1
0
mirror of https://github.com/google/leveldb.git synced 2025-04-25 14:00:27 +08:00
This commit is contained in:
Kezhu Wang 2025-02-27 20:04:38 +08:00 committed by GitHub
commit fc551b3db7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View File

@ -1012,6 +1012,7 @@ Status DBImpl::DoCompactionWork(CompactionState* compact) {
if (!status.ok()) {
break;
}
compact->compaction->RestartOverlappedBytes();
}
}

View File

@ -353,6 +353,10 @@ class Compaction {
// before processing "internal_key".
bool ShouldStopBefore(const Slice& internal_key);
// Reset overlapped bytes with grandparents. Should be called if we start
// building a new output for other reasons(eg. file size limitation).
void RestartOverlappedBytes() { overlapped_bytes_ = 0; }
// Release the input version for the compaction, once the compaction
// is successful.
void ReleaseInputs();