Skip to content
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

Fix shutdown sequence with cp mgr. #272

Merged
merged 1 commit into from
Jan 12, 2024
Merged

Conversation

sanebay
Copy link
Contributor

@sanebay sanebay commented Jan 9, 2024

Add blocking cp flush in cp mgr shutdown. Added atomic to stop cp to trigger another cp.
Destroy in btree and index dont need cp context. As cp mgr already shutdown.
Shut the cp mgr first.
Test meta blk used directly calling meta service api's to simulate recovery, instead use homestore restart to simulate a recovery.

@sanebay sanebay force-pushed the cp_shutdown_fix branch 2 times, most recently from 4d10150 to 5ced47b Compare January 10, 2024 19:35
yamingk
yamingk previously approved these changes Jan 10, 2024
@yamingk yamingk requested a review from JacksonYao287 January 10, 2024 19:53
@sanebay sanebay force-pushed the cp_shutdown_fix branch 4 times, most recently from 32981f0 to 5ecde2e Compare January 12, 2024 03:32
@codecov-commenter
Copy link

codecov-commenter commented Jan 12, 2024

Codecov Report

Attention: 799 lines in your changes are missing coverage. Please review.

Comparison is base (9a91944) 68.21% compared to head (f4df532) 48.64%.
Report is 17 commits behind head on master.

Files Patch % Lines
src/lib/replication/repl_dev/raft_repl_dev.cpp 0.00% 251 Missing ⚠️
.../lib/replication/log_store/home_raft_log_store.cpp 0.00% 136 Missing ⚠️
src/lib/replication/service/raft_repl_service.cpp 0.00% 130 Missing ⚠️
...rc/lib/replication/repl_dev/raft_state_machine.cpp 0.00% 109 Missing ⚠️
src/include/homestore/superblk_handler.hpp 17.64% 28 Missing ⚠️
src/lib/replication/log_store/repl_log_store.cpp 0.00% 28 Missing ⚠️
src/lib/replication/service/generic_repl_svc.cpp 73.33% 15 Missing and 5 partials ⚠️
src/lib/replication/repl_dev/common.cpp 20.83% 17 Missing and 2 partials ⚠️
src/include/homestore/btree/detail/varlen_node.hpp 56.52% 8 Missing and 2 partials ⚠️
src/lib/meta/meta_blk_service.cpp 37.50% 10 Missing ⚠️
... and 21 more

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

Additional details and impacted files
@@             Coverage Diff             @@
##           master     #272       +/-   ##
===========================================
- Coverage   68.21%   48.64%   -19.58%     
===========================================
  Files          96      111       +15     
  Lines        8016     8764      +748     
  Branches     1041     1126       +85     
===========================================
- Hits         5468     4263     -1205     
- Misses       2033     4157     +2124     
+ Partials      515      344      -171     

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

@sanebay sanebay force-pushed the cp_shutdown_fix branch 2 times, most recently from 10f173c to a3cb512 Compare January 12, 2024 18:36
Add blocking cp flush in cp mgr shutdown. Added atomic to stop cp to
trigger another cp. Destroy in btree and index dont need cp context.
As cp mgr already shutdown, shut the cp mgr first.
Test meta blk used directly calling meta service api's to simulate
recovery, instead use homestore restart to simulate a recovery.
@sanebay sanebay merged commit 92b9dfe into eBay:master Jan 12, 2024
20 checks passed
@sanebay sanebay deleted the cp_shutdown_fix branch January 12, 2024 21:25
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