qkc/slave 05: add MasterConn protocol layer - #37
Open
iteyelmp wants to merge 100 commits into
Open
Conversation
# Conflicts: # qkc/cluster/slave/compat_test.go
# Conflicts: # qkc/cluster/wire/messages_test.go
# Conflicts: # qkc/cluster/conn/base.go # qkc/cluster/conn/base_test.go
…ShardIDs are not set.
# Conflicts: # qkc/cluster/slave/xshard_conn.go # qkc/cluster/slave/xshard_pool.go # qkc/cluster/slave/xshard_test.go
qzhodl
reviewed
Sep 7, 2026
qzhodl
reviewed
Sep 7, 2026
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.
Add MasterConn: the slave-side master↔slave connection layer
Introduces
MasterConn, the slave-side TCP connection to the cluster master, built on the existingBaseConn.This PR establishes protocol compatibility, opcode registration, request dispatch, and handler delegation. Cluster business logic remains out of scope.
Scope
ClusterMetadataframing over TCP.DESTROY_CLUSTER_PEER_CONNECTION_COMMAND.SendAddMinorBlockHeaderSendAddMinorBlockHeaderListCommHandler(communication and topology orchestration);MasterHandler(business RPC handling).Not in Scope
Reviewer Notes
Handler boundary
ADD_ROOT_BLOCKintentionally goes throughCommHandlerrather thanMasterHandlerbecause applying the root block may activate new shards. This keeps the complete operation behind the same orchestration boundary as shard activation.The two shard-activation triggers are
PING(root_tip)andADD_ROOT_BLOCK(root_block).CREATE / DESTROY semantics
CREATE is a normal request/response RPC.
DESTROY is the sole non-RPC opcode.
Its serializer carries a placeholder
ResponseOpCode = 0only because the generic serializer registration requires one. The value is ignored for non-RPC opcodes and never appears on the wire.Full Codex 5.6 review completed.