-
Notifications
You must be signed in to change notification settings - Fork 15
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
Implement ReplicationStateMachine::write_snapshot_data #227
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## baseline_resync #227 +/- ##
==================================================
Coverage ? 51.53%
==================================================
Files ? 33
Lines ? 2053
Branches ? 236
==================================================
Hits ? 1058
Misses ? 906
Partials ? 89 ☔ View full report in Codecov by Sentry. |
ed3b7b3
to
133fe0b
Compare
|
||
const int64_t snp_lsn_{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't see this is being used expect for the check to reuse this handler instance. Can we remove this field and the check and always reuse this handler instance?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The follower may receive a new snapshot transmission request if the leader crashes or if the previous snapshot transmission times out. The current LSN is necessary for the follower to recognize such cases and discard the current handler instance.
3a7dff2
to
f96844f
Compare
Added several TODOs as reminders for suggestions mentioned in the comments. Further optimization & refactor will be posted within next PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
ca0735b
to
31512ba
Compare
ReplicationStateMachine::write_snapshot_data()
andSnapshotReceiveHandler
logiclocal_create_pg
,local_create_shard
andlocal_add_blob_info
for follower data creation