Commit Graph

157 Commits

Author SHA1 Message Date
Meng Xu 48e7897c9a FastRestore: RestoreLoader: Unify parsing range file
Handle the request of parsing range files in the same function for
both sampling phase and loading phase.
2019-05-12 23:15:58 -07:00
Meng Xu fd92ab64e4 FastRestore: Clean code for RestoreApplier
Remove unused code and add comments to actors
2019-05-12 22:05:55 -07:00
Meng Xu 620cdd411e FastRestore:Add comments for each restore file 2019-05-12 21:53:43 -07:00
Meng Xu 32c030b7d6 FastRestore: Clear RestoreRole key in DB at finishRestore
This commit is the one that passes correctness tests after
refactoring the fast restore.
2019-05-11 22:25:36 -07:00
Meng Xu 879bf8dc7b FastRestore: Bug fix for refactored code 2019-05-10 16:48:01 -07:00
Meng Xu a08a6776f5 FastRestore: Refactor to smaller components
The current code uses one restore interface to handle the work
for all restore roles, i.e., master, loader and applier.
This makes it harder to review or maintain or scale.

This commit split the restore into multiple roles by mimicing FDB
transaction system:
1) It uses a RestoreWorker as the process to host restore roles;
   This commit assumes one restore role per RestoreWorker; but
   it should be easy to extend to support multiple roles per RestoreWorker;
2) It creates 3 restore roles:
   RestoreMaster: Coordinate the restore process and send commands to the other two roles;
   RestoreLoader: Parse backup files to mutations and send mutations to appliers;
   RestoreApplier: Sort received mutations and apply them to DB in order.

Compilable version. To be tested in correctness.
2019-05-10 14:20:06 -07:00
Meng Xu 25c75f4222 FastRestore: Add new empty files for restore roles
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.
2019-05-06 16:59:41 -07:00