feat: rename replay_timeout_secs to timeout_secs (#191)

* feat: add `flush_timeout_secs` to `MigrateRegionRequest`

* chore: use `timeout_secs`

* feat: introduce `DowngradingLeader`
This commit is contained in:
Weny Xu
2024-10-17 13:13:26 +08:00
committed by GitHub
parent 796ce9b003
commit b4d301184e
10 changed files with 191 additions and 156 deletions
+11 -10
View File
@@ -354,22 +354,22 @@ const char descriptor_table_protodef_greptime_2fv1_2fmeta_2fheartbeat_2eproto[]
".greptime.v1.meta.Peer\"|\n\016MailboxMessage"
"\022\n\n\002id\030\001 \001(\004\022\017\n\007subject\030\002 \001(\t\022\014\n\004from\030\003 "
"\001(\t\022\n\n\002to\030\004 \001(\t\022\030\n\020timestamp_millis\030\005 \001("
"\003\022\016\n\004json\030\006 \001(\tH\000B\t\n\007payload*&\n\nRegionRo"
"le\022\n\n\006Leader\020\000\022\014\n\010Follower\020\0012\277\001\n\tHeartbe"
"at\022Z\n\tHeartbeat\022\".greptime.v1.meta.Heart"
"beatRequest\032#.greptime.v1.meta.Heartbeat"
"Response\"\000(\0010\001\022V\n\tAskLeader\022\".greptime.v"
"1.meta.AskLeaderRequest\032#.greptime.v1.me"
"ta.AskLeaderResponse\"\000B<Z:github.com/Gre"
"ptimeTeam/greptime-proto/go/greptime/v1/"
"metab\006proto3"
"\003\022\016\n\004json\030\006 \001(\tH\000B\t\n\007payload*=\n\nRegionRo"
"le\022\n\n\006Leader\020\000\022\014\n\010Follower\020\001\022\025\n\021Downgrad"
"ingLeader\020\0022\277\001\n\tHeartbeat\022Z\n\tHeartbeat\022\""
".greptime.v1.meta.HeartbeatRequest\032#.gre"
"ptime.v1.meta.HeartbeatResponse\"\000(\0010\001\022V\n"
"\tAskLeader\022\".greptime.v1.meta.AskLeaderR"
"equest\032#.greptime.v1.meta.AskLeaderRespo"
"nse\"\000B<Z:github.com/GreptimeTeam/greptim"
"e-proto/go/greptime/v1/metab\006proto3"
;
static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_deps[1] = {
&::descriptor_table_greptime_2fv1_2fmeta_2fcommon_2eproto,
};
static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto = {
false, false, 1812, descriptor_table_protodef_greptime_2fv1_2fmeta_2fheartbeat_2eproto,
false, false, 1835, descriptor_table_protodef_greptime_2fv1_2fmeta_2fheartbeat_2eproto,
"greptime/v1/meta/heartbeat.proto",
&descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_once, descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_deps, 1, 10,
schemas, file_default_instances, TableStruct_greptime_2fv1_2fmeta_2fheartbeat_2eproto::offsets,
@@ -393,6 +393,7 @@ bool RegionRole_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
return true;
default:
return false;
+2 -1
View File
@@ -104,12 +104,13 @@ namespace meta {
enum RegionRole : int {
Leader = 0,
Follower = 1,
DowngradingLeader = 2,
RegionRole_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(),
RegionRole_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max()
};
bool RegionRole_IsValid(int value);
constexpr RegionRole RegionRole_MIN = Leader;
constexpr RegionRole RegionRole_MAX = Follower;
constexpr RegionRole RegionRole_MAX = DowngradingLeader;
constexpr int RegionRole_ARRAYSIZE = RegionRole_MAX + 1;
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* RegionRole_descriptor();
+28 -28
View File
@@ -29,7 +29,7 @@ PROTOBUF_CONSTEXPR MigrateRegionRequest::MigrateRegionRequest(
, /*decltype(_impl_.region_id_)*/uint64_t{0u}
, /*decltype(_impl_.from_peer_)*/uint64_t{0u}
, /*decltype(_impl_.to_peer_)*/uint64_t{0u}
, /*decltype(_impl_.replay_timeout_secs_)*/0u
, /*decltype(_impl_.timeout_secs_)*/0u
, /*decltype(_impl_._cached_size_)*/{}} {}
struct MigrateRegionRequestDefaultTypeInternal {
PROTOBUF_CONSTEXPR MigrateRegionRequestDefaultTypeInternal()
@@ -72,7 +72,7 @@ const uint32_t TableStruct_greptime_2fv1_2fmeta_2fregion_2eproto::offsets[] PROT
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::MigrateRegionRequest, _impl_.region_id_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::MigrateRegionRequest, _impl_.from_peer_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::MigrateRegionRequest, _impl_.to_peer_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::MigrateRegionRequest, _impl_.replay_timeout_secs_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::MigrateRegionRequest, _impl_.timeout_secs_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::MigrateRegionResponse, _internal_metadata_),
~0u, // no _extensions_
@@ -95,22 +95,22 @@ static const ::_pb::Message* const file_default_instances[] = {
const char descriptor_table_protodef_greptime_2fv1_2fmeta_2fregion_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n\035greptime/v1/meta/region.proto\022\020greptim"
"e.v1.meta\032\035greptime/v1/meta/common.proto"
"\"\233\001\n\024MigrateRegionRequest\022/\n\006header\030\001 \001("
"\"\224\001\n\024MigrateRegionRequest\022/\n\006header\030\001 \001("
"\0132\037.greptime.v1.meta.RequestHeader\022\021\n\tre"
"gion_id\030\003 \001(\004\022\021\n\tfrom_peer\030\004 \001(\004\022\017\n\007to_p"
"eer\030\005 \001(\004\022\033\n\023replay_timeout_secs\030\006 \001(\r\"u"
"\n\025MigrateRegionResponse\0220\n\006header\030\001 \001(\0132"
" .greptime.v1.meta.ResponseHeader\022*\n\003pid"
"\030\002 \001(\0132\035.greptime.v1.meta.ProcedureIdB<Z"
":github.com/GreptimeTeam/greptime-proto/"
"go/greptime/v1/metab\006proto3"
"eer\030\005 \001(\004\022\024\n\014timeout_secs\030\006 \001(\r\"u\n\025Migra"
"teRegionResponse\0220\n\006header\030\001 \001(\0132 .grept"
"ime.v1.meta.ResponseHeader\022*\n\003pid\030\002 \001(\0132"
"\035.greptime.v1.meta.ProcedureIdB<Z:github"
".com/GreptimeTeam/greptime-proto/go/grep"
"time/v1/metab\006proto3"
;
static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fmeta_2fregion_2eproto_deps[1] = {
&::descriptor_table_greptime_2fv1_2fmeta_2fcommon_2eproto,
};
static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fmeta_2fregion_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fmeta_2fregion_2eproto = {
false, false, 427, descriptor_table_protodef_greptime_2fv1_2fmeta_2fregion_2eproto,
false, false, 420, descriptor_table_protodef_greptime_2fv1_2fmeta_2fregion_2eproto,
"greptime/v1/meta/region.proto",
&descriptor_table_greptime_2fv1_2fmeta_2fregion_2eproto_once, descriptor_table_greptime_2fv1_2fmeta_2fregion_2eproto_deps, 1, 2,
schemas, file_default_instances, TableStruct_greptime_2fv1_2fmeta_2fregion_2eproto::offsets,
@@ -158,7 +158,7 @@ MigrateRegionRequest::MigrateRegionRequest(const MigrateRegionRequest& from)
, decltype(_impl_.region_id_){}
, decltype(_impl_.from_peer_){}
, decltype(_impl_.to_peer_){}
, decltype(_impl_.replay_timeout_secs_){}
, decltype(_impl_.timeout_secs_){}
, /*decltype(_impl_._cached_size_)*/{}};
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
@@ -166,8 +166,8 @@ MigrateRegionRequest::MigrateRegionRequest(const MigrateRegionRequest& from)
_this->_impl_.header_ = new ::greptime::v1::meta::RequestHeader(*from._impl_.header_);
}
::memcpy(&_impl_.region_id_, &from._impl_.region_id_,
static_cast<size_t>(reinterpret_cast<char*>(&_impl_.replay_timeout_secs_) -
reinterpret_cast<char*>(&_impl_.region_id_)) + sizeof(_impl_.replay_timeout_secs_));
static_cast<size_t>(reinterpret_cast<char*>(&_impl_.timeout_secs_) -
reinterpret_cast<char*>(&_impl_.region_id_)) + sizeof(_impl_.timeout_secs_));
// @@protoc_insertion_point(copy_constructor:greptime.v1.meta.MigrateRegionRequest)
}
@@ -180,7 +180,7 @@ inline void MigrateRegionRequest::SharedCtor(
, decltype(_impl_.region_id_){uint64_t{0u}}
, decltype(_impl_.from_peer_){uint64_t{0u}}
, decltype(_impl_.to_peer_){uint64_t{0u}}
, decltype(_impl_.replay_timeout_secs_){0u}
, decltype(_impl_.timeout_secs_){0u}
, /*decltype(_impl_._cached_size_)*/{}
};
}
@@ -214,8 +214,8 @@ void MigrateRegionRequest::Clear() {
}
_impl_.header_ = nullptr;
::memset(&_impl_.region_id_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&_impl_.replay_timeout_secs_) -
reinterpret_cast<char*>(&_impl_.region_id_)) + sizeof(_impl_.replay_timeout_secs_));
reinterpret_cast<char*>(&_impl_.timeout_secs_) -
reinterpret_cast<char*>(&_impl_.region_id_)) + sizeof(_impl_.timeout_secs_));
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -257,10 +257,10 @@ const char* MigrateRegionRequest::_InternalParse(const char* ptr, ::_pbi::ParseC
} else
goto handle_unusual;
continue;
// uint32 replay_timeout_secs = 6;
// uint32 timeout_secs = 6;
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
_impl_.replay_timeout_secs_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
_impl_.timeout_secs_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
@@ -319,10 +319,10 @@ uint8_t* MigrateRegionRequest::_InternalSerialize(
target = ::_pbi::WireFormatLite::WriteUInt64ToArray(5, this->_internal_to_peer(), target);
}
// uint32 replay_timeout_secs = 6;
if (this->_internal_replay_timeout_secs() != 0) {
// uint32 timeout_secs = 6;
if (this->_internal_timeout_secs() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteUInt32ToArray(6, this->_internal_replay_timeout_secs(), target);
target = ::_pbi::WireFormatLite::WriteUInt32ToArray(6, this->_internal_timeout_secs(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
@@ -363,9 +363,9 @@ size_t MigrateRegionRequest::ByteSizeLong() const {
total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_to_peer());
}
// uint32 replay_timeout_secs = 6;
if (this->_internal_replay_timeout_secs() != 0) {
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_replay_timeout_secs());
// uint32 timeout_secs = 6;
if (this->_internal_timeout_secs() != 0) {
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_timeout_secs());
}
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
@@ -399,8 +399,8 @@ void MigrateRegionRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, c
if (from._internal_to_peer() != 0) {
_this->_internal_set_to_peer(from._internal_to_peer());
}
if (from._internal_replay_timeout_secs() != 0) {
_this->_internal_set_replay_timeout_secs(from._internal_replay_timeout_secs());
if (from._internal_timeout_secs() != 0) {
_this->_internal_set_timeout_secs(from._internal_timeout_secs());
}
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
@@ -420,8 +420,8 @@ void MigrateRegionRequest::InternalSwap(MigrateRegionRequest* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(MigrateRegionRequest, _impl_.replay_timeout_secs_)
+ sizeof(MigrateRegionRequest::_impl_.replay_timeout_secs_)
PROTOBUF_FIELD_OFFSET(MigrateRegionRequest, _impl_.timeout_secs_)
+ sizeof(MigrateRegionRequest::_impl_.timeout_secs_)
- PROTOBUF_FIELD_OFFSET(MigrateRegionRequest, _impl_.header_)>(
reinterpret_cast<char*>(&_impl_.header_),
reinterpret_cast<char*>(&other->_impl_.header_));
+21 -21
View File
@@ -192,7 +192,7 @@ class MigrateRegionRequest final :
kRegionIdFieldNumber = 3,
kFromPeerFieldNumber = 4,
kToPeerFieldNumber = 5,
kReplayTimeoutSecsFieldNumber = 6,
kTimeoutSecsFieldNumber = 6,
};
// .greptime.v1.meta.RequestHeader header = 1;
bool has_header() const;
@@ -239,13 +239,13 @@ class MigrateRegionRequest final :
void _internal_set_to_peer(uint64_t value);
public:
// uint32 replay_timeout_secs = 6;
void clear_replay_timeout_secs();
uint32_t replay_timeout_secs() const;
void set_replay_timeout_secs(uint32_t value);
// uint32 timeout_secs = 6;
void clear_timeout_secs();
uint32_t timeout_secs() const;
void set_timeout_secs(uint32_t value);
private:
uint32_t _internal_replay_timeout_secs() const;
void _internal_set_replay_timeout_secs(uint32_t value);
uint32_t _internal_timeout_secs() const;
void _internal_set_timeout_secs(uint32_t value);
public:
// @@protoc_insertion_point(class_scope:greptime.v1.meta.MigrateRegionRequest)
@@ -260,7 +260,7 @@ class MigrateRegionRequest final :
uint64_t region_id_;
uint64_t from_peer_;
uint64_t to_peer_;
uint32_t replay_timeout_secs_;
uint32_t timeout_secs_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
};
union { Impl_ _impl_; };
@@ -599,24 +599,24 @@ inline void MigrateRegionRequest::set_to_peer(uint64_t value) {
// @@protoc_insertion_point(field_set:greptime.v1.meta.MigrateRegionRequest.to_peer)
}
// uint32 replay_timeout_secs = 6;
inline void MigrateRegionRequest::clear_replay_timeout_secs() {
_impl_.replay_timeout_secs_ = 0u;
// uint32 timeout_secs = 6;
inline void MigrateRegionRequest::clear_timeout_secs() {
_impl_.timeout_secs_ = 0u;
}
inline uint32_t MigrateRegionRequest::_internal_replay_timeout_secs() const {
return _impl_.replay_timeout_secs_;
inline uint32_t MigrateRegionRequest::_internal_timeout_secs() const {
return _impl_.timeout_secs_;
}
inline uint32_t MigrateRegionRequest::replay_timeout_secs() const {
// @@protoc_insertion_point(field_get:greptime.v1.meta.MigrateRegionRequest.replay_timeout_secs)
return _internal_replay_timeout_secs();
inline uint32_t MigrateRegionRequest::timeout_secs() const {
// @@protoc_insertion_point(field_get:greptime.v1.meta.MigrateRegionRequest.timeout_secs)
return _internal_timeout_secs();
}
inline void MigrateRegionRequest::_internal_set_replay_timeout_secs(uint32_t value) {
inline void MigrateRegionRequest::_internal_set_timeout_secs(uint32_t value) {
_impl_.replay_timeout_secs_ = value;
_impl_.timeout_secs_ = value;
}
inline void MigrateRegionRequest::set_replay_timeout_secs(uint32_t value) {
_internal_set_replay_timeout_secs(value);
// @@protoc_insertion_point(field_set:greptime.v1.meta.MigrateRegionRequest.replay_timeout_secs)
inline void MigrateRegionRequest::set_timeout_secs(uint32_t value) {
_internal_set_timeout_secs(value);
// @@protoc_insertion_point(field_set:greptime.v1.meta.MigrateRegionRequest.timeout_secs)
}
// -------------------------------------------------------------------
+28 -20
View File
@@ -41,6 +41,10 @@ const (
RegionRole_Leader RegionRole = 0
// Readonly region.
RegionRole_Follower RegionRole = 1
// A downgrading region, which is in the process of downgrading from Leader to Follower.
//
// This role is used to prevent the region from being written during the downgrade process.
RegionRole_DowngradingLeader RegionRole = 2
)
// Enum value maps for RegionRole.
@@ -48,10 +52,12 @@ var (
RegionRole_name = map[int32]string{
0: "Leader",
1: "Follower",
2: "DowngradingLeader",
}
RegionRole_value = map[string]int32{
"Leader": 0,
"Follower": 1,
"Leader": 0,
"Follower": 1,
"DowngradingLeader": 2,
}
)
@@ -882,26 +888,28 @@ var file_greptime_v1_meta_heartbeat_proto_rawDesc = []byte{
0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x74, 0x69,
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x12, 0x14, 0x0a,
0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6a,
0x73, 0x6f, 0x6e, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2a, 0x26,
0x73, 0x6f, 0x6e, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2a, 0x3d,
0x0a, 0x0a, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x0a, 0x0a, 0x06,
0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x6f, 0x6c, 0x6c,
0x6f, 0x77, 0x65, 0x72, 0x10, 0x01, 0x32, 0xbf, 0x01, 0x0a, 0x09, 0x48, 0x65, 0x61, 0x72, 0x74,
0x62, 0x65, 0x61, 0x74, 0x12, 0x5a, 0x0a, 0x09, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61,
0x74, 0x12, 0x22, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e,
0x6d, 0x65, 0x74, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65,
0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65,
0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01,
0x12, 0x56, 0x0a, 0x09, 0x41, 0x73, 0x6b, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x22, 0x2e,
0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61,
0x2e, 0x41, 0x73, 0x6b, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x23, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e,
0x6d, 0x65, 0x74, 0x61, 0x2e, 0x41, 0x73, 0x6b, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68,
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54,
0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76,
0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x6f, 0x77, 0x65, 0x72, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x6f, 0x77, 0x6e, 0x67, 0x72,
0x61, 0x64, 0x69, 0x6e, 0x67, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x10, 0x02, 0x32, 0xbf, 0x01,
0x0a, 0x09, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x5a, 0x0a, 0x09, 0x48,
0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x22, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74,
0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x72,
0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67,
0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e,
0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x56, 0x0a, 0x09, 0x41, 0x73, 0x6b, 0x4c, 0x65,
0x61, 0x64, 0x65, 0x72, 0x12, 0x22, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e,
0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x41, 0x73, 0x6b, 0x4c, 0x65, 0x61, 0x64, 0x65,
0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74,
0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x41, 0x73, 0x6b, 0x4c,
0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42,
0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72,
0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74,
0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65,
0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
+24 -24
View File
@@ -39,11 +39,11 @@ type MigrateRegionRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
RegionId uint64 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"`
FromPeer uint64 `protobuf:"varint,4,opt,name=from_peer,json=fromPeer,proto3" json:"from_peer,omitempty"`
ToPeer uint64 `protobuf:"varint,5,opt,name=to_peer,json=toPeer,proto3" json:"to_peer,omitempty"`
ReplayTimeoutSecs uint32 `protobuf:"varint,6,opt,name=replay_timeout_secs,json=replayTimeoutSecs,proto3" json:"replay_timeout_secs,omitempty"`
Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
RegionId uint64 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"`
FromPeer uint64 `protobuf:"varint,4,opt,name=from_peer,json=fromPeer,proto3" json:"from_peer,omitempty"`
ToPeer uint64 `protobuf:"varint,5,opt,name=to_peer,json=toPeer,proto3" json:"to_peer,omitempty"`
TimeoutSecs uint32 `protobuf:"varint,6,opt,name=timeout_secs,json=timeoutSecs,proto3" json:"timeout_secs,omitempty"`
}
func (x *MigrateRegionRequest) Reset() {
@@ -106,9 +106,9 @@ func (x *MigrateRegionRequest) GetToPeer() uint64 {
return 0
}
func (x *MigrateRegionRequest) GetReplayTimeoutSecs() uint32 {
func (x *MigrateRegionRequest) GetTimeoutSecs() uint32 {
if x != nil {
return x.ReplayTimeoutSecs
return x.TimeoutSecs
}
return 0
}
@@ -176,7 +176,7 @@ var file_greptime_v1_meta_region_proto_rawDesc = []byte{
0x10, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74,
0x61, 0x1a, 0x1d, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d,
0x65, 0x74, 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x22, 0xd2, 0x01, 0x0a, 0x14, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x67, 0x69,
0x22, 0xc5, 0x01, 0x0a, 0x14, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x67, 0x69,
0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x06, 0x68, 0x65, 0x61,
0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70,
0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x71,
@@ -186,22 +186,22 @@ var file_greptime_v1_meta_region_proto_rawDesc = []byte{
0x1b, 0x0a, 0x09, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01,
0x28, 0x04, 0x52, 0x08, 0x66, 0x72, 0x6f, 0x6d, 0x50, 0x65, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07,
0x74, 0x6f, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x74,
0x6f, 0x50, 0x65, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x13, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x5f,
0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x73, 0x18, 0x06, 0x20, 0x01,
0x28, 0x0d, 0x52, 0x11, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75,
0x74, 0x53, 0x65, 0x63, 0x73, 0x22, 0x82, 0x01, 0x0a, 0x15, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74,
0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x38, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x20, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65,
0x74, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65,
0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x03, 0x70, 0x69, 0x64,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d,
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x64,
0x75, 0x72, 0x65, 0x49, 0x64, 0x52, 0x03, 0x70, 0x69, 0x64, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69,
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d,
0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65,
0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x6f, 0x50, 0x65, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74,
0x5f, 0x73, 0x65, 0x63, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x74, 0x69, 0x6d,
0x65, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x63, 0x73, 0x22, 0x82, 0x01, 0x0a, 0x15, 0x4d, 0x69, 0x67,
0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31,
0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65,
0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x03,
0x70, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x65, 0x70,
0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x50, 0x72, 0x6f,
0x63, 0x65, 0x64, 0x75, 0x72, 0x65, 0x49, 0x64, 0x52, 0x03, 0x70, 0x69, 0x64, 0x42, 0x3c, 0x5a,
0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70,
0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d,
0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74,
0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (
@@ -35,6 +35,16 @@ public final class HeartbeatOuterClass {
* <code>Follower = 1;</code>
*/
Follower(1),
/**
* <pre>
* A downgrading region, which is in the process of downgrading from Leader to Follower.
*
* This role is used to prevent the region from being written during the downgrade process.
* </pre>
*
* <code>DowngradingLeader = 2;</code>
*/
DowngradingLeader(2),
UNRECOGNIZED(-1),
;
@@ -54,6 +64,16 @@ public final class HeartbeatOuterClass {
* <code>Follower = 1;</code>
*/
public static final int Follower_VALUE = 1;
/**
* <pre>
* A downgrading region, which is in the process of downgrading from Leader to Follower.
*
* This role is used to prevent the region from being written during the downgrade process.
* </pre>
*
* <code>DowngradingLeader = 2;</code>
*/
public static final int DowngradingLeader_VALUE = 2;
public final int getNumber() {
@@ -82,6 +102,7 @@ public final class HeartbeatOuterClass {
switch (value) {
case 0: return Leader;
case 1: return Follower;
case 2: return DowngradingLeader;
default: return null;
}
}
@@ -10391,15 +10412,15 @@ com.google.protobuf.ByteString defaultValue);
".greptime.v1.meta.Peer\"|\n\016MailboxMessage" +
"\022\n\n\002id\030\001 \001(\004\022\017\n\007subject\030\002 \001(\t\022\014\n\004from\030\003 " +
"\001(\t\022\n\n\002to\030\004 \001(\t\022\030\n\020timestamp_millis\030\005 \001(" +
"\003\022\016\n\004json\030\006 \001(\tH\000B\t\n\007payload*&\n\nRegionRo" +
"le\022\n\n\006Leader\020\000\022\014\n\010Follower\020\0012\277\001\n\tHeartbe" +
"at\022Z\n\tHeartbeat\022\".greptime.v1.meta.Heart" +
"beatRequest\032#.greptime.v1.meta.Heartbeat" +
"Response\"\000(\0010\001\022V\n\tAskLeader\022\".greptime.v" +
"1.meta.AskLeaderRequest\032#.greptime.v1.me" +
"ta.AskLeaderResponse\"\000B<Z:github.com/Gre" +
"ptimeTeam/greptime-proto/go/greptime/v1/" +
"metab\006proto3"
"\003\022\016\n\004json\030\006 \001(\tH\000B\t\n\007payload*=\n\nRegionRo" +
"le\022\n\n\006Leader\020\000\022\014\n\010Follower\020\001\022\025\n\021Downgrad" +
"ingLeader\020\0022\277\001\n\tHeartbeat\022Z\n\tHeartbeat\022\"" +
".greptime.v1.meta.HeartbeatRequest\032#.gre" +
"ptime.v1.meta.HeartbeatResponse\"\000(\0010\001\022V\n" +
"\tAskLeader\022\".greptime.v1.meta.AskLeaderR" +
"equest\032#.greptime.v1.meta.AskLeaderRespo" +
"nse\"\000B<Z:github.com/GreptimeTeam/greptim" +
"e-proto/go/greptime/v1/metab\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
+42 -42
View File
@@ -52,10 +52,10 @@ public final class Region {
long getToPeer();
/**
* <code>uint32 replay_timeout_secs = 6;</code>
* @return The replayTimeoutSecs.
* <code>uint32 timeout_secs = 6;</code>
* @return The timeoutSecs.
*/
int getReplayTimeoutSecs();
int getTimeoutSecs();
}
/**
* Protobuf type {@code greptime.v1.meta.MigrateRegionRequest}
@@ -132,7 +132,7 @@ public final class Region {
}
case 48: {
replayTimeoutSecs_ = input.readUInt32();
timeoutSecs_ = input.readUInt32();
break;
}
default: {
@@ -228,15 +228,15 @@ public final class Region {
return toPeer_;
}
public static final int REPLAY_TIMEOUT_SECS_FIELD_NUMBER = 6;
private int replayTimeoutSecs_;
public static final int TIMEOUT_SECS_FIELD_NUMBER = 6;
private int timeoutSecs_;
/**
* <code>uint32 replay_timeout_secs = 6;</code>
* @return The replayTimeoutSecs.
* <code>uint32 timeout_secs = 6;</code>
* @return The timeoutSecs.
*/
@java.lang.Override
public int getReplayTimeoutSecs() {
return replayTimeoutSecs_;
public int getTimeoutSecs() {
return timeoutSecs_;
}
private byte memoizedIsInitialized = -1;
@@ -265,8 +265,8 @@ public final class Region {
if (toPeer_ != 0L) {
output.writeUInt64(5, toPeer_);
}
if (replayTimeoutSecs_ != 0) {
output.writeUInt32(6, replayTimeoutSecs_);
if (timeoutSecs_ != 0) {
output.writeUInt32(6, timeoutSecs_);
}
unknownFields.writeTo(output);
}
@@ -293,9 +293,9 @@ public final class Region {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(5, toPeer_);
}
if (replayTimeoutSecs_ != 0) {
if (timeoutSecs_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(6, replayTimeoutSecs_);
.computeUInt32Size(6, timeoutSecs_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
@@ -323,8 +323,8 @@ public final class Region {
!= other.getFromPeer()) return false;
if (getToPeer()
!= other.getToPeer()) return false;
if (getReplayTimeoutSecs()
!= other.getReplayTimeoutSecs()) return false;
if (getTimeoutSecs()
!= other.getTimeoutSecs()) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@@ -349,8 +349,8 @@ public final class Region {
hash = (37 * hash) + TO_PEER_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getToPeer());
hash = (37 * hash) + REPLAY_TIMEOUT_SECS_FIELD_NUMBER;
hash = (53 * hash) + getReplayTimeoutSecs();
hash = (37 * hash) + TIMEOUT_SECS_FIELD_NUMBER;
hash = (53 * hash) + getTimeoutSecs();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
@@ -496,7 +496,7 @@ public final class Region {
toPeer_ = 0L;
replayTimeoutSecs_ = 0;
timeoutSecs_ = 0;
return this;
}
@@ -532,7 +532,7 @@ public final class Region {
result.regionId_ = regionId_;
result.fromPeer_ = fromPeer_;
result.toPeer_ = toPeer_;
result.replayTimeoutSecs_ = replayTimeoutSecs_;
result.timeoutSecs_ = timeoutSecs_;
onBuilt();
return result;
}
@@ -593,8 +593,8 @@ public final class Region {
if (other.getToPeer() != 0L) {
setToPeer(other.getToPeer());
}
if (other.getReplayTimeoutSecs() != 0) {
setReplayTimeoutSecs(other.getReplayTimeoutSecs());
if (other.getTimeoutSecs() != 0) {
setTimeoutSecs(other.getTimeoutSecs());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
@@ -837,33 +837,33 @@ public final class Region {
return this;
}
private int replayTimeoutSecs_ ;
private int timeoutSecs_ ;
/**
* <code>uint32 replay_timeout_secs = 6;</code>
* @return The replayTimeoutSecs.
* <code>uint32 timeout_secs = 6;</code>
* @return The timeoutSecs.
*/
@java.lang.Override
public int getReplayTimeoutSecs() {
return replayTimeoutSecs_;
public int getTimeoutSecs() {
return timeoutSecs_;
}
/**
* <code>uint32 replay_timeout_secs = 6;</code>
* @param value The replayTimeoutSecs to set.
* <code>uint32 timeout_secs = 6;</code>
* @param value The timeoutSecs to set.
* @return This builder for chaining.
*/
public Builder setReplayTimeoutSecs(int value) {
public Builder setTimeoutSecs(int value) {
replayTimeoutSecs_ = value;
timeoutSecs_ = value;
onChanged();
return this;
}
/**
* <code>uint32 replay_timeout_secs = 6;</code>
* <code>uint32 timeout_secs = 6;</code>
* @return This builder for chaining.
*/
public Builder clearReplayTimeoutSecs() {
public Builder clearTimeoutSecs() {
replayTimeoutSecs_ = 0;
timeoutSecs_ = 0;
onChanged();
return this;
}
@@ -1767,15 +1767,15 @@ public final class Region {
java.lang.String[] descriptorData = {
"\n\035greptime/v1/meta/region.proto\022\020greptim" +
"e.v1.meta\032\035greptime/v1/meta/common.proto" +
"\"\233\001\n\024MigrateRegionRequest\022/\n\006header\030\001 \001(" +
"\"\224\001\n\024MigrateRegionRequest\022/\n\006header\030\001 \001(" +
"\0132\037.greptime.v1.meta.RequestHeader\022\021\n\tre" +
"gion_id\030\003 \001(\004\022\021\n\tfrom_peer\030\004 \001(\004\022\017\n\007to_p" +
"eer\030\005 \001(\004\022\033\n\023replay_timeout_secs\030\006 \001(\r\"u" +
"\n\025MigrateRegionResponse\0220\n\006header\030\001 \001(\0132" +
" .greptime.v1.meta.ResponseHeader\022*\n\003pid" +
"\030\002 \001(\0132\035.greptime.v1.meta.ProcedureIdB<Z" +
":github.com/GreptimeTeam/greptime-proto/" +
"go/greptime/v1/metab\006proto3"
"eer\030\005 \001(\004\022\024\n\014timeout_secs\030\006 \001(\r\"u\n\025Migra" +
"teRegionResponse\0220\n\006header\030\001 \001(\0132 .grept" +
"ime.v1.meta.ResponseHeader\022*\n\003pid\030\002 \001(\0132" +
"\035.greptime.v1.meta.ProcedureIdB<Z:github" +
".com/GreptimeTeam/greptime-proto/go/grep" +
"time/v1/metab\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
@@ -1787,7 +1787,7 @@ public final class Region {
internal_static_greptime_v1_meta_MigrateRegionRequest_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_greptime_v1_meta_MigrateRegionRequest_descriptor,
new java.lang.String[] { "Header", "RegionId", "FromPeer", "ToPeer", "ReplayTimeoutSecs", });
new java.lang.String[] { "Header", "RegionId", "FromPeer", "ToPeer", "TimeoutSecs", });
internal_static_greptime_v1_meta_MigrateRegionResponse_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_greptime_v1_meta_MigrateRegionResponse_fieldAccessorTable = new
+4
View File
@@ -54,6 +54,10 @@ enum RegionRole {
Leader = 0;
// Readonly region.
Follower = 1;
// A downgrading region, which is in the process of downgrading from Leader to Follower.
//
// This role is used to prevent the region from being written during the downgrade process.
DowngradingLeader = 2;
}
message NodeInfo {
+1 -1
View File
@@ -25,7 +25,7 @@ message MigrateRegionRequest {
uint64 region_id = 3;
uint64 from_peer = 4;
uint64 to_peer = 5;
uint32 replay_timeout_secs = 6;
uint32 timeout_secs = 6;
}
message MigrateRegionResponse {