fix: buffered peek cursor would advance very slowly through large ranges of empty versions
This commit is contained in:
parent
7f4586ad49
commit
cfce1e1705
|
@ -60,7 +60,8 @@ public:
|
|||
}
|
||||
}
|
||||
}
|
||||
TraceEvent("PeekNextGetMore").detail("Queue", self->recoveryQueue.size()).detail("Bytes", bytes).detail("Loc", self->recoveryLoc).detail("End", self->logSystem->getEnd());
|
||||
TraceEvent("PeekNextGetMore").detail("Queue", self->recoveryQueue.size()).detail("Bytes", bytes).detail("Loc", self->recoveryLoc)
|
||||
.detail("End", self->logSystem->getEnd()).detail("HasMessage", self->cursor->hasMessage()).detail("Version", self->cursor->version().version);
|
||||
if(self->recoveryQueueDataSize == 0) {
|
||||
self->recoveryQueueLoc = self->recoveryLoc;
|
||||
}
|
||||
|
|
|
@ -1008,7 +1008,11 @@ ACTOR Future<Void> bufferedGetMore( ILogSystem::BufferedCursor* self, int taskID
|
|||
}
|
||||
self->messageIndex = 0;
|
||||
self->hasNextMessage = self->messages.size() > 0;
|
||||
self->messageVersion = LogMessageVersion(targetVersion);
|
||||
Version minVersion = self->end;
|
||||
for(auto& cursor : self->cursors) {
|
||||
minVersion = std::min(minVersion, cursor->version().version);
|
||||
}
|
||||
self->messageVersion = LogMessageVersion(minVersion);
|
||||
|
||||
if(self->collectTags) {
|
||||
self->combineMessages();
|
||||
|
|
|
@ -676,7 +676,7 @@ bool validateRange( StorageServer::VersionedData::ViewAtVersion const& view, Key
|
|||
// * Nonoverlapping: No clear overlaps a set or another clear, or adjoins another clear.
|
||||
// * Old mutations are erased: All items in versionedData.atLatest() have insertVersion() > durableVersion()
|
||||
|
||||
TraceEvent("ValidateRange", id).detail("KeyBegin", range.begin).detail("KeyEnd", range.end).detail("Version", version);
|
||||
//TraceEvent("ValidateRange", id).detail("KeyBegin", range.begin).detail("KeyEnd", range.end).detail("Version", version);
|
||||
KeyRef k;
|
||||
bool ok = true;
|
||||
bool kIsClear = false;
|
||||
|
|
Loading…
Reference in New Issue