Commit Graph

38 Commits

Author SHA1 Message Date
Meng Xu 9670d64fbd FastRestore:Remove commented code 2019-12-11 16:48:40 -08:00
Meng Xu 1371db4cdc FastRestore:Self code review and cleanup
1. Review memory use cases and improve:
Ensure state varialble is initialized and
change unnecessary  state variable to variable.

2. Remove debug code that is no longer useful;

3. Mute verbose debug.
2019-12-11 16:37:33 -08:00
Meng Xu 4a66366a05 Use MutationsVec instead of VectorRef 2019-12-06 22:00:40 -08:00
Meng Xu 39a4f2372f Change FASTRESTORE_SAMPLING_PERCENT to 0 to 100 2019-12-04 21:26:27 -08:00
Meng Xu c6b36dbffb FastRestore:Sampling:Resolve review comments 2019-12-04 17:35:11 -08:00
Meng Xu a15320cca7 Merge branch 'master' into mengxu/fast-restore-sampling-PR 2019-12-03 21:42:01 -08:00
Meng Xu 3310f67e9e Merge branch 'mengxu/fast-restore-fix-valgrind-PR' into mengxu/fast-restore-sampling-PR 2019-12-03 16:24:40 -08:00
Meng Xu f153cadab9 ComplilationWarning:Fix actor that does not contain wait statement 2019-12-02 11:38:29 -08:00
Meng Xu 530b689299 Move state variable to the start of function 2019-11-26 11:17:59 -08:00
Meng Xu 3f5491318d FastRestore:Fix bug that cause nondeterminism
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.
2019-11-15 11:30:09 -08:00
Andrew Noyes de8921b660 Move RestoreWorkerInterface to fdbclient 2019-10-25 10:42:22 -07:00
Andrew Noyes d4de608bb6 Fix OPEN_FOR_IDE build 2019-10-25 10:42:22 -07:00
Meng Xu c2355f721e Merge branch 'master' into mengxu/performant-restore-PR 2019-09-04 17:11:42 -07:00
Meng Xu d160810662 FastRestore:Resolve review comments 2019-09-04 16:48:43 -07:00
Meng Xu 9cc832cfd6 FastRestore:Fix Mac and Windows compilation error 2019-08-02 14:33:08 -07:00
Meng Xu 3b54363780 FastRestore:Apply Clang-format 2019-08-01 18:09:12 -07:00
Meng Xu b0c31f28af FastRestore:Fix bug that blocks restore
1) Should recruit only configured number of roles;
2) Should never register a restore master interface as a restore worker (loader or applier) interface.
2019-07-25 17:55:37 -07:00
Meng Xu 45083edf74 Merge branch 'master' into mengxu/performant-restore-PR
Fix conflicts as well.
2019-07-25 10:46:11 -07:00
Meng Xu 701676dbd2 FastRestore:Refactor code and add missing files
Add RestoreWorker.actor.cpp and RestoreWorkerInterface.actor.h back.
2019-06-18 09:54:27 -07:00
Meng Xu 477fd152c0 FastRestore:Refactor code
1) Use the runRYWTransaction for simple DB access
2) Replace some printf with TraceEvent
3) Remove printf not used in debugging
4) Avoid wait inside the condition in loop-choose-when for
   the core routine of restore worker, loader and applier.
5) Rename Restore.actor.cpp to RestoreWorker.actor.cpp since
   the file only has functionalities related to restore worker.

Passed correctness test
2019-06-04 11:22:47 -07:00
Meng Xu fac63a83c4 FastRestore:Use NotifiedVersion to deduplicate requests
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.
2019-05-22 22:09:54 -07:00
Meng Xu f235bb7e0d FastRestore:Use readVersion to trigger watch
Use readVersion to trigger watch on the restoreRequestTriggerKey and
restoreRequestDoneKey.
2019-05-22 13:20:59 -07:00
Meng Xu 12817af03f FastRestore:Fix CMake compiling errors 2019-05-16 20:01:43 -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
Meng Xu 705b1d1538 FastRestore: Reduce the printf further
This help reduce the false positive in correctness.
2019-04-19 09:59:12 -07:00
Meng Xu 068ba2e082 FastRestore: Rename RestoreFile to RestoreFileFR to avoid weird running error
When two struct have the same name but never used in the same scope,
the compiler will NOT report any error in compilation, but
the program will arbitrarily choose one of the struct at the linker time,
and experience weird error in running time. The runtime error is caused by the
corrrupted memory when we assign a struct content to a different struct type.
2019-04-01 18:23:38 -07:00
Meng Xu d68c9ec09e FastRestore: Fix after merge with master 2019-03-31 22:07:37 -07:00
Meng Xu bed852436a Apply restore in version batches
Each version batch contains at least 0.01MB data
The version batch boundary cannot be within log file's version ranges

Must make sure workers (loaders and appliers) do not exit after applying one batch so that workers can keep working on the next version batch.

Make sure workers and master reset the global variable at the beginning of each version batch.
2019-01-17 17:30:25 -08:00
Meng Xu 2e2843366f Bugfix: clear the restoreRequestDoneKey may end in uncertain state
We need to retry to clear the key with the correct assumption that the key may have been cleared in the previous loop
2019-01-14 14:20:39 -08:00
Meng Xu b55236c0d9 Fix race condition in waiting for watch on trigger keys
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
2019-01-12 21:05:17 -08:00
Meng Xu d9268b54e8 fast restore: add data struct and assign role to nodes
add data structure to track the status of each node
add logic to let master node assign role to loader and applier
make sure the command request and reply is correct
2018-12-20 11:40:03 -08:00
Meng Xu bd88c75c7e avoid special character in trace event and mute some trace 2018-12-07 14:17:23 -08:00
Meng Xu bc18110693 Wip: why correctness fail but local runs 2018-12-05 10:07:43 -08:00
Meng Xu 8a000b181a Fix bug in extract kv from range file
We forgot to put the first kv in a range file into the global kvOps map.
This will cause us to miss restoring the first KV.
2018-12-04 15:10:55 -08:00
Meng Xu 80b2f75187 debug why restore did not restore the complete data 2018-12-03 19:29:17 -08:00
Meng Xu 1b085a9817 sequantial restore: pass 1 test case
-r simulation --logsize 1024MiB -f foundationdb/tests/fast/ParallelRestoreCorrectness.txt -b off -s 95208406
2018-12-03 10:57:30 -08:00
Meng Xu 796ea1cd6f Include Parallel restore into the workload 2018-11-27 15:32:10 -08:00
Meng Xu 66df43fbfb Create BackupAndParallelRestoreCorrectness for parallel restore
Copy BackupCorrectness workload to BackupAndParallelRestoreCorrectness workload
Reuse the existing backup and restore code.
The workload is running and can test the restore code.
Next step: Change the restore code to parallel restore code
2018-11-27 14:59:09 -08:00