diff --git a/docs/generated/http/full.md b/docs/generated/http/full.md index 08cd72ffa48d..2769d3c0a87a 100644 --- a/docs/generated/http/full.md +++ b/docs/generated/http/full.md @@ -123,6 +123,11 @@ `GET /_status/nodes` +Nodes returns status info for all commissioned nodes. Decommissioned nodes +are not included, except in rare cases where the node doing the +decommissioning crashed before completing the operation. In these cases, +the decommission operation can be rerun to clean up the status entry. + Don't introduce additional usages of this RPC. See #50707 for more details. The underlying response type is something we're looking to get rid of. diff --git a/pkg/cli/interactive_tests/test_demo_node_cmds.tcl b/pkg/cli/interactive_tests/test_demo_node_cmds.tcl index 81c1cef41cb3..ed7dad4c49ea 100644 --- a/pkg/cli/interactive_tests/test_demo_node_cmds.tcl +++ b/pkg/cli/interactive_tests/test_demo_node_cmds.tcl @@ -85,14 +85,14 @@ eexpect "node 6 has been added with locality \"region=ca-central,zone=a\"" send "show regions from cluster;\r" eexpect "ca-central | \{a\}" eexpect "us-east1 | \{b,c,d\}" -eexpect "us-west1 | \{a,b\}" +eexpect "us-west1 | \{b\}" # We use kv_node_status here because gossip_liveness is timing dependant. +# Node 4's status entry should have been removed by now. send "select node_id, locality from crdb_internal.kv_node_status;\r" eexpect "1 | region=us-east1,az=b" eexpect "2 | region=us-east1,az=c" eexpect "3 | region=us-east1,az=d" -eexpect "4 | region=us-west1,az=a" eexpect "5 | region=us-west1,az=b" eexpect "6 | region=ca-central,zone=a" @@ -100,7 +100,7 @@ eexpect "6 | region=ca-central,zone=a" send "\\demo shutdown 6\r" eexpect "node 6 has been shutdown" -# By now the node should have stabalized in gossip which allows us to query the more detailed information there. +# By now the node should have stabilized in gossip which allows us to query the more detailed information there. send "select node_id, draining, decommissioning, membership from crdb_internal.gossip_liveness ORDER BY node_id;\r" eexpect "1 | false | false | active" eexpect "2 | false | false | active" diff --git a/pkg/server/BUILD.bazel b/pkg/server/BUILD.bazel index b480b056abdb..9ddf14d4ce22 100644 --- a/pkg/server/BUILD.bazel +++ b/pkg/server/BUILD.bazel @@ -230,6 +230,7 @@ go_test( "authentication_test.go", "config_test.go", "connectivity_test.go", + "decommission_test.go", "drain_test.go", "graphite_test.go", "intent_test.go", diff --git a/pkg/server/decommission_test.go b/pkg/server/decommission_test.go new file mode 100644 index 000000000000..abf8cdb7dcee --- /dev/null +++ b/pkg/server/decommission_test.go @@ -0,0 +1,57 @@ +// Copyright 2016 The Cockroach Authors. +// +// Use of this software is governed by the Business Source License +// included in the file licenses/BSL.txt. +// +// As of the Change Date specified in that file, in accordance with +// the Business Source License, use of this software will be governed +// by the Apache License, Version 2.0, included in the file +// licenses/APL.txt. + +package server_test + +import ( + "context" + "testing" + + "github.com/cockroachdb/cockroach/pkg/base" + "github.com/cockroachdb/cockroach/pkg/keys" + "github.com/cockroachdb/cockroach/pkg/kv/kvserver/liveness/livenesspb" + "github.com/cockroachdb/cockroach/pkg/roachpb" + "github.com/cockroachdb/cockroach/pkg/testutils/testcluster" + "github.com/cockroachdb/cockroach/pkg/util/leaktest" + "github.com/cockroachdb/cockroach/pkg/util/log" + "github.com/stretchr/testify/require" +) + +// This test should really be in server_test.go but can't because it uses the +// server package, which is also imported by testutils/testcluster, causing +// an import cycle. +func TestDecommissionNodeStatus(t *testing.T) { + defer leaktest.AfterTest(t)() + defer log.Scope(t).Close(t) + + ctx := context.Background() + tc := testcluster.StartTestCluster(t, 3, base.TestClusterArgs{ + ReplicationMode: base.ReplicationManual, // saves time + }) + defer tc.Stopper().Stop(ctx) + decomNodeID := tc.Server(2).NodeID() + + // Make sure node status entries have been created. + for _, srv := range tc.Servers { + entry, err := srv.DB().Get(ctx, keys.NodeStatusKey(srv.NodeID())) + require.NoError(t, err) + require.NotNil(t, entry.Value, "node status entry not found for node %d", srv.NodeID()) + } + + require.NoError(t, tc.Servers[0].Decommission( + ctx, livenesspb.MembershipStatus_DECOMMISSIONING, []roachpb.NodeID{decomNodeID})) + require.NoError(t, tc.Servers[0].Decommission( + ctx, livenesspb.MembershipStatus_DECOMMISSIONED, []roachpb.NodeID{decomNodeID})) + + // The node status entry should now have been cleaned up. + entry, err := tc.Server(0).DB().Get(ctx, keys.NodeStatusKey(decomNodeID)) + require.NoError(t, err) + require.Nil(t, entry.Value, "found stale node status entry for node %d", decomNodeID) +} diff --git a/pkg/server/node.go b/pkg/server/node.go index aa755847f819..b8ea77228751 100644 --- a/pkg/server/node.go +++ b/pkg/server/node.go @@ -583,7 +583,7 @@ func (n *Node) initializeAdditionalStores( // Write a new status summary after all stores have been initialized; this // helps the UI remain responsive when new nodes are added. - if err := n.writeNodeStatus(ctx, 0 /* alertTTL */); err != nil { + if err := n.writeNodeStatus(ctx, 0 /* alertTTL */, false /* mustExist */); err != nil { log.Warningf(ctx, "error writing node summary after store bootstrap: %s", err) } @@ -701,11 +701,13 @@ func (n *Node) startGraphiteStatsExporter(st *cluster.Settings) { // startWriteNodeStatus begins periodically persisting status summaries for the // node and its stores. -func (n *Node) startWriteNodeStatus(frequency time.Duration) { +func (n *Node) startWriteNodeStatus(frequency time.Duration) error { ctx := logtags.AddTag(n.AnnotateCtx(context.Background()), "summaries", nil) - // Immediately record summaries once on server startup. - if err := n.writeNodeStatus(ctx, 0 /* alertTTL */); err != nil { - log.Warningf(ctx, "error recording initial status summaries: %s", err) + // Immediately record summaries once on server startup. The update loop below + // will only update the key if it exists, to avoid race conditions during + // node decommissioning, so we have to error out if we can't create it. + if err := n.writeNodeStatus(ctx, 0 /* alertTTL */, false /* mustExist */); err != nil { + return errors.Wrap(err, "error recording initial status summaries") } n.stopper.RunWorker(ctx, func(ctx context.Context) { // Write a status summary immediately; this helps the UI remain @@ -719,7 +721,13 @@ func (n *Node) startWriteNodeStatus(frequency time.Duration) { // alerts don't disappear and reappear spuriously while at the same // time ensuring that an alert doesn't linger for too long after having // resolved. - if err := n.writeNodeStatus(ctx, 2*frequency); err != nil { + // + // The status key must already exist, to avoid race conditions + // during decommissioning of this node. Decommissioning may be + // carried out by a different node, so this avoids resurrecting + // the status entry after the decommissioner has removed it. + // See Server.Decommission(). + if err := n.writeNodeStatus(ctx, 2*frequency, true /* mustExist */); err != nil { log.Warningf(ctx, "error recording status summaries: %s", err) } case <-n.stopper.ShouldStop(): @@ -727,11 +735,14 @@ func (n *Node) startWriteNodeStatus(frequency time.Duration) { } } }) + return nil } // writeNodeStatus retrieves status summaries from the supplied // NodeStatusRecorder and persists them to the cockroach data store. -func (n *Node) writeNodeStatus(ctx context.Context, alertTTL time.Duration) error { +// If mustExist is true the status key must already exist and must +// not change during writing -- if false, the status is always written. +func (n *Node) writeNodeStatus(ctx context.Context, alertTTL time.Duration, mustExist bool) error { var err error if runErr := n.stopper.RunTask(ctx, "node.Node: writing summary", func(ctx context.Context) { nodeStatus := n.recorder.GenerateNodeStatus(ctx) @@ -762,7 +773,7 @@ func (n *Node) writeNodeStatus(ctx context.Context, alertTTL time.Duration) erro // state (since it'll be incremented every ~10s). } - err = n.recorder.WriteNodeStatus(ctx, n.storeCfg.DB, *nodeStatus) + err = n.recorder.WriteNodeStatus(ctx, n.storeCfg.DB, *nodeStatus, mustExist) }); runErr != nil { err = runErr } diff --git a/pkg/server/server.go b/pkg/server/server.go index c40acb18ef05..d53907f861ef 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -36,6 +36,7 @@ import ( "github.com/cockroachdb/cockroach/pkg/gossip" "github.com/cockroachdb/cockroach/pkg/jobs" "github.com/cockroachdb/cockroach/pkg/jobs/jobsprotectedts" + "github.com/cockroachdb/cockroach/pkg/keys" "github.com/cockroachdb/cockroach/pkg/kv" "github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord" "github.com/cockroachdb/cockroach/pkg/kv/kvserver" @@ -1620,7 +1621,9 @@ func (s *Server) PreStart(ctx context.Context) error { }) // Begin recording status summaries. - s.node.startWriteNodeStatus(base.DefaultMetricsSampleInterval) + if err := s.node.startWriteNodeStatus(base.DefaultMetricsSampleInterval); err != nil { + return err + } // Start the protected timestamp subsystem. if err := s.protectedtsProvider.Start(ctx, s.stopper); err != nil { @@ -2063,6 +2066,18 @@ func (s *Server) Decommission( log.Errorf(ctx, "unable to record event: %+v: %+v", event, err) } } + + // Similarly to the log event above, we may not be able to clean up the + // status entry if we crash or fail -- the status entry is inline, and + // thus cannot be transactional. However, since decommissioning is + // idempotent, we can attempt to remove the key regardless of whether + // the status changed, such that a stale key can be removed by + // decommissioning the node again. + if targetStatus.Decommissioned() { + if err := s.db.PutInline(ctx, keys.NodeStatusKey(nodeID), nil); err != nil { + log.Errorf(ctx, "unable to clean up node status data for node %d: %s", nodeID, err) + } + } } return nil } diff --git a/pkg/server/serverpb/status.pb.go b/pkg/server/serverpb/status.pb.go index 9b1d55e8acd6..bb222b587648 100644 --- a/pkg/server/serverpb/status.pb.go +++ b/pkg/server/serverpb/status.pb.go @@ -66,7 +66,7 @@ func (x StacksType) String() string { return proto.EnumName(StacksType_name, int32(x)) } func (StacksType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{0} + return fileDescriptor_status_888e32a70da35e6b, []int{0} } // Represents the type of file. @@ -93,7 +93,7 @@ func (x FileType) String() string { return proto.EnumName(FileType_name, int32(x)) } func (FileType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{1} + return fileDescriptor_status_888e32a70da35e6b, []int{1} } // We use an enum to allow reporting of client certs and potential others (eg: @@ -130,7 +130,7 @@ func (x CertificateDetails_CertificateType) String() string { return proto.EnumName(CertificateDetails_CertificateType_name, int32(x)) } func (CertificateDetails_CertificateType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{1, 0} + return fileDescriptor_status_888e32a70da35e6b, []int{1, 0} } type ProfileRequest_Type int32 @@ -153,7 +153,7 @@ func (x ProfileRequest_Type) String() string { return proto.EnumName(ProfileRequest_Type_name, int32(x)) } func (ProfileRequest_Type) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{37, 0} + return fileDescriptor_status_888e32a70da35e6b, []int{37, 0} } // Enum for phase of execution. @@ -177,7 +177,7 @@ func (x ActiveQuery_Phase) String() string { return proto.EnumName(ActiveQuery_Phase_name, int32(x)) } func (ActiveQuery_Phase) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{45, 0} + return fileDescriptor_status_888e32a70da35e6b, []int{45, 0} } type CertificatesRequest struct { @@ -190,7 +190,7 @@ func (m *CertificatesRequest) Reset() { *m = CertificatesRequest{} } func (m *CertificatesRequest) String() string { return proto.CompactTextString(m) } func (*CertificatesRequest) ProtoMessage() {} func (*CertificatesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{0} + return fileDescriptor_status_888e32a70da35e6b, []int{0} } func (m *CertificatesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -229,7 +229,7 @@ func (m *CertificateDetails) Reset() { *m = CertificateDetails{} } func (m *CertificateDetails) String() string { return proto.CompactTextString(m) } func (*CertificateDetails) ProtoMessage() {} func (*CertificateDetails) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{1} + return fileDescriptor_status_888e32a70da35e6b, []int{1} } func (m *CertificateDetails) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -270,7 +270,7 @@ func (m *CertificateDetails_Fields) Reset() { *m = CertificateDetails_Fi func (m *CertificateDetails_Fields) String() string { return proto.CompactTextString(m) } func (*CertificateDetails_Fields) ProtoMessage() {} func (*CertificateDetails_Fields) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{1, 0} + return fileDescriptor_status_888e32a70da35e6b, []int{1, 0} } func (m *CertificateDetails_Fields) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -303,7 +303,7 @@ func (m *CertificatesResponse) Reset() { *m = CertificatesResponse{} } func (m *CertificatesResponse) String() string { return proto.CompactTextString(m) } func (*CertificatesResponse) ProtoMessage() {} func (*CertificatesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{2} + return fileDescriptor_status_888e32a70da35e6b, []int{2} } func (m *CertificatesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -340,7 +340,7 @@ func (m *DetailsRequest) Reset() { *m = DetailsRequest{} } func (m *DetailsRequest) String() string { return proto.CompactTextString(m) } func (*DetailsRequest) ProtoMessage() {} func (*DetailsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{3} + return fileDescriptor_status_888e32a70da35e6b, []int{3} } func (m *DetailsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -377,7 +377,7 @@ func (m *SystemInfo) Reset() { *m = SystemInfo{} } func (m *SystemInfo) String() string { return proto.CompactTextString(m) } func (*SystemInfo) ProtoMessage() {} func (*SystemInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{4} + return fileDescriptor_status_888e32a70da35e6b, []int{4} } func (m *SystemInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -414,7 +414,7 @@ func (m *DetailsResponse) Reset() { *m = DetailsResponse{} } func (m *DetailsResponse) String() string { return proto.CompactTextString(m) } func (*DetailsResponse) ProtoMessage() {} func (*DetailsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{5} + return fileDescriptor_status_888e32a70da35e6b, []int{5} } func (m *DetailsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -446,7 +446,7 @@ func (m *NodesRequest) Reset() { *m = NodesRequest{} } func (m *NodesRequest) String() string { return proto.CompactTextString(m) } func (*NodesRequest) ProtoMessage() {} func (*NodesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{6} + return fileDescriptor_status_888e32a70da35e6b, []int{6} } func (m *NodesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -480,7 +480,7 @@ func (m *NodesResponse) Reset() { *m = NodesResponse{} } func (m *NodesResponse) String() string { return proto.CompactTextString(m) } func (*NodesResponse) ProtoMessage() {} func (*NodesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{7} + return fileDescriptor_status_888e32a70da35e6b, []int{7} } func (m *NodesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -515,7 +515,7 @@ func (m *NodeRequest) Reset() { *m = NodeRequest{} } func (m *NodeRequest) String() string { return proto.CompactTextString(m) } func (*NodeRequest) ProtoMessage() {} func (*NodeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{8} + return fileDescriptor_status_888e32a70da35e6b, []int{8} } func (m *NodeRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -560,7 +560,7 @@ func (m *RaftState) Reset() { *m = RaftState{} } func (m *RaftState) String() string { return proto.CompactTextString(m) } func (*RaftState) ProtoMessage() {} func (*RaftState) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{9} + return fileDescriptor_status_888e32a70da35e6b, []int{9} } func (m *RaftState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -597,7 +597,7 @@ func (m *RaftState_Progress) Reset() { *m = RaftState_Progress{} } func (m *RaftState_Progress) String() string { return proto.CompactTextString(m) } func (*RaftState_Progress) ProtoMessage() {} func (*RaftState_Progress) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{9, 0} + return fileDescriptor_status_888e32a70da35e6b, []int{9, 0} } func (m *RaftState_Progress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -642,7 +642,7 @@ func (m *RangeProblems) Reset() { *m = RangeProblems{} } func (m *RangeProblems) String() string { return proto.CompactTextString(m) } func (*RangeProblems) ProtoMessage() {} func (*RangeProblems) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{10} + return fileDescriptor_status_888e32a70da35e6b, []int{10} } func (m *RangeProblems) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -678,7 +678,7 @@ func (m *RangeStatistics) Reset() { *m = RangeStatistics{} } func (m *RangeStatistics) String() string { return proto.CompactTextString(m) } func (*RangeStatistics) ProtoMessage() {} func (*RangeStatistics) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{11} + return fileDescriptor_status_888e32a70da35e6b, []int{11} } func (m *RangeStatistics) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -712,7 +712,7 @@ func (m *PrettySpan) Reset() { *m = PrettySpan{} } func (m *PrettySpan) String() string { return proto.CompactTextString(m) } func (*PrettySpan) ProtoMessage() {} func (*PrettySpan) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{12} + return fileDescriptor_status_888e32a70da35e6b, []int{12} } func (m *PrettySpan) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -758,7 +758,7 @@ func (m *RangeInfo) Reset() { *m = RangeInfo{} } func (m *RangeInfo) String() string { return proto.CompactTextString(m) } func (*RangeInfo) ProtoMessage() {} func (*RangeInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{13} + return fileDescriptor_status_888e32a70da35e6b, []int{13} } func (m *RangeInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -794,7 +794,7 @@ func (m *RangesRequest) Reset() { *m = RangesRequest{} } func (m *RangesRequest) String() string { return proto.CompactTextString(m) } func (*RangesRequest) ProtoMessage() {} func (*RangesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{14} + return fileDescriptor_status_888e32a70da35e6b, []int{14} } func (m *RangesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -827,7 +827,7 @@ func (m *RangesResponse) Reset() { *m = RangesResponse{} } func (m *RangesResponse) String() string { return proto.CompactTextString(m) } func (*RangesResponse) ProtoMessage() {} func (*RangesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{15} + return fileDescriptor_status_888e32a70da35e6b, []int{15} } func (m *RangesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -862,7 +862,7 @@ func (m *GossipRequest) Reset() { *m = GossipRequest{} } func (m *GossipRequest) String() string { return proto.CompactTextString(m) } func (*GossipRequest) ProtoMessage() {} func (*GossipRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{16} + return fileDescriptor_status_888e32a70da35e6b, []int{16} } func (m *GossipRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -897,7 +897,7 @@ func (m *EngineStatsInfo) Reset() { *m = EngineStatsInfo{} } func (m *EngineStatsInfo) String() string { return proto.CompactTextString(m) } func (*EngineStatsInfo) ProtoMessage() {} func (*EngineStatsInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{17} + return fileDescriptor_status_888e32a70da35e6b, []int{17} } func (m *EngineStatsInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -932,7 +932,7 @@ func (m *EngineStatsRequest) Reset() { *m = EngineStatsRequest{} } func (m *EngineStatsRequest) String() string { return proto.CompactTextString(m) } func (*EngineStatsRequest) ProtoMessage() {} func (*EngineStatsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{18} + return fileDescriptor_status_888e32a70da35e6b, []int{18} } func (m *EngineStatsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -965,7 +965,7 @@ func (m *EngineStatsResponse) Reset() { *m = EngineStatsResponse{} } func (m *EngineStatsResponse) String() string { return proto.CompactTextString(m) } func (*EngineStatsResponse) ProtoMessage() {} func (*EngineStatsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{19} + return fileDescriptor_status_888e32a70da35e6b, []int{19} } func (m *EngineStatsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -999,7 +999,7 @@ func (m *TraceEvent) Reset() { *m = TraceEvent{} } func (m *TraceEvent) String() string { return proto.CompactTextString(m) } func (*TraceEvent) ProtoMessage() {} func (*TraceEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{20} + return fileDescriptor_status_888e32a70da35e6b, []int{20} } func (m *TraceEvent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1033,7 +1033,7 @@ func (m *AllocatorDryRun) Reset() { *m = AllocatorDryRun{} } func (m *AllocatorDryRun) String() string { return proto.CompactTextString(m) } func (*AllocatorDryRun) ProtoMessage() {} func (*AllocatorDryRun) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{21} + return fileDescriptor_status_888e32a70da35e6b, []int{21} } func (m *AllocatorDryRun) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1066,7 +1066,7 @@ func (m *AllocatorRangeRequest) Reset() { *m = AllocatorRangeRequest{} } func (m *AllocatorRangeRequest) String() string { return proto.CompactTextString(m) } func (*AllocatorRangeRequest) ProtoMessage() {} func (*AllocatorRangeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{22} + return fileDescriptor_status_888e32a70da35e6b, []int{22} } func (m *AllocatorRangeRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1102,7 +1102,7 @@ func (m *AllocatorRangeResponse) Reset() { *m = AllocatorRangeResponse{} func (m *AllocatorRangeResponse) String() string { return proto.CompactTextString(m) } func (*AllocatorRangeResponse) ProtoMessage() {} func (*AllocatorRangeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{23} + return fileDescriptor_status_888e32a70da35e6b, []int{23} } func (m *AllocatorRangeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1136,7 +1136,7 @@ func (m *AllocatorRequest) Reset() { *m = AllocatorRequest{} } func (m *AllocatorRequest) String() string { return proto.CompactTextString(m) } func (*AllocatorRequest) ProtoMessage() {} func (*AllocatorRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{24} + return fileDescriptor_status_888e32a70da35e6b, []int{24} } func (m *AllocatorRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1169,7 +1169,7 @@ func (m *AllocatorResponse) Reset() { *m = AllocatorResponse{} } func (m *AllocatorResponse) String() string { return proto.CompactTextString(m) } func (*AllocatorResponse) ProtoMessage() {} func (*AllocatorResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{25} + return fileDescriptor_status_888e32a70da35e6b, []int{25} } func (m *AllocatorResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1202,7 +1202,7 @@ func (m *JSONResponse) Reset() { *m = JSONResponse{} } func (m *JSONResponse) String() string { return proto.CompactTextString(m) } func (*JSONResponse) ProtoMessage() {} func (*JSONResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{26} + return fileDescriptor_status_888e32a70da35e6b, []int{26} } func (m *JSONResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1238,7 +1238,7 @@ func (m *ResponseError) Reset() { *m = ResponseError{} } func (m *ResponseError) String() string { return proto.CompactTextString(m) } func (*ResponseError) ProtoMessage() {} func (*ResponseError) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{27} + return fileDescriptor_status_888e32a70da35e6b, []int{27} } func (m *ResponseError) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1282,7 +1282,7 @@ func (m *LogsRequest) Reset() { *m = LogsRequest{} } func (m *LogsRequest) String() string { return proto.CompactTextString(m) } func (*LogsRequest) ProtoMessage() {} func (*LogsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{28} + return fileDescriptor_status_888e32a70da35e6b, []int{28} } func (m *LogsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1315,7 +1315,7 @@ func (m *LogEntriesResponse) Reset() { *m = LogEntriesResponse{} } func (m *LogEntriesResponse) String() string { return proto.CompactTextString(m) } func (*LogEntriesResponse) ProtoMessage() {} func (*LogEntriesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{29} + return fileDescriptor_status_888e32a70da35e6b, []int{29} } func (m *LogEntriesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1350,7 +1350,7 @@ func (m *LogFilesListRequest) Reset() { *m = LogFilesListRequest{} } func (m *LogFilesListRequest) String() string { return proto.CompactTextString(m) } func (*LogFilesListRequest) ProtoMessage() {} func (*LogFilesListRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{30} + return fileDescriptor_status_888e32a70da35e6b, []int{30} } func (m *LogFilesListRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1383,7 +1383,7 @@ func (m *LogFilesListResponse) Reset() { *m = LogFilesListResponse{} } func (m *LogFilesListResponse) String() string { return proto.CompactTextString(m) } func (*LogFilesListResponse) ProtoMessage() {} func (*LogFilesListResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{31} + return fileDescriptor_status_888e32a70da35e6b, []int{31} } func (m *LogFilesListResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1423,7 +1423,7 @@ func (m *LogFileRequest) Reset() { *m = LogFileRequest{} } func (m *LogFileRequest) String() string { return proto.CompactTextString(m) } func (*LogFileRequest) ProtoMessage() {} func (*LogFileRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{32} + return fileDescriptor_status_888e32a70da35e6b, []int{32} } func (m *LogFileRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1459,7 +1459,7 @@ func (m *StacksRequest) Reset() { *m = StacksRequest{} } func (m *StacksRequest) String() string { return proto.CompactTextString(m) } func (*StacksRequest) ProtoMessage() {} func (*StacksRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{33} + return fileDescriptor_status_888e32a70da35e6b, []int{33} } func (m *StacksRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1495,7 +1495,7 @@ func (m *File) Reset() { *m = File{} } func (m *File) String() string { return proto.CompactTextString(m) } func (*File) ProtoMessage() {} func (*File) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{34} + return fileDescriptor_status_888e32a70da35e6b, []int{34} } func (m *File) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1539,7 +1539,7 @@ func (m *GetFilesRequest) Reset() { *m = GetFilesRequest{} } func (m *GetFilesRequest) String() string { return proto.CompactTextString(m) } func (*GetFilesRequest) ProtoMessage() {} func (*GetFilesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{35} + return fileDescriptor_status_888e32a70da35e6b, []int{35} } func (m *GetFilesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1572,7 +1572,7 @@ func (m *GetFilesResponse) Reset() { *m = GetFilesResponse{} } func (m *GetFilesResponse) String() string { return proto.CompactTextString(m) } func (*GetFilesResponse) ProtoMessage() {} func (*GetFilesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{36} + return fileDescriptor_status_888e32a70da35e6b, []int{36} } func (m *GetFilesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1610,7 +1610,7 @@ func (m *ProfileRequest) Reset() { *m = ProfileRequest{} } func (m *ProfileRequest) String() string { return proto.CompactTextString(m) } func (*ProfileRequest) ProtoMessage() {} func (*ProfileRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{37} + return fileDescriptor_status_888e32a70da35e6b, []int{37} } func (m *ProfileRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1645,7 +1645,7 @@ func (m *MetricsRequest) Reset() { *m = MetricsRequest{} } func (m *MetricsRequest) String() string { return proto.CompactTextString(m) } func (*MetricsRequest) ProtoMessage() {} func (*MetricsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{38} + return fileDescriptor_status_888e32a70da35e6b, []int{38} } func (m *MetricsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1679,7 +1679,7 @@ func (m *RaftRangeNode) Reset() { *m = RaftRangeNode{} } func (m *RaftRangeNode) String() string { return proto.CompactTextString(m) } func (*RaftRangeNode) ProtoMessage() {} func (*RaftRangeNode) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{39} + return fileDescriptor_status_888e32a70da35e6b, []int{39} } func (m *RaftRangeNode) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1712,7 +1712,7 @@ func (m *RaftRangeError) Reset() { *m = RaftRangeError{} } func (m *RaftRangeError) String() string { return proto.CompactTextString(m) } func (*RaftRangeError) ProtoMessage() {} func (*RaftRangeError) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{40} + return fileDescriptor_status_888e32a70da35e6b, []int{40} } func (m *RaftRangeError) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1747,7 +1747,7 @@ func (m *RaftRangeStatus) Reset() { *m = RaftRangeStatus{} } func (m *RaftRangeStatus) String() string { return proto.CompactTextString(m) } func (*RaftRangeStatus) ProtoMessage() {} func (*RaftRangeStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{41} + return fileDescriptor_status_888e32a70da35e6b, []int{41} } func (m *RaftRangeStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1780,7 +1780,7 @@ func (m *RaftDebugRequest) Reset() { *m = RaftDebugRequest{} } func (m *RaftDebugRequest) String() string { return proto.CompactTextString(m) } func (*RaftDebugRequest) ProtoMessage() {} func (*RaftDebugRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{42} + return fileDescriptor_status_888e32a70da35e6b, []int{42} } func (m *RaftDebugRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1814,7 +1814,7 @@ func (m *RaftDebugResponse) Reset() { *m = RaftDebugResponse{} } func (m *RaftDebugResponse) String() string { return proto.CompactTextString(m) } func (*RaftDebugResponse) ProtoMessage() {} func (*RaftDebugResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{43} + return fileDescriptor_status_888e32a70da35e6b, []int{43} } func (m *RaftDebugResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1872,7 +1872,7 @@ func (m *TxnInfo) Reset() { *m = TxnInfo{} } func (m *TxnInfo) String() string { return proto.CompactTextString(m) } func (*TxnInfo) ProtoMessage() {} func (*TxnInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{44} + return fileDescriptor_status_888e32a70da35e6b, []int{44} } func (m *TxnInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1920,7 +1920,7 @@ func (m *ActiveQuery) Reset() { *m = ActiveQuery{} } func (m *ActiveQuery) String() string { return proto.CompactTextString(m) } func (*ActiveQuery) ProtoMessage() {} func (*ActiveQuery) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{45} + return fileDescriptor_status_888e32a70da35e6b, []int{45} } func (m *ActiveQuery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1957,7 +1957,7 @@ func (m *ListSessionsRequest) Reset() { *m = ListSessionsRequest{} } func (m *ListSessionsRequest) String() string { return proto.CompactTextString(m) } func (*ListSessionsRequest) ProtoMessage() {} func (*ListSessionsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{46} + return fileDescriptor_status_888e32a70da35e6b, []int{46} } func (m *ListSessionsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2016,7 +2016,7 @@ func (m *Session) Reset() { *m = Session{} } func (m *Session) String() string { return proto.CompactTextString(m) } func (*Session) ProtoMessage() {} func (*Session) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{47} + return fileDescriptor_status_888e32a70da35e6b, []int{47} } func (m *Session) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2053,7 +2053,7 @@ func (m *ListSessionsError) Reset() { *m = ListSessionsError{} } func (m *ListSessionsError) String() string { return proto.CompactTextString(m) } func (*ListSessionsError) ProtoMessage() {} func (*ListSessionsError) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{48} + return fileDescriptor_status_888e32a70da35e6b, []int{48} } func (m *ListSessionsError) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2090,7 +2090,7 @@ func (m *ListSessionsResponse) Reset() { *m = ListSessionsResponse{} } func (m *ListSessionsResponse) String() string { return proto.CompactTextString(m) } func (*ListSessionsResponse) ProtoMessage() {} func (*ListSessionsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{49} + return fileDescriptor_status_888e32a70da35e6b, []int{49} } func (m *ListSessionsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2137,7 +2137,7 @@ func (m *CancelQueryRequest) Reset() { *m = CancelQueryRequest{} } func (m *CancelQueryRequest) String() string { return proto.CompactTextString(m) } func (*CancelQueryRequest) ProtoMessage() {} func (*CancelQueryRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{50} + return fileDescriptor_status_888e32a70da35e6b, []int{50} } func (m *CancelQueryRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2174,7 +2174,7 @@ func (m *CancelQueryResponse) Reset() { *m = CancelQueryResponse{} } func (m *CancelQueryResponse) String() string { return proto.CompactTextString(m) } func (*CancelQueryResponse) ProtoMessage() {} func (*CancelQueryResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{51} + return fileDescriptor_status_888e32a70da35e6b, []int{51} } func (m *CancelQueryResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2217,7 +2217,7 @@ func (m *CancelSessionRequest) Reset() { *m = CancelSessionRequest{} } func (m *CancelSessionRequest) String() string { return proto.CompactTextString(m) } func (*CancelSessionRequest) ProtoMessage() {} func (*CancelSessionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{52} + return fileDescriptor_status_888e32a70da35e6b, []int{52} } func (m *CancelSessionRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2251,7 +2251,7 @@ func (m *CancelSessionResponse) Reset() { *m = CancelSessionResponse{} } func (m *CancelSessionResponse) String() string { return proto.CompactTextString(m) } func (*CancelSessionResponse) ProtoMessage() {} func (*CancelSessionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{53} + return fileDescriptor_status_888e32a70da35e6b, []int{53} } func (m *CancelSessionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2286,7 +2286,7 @@ func (m *SpanStatsRequest) Reset() { *m = SpanStatsRequest{} } func (m *SpanStatsRequest) String() string { return proto.CompactTextString(m) } func (*SpanStatsRequest) ProtoMessage() {} func (*SpanStatsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{54} + return fileDescriptor_status_888e32a70da35e6b, []int{54} } func (m *SpanStatsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2321,7 +2321,7 @@ func (m *SpanStatsResponse) Reset() { *m = SpanStatsResponse{} } func (m *SpanStatsResponse) String() string { return proto.CompactTextString(m) } func (*SpanStatsResponse) ProtoMessage() {} func (*SpanStatsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{55} + return fileDescriptor_status_888e32a70da35e6b, []int{55} } func (m *SpanStatsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2355,7 +2355,7 @@ func (m *ProblemRangesRequest) Reset() { *m = ProblemRangesRequest{} } func (m *ProblemRangesRequest) String() string { return proto.CompactTextString(m) } func (*ProblemRangesRequest) ProtoMessage() {} func (*ProblemRangesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{56} + return fileDescriptor_status_888e32a70da35e6b, []int{56} } func (m *ProblemRangesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2390,7 +2390,7 @@ func (m *ProblemRangesResponse) Reset() { *m = ProblemRangesResponse{} } func (m *ProblemRangesResponse) String() string { return proto.CompactTextString(m) } func (*ProblemRangesResponse) ProtoMessage() {} func (*ProblemRangesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{57} + return fileDescriptor_status_888e32a70da35e6b, []int{57} } func (m *ProblemRangesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2431,7 +2431,7 @@ func (m *ProblemRangesResponse_NodeProblems) Reset() { *m = ProblemRange func (m *ProblemRangesResponse_NodeProblems) String() string { return proto.CompactTextString(m) } func (*ProblemRangesResponse_NodeProblems) ProtoMessage() {} func (*ProblemRangesResponse_NodeProblems) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{57, 0} + return fileDescriptor_status_888e32a70da35e6b, []int{57, 0} } func (m *ProblemRangesResponse_NodeProblems) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2475,7 +2475,7 @@ func (m *HotRangesRequest) Reset() { *m = HotRangesRequest{} } func (m *HotRangesRequest) String() string { return proto.CompactTextString(m) } func (*HotRangesRequest) ProtoMessage() {} func (*HotRangesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{58} + return fileDescriptor_status_888e32a70da35e6b, []int{58} } func (m *HotRangesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2515,7 +2515,7 @@ func (m *HotRangesResponse) Reset() { *m = HotRangesResponse{} } func (m *HotRangesResponse) String() string { return proto.CompactTextString(m) } func (*HotRangesResponse) ProtoMessage() {} func (*HotRangesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{59} + return fileDescriptor_status_888e32a70da35e6b, []int{59} } func (m *HotRangesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2559,7 +2559,7 @@ func (m *HotRangesResponse_HotRange) Reset() { *m = HotRangesResponse_Ho func (m *HotRangesResponse_HotRange) String() string { return proto.CompactTextString(m) } func (*HotRangesResponse_HotRange) ProtoMessage() {} func (*HotRangesResponse_HotRange) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{59, 0} + return fileDescriptor_status_888e32a70da35e6b, []int{59, 0} } func (m *HotRangesResponse_HotRange) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2599,7 +2599,7 @@ func (m *HotRangesResponse_StoreResponse) Reset() { *m = HotRangesRespon func (m *HotRangesResponse_StoreResponse) String() string { return proto.CompactTextString(m) } func (*HotRangesResponse_StoreResponse) ProtoMessage() {} func (*HotRangesResponse_StoreResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{59, 1} + return fileDescriptor_status_888e32a70da35e6b, []int{59, 1} } func (m *HotRangesResponse_StoreResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2641,7 +2641,7 @@ func (m *HotRangesResponse_NodeResponse) Reset() { *m = HotRangesRespons func (m *HotRangesResponse_NodeResponse) String() string { return proto.CompactTextString(m) } func (*HotRangesResponse_NodeResponse) ProtoMessage() {} func (*HotRangesResponse_NodeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{59, 2} + return fileDescriptor_status_888e32a70da35e6b, []int{59, 2} } func (m *HotRangesResponse_NodeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2674,7 +2674,7 @@ func (m *RangeRequest) Reset() { *m = RangeRequest{} } func (m *RangeRequest) String() string { return proto.CompactTextString(m) } func (*RangeRequest) ProtoMessage() {} func (*RangeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{60} + return fileDescriptor_status_888e32a70da35e6b, []int{60} } func (m *RangeRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2710,7 +2710,7 @@ func (m *RangeResponse) Reset() { *m = RangeResponse{} } func (m *RangeResponse) String() string { return proto.CompactTextString(m) } func (*RangeResponse) ProtoMessage() {} func (*RangeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{61} + return fileDescriptor_status_888e32a70da35e6b, []int{61} } func (m *RangeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2745,7 +2745,7 @@ func (m *RangeResponse_NodeResponse) Reset() { *m = RangeResponse_NodeRe func (m *RangeResponse_NodeResponse) String() string { return proto.CompactTextString(m) } func (*RangeResponse_NodeResponse) ProtoMessage() {} func (*RangeResponse_NodeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{61, 0} + return fileDescriptor_status_888e32a70da35e6b, []int{61, 0} } func (m *RangeResponse_NodeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2781,7 +2781,7 @@ func (m *DiagnosticsRequest) Reset() { *m = DiagnosticsRequest{} } func (m *DiagnosticsRequest) String() string { return proto.CompactTextString(m) } func (*DiagnosticsRequest) ProtoMessage() {} func (*DiagnosticsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{62} + return fileDescriptor_status_888e32a70da35e6b, []int{62} } func (m *DiagnosticsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2816,7 +2816,7 @@ func (m *StoresRequest) Reset() { *m = StoresRequest{} } func (m *StoresRequest) String() string { return proto.CompactTextString(m) } func (*StoresRequest) ProtoMessage() {} func (*StoresRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{63} + return fileDescriptor_status_888e32a70da35e6b, []int{63} } func (m *StoresRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2859,7 +2859,7 @@ func (m *StoreDetails) Reset() { *m = StoreDetails{} } func (m *StoreDetails) String() string { return proto.CompactTextString(m) } func (*StoreDetails) ProtoMessage() {} func (*StoreDetails) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{64} + return fileDescriptor_status_888e32a70da35e6b, []int{64} } func (m *StoreDetails) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2892,7 +2892,7 @@ func (m *StoresResponse) Reset() { *m = StoresResponse{} } func (m *StoresResponse) String() string { return proto.CompactTextString(m) } func (*StoresResponse) ProtoMessage() {} func (*StoresResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{65} + return fileDescriptor_status_888e32a70da35e6b, []int{65} } func (m *StoresResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2925,7 +2925,7 @@ func (m *StatementsRequest) Reset() { *m = StatementsRequest{} } func (m *StatementsRequest) String() string { return proto.CompactTextString(m) } func (*StatementsRequest) ProtoMessage() {} func (*StatementsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{66} + return fileDescriptor_status_888e32a70da35e6b, []int{66} } func (m *StatementsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2966,7 +2966,7 @@ func (m *StatementsResponse) Reset() { *m = StatementsResponse{} } func (m *StatementsResponse) String() string { return proto.CompactTextString(m) } func (*StatementsResponse) ProtoMessage() {} func (*StatementsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{67} + return fileDescriptor_status_888e32a70da35e6b, []int{67} } func (m *StatementsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3004,7 +3004,7 @@ func (m *StatementsResponse_ExtendedStatementStatisticsKey) String() string { } func (*StatementsResponse_ExtendedStatementStatisticsKey) ProtoMessage() {} func (*StatementsResponse_ExtendedStatementStatisticsKey) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{67, 0} + return fileDescriptor_status_888e32a70da35e6b, []int{67, 0} } func (m *StatementsResponse_ExtendedStatementStatisticsKey) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3043,7 +3043,7 @@ func (m *StatementsResponse_CollectedStatementStatistics) String() string { } func (*StatementsResponse_CollectedStatementStatistics) ProtoMessage() {} func (*StatementsResponse_CollectedStatementStatistics) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{67, 1} + return fileDescriptor_status_888e32a70da35e6b, []int{67, 1} } func (m *StatementsResponse_CollectedStatementStatistics) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3081,7 +3081,7 @@ func (m *StatementsResponse_ExtendedCollectedTransactionStatistics) String() str } func (*StatementsResponse_ExtendedCollectedTransactionStatistics) ProtoMessage() {} func (*StatementsResponse_ExtendedCollectedTransactionStatistics) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{67, 2} + return fileDescriptor_status_888e32a70da35e6b, []int{67, 2} } func (m *StatementsResponse_ExtendedCollectedTransactionStatistics) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3118,7 +3118,7 @@ func (m *StatementDiagnosticsReport) Reset() { *m = StatementDiagnostics func (m *StatementDiagnosticsReport) String() string { return proto.CompactTextString(m) } func (*StatementDiagnosticsReport) ProtoMessage() {} func (*StatementDiagnosticsReport) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{68} + return fileDescriptor_status_888e32a70da35e6b, []int{68} } func (m *StatementDiagnosticsReport) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3153,7 +3153,7 @@ func (m *CreateStatementDiagnosticsReportRequest) Reset() { func (m *CreateStatementDiagnosticsReportRequest) String() string { return proto.CompactTextString(m) } func (*CreateStatementDiagnosticsReportRequest) ProtoMessage() {} func (*CreateStatementDiagnosticsReportRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{69} + return fileDescriptor_status_888e32a70da35e6b, []int{69} } func (m *CreateStatementDiagnosticsReportRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3188,7 +3188,7 @@ func (m *CreateStatementDiagnosticsReportResponse) Reset() { func (m *CreateStatementDiagnosticsReportResponse) String() string { return proto.CompactTextString(m) } func (*CreateStatementDiagnosticsReportResponse) ProtoMessage() {} func (*CreateStatementDiagnosticsReportResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{70} + return fileDescriptor_status_888e32a70da35e6b, []int{70} } func (m *CreateStatementDiagnosticsReportResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3220,7 +3220,7 @@ func (m *StatementDiagnosticsReportsRequest) Reset() { *m = StatementDia func (m *StatementDiagnosticsReportsRequest) String() string { return proto.CompactTextString(m) } func (*StatementDiagnosticsReportsRequest) ProtoMessage() {} func (*StatementDiagnosticsReportsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{71} + return fileDescriptor_status_888e32a70da35e6b, []int{71} } func (m *StatementDiagnosticsReportsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3253,7 +3253,7 @@ func (m *StatementDiagnosticsReportsResponse) Reset() { *m = StatementDi func (m *StatementDiagnosticsReportsResponse) String() string { return proto.CompactTextString(m) } func (*StatementDiagnosticsReportsResponse) ProtoMessage() {} func (*StatementDiagnosticsReportsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{72} + return fileDescriptor_status_888e32a70da35e6b, []int{72} } func (m *StatementDiagnosticsReportsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3289,7 +3289,7 @@ func (m *StatementDiagnostics) Reset() { *m = StatementDiagnostics{} } func (m *StatementDiagnostics) String() string { return proto.CompactTextString(m) } func (*StatementDiagnostics) ProtoMessage() {} func (*StatementDiagnostics) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{73} + return fileDescriptor_status_888e32a70da35e6b, []int{73} } func (m *StatementDiagnostics) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3322,7 +3322,7 @@ func (m *StatementDiagnosticsRequest) Reset() { *m = StatementDiagnostic func (m *StatementDiagnosticsRequest) String() string { return proto.CompactTextString(m) } func (*StatementDiagnosticsRequest) ProtoMessage() {} func (*StatementDiagnosticsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{74} + return fileDescriptor_status_888e32a70da35e6b, []int{74} } func (m *StatementDiagnosticsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3355,7 +3355,7 @@ func (m *StatementDiagnosticsResponse) Reset() { *m = StatementDiagnosti func (m *StatementDiagnosticsResponse) String() string { return proto.CompactTextString(m) } func (*StatementDiagnosticsResponse) ProtoMessage() {} func (*StatementDiagnosticsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{75} + return fileDescriptor_status_888e32a70da35e6b, []int{75} } func (m *StatementDiagnosticsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3388,7 +3388,7 @@ func (m *JobRegistryStatusRequest) Reset() { *m = JobRegistryStatusReque func (m *JobRegistryStatusRequest) String() string { return proto.CompactTextString(m) } func (*JobRegistryStatusRequest) ProtoMessage() {} func (*JobRegistryStatusRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{76} + return fileDescriptor_status_888e32a70da35e6b, []int{76} } func (m *JobRegistryStatusRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3422,7 +3422,7 @@ func (m *JobRegistryStatusResponse) Reset() { *m = JobRegistryStatusResp func (m *JobRegistryStatusResponse) String() string { return proto.CompactTextString(m) } func (*JobRegistryStatusResponse) ProtoMessage() {} func (*JobRegistryStatusResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{77} + return fileDescriptor_status_888e32a70da35e6b, []int{77} } func (m *JobRegistryStatusResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3455,7 +3455,7 @@ func (m *JobRegistryStatusResponse_Job) Reset() { *m = JobRegistryStatus func (m *JobRegistryStatusResponse_Job) String() string { return proto.CompactTextString(m) } func (*JobRegistryStatusResponse_Job) ProtoMessage() {} func (*JobRegistryStatusResponse_Job) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{77, 0} + return fileDescriptor_status_888e32a70da35e6b, []int{77, 0} } func (m *JobRegistryStatusResponse_Job) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3488,7 +3488,7 @@ func (m *JobStatusRequest) Reset() { *m = JobStatusRequest{} } func (m *JobStatusRequest) String() string { return proto.CompactTextString(m) } func (*JobStatusRequest) ProtoMessage() {} func (*JobStatusRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{78} + return fileDescriptor_status_888e32a70da35e6b, []int{78} } func (m *JobStatusRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3521,7 +3521,7 @@ func (m *JobStatusResponse) Reset() { *m = JobStatusResponse{} } func (m *JobStatusResponse) String() string { return proto.CompactTextString(m) } func (*JobStatusResponse) ProtoMessage() {} func (*JobStatusResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_status_3a51ecb70cfc0a84, []int{79} + return fileDescriptor_status_888e32a70da35e6b, []int{79} } func (m *JobStatusResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3692,6 +3692,11 @@ const _ = grpc.SupportPackageIsVersion4 type StatusClient interface { Certificates(ctx context.Context, in *CertificatesRequest, opts ...grpc.CallOption) (*CertificatesResponse, error) Details(ctx context.Context, in *DetailsRequest, opts ...grpc.CallOption) (*DetailsResponse, error) + // Nodes returns status info for all commissioned nodes. Decommissioned nodes + // are not included, except in rare cases where the node doing the + // decommissioning crashed before completing the operation. In these cases, + // the decommission operation can be rerun to clean up the status entry. + // // Don't introduce additional usages of this RPC. See #50707 for more details. // The underlying response type is something we're looking to get rid of. Nodes(ctx context.Context, in *NodesRequest, opts ...grpc.CallOption) (*NodesResponse, error) @@ -4041,6 +4046,11 @@ func (c *statusClient) JobStatus(ctx context.Context, in *JobStatusRequest, opts type StatusServer interface { Certificates(context.Context, *CertificatesRequest) (*CertificatesResponse, error) Details(context.Context, *DetailsRequest) (*DetailsResponse, error) + // Nodes returns status info for all commissioned nodes. Decommissioned nodes + // are not included, except in rare cases where the node doing the + // decommissioning crashed before completing the operation. In these cases, + // the decommission operation can be rerun to clean up the status entry. + // // Don't introduce additional usages of this RPC. See #50707 for more details. // The underlying response type is something we're looking to get rid of. Nodes(context.Context, *NodesRequest) (*NodesResponse, error) @@ -22365,10 +22375,10 @@ var ( ) func init() { - proto.RegisterFile("server/serverpb/status.proto", fileDescriptor_status_3a51ecb70cfc0a84) + proto.RegisterFile("server/serverpb/status.proto", fileDescriptor_status_888e32a70da35e6b) } -var fileDescriptor_status_3a51ecb70cfc0a84 = []byte{ +var fileDescriptor_status_888e32a70da35e6b = []byte{ // 6183 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5c, 0x6f, 0x6c, 0x1b, 0xc9, 0x75, 0xf7, 0x92, 0x14, 0x45, 0x3e, 0xea, 0x0f, 0x35, 0xfa, 0x63, 0x9a, 0xf6, 0x49, 0xbe, 0xf5, diff --git a/pkg/server/serverpb/status.proto b/pkg/server/serverpb/status.proto index 1e30644fc67b..3c4ccf98fa5e 100644 --- a/pkg/server/serverpb/status.proto +++ b/pkg/server/serverpb/status.proto @@ -979,6 +979,11 @@ service Status { }; } + // Nodes returns status info for all commissioned nodes. Decommissioned nodes + // are not included, except in rare cases where the node doing the + // decommissioning crashed before completing the operation. In these cases, + // the decommission operation can be rerun to clean up the status entry. + // // Don't introduce additional usages of this RPC. See #50707 for more details. // The underlying response type is something we're looking to get rid of. rpc Nodes(NodesRequest) returns (NodesResponse) { diff --git a/pkg/server/status/BUILD.bazel b/pkg/server/status/BUILD.bazel index 05b4fccb97b3..74608f790b2f 100644 --- a/pkg/server/status/BUILD.bazel +++ b/pkg/server/status/BUILD.bazel @@ -40,6 +40,7 @@ go_library( visibility = ["//visibility:public"], deps = [ "//pkg/build", + "//pkg/clusterversion", "//pkg/gossip", "//pkg/keys", "//pkg/kv", diff --git a/pkg/server/status/recorder.go b/pkg/server/status/recorder.go index 0f3248e422e8..01e78a6a4afe 100644 --- a/pkg/server/status/recorder.go +++ b/pkg/server/status/recorder.go @@ -24,6 +24,7 @@ import ( "time" "github.com/cockroachdb/cockroach/pkg/build" + "github.com/cockroachdb/cockroach/pkg/clusterversion" "github.com/cockroachdb/cockroach/pkg/gossip" "github.com/cockroachdb/cockroach/pkg/keys" "github.com/cockroachdb/cockroach/pkg/kv" @@ -486,21 +487,37 @@ func (mr *MetricsRecorder) GenerateNodeStatus(ctx context.Context) *statuspb.Nod return nodeStat } -// WriteNodeStatus writes the supplied summary to the given client. +// WriteNodeStatus writes the supplied summary to the given client. If mustExist +// is true, the key must already exist and must not change while being updated, +// otherwise an error is returned -- if false, the status is always written. func (mr *MetricsRecorder) WriteNodeStatus( - ctx context.Context, db *kv.DB, nodeStatus statuspb.NodeStatus, + ctx context.Context, db *kv.DB, nodeStatus statuspb.NodeStatus, mustExist bool, ) error { mr.writeSummaryMu.Lock() defer mr.writeSummaryMu.Unlock() key := keys.NodeStatusKey(nodeStatus.Desc.NodeID) - // We use PutInline to store only a single version of the node status. + // We use an inline value to store only a single version of the node status. // There's not much point in keeping the historical versions as we keep // all of the constituent data as timeseries. Further, due to the size // of the build info in the node status, writing one of these every 10s // will generate more versions than will easily fit into a range over // the course of a day. - if err := db.PutInline(ctx, key, &nodeStatus); err != nil { - return err + if mustExist && mr.settings.Version.IsActive(ctx, clusterversion.CPutInline) { + entry, err := db.Get(ctx, key) + if err != nil { + return err + } + if entry.Value == nil { + return errors.New("status entry not found, node may have been decommissioned") + } + err = db.CPutInline(kv.CtxForCPutInline(ctx), key, &nodeStatus, entry.Value.TagAndDataBytes()) + if err != nil { + return err + } + } else { + if err := db.PutInline(ctx, key, &nodeStatus); err != nil { + return err + } } if log.V(2) { statusJSON, err := json.Marshal(&nodeStatus) diff --git a/pkg/server/testserver.go b/pkg/server/testserver.go index b502a9e1a7fd..72fce17cb59d 100644 --- a/pkg/server/testserver.go +++ b/pkg/server/testserver.go @@ -837,7 +837,7 @@ func (ts *TestServer) DrainClients(ctx context.Context) error { // WriteSummaries implements TestServerInterface. func (ts *TestServer) WriteSummaries() error { - return ts.node.writeNodeStatus(context.TODO(), time.Hour) + return ts.node.writeNodeStatus(context.TODO(), time.Hour, false) } // AdminURL implements TestServerInterface.