diff --git a/fdbserver/LogSystemPeekCursor.actor.cpp b/fdbserver/LogSystemPeekCursor.actor.cpp index fd300a85ef..4e9d6411f3 100644 --- a/fdbserver/LogSystemPeekCursor.actor.cpp +++ b/fdbserver/LogSystemPeekCursor.actor.cpp @@ -480,8 +480,7 @@ bool ILogSystem::MergedPeekCursor::isActive() { } bool ILogSystem::MergedPeekCursor::isExhausted() { - ASSERT(false); - return false; + return serverCursors[currentCursor]->isExhausted(); } LogMessageVersion ILogSystem::MergedPeekCursor::version() { return messageVersion; } @@ -755,8 +754,7 @@ bool ILogSystem::SetPeekCursor::isActive() { } bool ILogSystem::SetPeekCursor::isExhausted() { - ASSERT(false); - return false; + return serverCursors[currentSet][currentCursor]->isExhausted(); } LogMessageVersion ILogSystem::SetPeekCursor::version() { return messageVersion; } @@ -836,7 +834,7 @@ bool ILogSystem::MultiCursor::isActive() { } bool ILogSystem::MultiCursor::isExhausted() { - return cursors.back()->isActive(); + return cursors.back()->isExhausted(); } LogMessageVersion ILogSystem::MultiCursor::version() { diff --git a/fdbserver/storageserver.actor.cpp b/fdbserver/storageserver.actor.cpp index eca0bb72a3..974fc6d787 100644 --- a/fdbserver/storageserver.actor.cpp +++ b/fdbserver/storageserver.actor.cpp @@ -2351,7 +2351,13 @@ ACTOR Future update( StorageServer* data, bool* pReceivedUpdate ) state Reference cursor = data->logCursor; //TraceEvent("SSUpdatePeeking", data->thisServerID).detail("MyVer", data->version.get()).detail("Epoch", data->updateEpoch).detail("Seq", data->updateSequence); - Void _ = wait( cursor->getMore() ); + + loop { + Void _ = wait( cursor->getMore() ); + if(!cursor->isExhausted()) { + break; + } + } if(cursor->popped() > 0) throw worker_removed();