Issue: avoid log reply for graceful restart #146
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please refer to HomeStore PR: eBay/HomeStore#827 for details:
Problem Statement:
Replying logs on a graceful shutdown is unnecessary and will slow down the speed for HomeBlks/HomeStore opening up IO traffic unnecessarily. When HomeBlks/HomeStore is being gracefully shutdown, we want to avoid log replay on the next recovery boot.
Solution:
Add check in solo repl dev on_log_found to avoid replying the log if the lsn is already committed and cp-flushed.
Add assert in HomeBlks (PR in a different repo) that for a graceful shutdown, no log reply should happen.
Testing:
Without the fix, running below command will fail on restart boot (because of a known race that is being fixed, which is not relavant in this PR, the fix for that issue is being worked on) consistently.
With the fix, it could pass, and we can verify there is no log reply happened.
./Debug/src/lib/volume/tests/test_volume_io --gtest_filter=VolumeIOTest.LongRunningRandomIO --num_restarts=4 --num_vols=32 --write_num_io=300 --read_num_io=300 --dev_size_mb=1024000 --run_time=300I am running longer hours with --num_restarts setting to 200 and --write_num_io=999999 for more aggressive testing.