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

fix(server): initialize replica acked lsn #2236

Merged
merged 2 commits into from
Nov 30, 2023
Merged

Conversation

adiholden
Copy link
Collaborator

fixes #2235

Signed-off-by: adi_holden <adi@dragonflydb.io>
@@ -46,7 +46,7 @@ struct FlowInfo {
DflyVersion version;

std::optional<LSN> start_partial_sync_at;
uint64_t last_acked_lsn;
uint64_t last_acked_lsn = 0;
Copy link
Collaborator

Choose a reason for hiding this comment

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

If it's possible to use this class before initialization, shouldn't we also initialize conn and version?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The version and the connection are initialized when the flow is actually created. The last_acked_lsn is set on the first ACK we get from the replica flow.
But yes we can initialize them anyway

kostasrim
kostasrim previously approved these changes Nov 30, 2023
Signed-off-by: adi_holden <adi@dragonflydb.io>
@adiholden adiholden merged commit 3acacf8 into main Nov 30, 2023
10 checks passed
@adiholden adiholden deleted the fix_master_crash_replica_lag branch November 30, 2023 20:16
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.

Crash in master
3 participants