github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/kv/kvserver/kvserverpb/log.proto (about)

     1  // Copyright 2017 The Cockroach Authors.
     2  //
     3  // Use of this software is governed by the Business Source License
     4  // included in the file licenses/BSL.txt.
     5  //
     6  // As of the Change Date specified in that file, in accordance with
     7  // the Business Source License, use of this software will be governed
     8  // by the Apache License, Version 2.0, included in the file
     9  // licenses/APL.txt.
    10  
    11  syntax = "proto3";
    12  package cockroach.kv.kvserver.storagepb;
    13  option go_package = "kvserverpb";
    14  
    15  import "roachpb/metadata.proto";
    16  import "gogoproto/gogo.proto";
    17  import "google/protobuf/timestamp.proto";
    18  
    19  enum RangeLogEventType {
    20    // These are lower case to maintain compatibility with how they were
    21    // originally stored.
    22    // Split is the event type recorded when a range splits.
    23    split = 0;
    24    // Merge is the event type recorded when a range merges.
    25    merge = 3;
    26    // Add is the event type recorded when a range adds a new replica.
    27    add = 1;
    28    // Remove is the event type recorded when a range removed an existing replica.
    29    remove = 2;
    30  }
    31  
    32  message RangeLogEvent {
    33    message Info {
    34        roachpb.RangeDescriptor updated_desc = 1 [(gogoproto.jsontag) = "UpdatedDesc,omitempty"];
    35        roachpb.RangeDescriptor new_desc = 2 [(gogoproto.jsontag) = "NewDesc,omitempty"];
    36        roachpb.RangeDescriptor removed_desc = 7 [(gogoproto.jsontag) = "RemovedDesc,omitempty"];
    37        roachpb.ReplicaDescriptor added_replica = 3 [(gogoproto.jsontag) = "AddReplica,omitempty"];
    38        roachpb.ReplicaDescriptor removed_replica = 4 [(gogoproto.jsontag) = "RemovedReplica,omitempty"];
    39        string reason = 5 [
    40          (gogoproto.jsontag) = "Reason,omitempty",
    41          (gogoproto.casttype) = "RangeLogEventReason"
    42        ];
    43        string details = 6 [(gogoproto.jsontag) = "Details,omitempty"];
    44    }
    45  
    46    google.protobuf.Timestamp timestamp = 1 [
    47        (gogoproto.nullable) = false,
    48        (gogoproto.stdtime) = true
    49    ];
    50    int64 range_id = 2 [
    51      (gogoproto.customname) = "RangeID",
    52      (gogoproto.casttype) = "github.com/cockroachdb/cockroach/pkg/roachpb.RangeID"
    53    ];
    54    int32 store_id = 3 [
    55      (gogoproto.customname) = "StoreID",
    56      (gogoproto.casttype) = "github.com/cockroachdb/cockroach/pkg/roachpb.StoreID"
    57    ];
    58    RangeLogEventType event_type = 4;
    59    int64 other_range_id = 5 [
    60      (gogoproto.customname) = "OtherRangeID",
    61      (gogoproto.casttype) = "github.com/cockroachdb/cockroach/pkg/roachpb.RangeID"
    62    ];
    63    Info info = 6;
    64  }