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

Implementation of follower-side snapshot transmission resumption #255

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

Conversation

koujl
Copy link
Contributor

@koujl koujl commented Jan 24, 2025

  • Introduced a new snp_rcvr_meta_blk to record snapshot receiving progress on the follower. Since the ReplicationStateMachine instance cannot be directly referenced, the superblock is added to the HS_PG struct to act as a broker.
  • Enabled the follower to request resumption from the beginning of a specific shard in write_snapshot_obj. Adjusted the cursor update handling logic to accommodate this scenario.
  • Added a new test case for restarting the follower with a shorter delay to test resumption without causing a leader timeout.

@codecov-commenter
Copy link

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

Codecov Report

Attention: Patch coverage is 38.63636% with 54 lines in your changes missing coverage. Please review.

Project coverage is 63.18%. Comparing base (1746bcc) to head (dd1726c).
Report is 35 commits behind head on main.

Files with missing lines Patch % Lines
...lib/homestore_backend/snapshot_receive_handler.cpp 37.50% 35 Missing ⚠️
...ib/homestore_backend/replication_state_machine.cpp 0.00% 13 Missing ⚠️
src/lib/homestore_backend/pg_blob_iterator.cpp 63.63% 0 Missing and 4 partials ⚠️
src/lib/homestore_backend/hs_homeobject.cpp 75.00% 1 Missing ⚠️
src/lib/homestore_backend/hs_homeobject.hpp 0.00% 1 Missing ⚠️

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #255      +/-   ##
==========================================
+ Coverage   63.15%   63.18%   +0.02%     
==========================================
  Files          32       33       +1     
  Lines        1900     2537     +637     
  Branches      204      299      +95     
==========================================
+ Hits         1200     1603     +403     
- Misses        600      771     +171     
- Partials      100      163      +63     

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

@zhiteng
Copy link

zhiteng commented Jan 26, 2025

The PR description should be in the commit message as well to reserve the context the change.

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