diff --git a/c-deps/libroach/protos/roachpb/data.pb.cc b/c-deps/libroach/protos/roachpb/data.pb.cc index 649b9a65fac2..1ec8abd1d5b3 100644 --- a/c-deps/libroach/protos/roachpb/data.pb.cc +++ b/c-deps/libroach/protos/roachpb/data.pb.cc @@ -1983,16 +1983,16 @@ ::std::string MergeTrigger::GetTypeName() const { // =================================================================== void ChangeReplicasTrigger::InitAsDefaultInstance() { - ::cockroach::roachpb::_ChangeReplicasTrigger_default_instance_._instance.get_mutable()->replica_ = const_cast< ::cockroach::roachpb::ReplicaDescriptor*>( + ::cockroach::roachpb::_ChangeReplicasTrigger_default_instance_._instance.get_mutable()->deprecated_replica_ = const_cast< ::cockroach::roachpb::ReplicaDescriptor*>( ::cockroach::roachpb::ReplicaDescriptor::internal_default_instance()); ::cockroach::roachpb::_ChangeReplicasTrigger_default_instance_._instance.get_mutable()->desc_ = const_cast< ::cockroach::roachpb::RangeDescriptor*>( ::cockroach::roachpb::RangeDescriptor::internal_default_instance()); } -void ChangeReplicasTrigger::clear_replica() { - if (GetArenaNoVirtual() == NULL && replica_ != NULL) { - delete replica_; +void ChangeReplicasTrigger::clear_deprecated_replica() { + if (GetArenaNoVirtual() == NULL && deprecated_replica_ != NULL) { + delete deprecated_replica_; } - replica_ = NULL; + deprecated_replica_ = NULL; } void ChangeReplicasTrigger::clear_deprecated_updated_replicas() { deprecated_updated_replicas_.Clear(); @@ -2003,12 +2003,20 @@ void ChangeReplicasTrigger::clear_desc() { } desc_ = NULL; } +void ChangeReplicasTrigger::clear_internal_added_replicas() { + internal_added_replicas_.Clear(); +} +void ChangeReplicasTrigger::clear_internal_removed_replicas() { + internal_removed_replicas_.Clear(); +} #if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int ChangeReplicasTrigger::kChangeTypeFieldNumber; -const int ChangeReplicasTrigger::kReplicaFieldNumber; +const int ChangeReplicasTrigger::kDeprecatedChangeTypeFieldNumber; +const int ChangeReplicasTrigger::kDeprecatedReplicaFieldNumber; const int ChangeReplicasTrigger::kDeprecatedUpdatedReplicasFieldNumber; const int ChangeReplicasTrigger::kDeprecatedNextReplicaIdFieldNumber; const int ChangeReplicasTrigger::kDescFieldNumber; +const int ChangeReplicasTrigger::kInternalAddedReplicasFieldNumber; +const int ChangeReplicasTrigger::kInternalRemovedReplicasFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 ChangeReplicasTrigger::ChangeReplicasTrigger() @@ -2021,28 +2029,30 @@ ChangeReplicasTrigger::ChangeReplicasTrigger() ChangeReplicasTrigger::ChangeReplicasTrigger(const ChangeReplicasTrigger& from) : ::google::protobuf::MessageLite(), _internal_metadata_(NULL), - deprecated_updated_replicas_(from.deprecated_updated_replicas_) { + deprecated_updated_replicas_(from.deprecated_updated_replicas_), + internal_added_replicas_(from.internal_added_replicas_), + internal_removed_replicas_(from.internal_removed_replicas_) { _internal_metadata_.MergeFrom(from._internal_metadata_); - if (from.has_replica()) { - replica_ = new ::cockroach::roachpb::ReplicaDescriptor(*from.replica_); + if (from.has_deprecated_replica()) { + deprecated_replica_ = new ::cockroach::roachpb::ReplicaDescriptor(*from.deprecated_replica_); } else { - replica_ = NULL; + deprecated_replica_ = NULL; } if (from.has_desc()) { desc_ = new ::cockroach::roachpb::RangeDescriptor(*from.desc_); } else { desc_ = NULL; } - ::memcpy(&change_type_, &from.change_type_, + ::memcpy(&deprecated_change_type_, &from.deprecated_change_type_, static_cast(reinterpret_cast(&deprecated_next_replica_id_) - - reinterpret_cast(&change_type_)) + sizeof(deprecated_next_replica_id_)); + reinterpret_cast(&deprecated_change_type_)) + sizeof(deprecated_next_replica_id_)); // @@protoc_insertion_point(copy_constructor:cockroach.roachpb.ChangeReplicasTrigger) } void ChangeReplicasTrigger::SharedCtor() { - ::memset(&replica_, 0, static_cast( + ::memset(&deprecated_replica_, 0, static_cast( reinterpret_cast(&deprecated_next_replica_id_) - - reinterpret_cast(&replica_)) + sizeof(deprecated_next_replica_id_)); + reinterpret_cast(&deprecated_replica_)) + sizeof(deprecated_next_replica_id_)); } ChangeReplicasTrigger::~ChangeReplicasTrigger() { @@ -2051,7 +2061,7 @@ ChangeReplicasTrigger::~ChangeReplicasTrigger() { } void ChangeReplicasTrigger::SharedDtor() { - if (this != internal_default_instance()) delete replica_; + if (this != internal_default_instance()) delete deprecated_replica_; if (this != internal_default_instance()) delete desc_; } @@ -2071,17 +2081,19 @@ void ChangeReplicasTrigger::Clear() { (void) cached_has_bits; deprecated_updated_replicas_.Clear(); - if (GetArenaNoVirtual() == NULL && replica_ != NULL) { - delete replica_; + internal_added_replicas_.Clear(); + internal_removed_replicas_.Clear(); + if (GetArenaNoVirtual() == NULL && deprecated_replica_ != NULL) { + delete deprecated_replica_; } - replica_ = NULL; + deprecated_replica_ = NULL; if (GetArenaNoVirtual() == NULL && desc_ != NULL) { delete desc_; } desc_ = NULL; - ::memset(&change_type_, 0, static_cast( + ::memset(&deprecated_change_type_, 0, static_cast( reinterpret_cast(&deprecated_next_replica_id_) - - reinterpret_cast(&change_type_)) + sizeof(deprecated_next_replica_id_)); + reinterpret_cast(&deprecated_change_type_)) + sizeof(deprecated_next_replica_id_)); _internal_metadata_.Clear(); } @@ -2101,7 +2113,7 @@ bool ChangeReplicasTrigger::MergePartialFromCodedStream( tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // .cockroach.roachpb.ReplicaChangeType change_type = 1; + // .cockroach.roachpb.ReplicaChangeType deprecated_change_type = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { @@ -2109,7 +2121,7 @@ bool ChangeReplicasTrigger::MergePartialFromCodedStream( DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( input, &value))); - set_change_type(static_cast< ::cockroach::roachpb::ReplicaChangeType >(value)); + set_deprecated_change_type(static_cast< ::cockroach::roachpb::ReplicaChangeType >(value)); } else { goto handle_unusual; } @@ -2120,7 +2132,7 @@ bool ChangeReplicasTrigger::MergePartialFromCodedStream( if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( - input, mutable_replica())); + input, mutable_deprecated_replica())); } else { goto handle_unusual; } @@ -2163,6 +2175,28 @@ bool ChangeReplicasTrigger::MergePartialFromCodedStream( break; } + case 6: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, add_internal_added_replicas())); + } else { + goto handle_unusual; + } + break; + } + + case 7: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, add_internal_removed_replicas())); + } else { + goto handle_unusual; + } + break; + } + default: { handle_unusual: if (tag == 0) { @@ -2189,15 +2223,15 @@ void ChangeReplicasTrigger::SerializeWithCachedSizes( ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .cockroach.roachpb.ReplicaChangeType change_type = 1; - if (this->change_type() != 0) { + // .cockroach.roachpb.ReplicaChangeType deprecated_change_type = 1; + if (this->deprecated_change_type() != 0) { ::google::protobuf::internal::WireFormatLite::WriteEnum( - 1, this->change_type(), output); + 1, this->deprecated_change_type(), output); } - if (this->has_replica()) { + if (this->has_deprecated_replica()) { ::google::protobuf::internal::WireFormatLite::WriteMessage( - 2, this->_internal_replica(), output); + 2, this->_internal_deprecated_replica(), output); } for (unsigned int i = 0, @@ -2218,6 +2252,22 @@ void ChangeReplicasTrigger::SerializeWithCachedSizes( 5, this->_internal_desc(), output); } + for (unsigned int i = 0, + n = static_cast(this->internal_added_replicas_size()); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessage( + 6, + this->internal_added_replicas(static_cast(i)), + output); + } + + for (unsigned int i = 0, + n = static_cast(this->internal_removed_replicas_size()); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessage( + 7, + this->internal_removed_replicas(static_cast(i)), + output); + } + output->WriteRaw((::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).data(), static_cast((::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).size())); // @@protoc_insertion_point(serialize_end:cockroach.roachpb.ChangeReplicasTrigger) @@ -2239,10 +2289,30 @@ size_t ChangeReplicasTrigger::ByteSizeLong() const { } } - if (this->has_replica()) { + { + unsigned int count = static_cast(this->internal_added_replicas_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSize( + this->internal_added_replicas(static_cast(i))); + } + } + + { + unsigned int count = static_cast(this->internal_removed_replicas_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSize( + this->internal_removed_replicas(static_cast(i))); + } + } + + if (this->has_deprecated_replica()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( - *replica_); + *deprecated_replica_); } // .cockroach.roachpb.RangeDescriptor desc = 5; @@ -2252,10 +2322,10 @@ size_t ChangeReplicasTrigger::ByteSizeLong() const { *desc_); } - // .cockroach.roachpb.ReplicaChangeType change_type = 1; - if (this->change_type() != 0) { + // .cockroach.roachpb.ReplicaChangeType deprecated_change_type = 1; + if (this->deprecated_change_type() != 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::EnumSize(this->change_type()); + ::google::protobuf::internal::WireFormatLite::EnumSize(this->deprecated_change_type()); } if (this->deprecated_next_replica_id() != 0) { @@ -2282,14 +2352,16 @@ void ChangeReplicasTrigger::MergeFrom(const ChangeReplicasTrigger& from) { (void) cached_has_bits; deprecated_updated_replicas_.MergeFrom(from.deprecated_updated_replicas_); - if (from.has_replica()) { - mutable_replica()->::cockroach::roachpb::ReplicaDescriptor::MergeFrom(from.replica()); + internal_added_replicas_.MergeFrom(from.internal_added_replicas_); + internal_removed_replicas_.MergeFrom(from.internal_removed_replicas_); + if (from.has_deprecated_replica()) { + mutable_deprecated_replica()->::cockroach::roachpb::ReplicaDescriptor::MergeFrom(from.deprecated_replica()); } if (from.has_desc()) { mutable_desc()->::cockroach::roachpb::RangeDescriptor::MergeFrom(from.desc()); } - if (from.change_type() != 0) { - set_change_type(from.change_type()); + if (from.deprecated_change_type() != 0) { + set_deprecated_change_type(from.deprecated_change_type()); } if (from.deprecated_next_replica_id() != 0) { set_deprecated_next_replica_id(from.deprecated_next_replica_id()); @@ -2314,9 +2386,11 @@ void ChangeReplicasTrigger::Swap(ChangeReplicasTrigger* other) { void ChangeReplicasTrigger::InternalSwap(ChangeReplicasTrigger* other) { using std::swap; CastToBase(&deprecated_updated_replicas_)->InternalSwap(CastToBase(&other->deprecated_updated_replicas_)); - swap(replica_, other->replica_); + CastToBase(&internal_added_replicas_)->InternalSwap(CastToBase(&other->internal_added_replicas_)); + CastToBase(&internal_removed_replicas_)->InternalSwap(CastToBase(&other->internal_removed_replicas_)); + swap(deprecated_replica_, other->deprecated_replica_); swap(desc_, other->desc_); - swap(change_type_, other->change_type_); + swap(deprecated_change_type_, other->deprecated_change_type_); swap(deprecated_next_replica_id_, other->deprecated_next_replica_id_); _internal_metadata_.Swap(&other->_internal_metadata_); } diff --git a/c-deps/libroach/protos/roachpb/data.pb.h b/c-deps/libroach/protos/roachpb/data.pb.h index e55a7cb8dcc0..32d981d48518 100644 --- a/c-deps/libroach/protos/roachpb/data.pb.h +++ b/c-deps/libroach/protos/roachpb/data.pb.h @@ -1017,16 +1017,38 @@ class ChangeReplicasTrigger : public ::google::protobuf::MessageLite /* @@protoc const ::google::protobuf::RepeatedPtrField< ::cockroach::roachpb::ReplicaDescriptor >& deprecated_updated_replicas() const; - bool has_replica() const; - void clear_replica(); - static const int kReplicaFieldNumber = 2; + int internal_added_replicas_size() const; + void clear_internal_added_replicas(); + static const int kInternalAddedReplicasFieldNumber = 6; + ::cockroach::roachpb::ReplicaDescriptor* mutable_internal_added_replicas(int index); + ::google::protobuf::RepeatedPtrField< ::cockroach::roachpb::ReplicaDescriptor >* + mutable_internal_added_replicas(); + const ::cockroach::roachpb::ReplicaDescriptor& internal_added_replicas(int index) const; + ::cockroach::roachpb::ReplicaDescriptor* add_internal_added_replicas(); + const ::google::protobuf::RepeatedPtrField< ::cockroach::roachpb::ReplicaDescriptor >& + internal_added_replicas() const; + + int internal_removed_replicas_size() const; + void clear_internal_removed_replicas(); + static const int kInternalRemovedReplicasFieldNumber = 7; + ::cockroach::roachpb::ReplicaDescriptor* mutable_internal_removed_replicas(int index); + ::google::protobuf::RepeatedPtrField< ::cockroach::roachpb::ReplicaDescriptor >* + mutable_internal_removed_replicas(); + const ::cockroach::roachpb::ReplicaDescriptor& internal_removed_replicas(int index) const; + ::cockroach::roachpb::ReplicaDescriptor* add_internal_removed_replicas(); + const ::google::protobuf::RepeatedPtrField< ::cockroach::roachpb::ReplicaDescriptor >& + internal_removed_replicas() const; + + bool has_deprecated_replica() const; + void clear_deprecated_replica(); + static const int kDeprecatedReplicaFieldNumber = 2; private: - const ::cockroach::roachpb::ReplicaDescriptor& _internal_replica() const; + const ::cockroach::roachpb::ReplicaDescriptor& _internal_deprecated_replica() const; public: - const ::cockroach::roachpb::ReplicaDescriptor& replica() const; - ::cockroach::roachpb::ReplicaDescriptor* release_replica(); - ::cockroach::roachpb::ReplicaDescriptor* mutable_replica(); - void set_allocated_replica(::cockroach::roachpb::ReplicaDescriptor* replica); + const ::cockroach::roachpb::ReplicaDescriptor& deprecated_replica() const; + ::cockroach::roachpb::ReplicaDescriptor* release_deprecated_replica(); + ::cockroach::roachpb::ReplicaDescriptor* mutable_deprecated_replica(); + void set_allocated_deprecated_replica(::cockroach::roachpb::ReplicaDescriptor* deprecated_replica); // .cockroach.roachpb.RangeDescriptor desc = 5; bool has_desc() const; @@ -1040,11 +1062,11 @@ class ChangeReplicasTrigger : public ::google::protobuf::MessageLite /* @@protoc ::cockroach::roachpb::RangeDescriptor* mutable_desc(); void set_allocated_desc(::cockroach::roachpb::RangeDescriptor* desc); - // .cockroach.roachpb.ReplicaChangeType change_type = 1; - void clear_change_type(); - static const int kChangeTypeFieldNumber = 1; - ::cockroach::roachpb::ReplicaChangeType change_type() const; - void set_change_type(::cockroach::roachpb::ReplicaChangeType value); + // .cockroach.roachpb.ReplicaChangeType deprecated_change_type = 1; + void clear_deprecated_change_type(); + static const int kDeprecatedChangeTypeFieldNumber = 1; + ::cockroach::roachpb::ReplicaChangeType deprecated_change_type() const; + void set_deprecated_change_type(::cockroach::roachpb::ReplicaChangeType value); void clear_deprecated_next_replica_id(); static const int kDeprecatedNextReplicaIdFieldNumber = 4; @@ -1056,9 +1078,11 @@ class ChangeReplicasTrigger : public ::google::protobuf::MessageLite /* @@protoc ::google::protobuf::internal::InternalMetadataWithArenaLite _internal_metadata_; ::google::protobuf::RepeatedPtrField< ::cockroach::roachpb::ReplicaDescriptor > deprecated_updated_replicas_; - ::cockroach::roachpb::ReplicaDescriptor* replica_; + ::google::protobuf::RepeatedPtrField< ::cockroach::roachpb::ReplicaDescriptor > internal_added_replicas_; + ::google::protobuf::RepeatedPtrField< ::cockroach::roachpb::ReplicaDescriptor > internal_removed_replicas_; + ::cockroach::roachpb::ReplicaDescriptor* deprecated_replica_; ::cockroach::roachpb::RangeDescriptor* desc_; - int change_type_; + int deprecated_change_type_; ::google::protobuf::int32 deprecated_next_replica_id_; mutable ::google::protobuf::internal::CachedSize _cached_size_; friend struct ::protobuf_roachpb_2fdata_2eproto::TableStruct; @@ -3333,65 +3357,65 @@ inline void MergeTrigger::set_allocated_freeze_start(::cockroach::util::hlc::Tim // ChangeReplicasTrigger -// .cockroach.roachpb.ReplicaChangeType change_type = 1; -inline void ChangeReplicasTrigger::clear_change_type() { - change_type_ = 0; +// .cockroach.roachpb.ReplicaChangeType deprecated_change_type = 1; +inline void ChangeReplicasTrigger::clear_deprecated_change_type() { + deprecated_change_type_ = 0; } -inline ::cockroach::roachpb::ReplicaChangeType ChangeReplicasTrigger::change_type() const { - // @@protoc_insertion_point(field_get:cockroach.roachpb.ChangeReplicasTrigger.change_type) - return static_cast< ::cockroach::roachpb::ReplicaChangeType >(change_type_); +inline ::cockroach::roachpb::ReplicaChangeType ChangeReplicasTrigger::deprecated_change_type() const { + // @@protoc_insertion_point(field_get:cockroach.roachpb.ChangeReplicasTrigger.deprecated_change_type) + return static_cast< ::cockroach::roachpb::ReplicaChangeType >(deprecated_change_type_); } -inline void ChangeReplicasTrigger::set_change_type(::cockroach::roachpb::ReplicaChangeType value) { +inline void ChangeReplicasTrigger::set_deprecated_change_type(::cockroach::roachpb::ReplicaChangeType value) { - change_type_ = value; - // @@protoc_insertion_point(field_set:cockroach.roachpb.ChangeReplicasTrigger.change_type) + deprecated_change_type_ = value; + // @@protoc_insertion_point(field_set:cockroach.roachpb.ChangeReplicasTrigger.deprecated_change_type) } -inline bool ChangeReplicasTrigger::has_replica() const { - return this != internal_default_instance() && replica_ != NULL; +inline bool ChangeReplicasTrigger::has_deprecated_replica() const { + return this != internal_default_instance() && deprecated_replica_ != NULL; } -inline const ::cockroach::roachpb::ReplicaDescriptor& ChangeReplicasTrigger::_internal_replica() const { - return *replica_; +inline const ::cockroach::roachpb::ReplicaDescriptor& ChangeReplicasTrigger::_internal_deprecated_replica() const { + return *deprecated_replica_; } -inline const ::cockroach::roachpb::ReplicaDescriptor& ChangeReplicasTrigger::replica() const { - const ::cockroach::roachpb::ReplicaDescriptor* p = replica_; - // @@protoc_insertion_point(field_get:cockroach.roachpb.ChangeReplicasTrigger.replica) +inline const ::cockroach::roachpb::ReplicaDescriptor& ChangeReplicasTrigger::deprecated_replica() const { + const ::cockroach::roachpb::ReplicaDescriptor* p = deprecated_replica_; + // @@protoc_insertion_point(field_get:cockroach.roachpb.ChangeReplicasTrigger.deprecated_replica) return p != NULL ? *p : *reinterpret_cast( &::cockroach::roachpb::_ReplicaDescriptor_default_instance_); } -inline ::cockroach::roachpb::ReplicaDescriptor* ChangeReplicasTrigger::release_replica() { - // @@protoc_insertion_point(field_release:cockroach.roachpb.ChangeReplicasTrigger.replica) +inline ::cockroach::roachpb::ReplicaDescriptor* ChangeReplicasTrigger::release_deprecated_replica() { + // @@protoc_insertion_point(field_release:cockroach.roachpb.ChangeReplicasTrigger.deprecated_replica) - ::cockroach::roachpb::ReplicaDescriptor* temp = replica_; - replica_ = NULL; + ::cockroach::roachpb::ReplicaDescriptor* temp = deprecated_replica_; + deprecated_replica_ = NULL; return temp; } -inline ::cockroach::roachpb::ReplicaDescriptor* ChangeReplicasTrigger::mutable_replica() { +inline ::cockroach::roachpb::ReplicaDescriptor* ChangeReplicasTrigger::mutable_deprecated_replica() { - if (replica_ == NULL) { + if (deprecated_replica_ == NULL) { auto* p = CreateMaybeMessage<::cockroach::roachpb::ReplicaDescriptor>(GetArenaNoVirtual()); - replica_ = p; + deprecated_replica_ = p; } - // @@protoc_insertion_point(field_mutable:cockroach.roachpb.ChangeReplicasTrigger.replica) - return replica_; + // @@protoc_insertion_point(field_mutable:cockroach.roachpb.ChangeReplicasTrigger.deprecated_replica) + return deprecated_replica_; } -inline void ChangeReplicasTrigger::set_allocated_replica(::cockroach::roachpb::ReplicaDescriptor* replica) { +inline void ChangeReplicasTrigger::set_allocated_deprecated_replica(::cockroach::roachpb::ReplicaDescriptor* deprecated_replica) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { - delete reinterpret_cast< ::google::protobuf::MessageLite*>(replica_); + delete reinterpret_cast< ::google::protobuf::MessageLite*>(deprecated_replica_); } - if (replica) { + if (deprecated_replica) { ::google::protobuf::Arena* submessage_arena = NULL; if (message_arena != submessage_arena) { - replica = ::google::protobuf::internal::GetOwnedMessage( - message_arena, replica, submessage_arena); + deprecated_replica = ::google::protobuf::internal::GetOwnedMessage( + message_arena, deprecated_replica, submessage_arena); } } else { } - replica_ = replica; - // @@protoc_insertion_point(field_set_allocated:cockroach.roachpb.ChangeReplicasTrigger.replica) + deprecated_replica_ = deprecated_replica; + // @@protoc_insertion_point(field_set_allocated:cockroach.roachpb.ChangeReplicasTrigger.deprecated_replica) } inline int ChangeReplicasTrigger::deprecated_updated_replicas_size() const { @@ -3481,6 +3505,58 @@ inline void ChangeReplicasTrigger::set_allocated_desc(::cockroach::roachpb::Rang // @@protoc_insertion_point(field_set_allocated:cockroach.roachpb.ChangeReplicasTrigger.desc) } +inline int ChangeReplicasTrigger::internal_added_replicas_size() const { + return internal_added_replicas_.size(); +} +inline ::cockroach::roachpb::ReplicaDescriptor* ChangeReplicasTrigger::mutable_internal_added_replicas(int index) { + // @@protoc_insertion_point(field_mutable:cockroach.roachpb.ChangeReplicasTrigger.internal_added_replicas) + return internal_added_replicas_.Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField< ::cockroach::roachpb::ReplicaDescriptor >* +ChangeReplicasTrigger::mutable_internal_added_replicas() { + // @@protoc_insertion_point(field_mutable_list:cockroach.roachpb.ChangeReplicasTrigger.internal_added_replicas) + return &internal_added_replicas_; +} +inline const ::cockroach::roachpb::ReplicaDescriptor& ChangeReplicasTrigger::internal_added_replicas(int index) const { + // @@protoc_insertion_point(field_get:cockroach.roachpb.ChangeReplicasTrigger.internal_added_replicas) + return internal_added_replicas_.Get(index); +} +inline ::cockroach::roachpb::ReplicaDescriptor* ChangeReplicasTrigger::add_internal_added_replicas() { + // @@protoc_insertion_point(field_add:cockroach.roachpb.ChangeReplicasTrigger.internal_added_replicas) + return internal_added_replicas_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::cockroach::roachpb::ReplicaDescriptor >& +ChangeReplicasTrigger::internal_added_replicas() const { + // @@protoc_insertion_point(field_list:cockroach.roachpb.ChangeReplicasTrigger.internal_added_replicas) + return internal_added_replicas_; +} + +inline int ChangeReplicasTrigger::internal_removed_replicas_size() const { + return internal_removed_replicas_.size(); +} +inline ::cockroach::roachpb::ReplicaDescriptor* ChangeReplicasTrigger::mutable_internal_removed_replicas(int index) { + // @@protoc_insertion_point(field_mutable:cockroach.roachpb.ChangeReplicasTrigger.internal_removed_replicas) + return internal_removed_replicas_.Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField< ::cockroach::roachpb::ReplicaDescriptor >* +ChangeReplicasTrigger::mutable_internal_removed_replicas() { + // @@protoc_insertion_point(field_mutable_list:cockroach.roachpb.ChangeReplicasTrigger.internal_removed_replicas) + return &internal_removed_replicas_; +} +inline const ::cockroach::roachpb::ReplicaDescriptor& ChangeReplicasTrigger::internal_removed_replicas(int index) const { + // @@protoc_insertion_point(field_get:cockroach.roachpb.ChangeReplicasTrigger.internal_removed_replicas) + return internal_removed_replicas_.Get(index); +} +inline ::cockroach::roachpb::ReplicaDescriptor* ChangeReplicasTrigger::add_internal_removed_replicas() { + // @@protoc_insertion_point(field_add:cockroach.roachpb.ChangeReplicasTrigger.internal_removed_replicas) + return internal_removed_replicas_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::cockroach::roachpb::ReplicaDescriptor >& +ChangeReplicasTrigger::internal_removed_replicas() const { + // @@protoc_insertion_point(field_list:cockroach.roachpb.ChangeReplicasTrigger.internal_removed_replicas) + return internal_removed_replicas_; +} + // ------------------------------------------------------------------- // ModifiedSpanTrigger diff --git a/docs/generated/settings/settings.html b/docs/generated/settings/settings.html index 529f005fe137..57a39963451e 100644 --- a/docs/generated/settings/settings.html +++ b/docs/generated/settings/settings.html @@ -122,6 +122,6 @@ trace.debug.enablebooleanfalseif set, traces for recent requests can be seen in the /debug page trace.lightstep.tokenstringif set, traces go to Lightstep using this token trace.zipkin.collectorstringif set, traces go to the given Zipkin instance (example: '127.0.0.1:9411'); ignored if trace.lightstep.token is set -versioncustom validation19.1-7set the active cluster version in the format '.' +versioncustom validation19.1-8set the active cluster version in the format '.' diff --git a/pkg/roachpb/data.go b/pkg/roachpb/data.go index 9871401e71c5..d82c45e76243 100644 --- a/pkg/roachpb/data.go +++ b/pkg/roachpb/data.go @@ -22,6 +22,7 @@ import ( "math/rand" "sort" "strconv" + "strings" "sync" "time" @@ -1301,10 +1302,48 @@ func writeTooOldRetryTimestamp(txn *Transaction, err *WriteTooOldError) hlc.Time var _ fmt.Stringer = &ChangeReplicasTrigger{} func (crt ChangeReplicasTrigger) String() string { + var nextReplicaID ReplicaID + var afterReplicas []ReplicaDescriptor + added, removed := crt.Added(), crt.Removed() if crt.Desc != nil { - return fmt.Sprintf("%s(%s): updated=%s next=%d", crt.ChangeType, crt.Replica, crt.Desc.Replicas(), crt.Desc.NextReplicaID) + nextReplicaID = crt.Desc.NextReplicaID + // NB: we don't want to mutate InternalReplicas, so we don't call + // .Replicas() + // + // TODO(tbg): revisit after #39489 is merged. + afterReplicas = crt.Desc.InternalReplicas + } else { + nextReplicaID = crt.DeprecatedNextReplicaID + afterReplicas = crt.DeprecatedUpdatedReplicas + } + var chgS strings.Builder + if len(added) > 0 { + fmt.Fprintf(&chgS, "%s%s", ADD_REPLICA, added) + } + if len(removed) > 0 { + if chgS.Len() > 0 { + chgS.WriteString(", ") + } + fmt.Fprintf(&chgS, "%s%s", REMOVE_REPLICA, removed) + } + fmt.Fprintf(&chgS, ": after=%s next=%d", afterReplicas, nextReplicaID) + return chgS.String() +} + +// Added returns the replicas added by this change (if there are any). +func (crt ChangeReplicasTrigger) Added() []ReplicaDescriptor { + if len(crt.InternalAddedReplicas)+len(crt.InternalRemovedReplicas) == 0 && crt.DeprecatedChangeType == ADD_REPLICA { + return []ReplicaDescriptor{crt.DeprecatedReplica} + } + return crt.InternalAddedReplicas +} + +// Removed returns the replicas removed by this change (if there are any). +func (crt ChangeReplicasTrigger) Removed() []ReplicaDescriptor { + if len(crt.InternalAddedReplicas)+len(crt.InternalRemovedReplicas) == 0 && crt.DeprecatedChangeType == REMOVE_REPLICA { + return []ReplicaDescriptor{crt.DeprecatedReplica} } - return fmt.Sprintf("%s(%s): updated=%s next=%d", crt.ChangeType, crt.Replica, crt.DeprecatedUpdatedReplicas, crt.DeprecatedNextReplicaID) + return crt.InternalRemovedReplicas } // LeaseSequence is a custom type for a lease sequence number. diff --git a/pkg/roachpb/data.pb.go b/pkg/roachpb/data.pb.go index 46e2d7295941..447a44003d3c 100644 --- a/pkg/roachpb/data.pb.go +++ b/pkg/roachpb/data.pb.go @@ -87,7 +87,7 @@ func (x ValueType) String() string { return proto.EnumName(ValueType_name, int32(x)) } func (ValueType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_data_17df12a619763ecd, []int{0} + return fileDescriptor_data_cc95704a62d85cea, []int{0} } // ReplicaChangeType is a parameter of ChangeReplicasTrigger. @@ -111,7 +111,7 @@ func (x ReplicaChangeType) String() string { return proto.EnumName(ReplicaChangeType_name, int32(x)) } func (ReplicaChangeType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_data_17df12a619763ecd, []int{1} + return fileDescriptor_data_cc95704a62d85cea, []int{1} } // TransactionStatus specifies possible states for a transaction. @@ -163,7 +163,7 @@ func (x TransactionStatus) String() string { return proto.EnumName(TransactionStatus_name, int32(x)) } func (TransactionStatus) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_data_17df12a619763ecd, []int{2} + return fileDescriptor_data_cc95704a62d85cea, []int{2} } // Span is a key range with an inclusive start Key and an exclusive end Key. @@ -180,7 +180,7 @@ type Span struct { func (m *Span) Reset() { *m = Span{} } func (*Span) ProtoMessage() {} func (*Span) Descriptor() ([]byte, []int) { - return fileDescriptor_data_17df12a619763ecd, []int{0} + return fileDescriptor_data_cc95704a62d85cea, []int{0} } func (m *Span) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -232,7 +232,7 @@ func (m *Value) Reset() { *m = Value{} } func (m *Value) String() string { return proto.CompactTextString(m) } func (*Value) ProtoMessage() {} func (*Value) Descriptor() ([]byte, []int) { - return fileDescriptor_data_17df12a619763ecd, []int{1} + return fileDescriptor_data_cc95704a62d85cea, []int{1} } func (m *Value) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -268,7 +268,7 @@ func (m *KeyValue) Reset() { *m = KeyValue{} } func (m *KeyValue) String() string { return proto.CompactTextString(m) } func (*KeyValue) ProtoMessage() {} func (*KeyValue) Descriptor() ([]byte, []int) { - return fileDescriptor_data_17df12a619763ecd, []int{2} + return fileDescriptor_data_cc95704a62d85cea, []int{2} } func (m *KeyValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -306,7 +306,7 @@ func (m *StoreIdent) Reset() { *m = StoreIdent{} } func (m *StoreIdent) String() string { return proto.CompactTextString(m) } func (*StoreIdent) ProtoMessage() {} func (*StoreIdent) Descriptor() ([]byte, []int) { - return fileDescriptor_data_17df12a619763ecd, []int{3} + return fileDescriptor_data_cc95704a62d85cea, []int{3} } func (m *StoreIdent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -346,7 +346,7 @@ func (m *SplitTrigger) Reset() { *m = SplitTrigger{} } func (m *SplitTrigger) String() string { return proto.CompactTextString(m) } func (*SplitTrigger) ProtoMessage() {} func (*SplitTrigger) Descriptor() ([]byte, []int) { - return fileDescriptor_data_17df12a619763ecd, []int{4} + return fileDescriptor_data_cc95704a62d85cea, []int{4} } func (m *SplitTrigger) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -394,7 +394,7 @@ func (m *MergeTrigger) Reset() { *m = MergeTrigger{} } func (m *MergeTrigger) String() string { return proto.CompactTextString(m) } func (*MergeTrigger) ProtoMessage() {} func (*MergeTrigger) Descriptor() ([]byte, []int) { - return fileDescriptor_data_17df12a619763ecd, []int{5} + return fileDescriptor_data_cc95704a62d85cea, []int{5} } func (m *MergeTrigger) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -420,9 +420,16 @@ func (m *MergeTrigger) XXX_DiscardUnknown() { var xxx_messageInfo_MergeTrigger proto.InternalMessageInfo type ChangeReplicasTrigger struct { - ChangeType ReplicaChangeType `protobuf:"varint,1,opt,name=change_type,json=changeType,proto3,enum=cockroach.roachpb.ReplicaChangeType" json:"change_type,omitempty"` + // TODO(tbg): remove once we know that no trigger using this will ever be + // applied (this will require something like #39182). + // + // TODO(tbg): when removing this, also rename internal_x_replicas to just + // x_replicas and remove the getter. + DeprecatedChangeType ReplicaChangeType `protobuf:"varint,1,opt,name=deprecated_change_type,json=deprecatedChangeType,proto3,enum=cockroach.roachpb.ReplicaChangeType" json:"deprecated_change_type,omitempty"` // The replica being modified. - Replica ReplicaDescriptor `protobuf:"bytes,2,opt,name=replica,proto3" json:"replica"` + // TODO(tbg): remove once we know that no trigger using this will ever be + // applied (this will require something like #39182). + DeprecatedReplica ReplicaDescriptor `protobuf:"bytes,2,opt,name=deprecated_replica,json=deprecatedReplica,proto3" json:"deprecated_replica"` // The new replica list with this change applied. DeprecatedUpdatedReplicas []ReplicaDescriptor `protobuf:"bytes,3,rep,name=deprecated_updated_replicas,json=deprecatedUpdatedReplicas,proto3" json:"deprecated_updated_replicas"` // The next replica id to use with this change applied. @@ -433,12 +440,20 @@ type ChangeReplicasTrigger struct { // TODO(jeffreyxiao): Remove deprecated_updated_replicas and // deprecated_next_replica_id in 20.1. Desc *RangeDescriptor `protobuf:"bytes,5,opt,name=desc,proto3" json:"desc,omitempty"` + // The new replicas added in this change (all reflected in desc, which is necessarily + // set when this field is used). Must not specify the same replica more than once or + // overlap with the removed replicas below. + InternalAddedReplicas []ReplicaDescriptor `protobuf:"bytes,6,rep,name=internal_added_replicas,json=internalAddedReplicas,proto3" json:"internal_added_replicas"` + // The replicas removed in this change (all reflected in desc, which is necessarily + // set when this field is used). Must not specify the same replica more than once or + // overlap with the added replicas above. + InternalRemovedReplicas []ReplicaDescriptor `protobuf:"bytes,7,rep,name=internal_removed_replicas,json=internalRemovedReplicas,proto3" json:"internal_removed_replicas"` } func (m *ChangeReplicasTrigger) Reset() { *m = ChangeReplicasTrigger{} } func (*ChangeReplicasTrigger) ProtoMessage() {} func (*ChangeReplicasTrigger) Descriptor() ([]byte, []int) { - return fileDescriptor_data_17df12a619763ecd, []int{6} + return fileDescriptor_data_cc95704a62d85cea, []int{6} } func (m *ChangeReplicasTrigger) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -480,7 +495,7 @@ func (m *ModifiedSpanTrigger) Reset() { *m = ModifiedSpanTrigger{} } func (m *ModifiedSpanTrigger) String() string { return proto.CompactTextString(m) } func (*ModifiedSpanTrigger) ProtoMessage() {} func (*ModifiedSpanTrigger) Descriptor() ([]byte, []int) { - return fileDescriptor_data_17df12a619763ecd, []int{7} + return fileDescriptor_data_cc95704a62d85cea, []int{7} } func (m *ModifiedSpanTrigger) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -526,7 +541,7 @@ func (m *StickyBitTrigger) Reset() { *m = StickyBitTrigger{} } func (m *StickyBitTrigger) String() string { return proto.CompactTextString(m) } func (*StickyBitTrigger) ProtoMessage() {} func (*StickyBitTrigger) Descriptor() ([]byte, []int) { - return fileDescriptor_data_17df12a619763ecd, []int{8} + return fileDescriptor_data_cc95704a62d85cea, []int{8} } func (m *StickyBitTrigger) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -565,7 +580,7 @@ func (m *InternalCommitTrigger) Reset() { *m = InternalCommitTrigger{} } func (m *InternalCommitTrigger) String() string { return proto.CompactTextString(m) } func (*InternalCommitTrigger) ProtoMessage() {} func (*InternalCommitTrigger) Descriptor() ([]byte, []int) { - return fileDescriptor_data_17df12a619763ecd, []int{9} + return fileDescriptor_data_cc95704a62d85cea, []int{9} } func (m *InternalCommitTrigger) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -634,7 +649,7 @@ func (m *ObservedTimestamp) Reset() { *m = ObservedTimestamp{} } func (m *ObservedTimestamp) String() string { return proto.CompactTextString(m) } func (*ObservedTimestamp) ProtoMessage() {} func (*ObservedTimestamp) Descriptor() ([]byte, []int) { - return fileDescriptor_data_17df12a619763ecd, []int{10} + return fileDescriptor_data_cc95704a62d85cea, []int{10} } func (m *ObservedTimestamp) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -862,7 +877,7 @@ type Transaction struct { func (m *Transaction) Reset() { *m = Transaction{} } func (*Transaction) ProtoMessage() {} func (*Transaction) Descriptor() ([]byte, []int) { - return fileDescriptor_data_17df12a619763ecd, []int{11} + return fileDescriptor_data_cc95704a62d85cea, []int{11} } func (m *Transaction) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -912,7 +927,7 @@ func (m *TransactionRecord) Reset() { *m = TransactionRecord{} } func (m *TransactionRecord) String() string { return proto.CompactTextString(m) } func (*TransactionRecord) ProtoMessage() {} func (*TransactionRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_data_17df12a619763ecd, []int{12} + return fileDescriptor_data_cc95704a62d85cea, []int{12} } func (m *TransactionRecord) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -948,7 +963,7 @@ func (m *Intent) Reset() { *m = Intent{} } func (m *Intent) String() string { return proto.CompactTextString(m) } func (*Intent) ProtoMessage() {} func (*Intent) Descriptor() ([]byte, []int) { - return fileDescriptor_data_17df12a619763ecd, []int{13} + return fileDescriptor_data_cc95704a62d85cea, []int{13} } func (m *Intent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -985,7 +1000,7 @@ func (m *SequencedWrite) Reset() { *m = SequencedWrite{} } func (m *SequencedWrite) String() string { return proto.CompactTextString(m) } func (*SequencedWrite) ProtoMessage() {} func (*SequencedWrite) Descriptor() ([]byte, []int) { - return fileDescriptor_data_17df12a619763ecd, []int{14} + return fileDescriptor_data_cc95704a62d85cea, []int{14} } func (m *SequencedWrite) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1049,7 +1064,7 @@ type Lease struct { func (m *Lease) Reset() { *m = Lease{} } func (*Lease) ProtoMessage() {} func (*Lease) Descriptor() ([]byte, []int) { - return fileDescriptor_data_17df12a619763ecd, []int{15} + return fileDescriptor_data_cc95704a62d85cea, []int{15} } func (m *Lease) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1094,7 +1109,7 @@ func (m *AbortSpanEntry) Reset() { *m = AbortSpanEntry{} } func (m *AbortSpanEntry) String() string { return proto.CompactTextString(m) } func (*AbortSpanEntry) ProtoMessage() {} func (*AbortSpanEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_data_17df12a619763ecd, []int{16} + return fileDescriptor_data_cc95704a62d85cea, []int{16} } func (m *AbortSpanEntry) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1158,7 +1173,7 @@ func (m *TxnCoordMeta) Reset() { *m = TxnCoordMeta{} } func (m *TxnCoordMeta) String() string { return proto.CompactTextString(m) } func (*TxnCoordMeta) ProtoMessage() {} func (*TxnCoordMeta) Descriptor() ([]byte, []int) { - return fileDescriptor_data_17df12a619763ecd, []int{17} + return fileDescriptor_data_cc95704a62d85cea, []int{17} } func (m *TxnCoordMeta) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1339,10 +1354,10 @@ func (this *ChangeReplicasTrigger) Equal(that interface{}) bool { } else if this == nil { return false } - if this.ChangeType != that1.ChangeType { + if this.DeprecatedChangeType != that1.DeprecatedChangeType { return false } - if !this.Replica.Equal(&that1.Replica) { + if !this.DeprecatedReplica.Equal(&that1.DeprecatedReplica) { return false } if len(this.DeprecatedUpdatedReplicas) != len(that1.DeprecatedUpdatedReplicas) { @@ -1359,6 +1374,22 @@ func (this *ChangeReplicasTrigger) Equal(that interface{}) bool { if !this.Desc.Equal(that1.Desc) { return false } + if len(this.InternalAddedReplicas) != len(that1.InternalAddedReplicas) { + return false + } + for i := range this.InternalAddedReplicas { + if !this.InternalAddedReplicas[i].Equal(&that1.InternalAddedReplicas[i]) { + return false + } + } + if len(this.InternalRemovedReplicas) != len(that1.InternalRemovedReplicas) { + return false + } + for i := range this.InternalRemovedReplicas { + if !this.InternalRemovedReplicas[i].Equal(&that1.InternalRemovedReplicas[i]) { + return false + } + } return true } func (this *ModifiedSpanTrigger) Equal(that interface{}) bool { @@ -1912,15 +1943,15 @@ func (m *ChangeReplicasTrigger) MarshalTo(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.ChangeType != 0 { + if m.DeprecatedChangeType != 0 { dAtA[i] = 0x8 i++ - i = encodeVarintData(dAtA, i, uint64(m.ChangeType)) + i = encodeVarintData(dAtA, i, uint64(m.DeprecatedChangeType)) } dAtA[i] = 0x12 i++ - i = encodeVarintData(dAtA, i, uint64(m.Replica.Size())) - n10, err := m.Replica.MarshalTo(dAtA[i:]) + i = encodeVarintData(dAtA, i, uint64(m.DeprecatedReplica.Size())) + n10, err := m.DeprecatedReplica.MarshalTo(dAtA[i:]) if err != nil { return 0, err } @@ -1952,6 +1983,30 @@ func (m *ChangeReplicasTrigger) MarshalTo(dAtA []byte) (int, error) { } i += n11 } + if len(m.InternalAddedReplicas) > 0 { + for _, msg := range m.InternalAddedReplicas { + dAtA[i] = 0x32 + i++ + i = encodeVarintData(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.InternalRemovedReplicas) > 0 { + for _, msg := range m.InternalRemovedReplicas { + dAtA[i] = 0x3a + i++ + i = encodeVarintData(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } return i, nil } @@ -2924,10 +2979,10 @@ func (m *ChangeReplicasTrigger) Size() (n int) { } var l int _ = l - if m.ChangeType != 0 { - n += 1 + sovData(uint64(m.ChangeType)) + if m.DeprecatedChangeType != 0 { + n += 1 + sovData(uint64(m.DeprecatedChangeType)) } - l = m.Replica.Size() + l = m.DeprecatedReplica.Size() n += 1 + l + sovData(uint64(l)) if len(m.DeprecatedUpdatedReplicas) > 0 { for _, e := range m.DeprecatedUpdatedReplicas { @@ -2942,6 +2997,18 @@ func (m *ChangeReplicasTrigger) Size() (n int) { l = m.Desc.Size() n += 1 + l + sovData(uint64(l)) } + if len(m.InternalAddedReplicas) > 0 { + for _, e := range m.InternalAddedReplicas { + l = e.Size() + n += 1 + l + sovData(uint64(l)) + } + } + if len(m.InternalRemovedReplicas) > 0 { + for _, e := range m.InternalRemovedReplicas { + l = e.Size() + n += 1 + l + sovData(uint64(l)) + } + } return n } @@ -3987,9 +4054,9 @@ func (m *ChangeReplicasTrigger) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ChangeType", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedChangeType", wireType) } - m.ChangeType = 0 + m.DeprecatedChangeType = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowData @@ -3999,14 +4066,14 @@ func (m *ChangeReplicasTrigger) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ChangeType |= (ReplicaChangeType(b) & 0x7F) << shift + m.DeprecatedChangeType |= (ReplicaChangeType(b) & 0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Replica", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedReplica", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4030,7 +4097,7 @@ func (m *ChangeReplicasTrigger) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Replica.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.DeprecatedReplica.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4117,6 +4184,68 @@ func (m *ChangeReplicasTrigger) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InternalAddedReplicas", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowData + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthData + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.InternalAddedReplicas = append(m.InternalAddedReplicas, ReplicaDescriptor{}) + if err := m.InternalAddedReplicas[len(m.InternalAddedReplicas)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InternalRemovedReplicas", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowData + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthData + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.InternalRemovedReplicas = append(m.InternalRemovedReplicas, ReplicaDescriptor{}) + if err := m.InternalRemovedReplicas[len(m.InternalRemovedReplicas)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipData(dAtA[iNdEx:]) @@ -6160,137 +6289,140 @@ var ( ErrIntOverflowData = fmt.Errorf("proto: integer overflow") ) -func init() { proto.RegisterFile("roachpb/data.proto", fileDescriptor_data_17df12a619763ecd) } - -var fileDescriptor_data_17df12a619763ecd = []byte{ - // 2054 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcd, 0x8f, 0x1b, 0x49, - 0x15, 0x77, 0xbb, 0xdb, 0x76, 0xfb, 0xf9, 0x63, 0x7a, 0x2a, 0x99, 0xc4, 0x9b, 0x08, 0x3b, 0x38, - 0x08, 0x42, 0x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xc2, 0xe3, 0x29, 0xde, 0x8d, 0x35, 0x78, 0x6b, 0x63, 0x50, 0xd9, 0x31, 0xd6, 0x86, - 0xe6, 0x27, 0xb0, 0x33, 0x61, 0x76, 0xa7, 0xd6, 0x8a, 0xf0, 0x83, 0xec, 0xf3, 0xed, 0x75, 0xe7, - 0x3d, 0xed, 0x27, 0xca, 0x85, 0xc9, 0x1a, 0xe7, 0xf9, 0x08, 0xd0, 0xca, 0x5a, 0x11, 0x70, 0xe0, - 0xa4, 0xd7, 0xd7, 0xa9, 0xf3, 0x0d, 0x73, 0x2b, 0x92, 0xf7, 0x06, 0xe5, 0x8e, 0xf8, 0x39, 0xeb, - 0x18, 0xaa, 0xbf, 0xe2, 0x60, 0x7b, 0x7f, 0xe0, 0x61, 0xf7, 0x08, 0x9b, 0x91, 0xb5, 0xe3, 0x75, - 0x8f, 0xdb, 0xa0, 0xee, 0x7d, 0x05, 0x4d, 0x84, 0x18, 0xf6, 0x30, 0xd5, 0xdf, 0x67, 0x20, 0xa7, - 0xba, 0xba, 0xed, 0xe9, 0x86, 0x6f, 0x39, 0x36, 0xba, 0x0f, 0x02, 0xe9, 0xd8, 0x98, 0xff, 0xdc, - 0xdc, 0x20, 0x8f, 0xab, 0xc7, 0x76, 0x17, 0xfb, 0x7a, 0x43, 0x24, 0x9b, 0xbc, 0x5c, 0x54, 0x38, - 0x85, 0x22, 0x20, 0x04, 0x82, 0xad, 0x4f, 0x82, 0xd6, 0x23, 0xab, 0xd0, 0x31, 0xfa, 0x11, 0xa4, - 0x49, 0x99, 0x98, 0x05, 0x75, 0x62, 0x7d, 0x3a, 0x8d, 0x9d, 0xa6, 0x4f, 0x79, 0x15, 0x26, 0x83, - 0x3a, 0x50, 0x1c, 0xeb, 0x9e, 0xaf, 0x8d, 0xb0, 0xee, 0xfa, 0x03, 0xac, 0x9f, 0xab, 0x02, 0x14, - 0x88, 0xe8, 0xfd, 0x50, 0x92, 0x60, 0x39, 0xae, 0x35, 0xd4, 0x56,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, 0x60, 0x81, - 0x09, 0x23, 0xa2, 0x16, 0x00, 0x00, +func init() { proto.RegisterFile("roachpb/data.proto", fileDescriptor_data_cc95704a62d85cea) } + +var fileDescriptor_data_cc95704a62d85cea = []byte{ + // 2110 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcd, 0x6f, 0xdb, 0xc8, + 0x15, 0x37, 0x4d, 0x4a, 0xa2, 0x9e, 0x3e, 0x4c, 0x4f, 0xe2, 0x44, 0x49, 0x50, 0x29, 0x55, 0x8a, + 0x36, 0x0d, 0x76, 0x65, 0x34, 0x69, 0x17, 0x68, 0xd0, 0x16, 0xd5, 0x57, 0x12, 0x29, 0x96, 0x9d, + 0x1d, 0xd1, 0x09, 0xb2, 0xdb, 0x80, 0xa5, 0xc8, 0xb1, 0xcc, 0x46, 0x22, 0xb5, 0x24, 0xe5, 0x58, + 0xfd, 0x0b, 0xf6, 0xd6, 0x3d, 0x16, 0x3d, 0x05, 0xe8, 0xad, 0x97, 0x9e, 0x8a, 0xf6, 0xd4, 0x6b, + 0x73, 0x2a, 0x72, 0xeb, 0xa2, 0x07, 0xa1, 0x55, 0x2e, 0x3d, 0xf7, 0x18, 0xa0, 0x40, 0x31, 0xc3, + 0x21, 0x45, 0xc7, 0x8a, 0x21, 0xc1, 0xbb, 0xc0, 0x5e, 0x24, 0xf2, 0xcd, 0x7b, 0xbf, 0x37, 0xf3, + 0xbe, 0x87, 0x80, 0x5c, 0x47, 0x37, 0x0e, 0x47, 0xbd, 0x6d, 0x53, 0xf7, 0xf5, 0xca, 0xc8, 0x75, + 0x7c, 0x07, 0x6d, 0x1a, 0x8e, 0xf1, 0x9c, 0xd1, 0x2b, 0x7c, 0xf5, 0xea, 0xa5, 0x90, 0x6d, 0x48, + 0x7c, 0x7d, 0xce, 0x7a, 0xb5, 0xec, 0xf9, 0x8e, 0xab, 0xf7, 0xc9, 0x36, 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 0x23, 0x97, 0x81, 0x92, 0x69, 0x4b, + 0x72, 0x56, 0xc9, 0x05, 0xee, 0x6b, 0x4b, 0x72, 0x5e, 0xd9, 0x68, 0x4b, 0xf2, 0x86, 0xa2, 0xb4, + 0x25, 0x59, 0x51, 0x36, 0xcb, 0x7f, 0x13, 0x20, 0xd9, 0x62, 0x9b, 0x46, 0x3f, 0x02, 0x29, 0x9a, + 0x58, 0xce, 0x38, 0x69, 0xcc, 0x65, 0x94, 0x1d, 0xd5, 0x40, 0xf4, 0x8f, 0xc3, 0xc9, 0x65, 0x15, + 0xdf, 0x07, 0x47, 0xa4, 0xc2, 0x31, 0xb7, 0x8b, 0xab, 0xbb, 0x9d, 0x4f, 0x29, 0xbf, 0x13, 0x20, + 0x7f, 0xd2, 0x88, 0x67, 0x5d, 0xcc, 0x0d, 0x90, 0x3d, 0xce, 0xcc, 0xef, 0xba, 0xf7, 0xdf, 0x4e, + 0x4b, 0xf5, 0xa5, 0x6e, 0xd3, 0xef, 0xf9, 0x3a, 0x42, 0x0f, 0xd6, 0x25, 0x9f, 0xe1, 0x08, 0x38, + 0xd6, 0xef, 0xfe, 0x27, 0x42, 0x62, 0x87, 0xe8, 0x1e, 0x41, 0x3f, 0x86, 0x44, 0x70, 0x79, 0x5a, + 0x61, 0x22, 0x0b, 0x24, 0xd0, 0x33, 0x00, 0x72, 0x3c, 0xb2, 0x5c, 0x9d, 0xda, 0x60, 0xb9, 0x16, + 0x5c, 0xfc, 0xef, 0xb4, 0x74, 0x35, 0x76, 0x92, 0xbb, 0x65, 0x57, 0xb7, 0x4d, 0x7b, 0x3c, 0x18, + 0xe8, 0xbd, 0x01, 0x29, 0xe3, 0x18, 0x20, 0x6a, 0x40, 0x2a, 0xbc, 0x08, 0x89, 0x2b, 0x5f, 0x84, + 0x42, 0x51, 0x34, 0x86, 0xd8, 0x35, 0x22, 0xb8, 0x27, 0xd2, 0x5f, 0xcf, 0x0a, 0xaf, 0xa6, 0xe7, + 0xdc, 0xf1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, 0xf3, 0xd1, 0x4e, + 0xab, 0x5e, 0x55, 0xd6, 0x10, 0x82, 0x3c, 0x6e, 0x76, 0xf6, 0x1e, 0x37, 0x23, 0x9a, 0x70, 0x55, + 0xfa, 0xfc, 0xf7, 0xc5, 0xb5, 0x5b, 0x7b, 0x27, 0xa6, 0x92, 0xa0, 0x3d, 0xd0, 0x5d, 0x3f, 0x6a, + 0xee, 0x36, 0x5a, 0xbb, 0xf7, 0x95, 0x35, 0xfa, 0xd2, 0x55, 0xab, 0xf7, 0xe9, 0x8b, 0x88, 0x72, + 0x90, 0xae, 0xef, 0x75, 0x3a, 0x2d, 0x55, 0x6d, 0x36, 0x14, 0x81, 0xae, 0x55, 0x6b, 0x7b, 0x98, + 0xbe, 0xac, 0x07, 0x80, 0xb5, 0xef, 0xbf, 0xfa, 0x77, 0x71, 0xed, 0xd5, 0xac, 0x28, 0xbc, 0x9e, + 0x15, 0x85, 0x2f, 0x67, 0x45, 0xe1, 0x5f, 0xb3, 0xa2, 0xf0, 0xc5, 0x9b, 0xe2, 0xda, 0xeb, 0x37, + 0xc5, 0xb5, 0x2f, 0xdf, 0x14, 0xd7, 0x3e, 0x49, 0x71, 0x37, 0xf5, 0x92, 0xec, 0xf3, 0xf6, 0x9d, + 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0xd3, 0xba, 0x56, 0x1f, 0x98, 0x17, 0x00, 0x00, } diff --git a/pkg/roachpb/data.proto b/pkg/roachpb/data.proto index 75dbfae51eb7..e20947a797be 100644 --- a/pkg/roachpb/data.proto +++ b/pkg/roachpb/data.proto @@ -162,9 +162,16 @@ message ChangeReplicasTrigger { option (gogoproto.goproto_stringer) = false; - ReplicaChangeType change_type = 1; + // TODO(tbg): remove once we know that no trigger using this will ever be + // applied (this will require something like #39182). + // + // TODO(tbg): when removing this, also rename internal_x_replicas to just + // x_replicas and remove the getter. + ReplicaChangeType deprecated_change_type = 1; // The replica being modified. - ReplicaDescriptor replica = 2 [(gogoproto.nullable) = false]; + // TODO(tbg): remove once we know that no trigger using this will ever be + // applied (this will require something like #39182). + ReplicaDescriptor deprecated_replica = 2 [(gogoproto.nullable) = false]; // The new replica list with this change applied. repeated ReplicaDescriptor deprecated_updated_replicas = 3 [(gogoproto.nullable) = false]; // The next replica id to use with this change applied. @@ -175,6 +182,14 @@ message ChangeReplicasTrigger { // TODO(jeffreyxiao): Remove deprecated_updated_replicas and // deprecated_next_replica_id in 20.1. RangeDescriptor desc = 5; + // The new replicas added in this change (all reflected in desc, which is necessarily + // set when this field is used). Must not specify the same replica more than once or + // overlap with the removed replicas below. + repeated ReplicaDescriptor internal_added_replicas = 6 [(gogoproto.nullable) = false]; + // The replicas removed in this change (all reflected in desc, which is necessarily + // set when this field is used). Must not specify the same replica more than once or + // overlap with the added replicas above. + repeated ReplicaDescriptor internal_removed_replicas = 7 [(gogoproto.nullable) = false]; } // ModifiedSpanTrigger indicates that a specific span has been modified. diff --git a/pkg/roachpb/data_test.go b/pkg/roachpb/data_test.go index 2fc59f7b89c4..d9de20337186 100644 --- a/pkg/roachpb/data_test.go +++ b/pkg/roachpb/data_test.go @@ -1568,17 +1568,18 @@ func TestChangeReplicasTrigger_String(t *testing.T) { l := ReplicaType_LEARNER v := ReplicaType_VOTER - repl := ReplicaDescriptor{NodeID: 1, StoreID: 2, ReplicaID: 3, Type: &l} + repl1 := ReplicaDescriptor{NodeID: 1, StoreID: 2, ReplicaID: 3, Type: &l} + repl2 := ReplicaDescriptor{NodeID: 4, StoreID: 5, ReplicaID: 6, Type: &v} crt := ChangeReplicasTrigger{ - ChangeType: ADD_REPLICA, - Replica: repl, + InternalAddedReplicas: []ReplicaDescriptor{repl1}, + InternalRemovedReplicas: []ReplicaDescriptor{repl2}, Desc: &RangeDescriptor{ RangeID: 1, StartKey: RKey("a"), EndKey: RKey("b"), InternalReplicas: []ReplicaDescriptor{ - repl, - {NodeID: 4, StoreID: 5, ReplicaID: 6, Type: &v}, + repl1, + repl2, {NodeID: 7, StoreID: 8, ReplicaID: 9, Type: &l}, }, NextReplicaID: 10, @@ -1587,6 +1588,6 @@ func TestChangeReplicasTrigger_String(t *testing.T) { }, } act := crt.String() - exp := `ADD_REPLICA((n1,s2):3LEARNER): updated=(n4,s5):6,(n1,s2):3LEARNER,(n7,s8):9LEARNER next=10` + exp := "ADD_REPLICA[(n1,s2):3LEARNER], REMOVE_REPLICA[(n4,s5):6]: after=[(n1,s2):3LEARNER (n4,s5):6 (n7,s8):9LEARNER] next=10" require.Equal(t, exp, act) } diff --git a/pkg/settings/cluster/cockroach_versions.go b/pkg/settings/cluster/cockroach_versions.go index b70d1a88f964..879894c8764e 100644 --- a/pkg/settings/cluster/cockroach_versions.go +++ b/pkg/settings/cluster/cockroach_versions.go @@ -42,6 +42,7 @@ const ( VersionGenerationComparable VersionLearnerReplicas VersionTopLevelForeignKeys + VersionAtomicChangeReplicasTrigger // Add new versions here (step one of two). @@ -504,6 +505,14 @@ var versionsSingleton = keyedVersions([]keyedVersion{ Key: VersionTopLevelForeignKeys, Version: roachpb.Version{Major: 19, Minor: 1, Unstable: 7}, }, + { + // VersionAtomicChangeReplicasTrigger is https://github.com/cockroachdb/cockroach/pull/39485. + // + // It enables use of updated fields in ChangeReplicasTrigger that will + // support atomic replication changes. + Key: VersionAtomicChangeReplicasTrigger, + Version: roachpb.Version{Major: 19, Minor: 1, Unstable: 8}, + }, // Add new versions here (step two of two). diff --git a/pkg/settings/cluster/versionkey_string.go b/pkg/settings/cluster/versionkey_string.go index 40c87bf13f70..15cb3fa0899f 100644 --- a/pkg/settings/cluster/versionkey_string.go +++ b/pkg/settings/cluster/versionkey_string.go @@ -19,11 +19,12 @@ func _() { _ = x[VersionGenerationComparable-8] _ = x[VersionLearnerReplicas-9] _ = x[VersionTopLevelForeignKeys-10] + _ = x[VersionAtomicChangeReplicasTrigger-11] } -const _VersionKey_name = "Version2_1VersionUnreplicatedRaftTruncatedStateVersionSideloadedStorageNoReplicaIDVersion19_1VersionStart19_2VersionQueryTxnTimestampVersionStickyBitVersionParallelCommitsVersionGenerationComparableVersionLearnerReplicasVersionTopLevelForeignKeys" +const _VersionKey_name = "Version2_1VersionUnreplicatedRaftTruncatedStateVersionSideloadedStorageNoReplicaIDVersion19_1VersionStart19_2VersionQueryTxnTimestampVersionStickyBitVersionParallelCommitsVersionGenerationComparableVersionLearnerReplicasVersionTopLevelForeignKeysVersionAtomicChangeReplicasTrigger" -var _VersionKey_index = [...]uint8{0, 10, 47, 82, 93, 109, 133, 149, 171, 198, 220, 246} +var _VersionKey_index = [...]uint16{0, 10, 47, 82, 93, 109, 133, 149, 171, 198, 220, 246, 280} func (i VersionKey) String() string { if i < 0 || i >= VersionKey(len(_VersionKey_index)-1) { diff --git a/pkg/storage/batcheval/cmd_end_transaction.go b/pkg/storage/batcheval/cmd_end_transaction.go index d30569ded31e..5ab16a2412e3 100644 --- a/pkg/storage/batcheval/cmd_end_transaction.go +++ b/pkg/storage/batcheval/cmd_end_transaction.go @@ -591,6 +591,10 @@ func RunCommitTrigger( return trigger, err } if crt := ct.GetChangeReplicasTrigger(); crt != nil { + // TODO(tbg): once we support atomic replication changes, check that + // crt.Added() and crt.Removed() don't intersect (including mentioning + // the same replica more than once individually) because it would be + // silly (though possible) to have to attach semantics to that. return changeReplicasTrigger(ctx, rec, batch, crt), nil } if ct.GetModifiedSpanTrigger() != nil { diff --git a/pkg/storage/client_replica_gc_test.go b/pkg/storage/client_replica_gc_test.go index 7130a47a6b86..7b8e41cf1b36 100644 --- a/pkg/storage/client_replica_gc_test.go +++ b/pkg/storage/client_replica_gc_test.go @@ -70,7 +70,7 @@ func TestReplicaGCQueueDropReplicaDirect(t *testing.T) { return nil } crt := et.InternalCommitTrigger.GetChangeReplicasTrigger() - if crt == nil || crt.ChangeType != roachpb.REMOVE_REPLICA { + if crt == nil || crt.DeprecatedChangeType != roachpb.REMOVE_REPLICA { return nil } testutils.SucceedsSoon(t, func() error { diff --git a/pkg/storage/raft.pb.go b/pkg/storage/raft.pb.go index c5e8837a231c..97b93abcba9a 100644 --- a/pkg/storage/raft.pb.go +++ b/pkg/storage/raft.pb.go @@ -70,7 +70,7 @@ func (x *SnapshotRequest_Priority) UnmarshalJSON(data []byte) error { return nil } func (SnapshotRequest_Priority) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_raft_11bfea08aab81984, []int{5, 0} + return fileDescriptor_raft_d6a64da2f1251cf6, []int{5, 0} } type SnapshotRequest_Strategy int32 @@ -107,7 +107,7 @@ func (x *SnapshotRequest_Strategy) UnmarshalJSON(data []byte) error { return nil } func (SnapshotRequest_Strategy) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_raft_11bfea08aab81984, []int{5, 1} + return fileDescriptor_raft_d6a64da2f1251cf6, []int{5, 1} } type SnapshotRequest_Type int32 @@ -146,7 +146,7 @@ func (x *SnapshotRequest_Type) UnmarshalJSON(data []byte) error { return nil } func (SnapshotRequest_Type) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_raft_11bfea08aab81984, []int{5, 2} + return fileDescriptor_raft_d6a64da2f1251cf6, []int{5, 2} } type SnapshotResponse_Status int32 @@ -191,7 +191,7 @@ func (x *SnapshotResponse_Status) UnmarshalJSON(data []byte) error { return nil } func (SnapshotResponse_Status) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_raft_11bfea08aab81984, []int{6, 0} + return fileDescriptor_raft_d6a64da2f1251cf6, []int{6, 0} } // RaftHeartbeat is a request that contains the barebones information for a @@ -211,7 +211,7 @@ func (m *RaftHeartbeat) Reset() { *m = RaftHeartbeat{} } func (m *RaftHeartbeat) String() string { return proto.CompactTextString(m) } func (*RaftHeartbeat) ProtoMessage() {} func (*RaftHeartbeat) Descriptor() ([]byte, []int) { - return fileDescriptor_raft_11bfea08aab81984, []int{0} + return fileDescriptor_raft_d6a64da2f1251cf6, []int{0} } func (m *RaftHeartbeat) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -267,7 +267,7 @@ func (m *RaftMessageRequest) Reset() { *m = RaftMessageRequest{} } func (m *RaftMessageRequest) String() string { return proto.CompactTextString(m) } func (*RaftMessageRequest) ProtoMessage() {} func (*RaftMessageRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_raft_11bfea08aab81984, []int{1} + return fileDescriptor_raft_d6a64da2f1251cf6, []int{1} } func (m *RaftMessageRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -300,7 +300,7 @@ func (m *RaftMessageRequestBatch) Reset() { *m = RaftMessageRequestBatch func (m *RaftMessageRequestBatch) String() string { return proto.CompactTextString(m) } func (*RaftMessageRequestBatch) ProtoMessage() {} func (*RaftMessageRequestBatch) Descriptor() ([]byte, []int) { - return fileDescriptor_raft_11bfea08aab81984, []int{2} + return fileDescriptor_raft_d6a64da2f1251cf6, []int{2} } func (m *RaftMessageRequestBatch) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -333,7 +333,7 @@ func (m *RaftMessageResponseUnion) Reset() { *m = RaftMessageResponseUni func (m *RaftMessageResponseUnion) String() string { return proto.CompactTextString(m) } func (*RaftMessageResponseUnion) ProtoMessage() {} func (*RaftMessageResponseUnion) Descriptor() ([]byte, []int) { - return fileDescriptor_raft_11bfea08aab81984, []int{3} + return fileDescriptor_raft_d6a64da2f1251cf6, []int{3} } func (m *RaftMessageResponseUnion) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -376,7 +376,7 @@ func (m *RaftMessageResponse) Reset() { *m = RaftMessageResponse{} } func (m *RaftMessageResponse) String() string { return proto.CompactTextString(m) } func (*RaftMessageResponse) ProtoMessage() {} func (*RaftMessageResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_raft_11bfea08aab81984, []int{4} + return fileDescriptor_raft_d6a64da2f1251cf6, []int{4} } func (m *RaftMessageResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -417,7 +417,7 @@ func (m *SnapshotRequest) Reset() { *m = SnapshotRequest{} } func (m *SnapshotRequest) String() string { return proto.CompactTextString(m) } func (*SnapshotRequest) ProtoMessage() {} func (*SnapshotRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_raft_11bfea08aab81984, []int{5} + return fileDescriptor_raft_d6a64da2f1251cf6, []int{5} } func (m *SnapshotRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -479,7 +479,7 @@ func (m *SnapshotRequest_Header) Reset() { *m = SnapshotRequest_Header{} func (m *SnapshotRequest_Header) String() string { return proto.CompactTextString(m) } func (*SnapshotRequest_Header) ProtoMessage() {} func (*SnapshotRequest_Header) Descriptor() ([]byte, []int) { - return fileDescriptor_raft_11bfea08aab81984, []int{5, 0} + return fileDescriptor_raft_d6a64da2f1251cf6, []int{5, 0} } func (m *SnapshotRequest_Header) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -513,7 +513,7 @@ func (m *SnapshotResponse) Reset() { *m = SnapshotResponse{} } func (m *SnapshotResponse) String() string { return proto.CompactTextString(m) } func (*SnapshotResponse) ProtoMessage() {} func (*SnapshotResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_raft_11bfea08aab81984, []int{6} + return fileDescriptor_raft_d6a64da2f1251cf6, []int{6} } func (m *SnapshotResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -544,15 +544,13 @@ type ConfChangeContext struct { // Payload is the application-level command (i.e. an encoded // storagepb.RaftCommand). Payload []byte `protobuf:"bytes,2,opt,name=payload" json:"payload,omitempty"` - // Replica contains full details about the replica being added or removed. - Replica roachpb.ReplicaDescriptor `protobuf:"bytes,3,opt,name=replica" json:"replica"` } func (m *ConfChangeContext) Reset() { *m = ConfChangeContext{} } func (m *ConfChangeContext) String() string { return proto.CompactTextString(m) } func (*ConfChangeContext) ProtoMessage() {} func (*ConfChangeContext) Descriptor() ([]byte, []int) { - return fileDescriptor_raft_11bfea08aab81984, []int{7} + return fileDescriptor_raft_d6a64da2f1251cf6, []int{7} } func (m *ConfChangeContext) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1151,14 +1149,6 @@ func (m *ConfChangeContext) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintRaft(dAtA, i, uint64(len(m.Payload))) i += copy(dAtA[i:], m.Payload) } - dAtA[i] = 0x1a - i++ - i = encodeVarintRaft(dAtA, i, uint64(m.Replica.Size())) - n11, err := m.Replica.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n11 return i, nil } @@ -1330,8 +1320,6 @@ func (m *ConfChangeContext) Size() (n int) { l = len(m.Payload) n += 1 + l + sovRaft(uint64(l)) } - l = m.Replica.Size() - n += 1 + l + sovRaft(uint64(l)) return n } @@ -2700,36 +2688,6 @@ func (m *ConfChangeContext) Unmarshal(dAtA []byte) error { m.Payload = []byte{} } iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Replica", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaft - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRaft - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Replica.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipRaft(dAtA[iNdEx:]) @@ -2856,86 +2814,85 @@ var ( ErrIntOverflowRaft = fmt.Errorf("proto: integer overflow") ) -func init() { proto.RegisterFile("storage/raft.proto", fileDescriptor_raft_11bfea08aab81984) } - -var fileDescriptor_raft_11bfea08aab81984 = []byte{ - // 1234 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x56, 0xcd, 0x6e, 0x1b, 0x55, - 0x14, 0xf6, 0xc4, 0x63, 0x7b, 0x7c, 0x6c, 0x27, 0xd3, 0x4b, 0x05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b, 0x79, 0x5b, 0xbe, 0xa2, 0x16, 0x64, 0xfe, 0xf9, 0xa6, 0x94, 0xd0, 0xb5, 0x57, 0x0a, 0x64, - 0xb7, 0xa7, 0x63, 0xe2, 0xd1, 0x71, 0x47, 0x63, 0xd0, 0x17, 0xc6, 0x9e, 0x6f, 0xa0, 0xfb, 0x57, - 0xdb, 0x0d, 0xd4, 0xb6, 0x78, 0xf7, 0x6a, 0x6b, 0xd6, 0x4c, 0x54, 0x94, 0x07, 0x0a, 0x7a, 0x0a, - 0x79, 0xaa, 0x94, 0x15, 0x44, 0xe6, 0xdb, 0xbb, 0xb7, 0x78, 0xfb, 0x0a, 0x2d, 0xc0, 0xe9, 0x1b, - 0xf7, 0x8e, 0x7e, 0x2f, 0x25, 0x8e, 0x4e, 0x4a, 0xca, 0xcb, 0x93, 0x92, 0xf2, 0xea, 0xa4, 0xa4, - 0xfc, 0x76, 0x52, 0x52, 0xbe, 0x7b, 0x5d, 0x4a, 0xbc, 0x7c, 0x5d, 0x4a, 0xbc, 0x7a, 0x5d, 0x4a, - 0x7c, 0x9d, 0x11, 0x0c, 0x7f, 0x06, 0x00, 0x00, 0xff, 0xff, 0x5d, 0x91, 0x95, 0x8c, 0xb9, 0x0c, - 0x00, 0x00, +func init() { proto.RegisterFile("storage/raft.proto", fileDescriptor_raft_d6a64da2f1251cf6) } + +var fileDescriptor_raft_d6a64da2f1251cf6 = []byte{ + // 1224 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x56, 0x5f, 0x6f, 0xdb, 0x54, + 0x14, 0x8f, 0x1b, 0x27, 0x71, 0x4e, 0x92, 0xd6, 0xbb, 0x4c, 0x60, 0x85, 0x91, 0x46, 0x1e, 0x1b, + 0xd9, 0x10, 0xc9, 0xa8, 0x06, 0x0f, 0xbc, 0xe5, 0x8f, 0xbb, 0x66, 0xfd, 0x17, 0xb9, 0x59, 0x11, + 0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0x33, 0xdb, 0xe2, 0xdd, 0xab, 0xed, 0x47, 0x33, + 0x51, 0x51, 0x1e, 0x28, 0xe8, 0x29, 0xe4, 0x99, 0x32, 0x4e, 0x3d, 0x32, 0xdf, 0xdd, 0x76, 0xc5, + 0xdb, 0x57, 0xa8, 0x9d, 0xa0, 0x6f, 0xdc, 0x3b, 0xf9, 0xa3, 0x94, 0x38, 0x39, 0x2b, 0x29, 0x2f, + 0xcf, 0x4a, 0xca, 0xab, 0xb3, 0x92, 0xf2, 0xfb, 0x59, 0x49, 0xf9, 0xe1, 0x75, 0x29, 0xf1, 0xf2, + 0x75, 0x29, 0xf1, 0xea, 0x75, 0x29, 0xf1, 0x6d, 0x46, 0x32, 0xfc, 0x15, 0x00, 0x00, 0xff, 0xff, + 0x38, 0x31, 0xfb, 0x9d, 0x72, 0x0c, 0x00, 0x00, } diff --git a/pkg/storage/raft.proto b/pkg/storage/raft.proto index 14535540650d..b008a8cada9f 100644 --- a/pkg/storage/raft.proto +++ b/pkg/storage/raft.proto @@ -200,9 +200,6 @@ message ConfChangeContext { // Payload is the application-level command (i.e. an encoded // storagepb.RaftCommand). optional bytes payload = 2; - - // Replica contains full details about the replica being added or removed. - optional roachpb.ReplicaDescriptor replica = 3 [(gogoproto.nullable) = false]; } service MultiRaft { diff --git a/pkg/storage/replica_application_result.go b/pkg/storage/replica_application_result.go index 49f97ec27b69..42ee3c148b16 100644 --- a/pkg/storage/replica_application_result.go +++ b/pkg/storage/replica_application_result.go @@ -294,12 +294,15 @@ func (r *Replica) handleComputeChecksumResult(ctx context.Context, cc *storagepb } func (r *Replica) handleChangeReplicasResult(ctx context.Context, chng *storagepb.ChangeReplicas) { - if chng.ChangeType == roachpb.REMOVE_REPLICA && r.store.StoreID() == chng.Replica.StoreID { - // This wants to run as late as possible, maximizing the chances - // that the other nodes have finished this command as well (since - // processing the removal from the queue looks up the Range at the - // lease holder, being too early here turns this into a no-op). - r.store.replicaGCQueue.AddAsync(ctx, r, replicaGCPriorityRemoved) + for _, rDesc := range chng.Removed() { + if r.store.StoreID() == rDesc.StoreID { + // This wants to run as late as possible, maximizing the chances + // that the other nodes have finished this command as well (since + // processing the removal from the queue looks up the Range at the + // lease holder, being too early here turns this into a no-op). + r.store.replicaGCQueue.AddAsync(ctx, r, replicaGCPriorityRemoved) + break + } } } diff --git a/pkg/storage/replica_command.go b/pkg/storage/replica_command.go index fb4ec63eb805..5fe3ae59959a 100644 --- a/pkg/storage/replica_command.go +++ b/pkg/storage/replica_command.go @@ -1218,14 +1218,34 @@ func execChangeReplicasTxn( return err } + var crt *roachpb.ChangeReplicasTrigger + if !store.ClusterSettings().Version.IsActive(cluster.VersionAtomicChangeReplicasTrigger) { + crt = &roachpb.ChangeReplicasTrigger{ + DeprecatedChangeType: changeType, + DeprecatedReplica: repDesc, + Desc: updatedDesc, + } + } else { + var added, removed []roachpb.ReplicaDescriptor + switch changeType { + case roachpb.ADD_REPLICA: + added = append(added, repDesc) + case roachpb.REMOVE_REPLICA: + removed = append(removed, repDesc) + default: + return errors.Errorf("unknown change type: %d", changeType) + } + crt = &roachpb.ChangeReplicasTrigger{ + Desc: updatedDesc, + InternalAddedReplicas: added, + InternalRemovedReplicas: removed, + } + } + b.AddRawRequest(&roachpb.EndTransactionRequest{ Commit: true, InternalCommitTrigger: &roachpb.InternalCommitTrigger{ - ChangeReplicasTrigger: &roachpb.ChangeReplicasTrigger{ - ChangeType: changeType, - Replica: repDesc, - Desc: updatedDesc, - }, + ChangeReplicasTrigger: crt, }, }) if err := txn.Run(ctx, b); err != nil { diff --git a/pkg/storage/replica_proposal_buf.go b/pkg/storage/replica_proposal_buf.go index 22ccc1e421a9..6b82c166bfb3 100644 --- a/pkg/storage/replica_proposal_buf.go +++ b/pkg/storage/replica_proposal_buf.go @@ -18,6 +18,7 @@ import ( "github.com/cockroachdb/cockroach/pkg/roachpb" "github.com/cockroachdb/cockroach/pkg/util/log" "github.com/cockroachdb/cockroach/pkg/util/protoutil" + "github.com/cockroachdb/errors" "go.etcd.io/etcd/raft" "go.etcd.io/etcd/raft/raftpb" ) @@ -437,7 +438,6 @@ func (b *propBuf) FlushLockedWithRaftGroup(raftGroup *raft.RawNode) error { confChangeCtx := ConfChangeContext{ CommandID: string(p.idKey), Payload: p.encodedCommand, - Replica: crt.Replica, } encodedCtx, err := protoutil.Marshal(&confChangeCtx) if err != nil { @@ -445,15 +445,33 @@ func (b *propBuf) FlushLockedWithRaftGroup(raftGroup *raft.RawNode) error { continue } + added, removed := crt.Added(), crt.Removed() + if len(added)+len(removed) != 1 { + log.Fatalf(context.TODO(), "atomic replication changes not supported yet") + } + + var changeType raftpb.ConfChangeType + var replicaID roachpb.ReplicaID + if len(added) > 0 { + replicaID = added[0].ReplicaID + typ := added[0].GetType() + switch typ { + case roachpb.ReplicaType_VOTER: + changeType = raftpb.ConfChangeAddNode + case roachpb.ReplicaType_LEARNER: + changeType = raftpb.ConfChangeAddLearnerNode + default: + panic(errors.Errorf("unknown replica type %v", typ)) + } + } else { + changeType, replicaID = raftpb.ConfChangeRemoveNode, removed[0].ReplicaID + } + confChange := raftpb.ConfChange{ - Type: changeTypeInternalToRaft[crt.ChangeType], - NodeID: uint64(crt.Replica.ReplicaID), + Type: changeType, + NodeID: uint64(replicaID), Context: encodedCtx, } - if confChange.Type == raftpb.ConfChangeAddNode && - crt.Replica.GetType() == roachpb.ReplicaType_LEARNER { - confChange.Type = raftpb.ConfChangeAddLearnerNode - } if err := raftGroup.ProposeConfChange( confChange, ); err != nil && err != raft.ErrProposalDropped { diff --git a/pkg/storage/replica_raft.go b/pkg/storage/replica_raft.go index 60c6402d690d..62b3852e586f 100644 --- a/pkg/storage/replica_raft.go +++ b/pkg/storage/replica_raft.go @@ -297,11 +297,14 @@ func (r *Replica) propose(ctx context.Context, p *ProposalData) (index int64, pE // based range leases). This shouldn't happen often, but has been seen // before (#12591). replID := p.command.ProposerReplica.ReplicaID - if crt.ChangeType == roachpb.REMOVE_REPLICA && crt.Replica.ReplicaID == replID { - msg := fmt.Sprintf("received invalid ChangeReplicasTrigger %s to remove self (leaseholder)", crt) - log.Error(p.ctx, msg) - return 0, roachpb.NewErrorf("%s: %s", r, msg) + for _, rDesc := range crt.Removed() { + if rDesc.ReplicaID == replID { + msg := fmt.Sprintf("received invalid ChangeReplicasTrigger %s to remove self (leaseholder)", crt) + log.Error(p.ctx, msg) + return 0, roachpb.NewErrorf("%s: %s", r, msg) + } } + } else if p.command.ReplicatedEvalResult.AddSSTable != nil { log.VEvent(p.ctx, 4, "sideloadable proposal detected") version = raftVersionSideloaded diff --git a/pkg/storage/store.go b/pkg/storage/store.go index 05a276f6b239..0c15cd161879 100644 --- a/pkg/storage/store.go +++ b/pkg/storage/store.go @@ -95,11 +95,6 @@ const ( systemDataGossipInterval = 1 * time.Minute ) -var changeTypeInternalToRaft = map[roachpb.ReplicaChangeType]raftpb.ConfChangeType{ - roachpb.ADD_REPLICA: raftpb.ConfChangeAddNode, - roachpb.REMOVE_REPLICA: raftpb.ConfChangeRemoveNode, -} - var storeSchedulerConcurrency = envutil.EnvOrDefaultInt( "COCKROACH_SCHEDULER_CONCURRENCY", 8*runtime.NumCPU())