From 9a585a301265b53dd96da9a155febf71a6c1bfd3 Mon Sep 17 00:00:00 2001 From: Alex Rousskov Date: Mon, 26 Sep 2011 15:05:15 -0600 Subject: [PATCH] Initialize LastIo to avoid huge balance values that effectively disable disker by forcing it to ignore I/O requests for current_time seconds. --- src/DiskIO/IpcIo/IpcIoFile.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DiskIO/IpcIo/IpcIoFile.cc b/src/DiskIO/IpcIo/IpcIoFile.cc index 3bc587e51c..3bb2e83739 100644 --- a/src/DiskIO/IpcIo/IpcIoFile.cc +++ b/src/DiskIO/IpcIo/IpcIoFile.cc @@ -679,7 +679,7 @@ IpcIoFile::WaitBeforePop() return false; } - static timeval LastIo; + static timeval LastIo = current_time; const double ioDuration = 1.0 / maxRate; // ideal distance between two I/Os // do not accumulate more than 100ms or 100 I/Os, whichever is smaller -- 2.47.3