diff --git a/fdbserver/VersionedBTree.actor.cpp b/fdbserver/VersionedBTree.actor.cpp index 40a7763c2c..26da92f01c 100644 --- a/fdbserver/VersionedBTree.actor.cpp +++ b/fdbserver/VersionedBTree.actor.cpp @@ -1837,6 +1837,7 @@ public: state Version minStopVersion = cutoff.version - (BUGGIFY ? deterministicRandom()->randomInt(0, 10) : (self->remapCleanupWindow * SERVER_KNOBS->REDWOOD_REMAP_CLEANUP_LAG)); self->remapDestinationsSimOnly.clear(); + state int sinceYield = 0; loop { state Optional p = wait(self->remapQueue.pop(cutoff)); debug_printf("DWALPager(%s) remapCleanup popped %s\n", self->filename.c_str(), ::toString(p).c_str()); @@ -1855,6 +1856,11 @@ public: if (self->remapCleanupStop && p.get().version >= minStopVersion) { break; } + + if(++sinceYield >= 100) { + sinceYield = 0; + wait(yield()); + } } debug_printf("DWALPager(%s) remapCleanup stopped (stop=%d)\n", self->filename.c_str(), self->remapCleanupStop);