-
Notifications
You must be signed in to change notification settings - Fork 3.8k
/
Copy pathdebug_events.proto
56 lines (49 loc) · 2.47 KB
/
debug_events.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Copyright 2021 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.
syntax = "proto3";
package cockroach.util.log.eventpb;
option go_package = "eventpb";
import "gogoproto/gogo.proto";
import "util/log/eventpb/events.proto";
// Category: Debugging events
// Channel: OPS
//
// Events in this category pertain to debugging operations performed by
// operators or (more commonly) Cockroach Labs employees. These operations can
// e.g. directly access and mutate internal state, breaking system invariants.
// Notes to CockroachDB maintainers: refer to doc.go at the package
// level for more details. Beware that JSON compatibility rules apply
// here, not protobuf.
// *Really look at doc.go before modifying this file.*
// CommonDebugEventDetails contains the fields common to all debugging events.
message CommonDebugEventDetails {
// The node ID where the event originated.
int32 node_id = 1 [(gogoproto.customname) = "NodeID", (gogoproto.jsontag) = ",omitempty"];
// The user which performed the operation.
string user = 2 [(gogoproto.jsontag) = ",omitempty"];
}
// DebugSendKvBatch is recorded when an arbitrary KV BatchRequest is submitted
// to the cluster via the `debug send-kv-batch` CLI command.
message DebugSendKvBatch {
CommonEventDetails common = 1 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "", (gogoproto.embed) = true];
CommonDebugEventDetails debug = 2 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "", (gogoproto.embed) = true];
string batch_request = 3 [(gogoproto.jsontag) = ",omitempty"];
}
// DebugRecoverReplica is recorded when unsafe loss of quorum recovery is performed.
message DebugRecoverReplica {
CommonEventDetails common = 1 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "", (gogoproto.embed) = true];
CommonDebugEventDetails debug = 2 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "", (gogoproto.embed) = true];
int64 range_id = 3 [(gogoproto.customname) = "RangeID"];
int64 store_id = 4 [(gogoproto.customname) = "StoreID"];
int32 original_replica_id = 5 [(gogoproto.customname) = "OriginalReplicaID"];
int32 updated_replica_id = 6 [(gogoproto.customname) = "UpdatedReplicaID"];
string start_key = 7;
string end_key = 8;
}