mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 10:07:28 +01:00
Completes the T4a-5.0 §8C.3 Discovery Bridge resolution (Option
P-refined, landed per architect + QA round-19). Extends the
AssignmentFact wire with master-minted peer set + monotonic
generation, adds a separate host-only decode path that does NOT
touch AssignmentInfo (preserves the TestNoOtherAssignment
InfoConstruction AST fence), and wires Host.streamOnce to drive
ReplicationVolume.UpdateReplicaSet after every self-replica
AssignmentFact.
Guardrails (all four from round-19) honored:
1. decodeAssignmentFact unchanged; AST fence stays green.
2. decodeReplicaTargets is SEPARATE and produces replication.
ReplicaTarget + generation, never AssignmentInfo. Adapter +
engine packages: zero changes.
3. Peer set is master-minted only. Host does NOT accumulate or
derive from other-replica facts (option R rejected).
4. peer_set_generation mandatory on the wire; monotonic guard in
ReplicationVolume.UpdateReplicaSet.
Changes:
core/rpc/proto/control.proto
NEW message ReplicaDescriptor{replica_id, epoch, endpoint_
version, data_addr, ctrl_addr}. AssignmentFact gains
`repeated ReplicaDescriptor peers = 7` (excludes self) and
`uint64 peer_set_generation = 8` (monotonic, master-minted).
core/rpc/control/control.pb.go + control_grpc.pb.go
Regenerated via scripts/genproto.sh.
core/host/master/services.go
SubscribeAssignments fills fact.Peers via new collectPeers
helper (reads Publisher.LastPublished for each non-self slot
in the volume's accepted topology). Generation derived as
`(info.Epoch << 32) | info.EndpointVersion` — monotonic
because publisher's lex-dedupe upstream guarantees strictly-
increasing (Epoch, EV) pairs and Epoch/EV are durable authority
facts (survives master restart).
core/host/volume/subscribe.go
NEW decodeReplicaTargets(fact) ([]replication.ReplicaTarget,
uint64) — strict field-copy, same discipline as decode
AssignmentFact. Produces a different output type so the
AST fence TestNoOtherAssignmentInfoConstruction continues to
pass.
core/host/volume/host.go
Config gains `ReplicationVolume *replication.ReplicationVolume`
(nil = T0/observer-only; non-nil = T4a-5 production wire).
streamOnce self-replica branch calls UpdateReplicaSet(gen,
targets) AFTER adapter.OnAssignment. Non-blocking log on
error (best-effort; failure does not stop the assignment
stream).
core/replication/volume.go
UpdateReplicaSet signature break (QA option (a), no shim):
Before: UpdateReplicaSet(targets []ReplicaTarget) error
After: UpdateReplicaSet(generation uint64, targets []ReplicaTarget) error
Three-way generation rule (T4a-5.0 §9.4, QA corrected sw's
original MaxUint64 sentinel which would have one-way-poisoned
the monotonic guard):
- gen == 0: unversioned apply; peer map mutated;
lastAppliedGeneration NOT advanced. Test/fake-master only.
- gen > 0 && gen > lastApplied: apply + advance.
- gen > 0 && gen <= lastApplied: stale; peer map NOT mutated;
replayedGens counter increments; debug log emits peer-ID-
set delta (Q2 binding — IDs only, not full target structs).
Returns nil (idempotent replay is success).
Empty peer set (N → 0) flows through the same teardown path as
any N → M-1 removal. No special branch (Q3 binding).
New state: lastAppliedGeneration uint64 (mu-guarded);
replayedGens atomic.Uint64 (stats counter, private; public
Stats() deferred to T4-end observability pass).
New helpers (internal): peerIDSet, targetIDSet,
stringSetEqual, formatIDSet (deterministic brace-form
rendering of peer-ID sets for log diffs).
core/replication/volume_test.go
All 8 existing tests migrated to new signature with gen=0
(unversioned apply preserves previous functional semantics).
3 new tests (Q1/Q2/Q3 pins):
9. UpdateReplicaSet_Generation_MonotonicGuard — advance
through gens 1, 2, 3; stale replays at gen=2 and gen=3
(equal is stale); verify replayedGens counter; forward
progress at gen=4 works. Exercises Q2 differing-peers
path via the gen=2 replay with original r1+r2 set.
10. UpdateReplicaSet_GenerationZero_DoesNotAdvanceGuard —
gen=5 applied, gen=0 applied (peers mutated, last
Applied stays at 5), gen=3 rejected as stale. Pins the
correctness of the gen=0 rule vs. the original
MaxUint64 sentinel which would have failed this test.
11. UpdateReplicaSet_EmptyPeerSet_AppliesWithTeardown — Q3
binding three assertions: PeerCount=0 after empty
apply, all former peers' executor sessions invalidated,
next OnLocalWrite succeeds as zero-fanout no-op.
Verification: full 20-package repo suite green (core/host: 124s
including supersede_integration_test; core/host/volume: 31ms
confirming AST fence TestNoOtherAssignmentInfoConstruction still
passes; core/replication: all 17 tests green). G-2 tri-line godoc
on every new public surface.
Closes T4a-5.0 §8C.3 Discovery Bridge. Next: T4a-6 L2 subprocess
integration test.
1021 lines
38 KiB
Go
1021 lines
38 KiB
Go
// Master-volume control-plane RPC for the block system.
|
|
//
|
|
// Direction:
|
|
// volume -> master: ObservationService.ReportHeartbeat (unary)
|
|
// volume -> master: AssignmentService.SubscribeAssignments (server-streaming)
|
|
// operator -> master: EvidenceService.QueryVolumeStatus (unary, read-only)
|
|
//
|
|
// Boundary (T0 sketch §3 load-bearing):
|
|
// - no message carries an AssignmentAsk
|
|
// - no message field maps to Epoch / EndpointVersion as an INPUT from the volume side
|
|
// - Epoch / EndpointVersion appear only INSIDE AssignmentFact, which is master-minted and
|
|
// consumed by the volume read-only
|
|
// - AssignmentFact has NO Intent field; Intent lives on AssignmentAsk, internal to the
|
|
// authority package, and never crosses the wire
|
|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.27.1
|
|
// protoc v3.12.4
|
|
// source: control.proto
|
|
|
|
package control
|
|
|
|
import (
|
|
timestamp "github.com/golang/protobuf/ptypes/timestamp"
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
reflect "reflect"
|
|
sync "sync"
|
|
)
|
|
|
|
const (
|
|
// Verify that this generated code is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
)
|
|
|
|
// HeartbeatReport — volume -> master observation fact. Field set
|
|
// field-compatible with authority.HeartbeatMessage (P14 S4 wire).
|
|
// No authority-mutation fields of any kind.
|
|
type HeartbeatReport struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
ServerId string `protobuf:"bytes,1,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty"`
|
|
SentAt *timestamp.Timestamp `protobuf:"bytes,2,opt,name=sent_at,json=sentAt,proto3" json:"sent_at,omitempty"`
|
|
Reachable bool `protobuf:"varint,3,opt,name=reachable,proto3" json:"reachable,omitempty"`
|
|
Eligible bool `protobuf:"varint,4,opt,name=eligible,proto3" json:"eligible,omitempty"`
|
|
Slots []*HeartbeatSlot `protobuf:"bytes,5,rep,name=slots,proto3" json:"slots,omitempty"`
|
|
}
|
|
|
|
func (x *HeartbeatReport) Reset() {
|
|
*x = HeartbeatReport{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_control_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *HeartbeatReport) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*HeartbeatReport) ProtoMessage() {}
|
|
|
|
func (x *HeartbeatReport) ProtoReflect() protoreflect.Message {
|
|
mi := &file_control_proto_msgTypes[0]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use HeartbeatReport.ProtoReflect.Descriptor instead.
|
|
func (*HeartbeatReport) Descriptor() ([]byte, []int) {
|
|
return file_control_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *HeartbeatReport) GetServerId() string {
|
|
if x != nil {
|
|
return x.ServerId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *HeartbeatReport) GetSentAt() *timestamp.Timestamp {
|
|
if x != nil {
|
|
return x.SentAt
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *HeartbeatReport) GetReachable() bool {
|
|
if x != nil {
|
|
return x.Reachable
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *HeartbeatReport) GetEligible() bool {
|
|
if x != nil {
|
|
return x.Eligible
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *HeartbeatReport) GetSlots() []*HeartbeatSlot {
|
|
if x != nil {
|
|
return x.Slots
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// HeartbeatSlot — per-replica slot fact. local_role_claim is the
|
|
// V2-shaped "I think I am Primary/Candidate" flag, carried RAW;
|
|
// the observation layer may treat conflicting-primary as
|
|
// ReasonConflictingPrimaryClaim but NEVER treats it as authority.
|
|
type HeartbeatSlot struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"`
|
|
ReplicaId string `protobuf:"bytes,2,opt,name=replica_id,json=replicaId,proto3" json:"replica_id,omitempty"`
|
|
DataAddr string `protobuf:"bytes,3,opt,name=data_addr,json=dataAddr,proto3" json:"data_addr,omitempty"`
|
|
CtrlAddr string `protobuf:"bytes,4,opt,name=ctrl_addr,json=ctrlAddr,proto3" json:"ctrl_addr,omitempty"`
|
|
Reachable bool `protobuf:"varint,5,opt,name=reachable,proto3" json:"reachable,omitempty"`
|
|
ReadyForPrimary bool `protobuf:"varint,6,opt,name=ready_for_primary,json=readyForPrimary,proto3" json:"ready_for_primary,omitempty"`
|
|
Eligible bool `protobuf:"varint,7,opt,name=eligible,proto3" json:"eligible,omitempty"`
|
|
Withdrawn bool `protobuf:"varint,8,opt,name=withdrawn,proto3" json:"withdrawn,omitempty"`
|
|
EvidenceScore uint64 `protobuf:"varint,9,opt,name=evidence_score,json=evidenceScore,proto3" json:"evidence_score,omitempty"`
|
|
LocalRoleClaim uint32 `protobuf:"varint,10,opt,name=local_role_claim,json=localRoleClaim,proto3" json:"local_role_claim,omitempty"` // authority.LocalRoleClaim enum value
|
|
}
|
|
|
|
func (x *HeartbeatSlot) Reset() {
|
|
*x = HeartbeatSlot{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_control_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *HeartbeatSlot) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*HeartbeatSlot) ProtoMessage() {}
|
|
|
|
func (x *HeartbeatSlot) ProtoReflect() protoreflect.Message {
|
|
mi := &file_control_proto_msgTypes[1]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use HeartbeatSlot.ProtoReflect.Descriptor instead.
|
|
func (*HeartbeatSlot) Descriptor() ([]byte, []int) {
|
|
return file_control_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *HeartbeatSlot) GetVolumeId() string {
|
|
if x != nil {
|
|
return x.VolumeId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *HeartbeatSlot) GetReplicaId() string {
|
|
if x != nil {
|
|
return x.ReplicaId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *HeartbeatSlot) GetDataAddr() string {
|
|
if x != nil {
|
|
return x.DataAddr
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *HeartbeatSlot) GetCtrlAddr() string {
|
|
if x != nil {
|
|
return x.CtrlAddr
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *HeartbeatSlot) GetReachable() bool {
|
|
if x != nil {
|
|
return x.Reachable
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *HeartbeatSlot) GetReadyForPrimary() bool {
|
|
if x != nil {
|
|
return x.ReadyForPrimary
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *HeartbeatSlot) GetEligible() bool {
|
|
if x != nil {
|
|
return x.Eligible
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *HeartbeatSlot) GetWithdrawn() bool {
|
|
if x != nil {
|
|
return x.Withdrawn
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *HeartbeatSlot) GetEvidenceScore() uint64 {
|
|
if x != nil {
|
|
return x.EvidenceScore
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *HeartbeatSlot) GetLocalRoleClaim() uint32 {
|
|
if x != nil {
|
|
return x.LocalRoleClaim
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type HeartbeatAck struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
AcceptedAt *timestamp.Timestamp `protobuf:"bytes,1,opt,name=accepted_at,json=acceptedAt,proto3" json:"accepted_at,omitempty"`
|
|
Sequence uint64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"`
|
|
}
|
|
|
|
func (x *HeartbeatAck) Reset() {
|
|
*x = HeartbeatAck{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_control_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *HeartbeatAck) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*HeartbeatAck) ProtoMessage() {}
|
|
|
|
func (x *HeartbeatAck) ProtoReflect() protoreflect.Message {
|
|
mi := &file_control_proto_msgTypes[2]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use HeartbeatAck.ProtoReflect.Descriptor instead.
|
|
func (*HeartbeatAck) Descriptor() ([]byte, []int) {
|
|
return file_control_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
func (x *HeartbeatAck) GetAcceptedAt() *timestamp.Timestamp {
|
|
if x != nil {
|
|
return x.AcceptedAt
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *HeartbeatAck) GetSequence() uint64 {
|
|
if x != nil {
|
|
return x.Sequence
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type SubscribeRequest struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"`
|
|
ReplicaId string `protobuf:"bytes,2,opt,name=replica_id,json=replicaId,proto3" json:"replica_id,omitempty"`
|
|
ResumeEpoch uint64 `protobuf:"varint,3,opt,name=resume_epoch,json=resumeEpoch,proto3" json:"resume_epoch,omitempty"` // delivery hint only; does NOT influence authority
|
|
}
|
|
|
|
func (x *SubscribeRequest) Reset() {
|
|
*x = SubscribeRequest{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_control_proto_msgTypes[3]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *SubscribeRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*SubscribeRequest) ProtoMessage() {}
|
|
|
|
func (x *SubscribeRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_control_proto_msgTypes[3]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use SubscribeRequest.ProtoReflect.Descriptor instead.
|
|
func (*SubscribeRequest) Descriptor() ([]byte, []int) {
|
|
return file_control_proto_rawDescGZIP(), []int{3}
|
|
}
|
|
|
|
func (x *SubscribeRequest) GetVolumeId() string {
|
|
if x != nil {
|
|
return x.VolumeId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *SubscribeRequest) GetReplicaId() string {
|
|
if x != nil {
|
|
return x.ReplicaId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *SubscribeRequest) GetResumeEpoch() uint64 {
|
|
if x != nil {
|
|
return x.ResumeEpoch
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ReplicaDescriptor — one entry in an AssignmentFact.peers list.
|
|
// Carries the authoritative lineage + addressing for a single peer
|
|
// replica. Used by primary to configure its replication fan-out
|
|
// (see ReplicationVolume.UpdateReplicaSet). Master-minted; hosts
|
|
// MUST NOT construct or accumulate these from local observations
|
|
// (option R rejected in v3-phase-15-t4a-5-0-host-callback-discovery.md
|
|
// §9.5).
|
|
type ReplicaDescriptor struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
ReplicaId string `protobuf:"bytes,1,opt,name=replica_id,json=replicaId,proto3" json:"replica_id,omitempty"`
|
|
Epoch uint64 `protobuf:"varint,2,opt,name=epoch,proto3" json:"epoch,omitempty"`
|
|
EndpointVersion uint64 `protobuf:"varint,3,opt,name=endpoint_version,json=endpointVersion,proto3" json:"endpoint_version,omitempty"`
|
|
DataAddr string `protobuf:"bytes,4,opt,name=data_addr,json=dataAddr,proto3" json:"data_addr,omitempty"`
|
|
CtrlAddr string `protobuf:"bytes,5,opt,name=ctrl_addr,json=ctrlAddr,proto3" json:"ctrl_addr,omitempty"`
|
|
}
|
|
|
|
func (x *ReplicaDescriptor) Reset() {
|
|
*x = ReplicaDescriptor{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_control_proto_msgTypes[4]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *ReplicaDescriptor) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ReplicaDescriptor) ProtoMessage() {}
|
|
|
|
func (x *ReplicaDescriptor) ProtoReflect() protoreflect.Message {
|
|
mi := &file_control_proto_msgTypes[4]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ReplicaDescriptor.ProtoReflect.Descriptor instead.
|
|
func (*ReplicaDescriptor) Descriptor() ([]byte, []int) {
|
|
return file_control_proto_rawDescGZIP(), []int{4}
|
|
}
|
|
|
|
func (x *ReplicaDescriptor) GetReplicaId() string {
|
|
if x != nil {
|
|
return x.ReplicaId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ReplicaDescriptor) GetEpoch() uint64 {
|
|
if x != nil {
|
|
return x.Epoch
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *ReplicaDescriptor) GetEndpointVersion() uint64 {
|
|
if x != nil {
|
|
return x.EndpointVersion
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *ReplicaDescriptor) GetDataAddr() string {
|
|
if x != nil {
|
|
return x.DataAddr
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ReplicaDescriptor) GetCtrlAddr() string {
|
|
if x != nil {
|
|
return x.CtrlAddr
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// AssignmentFact — master-minted AssignmentInfo fact carried to a
|
|
// subscribed volume. Identity fields (1-6) mirror
|
|
// adapter.AssignmentInfo and MUST be decoded via the sole permitted
|
|
// site core/host/volume/subscribe.go:decodeAssignmentFact (guarded
|
|
// by the TestNoOtherAssignmentInfoConstruction AST fence).
|
|
//
|
|
// Peer-set fields (7-8) are consumed via a separate host-only
|
|
// decoder decodeReplicaTargets in the same file — they do NOT
|
|
// transit through AssignmentInfo or the adapter/engine layers
|
|
// (guardrail #2 of T4a-5.0 decision). This keeps the narrow
|
|
// identity-truth seam untouched while unlocking the primary-side
|
|
// replication fan-out that ReplicationVolume.UpdateReplicaSet needs.
|
|
type AssignmentFact struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"`
|
|
ReplicaId string `protobuf:"bytes,2,opt,name=replica_id,json=replicaId,proto3" json:"replica_id,omitempty"`
|
|
Epoch uint64 `protobuf:"varint,3,opt,name=epoch,proto3" json:"epoch,omitempty"`
|
|
EndpointVersion uint64 `protobuf:"varint,4,opt,name=endpoint_version,json=endpointVersion,proto3" json:"endpoint_version,omitempty"`
|
|
DataAddr string `protobuf:"bytes,5,opt,name=data_addr,json=dataAddr,proto3" json:"data_addr,omitempty"`
|
|
CtrlAddr string `protobuf:"bytes,6,opt,name=ctrl_addr,json=ctrlAddr,proto3" json:"ctrl_addr,omitempty"`
|
|
// peers — full authoritative peer set for this volume's current
|
|
// line. MAY be empty (legal: standalone / RF=1 / pre-peer
|
|
// bootstrap / operator-drained maintenance). self-replica is
|
|
// implicitly excluded from peers (the primary does not ship to
|
|
// itself).
|
|
Peers []*ReplicaDescriptor `protobuf:"bytes,7,rep,name=peers,proto3" json:"peers,omitempty"`
|
|
// peer_set_generation — monotonic per-volume counter minted by
|
|
// master. Production master MUST emit peer_set_generation >= 1.
|
|
// ReplicationVolume.UpdateReplicaSet uses this for stale-replay
|
|
// protection; fake-master / test harnesses MAY use 0 for
|
|
// unversioned apply (does not advance the monotonic guard).
|
|
PeerSetGeneration uint64 `protobuf:"varint,8,opt,name=peer_set_generation,json=peerSetGeneration,proto3" json:"peer_set_generation,omitempty"`
|
|
}
|
|
|
|
func (x *AssignmentFact) Reset() {
|
|
*x = AssignmentFact{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_control_proto_msgTypes[5]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *AssignmentFact) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*AssignmentFact) ProtoMessage() {}
|
|
|
|
func (x *AssignmentFact) ProtoReflect() protoreflect.Message {
|
|
mi := &file_control_proto_msgTypes[5]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use AssignmentFact.ProtoReflect.Descriptor instead.
|
|
func (*AssignmentFact) Descriptor() ([]byte, []int) {
|
|
return file_control_proto_rawDescGZIP(), []int{5}
|
|
}
|
|
|
|
func (x *AssignmentFact) GetVolumeId() string {
|
|
if x != nil {
|
|
return x.VolumeId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *AssignmentFact) GetReplicaId() string {
|
|
if x != nil {
|
|
return x.ReplicaId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *AssignmentFact) GetEpoch() uint64 {
|
|
if x != nil {
|
|
return x.Epoch
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *AssignmentFact) GetEndpointVersion() uint64 {
|
|
if x != nil {
|
|
return x.EndpointVersion
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *AssignmentFact) GetDataAddr() string {
|
|
if x != nil {
|
|
return x.DataAddr
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *AssignmentFact) GetCtrlAddr() string {
|
|
if x != nil {
|
|
return x.CtrlAddr
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *AssignmentFact) GetPeers() []*ReplicaDescriptor {
|
|
if x != nil {
|
|
return x.Peers
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *AssignmentFact) GetPeerSetGeneration() uint64 {
|
|
if x != nil {
|
|
return x.PeerSetGeneration
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type StatusRequest struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"`
|
|
}
|
|
|
|
func (x *StatusRequest) Reset() {
|
|
*x = StatusRequest{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_control_proto_msgTypes[6]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *StatusRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*StatusRequest) ProtoMessage() {}
|
|
|
|
func (x *StatusRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_control_proto_msgTypes[6]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead.
|
|
func (*StatusRequest) Descriptor() ([]byte, []int) {
|
|
return file_control_proto_rawDescGZIP(), []int{6}
|
|
}
|
|
|
|
func (x *StatusRequest) GetVolumeId() string {
|
|
if x != nil {
|
|
return x.VolumeId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// StatusResponse — operator read-only view. T0 surface is intentionally
|
|
// thin: publisher's current line + controller's per-volume evidence.
|
|
// Mode / fence / probe / session facts are G3/G4+ territory.
|
|
type StatusResponse struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"`
|
|
ReplicaId string `protobuf:"bytes,2,opt,name=replica_id,json=replicaId,proto3" json:"replica_id,omitempty"`
|
|
Epoch uint64 `protobuf:"varint,3,opt,name=epoch,proto3" json:"epoch,omitempty"`
|
|
EndpointVersion uint64 `protobuf:"varint,4,opt,name=endpoint_version,json=endpointVersion,proto3" json:"endpoint_version,omitempty"`
|
|
Assigned bool `protobuf:"varint,5,opt,name=assigned,proto3" json:"assigned,omitempty"`
|
|
LastUnsupportedReason string `protobuf:"bytes,6,opt,name=last_unsupported_reason,json=lastUnsupportedReason,proto3" json:"last_unsupported_reason,omitempty"`
|
|
LastConvergenceStuckAt string `protobuf:"bytes,7,opt,name=last_convergence_stuck_at,json=lastConvergenceStuckAt,proto3" json:"last_convergence_stuck_at,omitempty"`
|
|
}
|
|
|
|
func (x *StatusResponse) Reset() {
|
|
*x = StatusResponse{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_control_proto_msgTypes[7]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *StatusResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*StatusResponse) ProtoMessage() {}
|
|
|
|
func (x *StatusResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_control_proto_msgTypes[7]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use StatusResponse.ProtoReflect.Descriptor instead.
|
|
func (*StatusResponse) Descriptor() ([]byte, []int) {
|
|
return file_control_proto_rawDescGZIP(), []int{7}
|
|
}
|
|
|
|
func (x *StatusResponse) GetVolumeId() string {
|
|
if x != nil {
|
|
return x.VolumeId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *StatusResponse) GetReplicaId() string {
|
|
if x != nil {
|
|
return x.ReplicaId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *StatusResponse) GetEpoch() uint64 {
|
|
if x != nil {
|
|
return x.Epoch
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *StatusResponse) GetEndpointVersion() uint64 {
|
|
if x != nil {
|
|
return x.EndpointVersion
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *StatusResponse) GetAssigned() bool {
|
|
if x != nil {
|
|
return x.Assigned
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *StatusResponse) GetLastUnsupportedReason() string {
|
|
if x != nil {
|
|
return x.LastUnsupportedReason
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *StatusResponse) GetLastConvergenceStuckAt() string {
|
|
if x != nil {
|
|
return x.LastConvergenceStuckAt
|
|
}
|
|
return ""
|
|
}
|
|
|
|
var File_control_proto protoreflect.FileDescriptor
|
|
|
|
var file_control_proto_rawDesc = []byte{
|
|
0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
|
|
0x17, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b,
|
|
0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
|
|
0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74,
|
|
0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdb, 0x01, 0x0a, 0x0f, 0x48, 0x65,
|
|
0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1b, 0x0a,
|
|
0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
|
0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, 0x33, 0x0a, 0x07, 0x73, 0x65,
|
|
0x6e, 0x74, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f,
|
|
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69,
|
|
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x12,
|
|
0x1c, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01,
|
|
0x28, 0x08, 0x52, 0x09, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1a, 0x0a,
|
|
0x08, 0x65, 0x6c, 0x69, 0x67, 0x69, 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52,
|
|
0x08, 0x65, 0x6c, 0x69, 0x67, 0x69, 0x62, 0x6c, 0x65, 0x12, 0x3c, 0x0a, 0x05, 0x73, 0x6c, 0x6f,
|
|
0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65,
|
|
0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72,
|
|
0x6f, 0x6c, 0x2e, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x53, 0x6c, 0x6f, 0x74,
|
|
0x52, 0x05, 0x73, 0x6c, 0x6f, 0x74, 0x73, 0x22, 0xda, 0x02, 0x0a, 0x0d, 0x48, 0x65, 0x61, 0x72,
|
|
0x74, 0x62, 0x65, 0x61, 0x74, 0x53, 0x6c, 0x6f, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x6f, 0x6c,
|
|
0x75, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x6f,
|
|
0x6c, 0x75, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63,
|
|
0x61, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x70, 0x6c,
|
|
0x69, 0x63, 0x61, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x61, 0x64,
|
|
0x64, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x41, 0x64,
|
|
0x64, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x74, 0x72, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18,
|
|
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x74, 0x72, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x12,
|
|
0x1c, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01,
|
|
0x28, 0x08, 0x52, 0x09, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2a, 0x0a,
|
|
0x11, 0x72, 0x65, 0x61, 0x64, 0x79, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61,
|
|
0x72, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x46,
|
|
0x6f, 0x72, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6c, 0x69,
|
|
0x67, 0x69, 0x62, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x65, 0x6c, 0x69,
|
|
0x67, 0x69, 0x62, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61,
|
|
0x77, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72,
|
|
0x61, 0x77, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x5f,
|
|
0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x65, 0x76, 0x69,
|
|
0x64, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x6c, 0x6f,
|
|
0x63, 0x61, 0x6c, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x18, 0x0a,
|
|
0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x52, 0x6f, 0x6c, 0x65, 0x43,
|
|
0x6c, 0x61, 0x69, 0x6d, 0x22, 0x67, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61,
|
|
0x74, 0x41, 0x63, 0x6b, 0x12, 0x3b, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64,
|
|
0x5f, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
|
|
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65,
|
|
0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x41,
|
|
0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20,
|
|
0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x71, 0x0a,
|
|
0x10, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
|
0x74, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01,
|
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x1d,
|
|
0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
|
|
0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x49, 0x64, 0x12, 0x21, 0x0a,
|
|
0x0c, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x03, 0x20,
|
|
0x01, 0x28, 0x04, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x45, 0x70, 0x6f, 0x63, 0x68,
|
|
0x22, 0xad, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x44, 0x65, 0x73, 0x63,
|
|
0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63,
|
|
0x61, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x70, 0x6c,
|
|
0x69, 0x63, 0x61, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x02,
|
|
0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x29, 0x0a, 0x10, 0x65,
|
|
0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18,
|
|
0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x56,
|
|
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x61,
|
|
0x64, 0x64, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x41,
|
|
0x64, 0x64, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x74, 0x72, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72,
|
|
0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x74, 0x72, 0x6c, 0x41, 0x64, 0x64, 0x72,
|
|
0x22, 0xb9, 0x02, 0x0a, 0x0e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x46,
|
|
0x61, 0x63, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x69, 0x64,
|
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x64,
|
|
0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x5f, 0x69, 0x64, 0x18, 0x02,
|
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x49, 0x64, 0x12,
|
|
0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05,
|
|
0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e,
|
|
0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52,
|
|
0x0f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
|
|
0x12, 0x1b, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x05, 0x20,
|
|
0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x41, 0x64, 0x64, 0x72, 0x12, 0x1b, 0x0a,
|
|
0x09, 0x63, 0x74, 0x72, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
|
|
0x52, 0x08, 0x63, 0x74, 0x72, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x12, 0x40, 0x0a, 0x05, 0x70, 0x65,
|
|
0x65, 0x72, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x73, 0x65, 0x61, 0x77,
|
|
0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74,
|
|
0x72, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x44, 0x65, 0x73, 0x63, 0x72,
|
|
0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x12, 0x2e, 0x0a, 0x13,
|
|
0x70, 0x65, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
|
|
0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x70, 0x65, 0x65, 0x72, 0x53,
|
|
0x65, 0x74, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2c, 0x0a, 0x0d,
|
|
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a,
|
|
0x09, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
|
0x52, 0x08, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x64, 0x22, 0x9c, 0x02, 0x0a, 0x0e, 0x53,
|
|
0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a,
|
|
0x09, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
|
0x52, 0x08, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65,
|
|
0x70, 0x6c, 0x69, 0x63, 0x61, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
|
|
0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f,
|
|
0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12,
|
|
0x29, 0x0a, 0x10, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73,
|
|
0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x65, 0x6e, 0x64, 0x70, 0x6f,
|
|
0x69, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x73,
|
|
0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x61, 0x73,
|
|
0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x12, 0x36, 0x0a, 0x17, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75,
|
|
0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f,
|
|
0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x6e, 0x73,
|
|
0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x39,
|
|
0x0a, 0x19, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x67, 0x65, 0x6e,
|
|
0x63, 0x65, 0x5f, 0x73, 0x74, 0x75, 0x63, 0x6b, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28,
|
|
0x09, 0x52, 0x16, 0x6c, 0x61, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x67, 0x65, 0x6e,
|
|
0x63, 0x65, 0x53, 0x74, 0x75, 0x63, 0x6b, 0x41, 0x74, 0x32, 0x78, 0x0a, 0x12, 0x4f, 0x62, 0x73,
|
|
0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,
|
|
0x62, 0x0a, 0x0f, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65,
|
|
0x61, 0x74, 0x12, 0x28, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62,
|
|
0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x48, 0x65, 0x61,
|
|
0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x1a, 0x25, 0x2e, 0x73,
|
|
0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63,
|
|
0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74,
|
|
0x41, 0x63, 0x6b, 0x32, 0x81, 0x01, 0x0a, 0x11, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65,
|
|
0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6c, 0x0a, 0x14, 0x53, 0x75, 0x62,
|
|
0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74,
|
|
0x73, 0x12, 0x29, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c,
|
|
0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x75, 0x62, 0x73,
|
|
0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x73,
|
|
0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63,
|
|
0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e,
|
|
0x74, 0x46, 0x61, 0x63, 0x74, 0x30, 0x01, 0x32, 0x77, 0x0a, 0x0f, 0x45, 0x76, 0x69, 0x64, 0x65,
|
|
0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x64, 0x0a, 0x11, 0x51, 0x75,
|
|
0x65, 0x72, 0x79, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12,
|
|
0x26, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63,
|
|
0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
|
|
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65,
|
|
0x64, 0x66, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
|
|
0x6c, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
|
0x42, 0x3d, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73,
|
|
0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2f, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64,
|
|
0x2d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f,
|
|
0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x3b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x62,
|
|
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
}
|
|
|
|
var (
|
|
file_control_proto_rawDescOnce sync.Once
|
|
file_control_proto_rawDescData = file_control_proto_rawDesc
|
|
)
|
|
|
|
func file_control_proto_rawDescGZIP() []byte {
|
|
file_control_proto_rawDescOnce.Do(func() {
|
|
file_control_proto_rawDescData = protoimpl.X.CompressGZIP(file_control_proto_rawDescData)
|
|
})
|
|
return file_control_proto_rawDescData
|
|
}
|
|
|
|
var file_control_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
|
|
var file_control_proto_goTypes = []interface{}{
|
|
(*HeartbeatReport)(nil), // 0: seaweedfs.block.control.HeartbeatReport
|
|
(*HeartbeatSlot)(nil), // 1: seaweedfs.block.control.HeartbeatSlot
|
|
(*HeartbeatAck)(nil), // 2: seaweedfs.block.control.HeartbeatAck
|
|
(*SubscribeRequest)(nil), // 3: seaweedfs.block.control.SubscribeRequest
|
|
(*ReplicaDescriptor)(nil), // 4: seaweedfs.block.control.ReplicaDescriptor
|
|
(*AssignmentFact)(nil), // 5: seaweedfs.block.control.AssignmentFact
|
|
(*StatusRequest)(nil), // 6: seaweedfs.block.control.StatusRequest
|
|
(*StatusResponse)(nil), // 7: seaweedfs.block.control.StatusResponse
|
|
(*timestamp.Timestamp)(nil), // 8: google.protobuf.Timestamp
|
|
}
|
|
var file_control_proto_depIdxs = []int32{
|
|
8, // 0: seaweedfs.block.control.HeartbeatReport.sent_at:type_name -> google.protobuf.Timestamp
|
|
1, // 1: seaweedfs.block.control.HeartbeatReport.slots:type_name -> seaweedfs.block.control.HeartbeatSlot
|
|
8, // 2: seaweedfs.block.control.HeartbeatAck.accepted_at:type_name -> google.protobuf.Timestamp
|
|
4, // 3: seaweedfs.block.control.AssignmentFact.peers:type_name -> seaweedfs.block.control.ReplicaDescriptor
|
|
0, // 4: seaweedfs.block.control.ObservationService.ReportHeartbeat:input_type -> seaweedfs.block.control.HeartbeatReport
|
|
3, // 5: seaweedfs.block.control.AssignmentService.SubscribeAssignments:input_type -> seaweedfs.block.control.SubscribeRequest
|
|
6, // 6: seaweedfs.block.control.EvidenceService.QueryVolumeStatus:input_type -> seaweedfs.block.control.StatusRequest
|
|
2, // 7: seaweedfs.block.control.ObservationService.ReportHeartbeat:output_type -> seaweedfs.block.control.HeartbeatAck
|
|
5, // 8: seaweedfs.block.control.AssignmentService.SubscribeAssignments:output_type -> seaweedfs.block.control.AssignmentFact
|
|
7, // 9: seaweedfs.block.control.EvidenceService.QueryVolumeStatus:output_type -> seaweedfs.block.control.StatusResponse
|
|
7, // [7:10] is the sub-list for method output_type
|
|
4, // [4:7] is the sub-list for method input_type
|
|
4, // [4:4] is the sub-list for extension type_name
|
|
4, // [4:4] is the sub-list for extension extendee
|
|
0, // [0:4] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_control_proto_init() }
|
|
func file_control_proto_init() {
|
|
if File_control_proto != nil {
|
|
return
|
|
}
|
|
if !protoimpl.UnsafeEnabled {
|
|
file_control_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*HeartbeatReport); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_control_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*HeartbeatSlot); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_control_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*HeartbeatAck); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_control_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*SubscribeRequest); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_control_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*ReplicaDescriptor); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_control_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*AssignmentFact); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_control_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*StatusRequest); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_control_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*StatusResponse); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: file_control_proto_rawDesc,
|
|
NumEnums: 0,
|
|
NumMessages: 8,
|
|
NumExtensions: 0,
|
|
NumServices: 3,
|
|
},
|
|
GoTypes: file_control_proto_goTypes,
|
|
DependencyIndexes: file_control_proto_depIdxs,
|
|
MessageInfos: file_control_proto_msgTypes,
|
|
}.Build()
|
|
File_control_proto = out.File
|
|
file_control_proto_rawDesc = nil
|
|
file_control_proto_goTypes = nil
|
|
file_control_proto_depIdxs = nil
|
|
}
|