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

Homeobject side graceful shutdown #254

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JacksonYao287
Copy link
Collaborator

this PR add counters to record the pending request and start shutdown homestore when no pending request

@JacksonYao287 JacksonYao287 changed the title Homeobject side graceful shutdwon Homeobject side graceful shutdown Jan 15, 2025
@codecov-commenter
Copy link

codecov-commenter commented Jan 15, 2025

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

Codecov Report

Attention: Patch coverage is 34.95146% with 67 lines in your changes missing coverage. Please review.

Project coverage is 61.03%. Comparing base (1746bcc) to head (023a31c).
Report is 35 commits behind head on main.

Files with missing lines Patch % Lines
src/lib/homestore_backend/hs_shard_manager.cpp 20.00% 28 Missing and 4 partials ⚠️
src/lib/homestore_backend/hs_blob_manager.cpp 26.47% 22 Missing and 3 partials ⚠️
src/lib/homestore_backend/hs_pg_manager.cpp 53.33% 5 Missing and 2 partials ⚠️
src/lib/homestore_backend/hs_homeobject.cpp 57.14% 2 Missing and 1 partial ⚠️

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #254      +/-   ##
==========================================
- Coverage   63.15%   61.03%   -2.13%     
==========================================
  Files          32       33       +1     
  Lines        1900     2564     +664     
  Branches      204      300      +96     
==========================================
+ Hits         1200     1565     +365     
- Misses        600      838     +238     
- Partials      100      161      +61     

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

start_shutting_down();
// Wait for all pending requests to complete
while (true) {
auto pending_reqs = get_pending_request_num();
Copy link
Collaborator

Choose a reason for hiding this comment

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

baseline resync be considered as HS or HO?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it will be considered as HS.

Homeobject side graceful shutdown will only make sure that when shutting down homeobject , there is no pending external (or user api) calls from upper layer and reject later api calls .

baseline resync is a mechanism of statemachin(raft), and all the baseline resync related code in homeobject is called by statemachine. homeobject can not do anything for this. so , we need to handle this in raft level (homestore).

i will try to submit another pr for homestore graceful shutdown.

@JacksonYao287 JacksonYao287 requested a review from yamingk January 17, 2025 08:56
@JacksonYao287
Copy link
Collaborator Author

this PR add counters to record the pending request and start shutdown
homestore when no pending request
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.

3 participants