Skip to content

Fix solo repl dev log flush and graceful shutdown.#681

Merged
sanebay merged 1 commit into
eBay:masterfrom
sanebay:solo_repldev_fixes
Apr 9, 2025
Merged

Fix solo repl dev log flush and graceful shutdown.#681
sanebay merged 1 commit into
eBay:masterfrom
sanebay:solo_repldev_fixes

Conversation

@sanebay
Copy link
Copy Markdown
Contributor

@sanebay sanebay commented Apr 2, 2025

Add flush mode to logdev as nublocks uses timer,
nuobject uses explicit log flush mode. Flush mode has to be stored in superblk to support recovery. Enable solo repl dev UT. Add graceful shutdown for UT to work.

@sanebay sanebay force-pushed the solo_repldev_fixes branch 2 times, most recently from 71fc378 to a13759d Compare April 2, 2025 11:16
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 2, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 68.75000% with 15 lines in your changes missing coverage. Please review.

Project coverage is 67.17%. Comparing base (1a0cef8) to head (11bf9b9).
Report is 167 commits behind head on master.

Files with missing lines Patch % Lines
src/lib/replication/repl_dev/solo_repl_dev.cpp 44.44% 9 Missing and 1 partial ⚠️
src/lib/replication/service/generic_repl_svc.cpp 84.61% 1 Missing and 1 partial ⚠️
src/lib/logstore/log_dev.cpp 80.00% 0 Missing and 1 partial ⚠️
.../lib/replication/log_store/home_raft_log_store.cpp 66.66% 1 Missing ⚠️
src/lib/replication/repl_dev/solo_repl_dev.h 0.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           master     #681       +/-   ##
===========================================
+ Coverage   56.51%   67.17%   +10.66%     
===========================================
  Files         108      109        +1     
  Lines       10300    11428     +1128     
  Branches     1402     1566      +164     
===========================================
+ Hits         5821     7677     +1856     
+ Misses       3894     3001      -893     
- Partials      585      750      +165     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread src/lib/logstore/log_store_service.cpp
Comment thread src/lib/replication/log_store/home_raft_log_store.cpp
@yamingk
Copy link
Copy Markdown
Contributor

yamingk commented Apr 2, 2025

LGTM, except the comment around open_logdev to see if we can even simplify, thanks!
Let me know if it makes sense.

yamingk
yamingk previously approved these changes Apr 3, 2025
Copy link
Copy Markdown
Collaborator

@xiaoxichen xiaoxichen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am curious why the flush_mode needs to be persisted?

The flush mode controlled the flushing behavior when appending logs, once the log dev closed then re-opened, the previous flush_mode should not take any forward impact right? Meaning that nublox can use explicit then in one tick we change the config file to use timer, after a restart the timer can works and effect on new appending logs.

What is the benefit of remember "this log dev was created with explicit flushing" ?

And if we believe there is a racing between logdev_superblk_found and open_logdev, then there is a ambiguity whether the mode provided by open_logdev take effect, or the mode in sb take effect.

Add flush mode to logdev as nublocks uses timer,
nuobject uses explicit log flush mode. Flush mode has
to be stored in superblk to support recovery. Enable solo repl dev UT.
Add graceful shutdown for UT to work.
@sanebay
Copy link
Copy Markdown
Contributor Author

sanebay commented Apr 9, 2025

I am curious why the flush_mode needs to be persisted?

The flush mode controlled the flushing behavior when appending logs, once the log dev closed then re-opened, the previous flush_mode should not take any forward impact right? Meaning that nublox can use explicit then in one tick we change the config file to use timer, after a restart the timer can works and effect on new appending logs.

What is the benefit of remember "this log dev was created with explicit flushing" ?

And if we believe there is a racing between logdev_superblk_found and open_logdev, then there is a ambiguity whether the mode provided by open_logdev take effect, or the mode in sb take effect.

This is to support logdev_superblk_found to open logdev with flush mode.

@sanebay sanebay merged commit 9feabb3 into eBay:master Apr 9, 2025
21 checks passed
@sanebay sanebay deleted the solo_repldev_fixes branch April 9, 2025 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants