qkc/slave 05: add MasterConn protocol layer - #37
Open
iteyelmp wants to merge 23 commits into
Open
Conversation
# Conflicts: # qkc/cluster/slave/compat_test.go
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's TCP connection to the cluster master, built on the existingBaseConn. This PR covers protocol compatibility and handler registration only; cluster business logic is intentionally deferred.Scope
ClusterMetadataframing over TCP (master↔slave).DESTROY_CLUSTER_PEER_CONNECTION_COMMANDnon-RPC opcode.SendAddMinorBlockHeader,SendAddMinorBlockHeaderList.MasterHandlerinterface; the service layer implements it later.Not in Scope
Reviewer notes
Handler boundary
MasterConn owns protocol framing, opcode dispatch, and connection-level
communication behavior.
PING has two responsibilities:
The handshake remains in MasterConn. RootTip processing is delegated through
MasterHandler because shard initialization/update is runtime behavior rather
than connection-layer behavior.
All other master-driven operations are delegated through MasterHandler. This
PR intentionally defines protocol wiring and dispatch only; business logic is
implemented in later PRs.
Create / Destroy semantics
CREATE is a normal RPC (request/response).
DESTROY is a fire-and-forget non-RPC command: rpc_id must be zero and no
response frame is written. It is registered via NonRPCOps; the placeholder
ResponseOpCode exists only for opcode registration consistency and is never
observed on the wire.
Full Codex 5.6 review completed.