mirror of
https://github.com/google/leveldb.git
synced 2025-06-07 18:02:42 +08:00
Merge 27445141b2
into ac691084fd
This commit is contained in:
commit
fc551b3db7
@ -1012,6 +1012,7 @@ Status DBImpl::DoCompactionWork(CompactionState* compact) {
|
|||||||
if (!status.ok()) {
|
if (!status.ok()) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
compact->compaction->RestartOverlappedBytes();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -353,6 +353,10 @@ class Compaction {
|
|||||||
// before processing "internal_key".
|
// before processing "internal_key".
|
||||||
bool ShouldStopBefore(const Slice& 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
|
// Release the input version for the compaction, once the compaction
|
||||||
// is successful.
|
// is successful.
|
||||||
void ReleaseInputs();
|
void ReleaseInputs();
|
||||||
|
Loading…
Reference in New Issue
Block a user