-
Notifications
You must be signed in to change notification settings - Fork 24
[Solo Repl Dev] Issue xxxx: Avoid log reply on graceful shutdown of HomeStore #827
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #827 +/- ##
==========================================
- Coverage 56.51% 49.61% -6.91%
==========================================
Files 108 110 +2
Lines 10300 11308 +1008
Branches 1402 5327 +3925
==========================================
- Hits 5821 5610 -211
+ Misses 3894 2085 -1809
- Partials 585 3613 +3028 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
sanebay
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
| HS_REL_ASSERT_EQ(entry->major_version, repl_journal_entry::JOURNAL_ENTRY_MAJOR, | ||
| "Mismatched version of journal entry found"); | ||
| // HS_LOG(DEBUG, solorepl, "SoloReplDev found journal entry at lsn={}", lsn); | ||
| LOGINFO("SoloReplDev log replay found journal entry at lsn={}", lsn); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DEBUG LOG ?
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 eBay/HomeBlocks#146) that for a graceful shutdown, no log reply should happen.
Also fixed one issue in log truncation that we should set in-memory-only to false.
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.