Skip to content

statement-store: defer statement protocol connections during major sync#11487

Draft
DenzelPenzel wants to merge 1 commit intomasterfrom
denzelpenzel/statement-store-loss-during-major-sync
Draft

statement-store: defer statement protocol connections during major sync#11487
DenzelPenzel wants to merge 1 commit intomasterfrom
denzelpenzel/statement-store-loss-during-major-sync

Conversation

@DenzelPenzel
Copy link
Contributor

Description

Nodes drop all statements received from peers during major sync because of the is_major_syncing() guard.

  • Fixes permanent statement loss during major sync by deferring statement protocol connections until sync completes
  • When major sync starts, disconnects all statement protocol peers
  • When major sync ends, reconnects all peers

@DenzelPenzel DenzelPenzel requested a review from alexggh March 24, 2026 22:01
},
SyncEvent::PeerDisconnected(remote) => {
self.deferred_peers.retain(|(p, _)| *p != remote);
let result = self.network.remove_peers_from_reserved_set(
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this function actually disconnecting the nodes ? As far as I know they just get remove from reserved set but it does not mean they get disconnected.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if reserved_only = true -> remove_peers_from_reserved_set does disconnect

reserved_only: set_config.non_reserved_mode.is_reserved_only(),

SS setup the NonReservedPeerMode::Deny at protocol creation

@DenzelPenzel DenzelPenzel marked this pull request as draft March 25, 2026 10:14
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.

2 participants