From 419a187ee8c11b9deb226f83ffc5b35291708d9c Mon Sep 17 00:00:00 2001 From: Chaoguang Lin Date: Tue, 28 Jul 2020 13:20:13 -0700 Subject: [PATCH] reinitilize specialKeySpaceWriteMap in resertRyow() --- fdbclient/ReadYourWrites.actor.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fdbclient/ReadYourWrites.actor.cpp b/fdbclient/ReadYourWrites.actor.cpp index 5c08645d48..6cce081dec 100644 --- a/fdbclient/ReadYourWrites.actor.cpp +++ b/fdbclient/ReadYourWrites.actor.cpp @@ -2098,7 +2098,7 @@ ReadYourWritesTransaction::ReadYourWritesTransaction(ReadYourWritesTransaction&& nativeReadRanges = std::move(r.nativeReadRanges); nativeWriteRanges = std::move(r.nativeWriteRanges); versionStampKeys = std::move(r.versionStampKeys); - specialKeySpaceWriteMap = std::move(r.specialKeySpaceWriteMap); // TODO: Check why copy constructor is deleted + specialKeySpaceWriteMap = std::move(r.specialKeySpaceWriteMap); } Future ReadYourWritesTransaction::onError(Error const& e) { @@ -2136,8 +2136,9 @@ void ReadYourWritesTransaction::resetRyow() { versionStampKeys = VectorRef(); nativeReadRanges = Standalone>(); nativeWriteRanges = Standalone>(); - specialKeySpaceWriteMap.rawErase(specialKeys); // TODO : add a reset() for KeyRangeMap - specialKeySpaceErrorMsg.reset(); // Shoule we clear it every time? + specialKeySpaceWriteMap = + KeyRangeMap>>(std::make_pair(false, Optional()), specialKeys.end); + specialKeySpaceErrorMsg.reset(); watchMap.clear(); reading = AndFuture(); approximateSize = 0;