FastRestore:Applier:Handle CompareAndClear atomicOp
This commit is contained in:
parent
58dad5373b
commit
b1b44d4477
|
@ -779,7 +779,7 @@ ACTOR static Future<Void> handleApplyToDBRequest(RestoreVersionBatchRequest req,
|
|||
}
|
||||
|
||||
// Copy from WriteDuringRead.actor.cpp with small modifications
|
||||
// Not all AtomicOps are handled in this function: SetVersionstampedKey, SetVersionstampedValue,
|
||||
// Not all AtomicOps are handled in this function: SetVersionstampedKey, SetVersionstampedValue, and CompareAndClear
|
||||
Value applyAtomicOp(Optional<StringRef> existingValue, Value value, MutationRef::Type type) {
|
||||
Arena arena;
|
||||
if (type == MutationRef::AddValue)
|
||||
|
|
|
@ -117,7 +117,8 @@ struct StagingKey {
|
|||
}
|
||||
for (auto& mutation : lb->second) {
|
||||
if (type == MutationRef::CompareAndClear) { // Special atomicOp
|
||||
Optional<Value> retVal = doCompareAndClear(existingValue, value, arena);
|
||||
Arena arena;
|
||||
Optional<ValueRef> retVal = doCompareAndClear(val, mutation.param2, arena);
|
||||
if (!retVal.present()) {
|
||||
val = key;
|
||||
type = MutationRef::ClearRange;
|
||||
|
|
Loading…
Reference in New Issue