Skip to content

Homeobject side graceful shutdown#254

Merged
JacksonYao287 merged 2 commits intoeBay:mainfrom
JacksonYao287:graceful-shutdown
Mar 6, 2025
Merged

Homeobject side graceful shutdown#254
JacksonYao287 merged 2 commits intoeBay:mainfrom
JacksonYao287:graceful-shutdown

Conversation

@JacksonYao287
Copy link
Copy Markdown
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
Copy Markdown

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 32.67327% with 68 lines in your changes missing coverage. Please review.

Project coverage is 61.24%. Comparing base (1746bcc) to head (df3afe9).
Report is 45 commits behind head on main.

Files with missing lines Patch % Lines
src/lib/homestore_backend/hs_shard_manager.cpp 15.62% 25 Missing and 2 partials ⚠️
src/lib/homestore_backend/hs_blob_manager.cpp 29.03% 19 Missing and 3 partials ⚠️
src/lib/homestore_backend/hs_pg_manager.cpp 33.33% 12 Missing and 4 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.24%   -1.92%     
==========================================
  Files          32       33       +1     
  Lines        1900     2722     +822     
  Branches      204      330     +126     
==========================================
+ Hits         1200     1667     +467     
- Misses        600      880     +280     
- Partials      100      175      +75     

☔ 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.

start_shutting_down();
// Wait for all pending requests to complete
while (true) {
auto pending_reqs = get_pending_request_num();
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Collaborator Author

@JacksonYao287 JacksonYao287 requested a review from szmyd February 7, 2025 03:25
@JacksonYao287 JacksonYao287 force-pushed the graceful-shutdown branch 2 times, most recently from ec3e0bf to 8f6e0ab Compare March 6, 2025 07:23
this PR add counters to record the pending request and start shutdown
homestore when no pending request
@JacksonYao287 JacksonYao287 requested a review from xiaoxichen March 6, 2025 11:43
@JacksonYao287 JacksonYao287 merged commit e0e1b61 into eBay:main Mar 6, 2025
25 checks passed
@JacksonYao287 JacksonYao287 deleted the graceful-shutdown branch March 6, 2025 13:31
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