diff --git a/fdbserver/RestoreApplier.actor.cpp b/fdbserver/RestoreApplier.actor.cpp index 1fa8787531..373d227b21 100644 --- a/fdbserver/RestoreApplier.actor.cpp +++ b/fdbserver/RestoreApplier.actor.cpp @@ -779,7 +779,7 @@ ACTOR static Future 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 existingValue, Value value, MutationRef::Type type) { Arena arena; if (type == MutationRef::AddValue) diff --git a/fdbserver/RestoreApplier.actor.h b/fdbserver/RestoreApplier.actor.h index e83f3298d2..241d09bc4b 100644 --- a/fdbserver/RestoreApplier.actor.h +++ b/fdbserver/RestoreApplier.actor.h @@ -117,7 +117,8 @@ struct StagingKey { } for (auto& mutation : lb->second) { if (type == MutationRef::CompareAndClear) { // Special atomicOp - Optional retVal = doCompareAndClear(existingValue, value, arena); + Arena arena; + Optional retVal = doCompareAndClear(val, mutation.param2, arena); if (!retVal.present()) { val = key; type = MutationRef::ClearRange;