Skip to content

Commit

Permalink
MB-53920: Rename NeedsRecovery into HighAndNeedsRecovery
Browse files Browse the repository at this point in the history
In preparation for introducing the CheckpointMemoryState::High entry,
which will indicate a state where the overall checkpoint allocation in
the system is high but we don't want to trigger mem-recovery from CM.

Change-Id: I81cc7ac6bdc988114806a10a460b5d7cbdbed186
Reviewed-on: https://review.couchbase.org/c/kv_engine/+/181048
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>
  • Loading branch information
paolococchi authored and daverigby committed Nov 4, 2022
1 parent c10d55c commit e8a2a0d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions engines/ep/src/kv_bucket.cc
Expand Up @@ -2989,7 +2989,7 @@ KVBucket::CheckpointMemoryState KVBucket::getCheckpointMemoryState() const {
if (usage < recoveryThreshold) {
return CheckpointMemoryState::Available;
} else if (usage < checkpointQuota) {
return CheckpointMemoryState::NeedsRecovery;
return CheckpointMemoryState::HighAndNeedsRecovery;
} else {
return CheckpointMemoryState::Full;
}
Expand All @@ -3002,7 +3002,7 @@ KVBucket::CheckpointMemoryState KVBucket::verifyCheckpointMemoryState() {
switch (state) {
case CheckpointMemoryState::Available:
break;
case CheckpointMemoryState::NeedsRecovery:
case CheckpointMemoryState::HighAndNeedsRecovery:
case CheckpointMemoryState::Full:
wakeUpCheckpointMemRecoveryTask();
break;
Expand Down
2 changes: 1 addition & 1 deletion engines/ep/src/kv_bucket.h
Expand Up @@ -866,7 +866,7 @@ class KVBucket : public KVBucketIface {

enum class CheckpointMemoryState : uint8_t {
Available,
NeedsRecovery,
HighAndNeedsRecovery,
Full
};

Expand Down

0 comments on commit e8a2a0d

Please sign in to comment.