I ran this command in my build directory after compiling with
OPEN_FOR_IDE. It took a few small tweaks to get it to compile, which is
outside the scope of this commit.
$ python run-clang-tidy.py -j $(nproc) -checks='-*,performance-inefficient-vector-operation' -fix
1) Use map iterator instead of pointer to maintain stability when map is inserted or deleted
2) dummySampleWorkload: clear rangeToApplier data in each sampling phase. otherwise, we can
have an increasing number of keys assigned to the applier.
Add a NotifiedVersion into an applier data which represents
the smallest version the applier is at.
When a loader sends mutation vector to appliers, it sends
the request that contains prevVersion and commitVersion.
This commits also put actor into an actorCollector for
loop-choose-when situation.
Add .h and .cpp files for RestoreLoader and RestoreApplier roles.
We will split the code for each restore role into a separate file.
This commit also fixes the bug in including RestoreCommon.actor.h, and
remove the unused code.
We use watch to let processes know if the restore request is ready and if the restore has been finished.
When we setup the watch and wait on the watch on a key, we ASSUME that the key has not been set yet.
However, under certain situations (e.g., the restore is fast and the restore request agent is slow), the trigger key may have been set before we wait on the watch.
Without handling this situation, the system will stuck in waiting on the watch.
To solve this situation, we need to check the existance of the key (the watch is on) before we wait on the watch