fix(gateway): enable cluster sync without requiring BOOTNODE_URL#574
Merged
fix(gateway): enable cluster sync without requiring BOOTNODE_URL#574
Conversation
Previously, SYNC_ENABLED was tied to BOOTNODE_URL being set, creating a chicken-and-egg problem: the first node in a cluster had no bootnode to point to, so sync was disabled entirely. Now sync is enabled whenever NODE_ID > 0. Peer auto-discovery works via incoming sync connections — when another node syncs to us, WaveKV's handle_sync automatically adds the sender as a peer. BOOTNODE_URL remains optional for speeding up initial discovery.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SYNC_ENABLEDwas previously tied toBOOTNODE_URLbeing set, so the first node in a cluster could never enable syncNODE_ID > 0, and peers are auto-discovered via incoming sync connections (WaveKV'shandle_syncadds the sender as a peer)BOOTNODE_URLremains optional — it speeds up initial discovery but is no longer requiredTest plan
NODE_ID=1and noBOOTNODE_URL→ verify sync is enabledNODE_ID=2andBOOTNODE_URLpointing to gateway-1 → verify both nodes discover each other and sync