From da7249ed1c056421c2e3017a9a5d97aa8de0f7ed Mon Sep 17 00:00:00 2001 From: Meng Xu Date: Thu, 2 Apr 2020 11:15:22 -0700 Subject: [PATCH] FastRestore:Minor revision based on review comments --- fdbserver/RestoreLoader.actor.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fdbserver/RestoreLoader.actor.cpp b/fdbserver/RestoreLoader.actor.cpp index bf7bd1c3ff..90be2dbd43 100644 --- a/fdbserver/RestoreLoader.actor.cpp +++ b/fdbserver/RestoreLoader.actor.cpp @@ -896,7 +896,7 @@ TEST_CASE("/FastRestore/RestoreLoader/splitMutation") { // Prepare RangeToApplier rangeToApplier.emplace(normalKeys.begin, deterministicRandom()->randomUniqueID()); - int numAppliers = deterministicRandom()->randomInt(0, 50); + int numAppliers = deterministicRandom()->randomInt(1, 50); for (int i = 0; i < numAppliers; ++i) { Key k = Key(deterministicRandom()->randomAlphaNumeric(deterministicRandom()->randomInt(1, 1000))); UID node = deterministicRandom()->randomUniqueID(); @@ -916,8 +916,7 @@ TEST_CASE("/FastRestore/RestoreLoader/splitMutation") { // Method 2: Use intersection KeyRangeMap krMap; std::map::iterator beginKey = rangeToApplier.begin(); - std::map::iterator endKey = beginKey; - endKey++; + std::map::iterator endKey = std::next(beginKey, 1); while (endKey != rangeToApplier.end()) { TraceEvent("KeyRangeMap") .detail("BeginKey", beginKey->first)