Skip to content

Conversation

@yuwmao
Copy link
Contributor

@yuwmao yuwmao commented Jan 28, 2026

  • Implement on_pg_clean_replace_member_task callback which actually rollback the membership change
  • Add a reconcile_membership API which is used to correct the existing inconsistency problem.

Rely on eBay/HomeStore#856

- Implement on_pg_clean_replace_member_task callback which actually rollback the membership change
- Add a reconcile_membership API which is used to correct the existing inconsistency problem.
@codecov-commenter
Copy link

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

Codecov Report

❌ Patch coverage is 0% with 72 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.86%. Comparing base (1746bcc) to head (aff362e).
⚠️ Report is 147 commits behind head on main.

Files with missing lines Patch % Lines
src/lib/homestore_backend/hs_pg_manager.cpp 0.00% 52 Missing ⚠️
src/lib/homestore_backend/hs_http_manager.cpp 0.00% 18 Missing ⚠️
...ib/homestore_backend/replication_state_machine.cpp 0.00% 2 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #386      +/-   ##
==========================================
- Coverage   63.15%   55.86%   -7.29%     
==========================================
  Files          32       35       +3     
  Lines        1900     4942    +3042     
  Branches      204      625     +421     
==========================================
+ Hits         1200     2761    +1561     
- Misses        600     1888    +1288     
- Partials      100      293     +193     

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

@yuwmao yuwmao marked this pull request as ready for review January 30, 2026 00:28
Copy link
Collaborator

@JacksonYao287 JacksonYao287 left a comment

Choose a reason for hiding this comment

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

LGTM

const replica_member_info& member_out,
const replica_member_info& member_in, trace_id_t tid) {
std::unique_lock lck(_pg_lock);
for (const auto& iter : _pg_map) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit, suggest using get_pg_id_with_group_id instead of a loop here

Copy link
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.

We have 4 similar API hook functions

  1. on_pg_start_replace_member
  2. on_pg_complete_replace_member
  3. reconcile_membership
  4. on_pg_clean_replace_member_task

all of them are trying to maintain the PG superblok in sync with actual raft membership.

So which layer maintain the source of truth ? It seems to me like the HS is the source of truth as in PG creation the PG superblock is the last one get written , pg move also sharing similar pattern.

If HS is the source of truth , can we consolidate all the API into "update_membership" ?

API hooks can still there, just trying to avoid PG superblk manage code is written several times

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