diff --git a/include/dsn/dist/replication/replication.codes.h b/include/dsn/dist/replication/replication.codes.h index a9db134973..4741806e7c 100644 --- a/include/dsn/dist/replication/replication.codes.h +++ b/include/dsn/dist/replication/replication.codes.h @@ -107,6 +107,7 @@ MAKE_EVENT_CODE_RPC(RPC_CM_UPDATE_APP_ENV, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE_RPC(RPC_CM_DDD_DIAGNOSE, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE_RPC(RPC_CM_START_PARTITION_SPLIT, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE_RPC(RPC_CM_CONTROL_PARTITION_SPLIT, TASK_PRIORITY_COMMON) +MAKE_EVENT_CODE_RPC(RPC_CM_QUERY_PARTITION_SPLIT, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE_RPC(RPC_CM_REGISTER_CHILD_REPLICA, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE_RPC(RPC_CM_NOTIFY_STOP_SPLIT, TASK_PRIORITY_COMMON) MAKE_EVENT_CODE_RPC(RPC_CM_START_BULK_LOAD, TASK_PRIORITY_COMMON) diff --git a/include/dsn/dist/replication/replication_ddl_client.h b/include/dsn/dist/replication/replication_ddl_client.h index 09ccb79f18..e36f6a2119 100644 --- a/include/dsn/dist/replication/replication_ddl_client.h +++ b/include/dsn/dist/replication/replication_ddl_client.h @@ -207,6 +207,8 @@ class replication_ddl_client const int32_t parent_pidx, const int32_t old_partition_count); + error_with query_partition_split(const std::string &app_name); + private: bool static valid_app_char(int c); diff --git a/include/dsn/dist/replication/replication_types.h b/include/dsn/dist/replication/replication_types.h index 1a0a176c27..a2c9d7895c 100644 --- a/include/dsn/dist/replication/replication_types.h +++ b/include/dsn/dist/replication/replication_types.h @@ -465,6 +465,10 @@ class control_split_request; class control_split_response; +class query_split_request; + +class query_split_response; + class notify_catch_up_request; class notify_cacth_up_response; @@ -6438,6 +6442,121 @@ inline std::ostream &operator<<(std::ostream &out, const control_split_response return out; } +typedef struct _query_split_request__isset +{ + _query_split_request__isset() : app_name(false) {} + bool app_name : 1; +} _query_split_request__isset; + +class query_split_request +{ +public: + query_split_request(const query_split_request &); + query_split_request(query_split_request &&); + query_split_request &operator=(const query_split_request &); + query_split_request &operator=(query_split_request &&); + query_split_request() : app_name() {} + + virtual ~query_split_request() throw(); + std::string app_name; + + _query_split_request__isset __isset; + + void __set_app_name(const std::string &val); + + bool operator==(const query_split_request &rhs) const + { + if (!(app_name == rhs.app_name)) + return false; + return true; + } + bool operator!=(const query_split_request &rhs) const { return !(*this == rhs); } + + bool operator<(const query_split_request &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; +}; + +void swap(query_split_request &a, query_split_request &b); + +inline std::ostream &operator<<(std::ostream &out, const query_split_request &obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _query_split_response__isset +{ + _query_split_response__isset() + : err(false), new_partition_count(false), status(false), hint_msg(false) + { + } + bool err : 1; + bool new_partition_count : 1; + bool status : 1; + bool hint_msg : 1; +} _query_split_response__isset; + +class query_split_response +{ +public: + query_split_response(const query_split_response &); + query_split_response(query_split_response &&); + query_split_response &operator=(const query_split_response &); + query_split_response &operator=(query_split_response &&); + query_split_response() : new_partition_count(0), hint_msg() {} + + virtual ~query_split_response() throw(); + ::dsn::error_code err; + int32_t new_partition_count; + std::map status; + std::string hint_msg; + + _query_split_response__isset __isset; + + void __set_err(const ::dsn::error_code &val); + + void __set_new_partition_count(const int32_t val); + + void __set_status(const std::map &val); + + void __set_hint_msg(const std::string &val); + + bool operator==(const query_split_response &rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(new_partition_count == rhs.new_partition_count)) + return false; + if (!(status == rhs.status)) + return false; + if (__isset.hint_msg != rhs.__isset.hint_msg) + return false; + else if (__isset.hint_msg && !(hint_msg == rhs.hint_msg)) + return false; + return true; + } + bool operator!=(const query_split_response &rhs) const { return !(*this == rhs); } + + bool operator<(const query_split_response &) const; + + uint32_t read(::apache::thrift::protocol::TProtocol *iprot); + uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; + + virtual void printTo(std::ostream &out) const; +}; + +void swap(query_split_response &a, query_split_response &b); + +inline std::ostream &operator<<(std::ostream &out, const query_split_response &obj) +{ + obj.printTo(out); + return out; +} + typedef struct _notify_catch_up_request__isset { _notify_catch_up_request__isset() diff --git a/src/client/replication_ddl_client.cpp b/src/client/replication_ddl_client.cpp index 9495e83959..0fa96508b7 100644 --- a/src/client/replication_ddl_client.cpp +++ b/src/client/replication_ddl_client.cpp @@ -1639,5 +1639,13 @@ replication_ddl_client::control_partition_split(const std::string &app_name, return call_rpc_sync(control_split_rpc(std::move(req), RPC_CM_CONTROL_PARTITION_SPLIT)); } +error_with +replication_ddl_client::query_partition_split(const std::string &app_name) +{ + auto req = make_unique(); + req->__set_app_name(app_name); + return call_rpc_sync(query_split_rpc(std::move(req), RPC_CM_QUERY_PARTITION_SPLIT)); +} + } // namespace replication } // namespace dsn diff --git a/src/common/replication_common.h b/src/common/replication_common.h index 6c1612329f..ca8c3c48fa 100644 --- a/src/common/replication_common.h +++ b/src/common/replication_common.h @@ -42,6 +42,7 @@ typedef rpc_holder query_bulk typedef rpc_holder start_split_rpc; typedef rpc_holder control_split_rpc; +typedef rpc_holder query_split_rpc; typedef rpc_holder notify_stop_split_rpc; class replication_options diff --git a/src/common/replication_types.cpp b/src/common/replication_types.cpp index 9c1dd54b46..65a98b4abb 100644 --- a/src/common/replication_types.cpp +++ b/src/common/replication_types.cpp @@ -14915,6 +14915,297 @@ void control_split_response::printTo(std::ostream &out) const out << ")"; } +query_split_request::~query_split_request() throw() {} + +void query_split_request::__set_app_name(const std::string &val) { this->app_name = val; } + +uint32_t query_split_request::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->app_name); + this->__isset.app_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t query_split_request::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("query_split_request"); + + xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->app_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(query_split_request &a, query_split_request &b) +{ + using ::std::swap; + swap(a.app_name, b.app_name); + swap(a.__isset, b.__isset); +} + +query_split_request::query_split_request(const query_split_request &other655) +{ + app_name = other655.app_name; + __isset = other655.__isset; +} +query_split_request::query_split_request(query_split_request &&other656) +{ + app_name = std::move(other656.app_name); + __isset = std::move(other656.__isset); +} +query_split_request &query_split_request::operator=(const query_split_request &other657) +{ + app_name = other657.app_name; + __isset = other657.__isset; + return *this; +} +query_split_request &query_split_request::operator=(query_split_request &&other658) +{ + app_name = std::move(other658.app_name); + __isset = std::move(other658.__isset); + return *this; +} +void query_split_request::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "query_split_request("; + out << "app_name=" << to_string(app_name); + out << ")"; +} + +query_split_response::~query_split_response() throw() {} + +void query_split_response::__set_err(const ::dsn::error_code &val) { this->err = val; } + +void query_split_response::__set_new_partition_count(const int32_t val) +{ + this->new_partition_count = val; +} + +void query_split_response::__set_status(const std::map &val) +{ + this->status = val; +} + +void query_split_response::__set_hint_msg(const std::string &val) +{ + this->hint_msg = val; + __isset.hint_msg = true; +} + +uint32_t query_split_response::read(::apache::thrift::protocol::TProtocol *iprot) +{ + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + while (true) { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->new_partition_count); + this->__isset.new_partition_count = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->status.clear(); + uint32_t _size659; + ::apache::thrift::protocol::TType _ktype660; + ::apache::thrift::protocol::TType _vtype661; + xfer += iprot->readMapBegin(_ktype660, _vtype661, _size659); + uint32_t _i663; + for (_i663 = 0; _i663 < _size659; ++_i663) { + int32_t _key664; + xfer += iprot->readI32(_key664); + split_status::type &_val665 = this->status[_key664]; + int32_t ecast666; + xfer += iprot->readI32(ecast666); + _val665 = (split_status::type)ecast666; + } + xfer += iprot->readMapEnd(); + } + this->__isset.status = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->hint_msg); + this->__isset.hint_msg = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t query_split_response::write(::apache::thrift::protocol::TProtocol *oprot) const +{ + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("query_split_response"); + + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("new_partition_count", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->new_partition_count); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_MAP, 3); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I32, + ::apache::thrift::protocol::T_I32, + static_cast(this->status.size())); + std::map::const_iterator _iter667; + for (_iter667 = this->status.begin(); _iter667 != this->status.end(); ++_iter667) { + xfer += oprot->writeI32(_iter667->first); + xfer += oprot->writeI32((int32_t)_iter667->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + if (this->__isset.hint_msg) { + xfer += oprot->writeFieldBegin("hint_msg", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->hint_msg); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(query_split_response &a, query_split_response &b) +{ + using ::std::swap; + swap(a.err, b.err); + swap(a.new_partition_count, b.new_partition_count); + swap(a.status, b.status); + swap(a.hint_msg, b.hint_msg); + swap(a.__isset, b.__isset); +} + +query_split_response::query_split_response(const query_split_response &other668) +{ + err = other668.err; + new_partition_count = other668.new_partition_count; + status = other668.status; + hint_msg = other668.hint_msg; + __isset = other668.__isset; +} +query_split_response::query_split_response(query_split_response &&other669) +{ + err = std::move(other669.err); + new_partition_count = std::move(other669.new_partition_count); + status = std::move(other669.status); + hint_msg = std::move(other669.hint_msg); + __isset = std::move(other669.__isset); +} +query_split_response &query_split_response::operator=(const query_split_response &other670) +{ + err = other670.err; + new_partition_count = other670.new_partition_count; + status = other670.status; + hint_msg = other670.hint_msg; + __isset = other670.__isset; + return *this; +} +query_split_response &query_split_response::operator=(query_split_response &&other671) +{ + err = std::move(other671.err); + new_partition_count = std::move(other671.new_partition_count); + status = std::move(other671.status); + hint_msg = std::move(other671.hint_msg); + __isset = std::move(other671.__isset); + return *this; +} +void query_split_response::printTo(std::ostream &out) const +{ + using ::apache::thrift::to_string; + out << "query_split_response("; + out << "err=" << to_string(err); + out << ", " + << "new_partition_count=" << to_string(new_partition_count); + out << ", " + << "status=" << to_string(status); + out << ", " + << "hint_msg="; + (__isset.hint_msg ? (out << to_string(hint_msg)) : (out << "")); + out << ")"; +} + notify_catch_up_request::~notify_catch_up_request() throw() {} void notify_catch_up_request::__set_parent_gpid(const ::dsn::gpid &val) { this->parent_gpid = val; } @@ -15028,38 +15319,38 @@ void swap(notify_catch_up_request &a, notify_catch_up_request &b) swap(a.__isset, b.__isset); } -notify_catch_up_request::notify_catch_up_request(const notify_catch_up_request &other655) +notify_catch_up_request::notify_catch_up_request(const notify_catch_up_request &other672) { - parent_gpid = other655.parent_gpid; - child_gpid = other655.child_gpid; - child_ballot = other655.child_ballot; - child_address = other655.child_address; - __isset = other655.__isset; + parent_gpid = other672.parent_gpid; + child_gpid = other672.child_gpid; + child_ballot = other672.child_ballot; + child_address = other672.child_address; + __isset = other672.__isset; } -notify_catch_up_request::notify_catch_up_request(notify_catch_up_request &&other656) +notify_catch_up_request::notify_catch_up_request(notify_catch_up_request &&other673) { - parent_gpid = std::move(other656.parent_gpid); - child_gpid = std::move(other656.child_gpid); - child_ballot = std::move(other656.child_ballot); - child_address = std::move(other656.child_address); - __isset = std::move(other656.__isset); + parent_gpid = std::move(other673.parent_gpid); + child_gpid = std::move(other673.child_gpid); + child_ballot = std::move(other673.child_ballot); + child_address = std::move(other673.child_address); + __isset = std::move(other673.__isset); } -notify_catch_up_request ¬ify_catch_up_request::operator=(const notify_catch_up_request &other657) +notify_catch_up_request ¬ify_catch_up_request::operator=(const notify_catch_up_request &other674) { - parent_gpid = other657.parent_gpid; - child_gpid = other657.child_gpid; - child_ballot = other657.child_ballot; - child_address = other657.child_address; - __isset = other657.__isset; + parent_gpid = other674.parent_gpid; + child_gpid = other674.child_gpid; + child_ballot = other674.child_ballot; + child_address = other674.child_address; + __isset = other674.__isset; return *this; } -notify_catch_up_request ¬ify_catch_up_request::operator=(notify_catch_up_request &&other658) +notify_catch_up_request ¬ify_catch_up_request::operator=(notify_catch_up_request &&other675) { - parent_gpid = std::move(other658.parent_gpid); - child_gpid = std::move(other658.child_gpid); - child_ballot = std::move(other658.child_ballot); - child_address = std::move(other658.child_address); - __isset = std::move(other658.__isset); + parent_gpid = std::move(other675.parent_gpid); + child_gpid = std::move(other675.child_gpid); + child_ballot = std::move(other675.child_ballot); + child_address = std::move(other675.child_address); + __isset = std::move(other675.__isset); return *this; } void notify_catch_up_request::printTo(std::ostream &out) const @@ -15141,27 +15432,27 @@ void swap(notify_cacth_up_response &a, notify_cacth_up_response &b) swap(a.__isset, b.__isset); } -notify_cacth_up_response::notify_cacth_up_response(const notify_cacth_up_response &other659) +notify_cacth_up_response::notify_cacth_up_response(const notify_cacth_up_response &other676) { - err = other659.err; - __isset = other659.__isset; + err = other676.err; + __isset = other676.__isset; } -notify_cacth_up_response::notify_cacth_up_response(notify_cacth_up_response &&other660) +notify_cacth_up_response::notify_cacth_up_response(notify_cacth_up_response &&other677) { - err = std::move(other660.err); - __isset = std::move(other660.__isset); + err = std::move(other677.err); + __isset = std::move(other677.__isset); } notify_cacth_up_response ¬ify_cacth_up_response:: -operator=(const notify_cacth_up_response &other661) +operator=(const notify_cacth_up_response &other678) { - err = other661.err; - __isset = other661.__isset; + err = other678.err; + __isset = other678.__isset; return *this; } -notify_cacth_up_response ¬ify_cacth_up_response::operator=(notify_cacth_up_response &&other662) +notify_cacth_up_response ¬ify_cacth_up_response::operator=(notify_cacth_up_response &&other679) { - err = std::move(other662.err); - __isset = std::move(other662.__isset); + err = std::move(other679.err); + __isset = std::move(other679.__isset); return *this; } void notify_cacth_up_response::printTo(std::ostream &out) const @@ -15298,41 +15589,41 @@ void swap(update_child_group_partition_count_request &a, } update_child_group_partition_count_request::update_child_group_partition_count_request( - const update_child_group_partition_count_request &other663) + const update_child_group_partition_count_request &other680) { - target_address = other663.target_address; - new_partition_count = other663.new_partition_count; - child_pid = other663.child_pid; - ballot = other663.ballot; - __isset = other663.__isset; + target_address = other680.target_address; + new_partition_count = other680.new_partition_count; + child_pid = other680.child_pid; + ballot = other680.ballot; + __isset = other680.__isset; } update_child_group_partition_count_request::update_child_group_partition_count_request( - update_child_group_partition_count_request &&other664) + update_child_group_partition_count_request &&other681) { - target_address = std::move(other664.target_address); - new_partition_count = std::move(other664.new_partition_count); - child_pid = std::move(other664.child_pid); - ballot = std::move(other664.ballot); - __isset = std::move(other664.__isset); + target_address = std::move(other681.target_address); + new_partition_count = std::move(other681.new_partition_count); + child_pid = std::move(other681.child_pid); + ballot = std::move(other681.ballot); + __isset = std::move(other681.__isset); } update_child_group_partition_count_request &update_child_group_partition_count_request:: -operator=(const update_child_group_partition_count_request &other665) +operator=(const update_child_group_partition_count_request &other682) { - target_address = other665.target_address; - new_partition_count = other665.new_partition_count; - child_pid = other665.child_pid; - ballot = other665.ballot; - __isset = other665.__isset; + target_address = other682.target_address; + new_partition_count = other682.new_partition_count; + child_pid = other682.child_pid; + ballot = other682.ballot; + __isset = other682.__isset; return *this; } update_child_group_partition_count_request &update_child_group_partition_count_request:: -operator=(update_child_group_partition_count_request &&other666) +operator=(update_child_group_partition_count_request &&other683) { - target_address = std::move(other666.target_address); - new_partition_count = std::move(other666.new_partition_count); - child_pid = std::move(other666.child_pid); - ballot = std::move(other666.ballot); - __isset = std::move(other666.__isset); + target_address = std::move(other683.target_address); + new_partition_count = std::move(other683.new_partition_count); + child_pid = std::move(other683.child_pid); + ballot = std::move(other683.ballot); + __isset = std::move(other683.__isset); return *this; } void update_child_group_partition_count_request::printTo(std::ostream &out) const @@ -15423,29 +15714,29 @@ void swap(update_child_group_partition_count_response &a, } update_child_group_partition_count_response::update_child_group_partition_count_response( - const update_child_group_partition_count_response &other667) + const update_child_group_partition_count_response &other684) { - err = other667.err; - __isset = other667.__isset; + err = other684.err; + __isset = other684.__isset; } update_child_group_partition_count_response::update_child_group_partition_count_response( - update_child_group_partition_count_response &&other668) + update_child_group_partition_count_response &&other685) { - err = std::move(other668.err); - __isset = std::move(other668.__isset); + err = std::move(other685.err); + __isset = std::move(other685.__isset); } update_child_group_partition_count_response &update_child_group_partition_count_response:: -operator=(const update_child_group_partition_count_response &other669) +operator=(const update_child_group_partition_count_response &other686) { - err = other669.err; - __isset = other669.__isset; + err = other686.err; + __isset = other686.__isset; return *this; } update_child_group_partition_count_response &update_child_group_partition_count_response:: -operator=(update_child_group_partition_count_response &&other670) +operator=(update_child_group_partition_count_response &&other687) { - err = std::move(other670.err); - __isset = std::move(other670.__isset); + err = std::move(other687.err); + __isset = std::move(other687.__isset); return *this; } void update_child_group_partition_count_response::printTo(std::ostream &out) const @@ -15575,38 +15866,38 @@ void swap(register_child_request &a, register_child_request &b) swap(a.__isset, b.__isset); } -register_child_request::register_child_request(const register_child_request &other671) +register_child_request::register_child_request(const register_child_request &other688) { - app = other671.app; - parent_config = other671.parent_config; - child_config = other671.child_config; - primary_address = other671.primary_address; - __isset = other671.__isset; + app = other688.app; + parent_config = other688.parent_config; + child_config = other688.child_config; + primary_address = other688.primary_address; + __isset = other688.__isset; } -register_child_request::register_child_request(register_child_request &&other672) +register_child_request::register_child_request(register_child_request &&other689) { - app = std::move(other672.app); - parent_config = std::move(other672.parent_config); - child_config = std::move(other672.child_config); - primary_address = std::move(other672.primary_address); - __isset = std::move(other672.__isset); + app = std::move(other689.app); + parent_config = std::move(other689.parent_config); + child_config = std::move(other689.child_config); + primary_address = std::move(other689.primary_address); + __isset = std::move(other689.__isset); } -register_child_request ®ister_child_request::operator=(const register_child_request &other673) +register_child_request ®ister_child_request::operator=(const register_child_request &other690) { - app = other673.app; - parent_config = other673.parent_config; - child_config = other673.child_config; - primary_address = other673.primary_address; - __isset = other673.__isset; + app = other690.app; + parent_config = other690.parent_config; + child_config = other690.child_config; + primary_address = other690.primary_address; + __isset = other690.__isset; return *this; } -register_child_request ®ister_child_request::operator=(register_child_request &&other674) +register_child_request ®ister_child_request::operator=(register_child_request &&other691) { - app = std::move(other674.app); - parent_config = std::move(other674.parent_config); - child_config = std::move(other674.child_config); - primary_address = std::move(other674.primary_address); - __isset = std::move(other674.__isset); + app = std::move(other691.app); + parent_config = std::move(other691.parent_config); + child_config = std::move(other691.child_config); + primary_address = std::move(other691.primary_address); + __isset = std::move(other691.__isset); return *this; } void register_child_request::printTo(std::ostream &out) const @@ -15739,38 +16030,38 @@ void swap(register_child_response &a, register_child_response &b) swap(a.__isset, b.__isset); } -register_child_response::register_child_response(const register_child_response &other675) +register_child_response::register_child_response(const register_child_response &other692) { - err = other675.err; - app = other675.app; - parent_config = other675.parent_config; - child_config = other675.child_config; - __isset = other675.__isset; + err = other692.err; + app = other692.app; + parent_config = other692.parent_config; + child_config = other692.child_config; + __isset = other692.__isset; } -register_child_response::register_child_response(register_child_response &&other676) +register_child_response::register_child_response(register_child_response &&other693) { - err = std::move(other676.err); - app = std::move(other676.app); - parent_config = std::move(other676.parent_config); - child_config = std::move(other676.child_config); - __isset = std::move(other676.__isset); + err = std::move(other693.err); + app = std::move(other693.app); + parent_config = std::move(other693.parent_config); + child_config = std::move(other693.child_config); + __isset = std::move(other693.__isset); } -register_child_response ®ister_child_response::operator=(const register_child_response &other677) +register_child_response ®ister_child_response::operator=(const register_child_response &other694) { - err = other677.err; - app = other677.app; - parent_config = other677.parent_config; - child_config = other677.child_config; - __isset = other677.__isset; + err = other694.err; + app = other694.app; + parent_config = other694.parent_config; + child_config = other694.child_config; + __isset = other694.__isset; return *this; } -register_child_response ®ister_child_response::operator=(register_child_response &&other678) +register_child_response ®ister_child_response::operator=(register_child_response &&other695) { - err = std::move(other678.err); - app = std::move(other678.app); - parent_config = std::move(other678.parent_config); - child_config = std::move(other678.child_config); - __isset = std::move(other678.__isset); + err = std::move(other695.err); + app = std::move(other695.app); + parent_config = std::move(other695.parent_config); + child_config = std::move(other695.child_config); + __isset = std::move(other695.__isset); return *this; } void register_child_response::printTo(std::ostream &out) const @@ -15843,9 +16134,9 @@ uint32_t notify_stop_split_request::read(::apache::thrift::protocol::TProtocol * break; case 3: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast679; - xfer += iprot->readI32(ecast679); - this->meta_split_status = (split_status::type)ecast679; + int32_t ecast696; + xfer += iprot->readI32(ecast696); + this->meta_split_status = (split_status::type)ecast696; this->__isset.meta_split_status = true; } else { xfer += iprot->skip(ftype); @@ -15908,40 +16199,40 @@ void swap(notify_stop_split_request &a, notify_stop_split_request &b) swap(a.__isset, b.__isset); } -notify_stop_split_request::notify_stop_split_request(const notify_stop_split_request &other680) +notify_stop_split_request::notify_stop_split_request(const notify_stop_split_request &other697) { - app_name = other680.app_name; - parent_gpid = other680.parent_gpid; - meta_split_status = other680.meta_split_status; - partition_count = other680.partition_count; - __isset = other680.__isset; + app_name = other697.app_name; + parent_gpid = other697.parent_gpid; + meta_split_status = other697.meta_split_status; + partition_count = other697.partition_count; + __isset = other697.__isset; } -notify_stop_split_request::notify_stop_split_request(notify_stop_split_request &&other681) +notify_stop_split_request::notify_stop_split_request(notify_stop_split_request &&other698) { - app_name = std::move(other681.app_name); - parent_gpid = std::move(other681.parent_gpid); - meta_split_status = std::move(other681.meta_split_status); - partition_count = std::move(other681.partition_count); - __isset = std::move(other681.__isset); + app_name = std::move(other698.app_name); + parent_gpid = std::move(other698.parent_gpid); + meta_split_status = std::move(other698.meta_split_status); + partition_count = std::move(other698.partition_count); + __isset = std::move(other698.__isset); } notify_stop_split_request ¬ify_stop_split_request:: -operator=(const notify_stop_split_request &other682) +operator=(const notify_stop_split_request &other699) { - app_name = other682.app_name; - parent_gpid = other682.parent_gpid; - meta_split_status = other682.meta_split_status; - partition_count = other682.partition_count; - __isset = other682.__isset; + app_name = other699.app_name; + parent_gpid = other699.parent_gpid; + meta_split_status = other699.meta_split_status; + partition_count = other699.partition_count; + __isset = other699.__isset; return *this; } notify_stop_split_request ¬ify_stop_split_request:: -operator=(notify_stop_split_request &&other683) +operator=(notify_stop_split_request &&other700) { - app_name = std::move(other683.app_name); - parent_gpid = std::move(other683.parent_gpid); - meta_split_status = std::move(other683.meta_split_status); - partition_count = std::move(other683.partition_count); - __isset = std::move(other683.__isset); + app_name = std::move(other700.app_name); + parent_gpid = std::move(other700.parent_gpid); + meta_split_status = std::move(other700.meta_split_status); + partition_count = std::move(other700.partition_count); + __isset = std::move(other700.__isset); return *this; } void notify_stop_split_request::printTo(std::ostream &out) const @@ -16023,28 +16314,28 @@ void swap(notify_stop_split_response &a, notify_stop_split_response &b) swap(a.__isset, b.__isset); } -notify_stop_split_response::notify_stop_split_response(const notify_stop_split_response &other684) +notify_stop_split_response::notify_stop_split_response(const notify_stop_split_response &other701) { - err = other684.err; - __isset = other684.__isset; + err = other701.err; + __isset = other701.__isset; } -notify_stop_split_response::notify_stop_split_response(notify_stop_split_response &&other685) +notify_stop_split_response::notify_stop_split_response(notify_stop_split_response &&other702) { - err = std::move(other685.err); - __isset = std::move(other685.__isset); + err = std::move(other702.err); + __isset = std::move(other702.__isset); } notify_stop_split_response ¬ify_stop_split_response:: -operator=(const notify_stop_split_response &other686) +operator=(const notify_stop_split_response &other703) { - err = other686.err; - __isset = other686.__isset; + err = other703.err; + __isset = other703.__isset; return *this; } notify_stop_split_response ¬ify_stop_split_response:: -operator=(notify_stop_split_response &&other687) +operator=(notify_stop_split_response &&other704) { - err = std::move(other687.err); - __isset = std::move(other687.__isset); + err = std::move(other704.err); + __isset = std::move(other704.__isset); return *this; } void notify_stop_split_response::printTo(std::ostream &out) const @@ -16084,13 +16375,13 @@ uint32_t bulk_load_metadata::read(::apache::thrift::protocol::TProtocol *iprot) if (ftype == ::apache::thrift::protocol::T_LIST) { { this->files.clear(); - uint32_t _size688; - ::apache::thrift::protocol::TType _etype691; - xfer += iprot->readListBegin(_etype691, _size688); - this->files.resize(_size688); - uint32_t _i692; - for (_i692 = 0; _i692 < _size688; ++_i692) { - xfer += this->files[_i692].read(iprot); + uint32_t _size705; + ::apache::thrift::protocol::TType _etype708; + xfer += iprot->readListBegin(_etype708, _size705); + this->files.resize(_size705); + uint32_t _i709; + for (_i709 = 0; _i709 < _size705; ++_i709) { + xfer += this->files[_i709].read(iprot); } xfer += iprot->readListEnd(); } @@ -16129,9 +16420,9 @@ uint32_t bulk_load_metadata::write(::apache::thrift::protocol::TProtocol *oprot) { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->files.size())); - std::vector::const_iterator _iter693; - for (_iter693 = this->files.begin(); _iter693 != this->files.end(); ++_iter693) { - xfer += (*_iter693).write(oprot); + std::vector::const_iterator _iter710; + for (_iter710 = this->files.begin(); _iter710 != this->files.end(); ++_iter710) { + xfer += (*_iter710).write(oprot); } xfer += oprot->writeListEnd(); } @@ -16154,30 +16445,30 @@ void swap(bulk_load_metadata &a, bulk_load_metadata &b) swap(a.__isset, b.__isset); } -bulk_load_metadata::bulk_load_metadata(const bulk_load_metadata &other694) +bulk_load_metadata::bulk_load_metadata(const bulk_load_metadata &other711) { - files = other694.files; - file_total_size = other694.file_total_size; - __isset = other694.__isset; + files = other711.files; + file_total_size = other711.file_total_size; + __isset = other711.__isset; } -bulk_load_metadata::bulk_load_metadata(bulk_load_metadata &&other695) +bulk_load_metadata::bulk_load_metadata(bulk_load_metadata &&other712) { - files = std::move(other695.files); - file_total_size = std::move(other695.file_total_size); - __isset = std::move(other695.__isset); + files = std::move(other712.files); + file_total_size = std::move(other712.file_total_size); + __isset = std::move(other712.__isset); } -bulk_load_metadata &bulk_load_metadata::operator=(const bulk_load_metadata &other696) +bulk_load_metadata &bulk_load_metadata::operator=(const bulk_load_metadata &other713) { - files = other696.files; - file_total_size = other696.file_total_size; - __isset = other696.__isset; + files = other713.files; + file_total_size = other713.file_total_size; + __isset = other713.__isset; return *this; } -bulk_load_metadata &bulk_load_metadata::operator=(bulk_load_metadata &&other697) +bulk_load_metadata &bulk_load_metadata::operator=(bulk_load_metadata &&other714) { - files = std::move(other697.files); - file_total_size = std::move(other697.file_total_size); - __isset = std::move(other697.__isset); + files = std::move(other714.files); + file_total_size = std::move(other714.file_total_size); + __isset = std::move(other714.__isset); return *this; } void bulk_load_metadata::printTo(std::ostream &out) const @@ -16309,38 +16600,38 @@ void swap(start_bulk_load_request &a, start_bulk_load_request &b) swap(a.__isset, b.__isset); } -start_bulk_load_request::start_bulk_load_request(const start_bulk_load_request &other698) +start_bulk_load_request::start_bulk_load_request(const start_bulk_load_request &other715) { - app_name = other698.app_name; - cluster_name = other698.cluster_name; - file_provider_type = other698.file_provider_type; - remote_root_path = other698.remote_root_path; - __isset = other698.__isset; + app_name = other715.app_name; + cluster_name = other715.cluster_name; + file_provider_type = other715.file_provider_type; + remote_root_path = other715.remote_root_path; + __isset = other715.__isset; } -start_bulk_load_request::start_bulk_load_request(start_bulk_load_request &&other699) +start_bulk_load_request::start_bulk_load_request(start_bulk_load_request &&other716) { - app_name = std::move(other699.app_name); - cluster_name = std::move(other699.cluster_name); - file_provider_type = std::move(other699.file_provider_type); - remote_root_path = std::move(other699.remote_root_path); - __isset = std::move(other699.__isset); + app_name = std::move(other716.app_name); + cluster_name = std::move(other716.cluster_name); + file_provider_type = std::move(other716.file_provider_type); + remote_root_path = std::move(other716.remote_root_path); + __isset = std::move(other716.__isset); } -start_bulk_load_request &start_bulk_load_request::operator=(const start_bulk_load_request &other700) +start_bulk_load_request &start_bulk_load_request::operator=(const start_bulk_load_request &other717) { - app_name = other700.app_name; - cluster_name = other700.cluster_name; - file_provider_type = other700.file_provider_type; - remote_root_path = other700.remote_root_path; - __isset = other700.__isset; + app_name = other717.app_name; + cluster_name = other717.cluster_name; + file_provider_type = other717.file_provider_type; + remote_root_path = other717.remote_root_path; + __isset = other717.__isset; return *this; } -start_bulk_load_request &start_bulk_load_request::operator=(start_bulk_load_request &&other701) +start_bulk_load_request &start_bulk_load_request::operator=(start_bulk_load_request &&other718) { - app_name = std::move(other701.app_name); - cluster_name = std::move(other701.cluster_name); - file_provider_type = std::move(other701.file_provider_type); - remote_root_path = std::move(other701.remote_root_path); - __isset = std::move(other701.__isset); + app_name = std::move(other718.app_name); + cluster_name = std::move(other718.cluster_name); + file_provider_type = std::move(other718.file_provider_type); + remote_root_path = std::move(other718.remote_root_path); + __isset = std::move(other718.__isset); return *this; } void start_bulk_load_request::printTo(std::ostream &out) const @@ -16437,31 +16728,31 @@ void swap(start_bulk_load_response &a, start_bulk_load_response &b) swap(a.__isset, b.__isset); } -start_bulk_load_response::start_bulk_load_response(const start_bulk_load_response &other702) +start_bulk_load_response::start_bulk_load_response(const start_bulk_load_response &other719) { - err = other702.err; - hint_msg = other702.hint_msg; - __isset = other702.__isset; + err = other719.err; + hint_msg = other719.hint_msg; + __isset = other719.__isset; } -start_bulk_load_response::start_bulk_load_response(start_bulk_load_response &&other703) +start_bulk_load_response::start_bulk_load_response(start_bulk_load_response &&other720) { - err = std::move(other703.err); - hint_msg = std::move(other703.hint_msg); - __isset = std::move(other703.__isset); + err = std::move(other720.err); + hint_msg = std::move(other720.hint_msg); + __isset = std::move(other720.__isset); } start_bulk_load_response &start_bulk_load_response:: -operator=(const start_bulk_load_response &other704) +operator=(const start_bulk_load_response &other721) { - err = other704.err; - hint_msg = other704.hint_msg; - __isset = other704.__isset; + err = other721.err; + hint_msg = other721.hint_msg; + __isset = other721.__isset; return *this; } -start_bulk_load_response &start_bulk_load_response::operator=(start_bulk_load_response &&other705) +start_bulk_load_response &start_bulk_load_response::operator=(start_bulk_load_response &&other722) { - err = std::move(other705.err); - hint_msg = std::move(other705.hint_msg); - __isset = std::move(other705.__isset); + err = std::move(other722.err); + hint_msg = std::move(other722.hint_msg); + __isset = std::move(other722.__isset); return *this; } void start_bulk_load_response::printTo(std::ostream &out) const @@ -16543,9 +16834,9 @@ uint32_t partition_bulk_load_state::read(::apache::thrift::protocol::TProtocol * break; case 3: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast706; - xfer += iprot->readI32(ecast706); - this->ingest_status = (ingestion_status::type)ecast706; + int32_t ecast723; + xfer += iprot->readI32(ecast723); + this->ingest_status = (ingestion_status::type)ecast723; this->__isset.ingest_status = true; } else { xfer += iprot->skip(ftype); @@ -16626,44 +16917,44 @@ void swap(partition_bulk_load_state &a, partition_bulk_load_state &b) swap(a.__isset, b.__isset); } -partition_bulk_load_state::partition_bulk_load_state(const partition_bulk_load_state &other707) +partition_bulk_load_state::partition_bulk_load_state(const partition_bulk_load_state &other724) { - download_progress = other707.download_progress; - download_status = other707.download_status; - ingest_status = other707.ingest_status; - is_cleaned_up = other707.is_cleaned_up; - is_paused = other707.is_paused; - __isset = other707.__isset; + download_progress = other724.download_progress; + download_status = other724.download_status; + ingest_status = other724.ingest_status; + is_cleaned_up = other724.is_cleaned_up; + is_paused = other724.is_paused; + __isset = other724.__isset; } -partition_bulk_load_state::partition_bulk_load_state(partition_bulk_load_state &&other708) +partition_bulk_load_state::partition_bulk_load_state(partition_bulk_load_state &&other725) { - download_progress = std::move(other708.download_progress); - download_status = std::move(other708.download_status); - ingest_status = std::move(other708.ingest_status); - is_cleaned_up = std::move(other708.is_cleaned_up); - is_paused = std::move(other708.is_paused); - __isset = std::move(other708.__isset); + download_progress = std::move(other725.download_progress); + download_status = std::move(other725.download_status); + ingest_status = std::move(other725.ingest_status); + is_cleaned_up = std::move(other725.is_cleaned_up); + is_paused = std::move(other725.is_paused); + __isset = std::move(other725.__isset); } partition_bulk_load_state &partition_bulk_load_state:: -operator=(const partition_bulk_load_state &other709) -{ - download_progress = other709.download_progress; - download_status = other709.download_status; - ingest_status = other709.ingest_status; - is_cleaned_up = other709.is_cleaned_up; - is_paused = other709.is_paused; - __isset = other709.__isset; +operator=(const partition_bulk_load_state &other726) +{ + download_progress = other726.download_progress; + download_status = other726.download_status; + ingest_status = other726.ingest_status; + is_cleaned_up = other726.is_cleaned_up; + is_paused = other726.is_paused; + __isset = other726.__isset; return *this; } partition_bulk_load_state &partition_bulk_load_state:: -operator=(partition_bulk_load_state &&other710) -{ - download_progress = std::move(other710.download_progress); - download_status = std::move(other710.download_status); - ingest_status = std::move(other710.ingest_status); - is_cleaned_up = std::move(other710.is_cleaned_up); - is_paused = std::move(other710.is_paused); - __isset = std::move(other710.__isset); +operator=(partition_bulk_load_state &&other727) +{ + download_progress = std::move(other727.download_progress); + download_status = std::move(other727.download_status); + ingest_status = std::move(other727.ingest_status); + is_cleaned_up = std::move(other727.is_cleaned_up); + is_paused = std::move(other727.is_paused); + __isset = std::move(other727.__isset); return *this; } void partition_bulk_load_state::printTo(std::ostream &out) const @@ -16791,9 +17082,9 @@ uint32_t bulk_load_request::read(::apache::thrift::protocol::TProtocol *iprot) break; case 7: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast711; - xfer += iprot->readI32(ecast711); - this->meta_bulk_load_status = (bulk_load_status::type)ecast711; + int32_t ecast728; + xfer += iprot->readI32(ecast728); + this->meta_bulk_load_status = (bulk_load_status::type)ecast728; this->__isset.meta_bulk_load_status = true; } else { xfer += iprot->skip(ftype); @@ -16890,58 +17181,58 @@ void swap(bulk_load_request &a, bulk_load_request &b) swap(a.__isset, b.__isset); } -bulk_load_request::bulk_load_request(const bulk_load_request &other712) -{ - pid = other712.pid; - app_name = other712.app_name; - primary_addr = other712.primary_addr; - remote_provider_name = other712.remote_provider_name; - cluster_name = other712.cluster_name; - ballot = other712.ballot; - meta_bulk_load_status = other712.meta_bulk_load_status; - query_bulk_load_metadata = other712.query_bulk_load_metadata; - remote_root_path = other712.remote_root_path; - __isset = other712.__isset; -} -bulk_load_request::bulk_load_request(bulk_load_request &&other713) -{ - pid = std::move(other713.pid); - app_name = std::move(other713.app_name); - primary_addr = std::move(other713.primary_addr); - remote_provider_name = std::move(other713.remote_provider_name); - cluster_name = std::move(other713.cluster_name); - ballot = std::move(other713.ballot); - meta_bulk_load_status = std::move(other713.meta_bulk_load_status); - query_bulk_load_metadata = std::move(other713.query_bulk_load_metadata); - remote_root_path = std::move(other713.remote_root_path); - __isset = std::move(other713.__isset); -} -bulk_load_request &bulk_load_request::operator=(const bulk_load_request &other714) -{ - pid = other714.pid; - app_name = other714.app_name; - primary_addr = other714.primary_addr; - remote_provider_name = other714.remote_provider_name; - cluster_name = other714.cluster_name; - ballot = other714.ballot; - meta_bulk_load_status = other714.meta_bulk_load_status; - query_bulk_load_metadata = other714.query_bulk_load_metadata; - remote_root_path = other714.remote_root_path; - __isset = other714.__isset; +bulk_load_request::bulk_load_request(const bulk_load_request &other729) +{ + pid = other729.pid; + app_name = other729.app_name; + primary_addr = other729.primary_addr; + remote_provider_name = other729.remote_provider_name; + cluster_name = other729.cluster_name; + ballot = other729.ballot; + meta_bulk_load_status = other729.meta_bulk_load_status; + query_bulk_load_metadata = other729.query_bulk_load_metadata; + remote_root_path = other729.remote_root_path; + __isset = other729.__isset; +} +bulk_load_request::bulk_load_request(bulk_load_request &&other730) +{ + pid = std::move(other730.pid); + app_name = std::move(other730.app_name); + primary_addr = std::move(other730.primary_addr); + remote_provider_name = std::move(other730.remote_provider_name); + cluster_name = std::move(other730.cluster_name); + ballot = std::move(other730.ballot); + meta_bulk_load_status = std::move(other730.meta_bulk_load_status); + query_bulk_load_metadata = std::move(other730.query_bulk_load_metadata); + remote_root_path = std::move(other730.remote_root_path); + __isset = std::move(other730.__isset); +} +bulk_load_request &bulk_load_request::operator=(const bulk_load_request &other731) +{ + pid = other731.pid; + app_name = other731.app_name; + primary_addr = other731.primary_addr; + remote_provider_name = other731.remote_provider_name; + cluster_name = other731.cluster_name; + ballot = other731.ballot; + meta_bulk_load_status = other731.meta_bulk_load_status; + query_bulk_load_metadata = other731.query_bulk_load_metadata; + remote_root_path = other731.remote_root_path; + __isset = other731.__isset; return *this; } -bulk_load_request &bulk_load_request::operator=(bulk_load_request &&other715) -{ - pid = std::move(other715.pid); - app_name = std::move(other715.app_name); - primary_addr = std::move(other715.primary_addr); - remote_provider_name = std::move(other715.remote_provider_name); - cluster_name = std::move(other715.cluster_name); - ballot = std::move(other715.ballot); - meta_bulk_load_status = std::move(other715.meta_bulk_load_status); - query_bulk_load_metadata = std::move(other715.query_bulk_load_metadata); - remote_root_path = std::move(other715.remote_root_path); - __isset = std::move(other715.__isset); +bulk_load_request &bulk_load_request::operator=(bulk_load_request &&other732) +{ + pid = std::move(other732.pid); + app_name = std::move(other732.app_name); + primary_addr = std::move(other732.primary_addr); + remote_provider_name = std::move(other732.remote_provider_name); + cluster_name = std::move(other732.cluster_name); + ballot = std::move(other732.ballot); + meta_bulk_load_status = std::move(other732.meta_bulk_load_status); + query_bulk_load_metadata = std::move(other732.query_bulk_load_metadata); + remote_root_path = std::move(other732.remote_root_path); + __isset = std::move(other732.__isset); return *this; } void bulk_load_request::printTo(std::ostream &out) const @@ -17062,9 +17353,9 @@ uint32_t bulk_load_response::read(::apache::thrift::protocol::TProtocol *iprot) break; case 4: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast716; - xfer += iprot->readI32(ecast716); - this->primary_bulk_load_status = (bulk_load_status::type)ecast716; + int32_t ecast733; + xfer += iprot->readI32(ecast733); + this->primary_bulk_load_status = (bulk_load_status::type)ecast733; this->__isset.primary_bulk_load_status = true; } else { xfer += iprot->skip(ftype); @@ -17074,16 +17365,16 @@ uint32_t bulk_load_response::read(::apache::thrift::protocol::TProtocol *iprot) if (ftype == ::apache::thrift::protocol::T_MAP) { { this->group_bulk_load_state.clear(); - uint32_t _size717; - ::apache::thrift::protocol::TType _ktype718; - ::apache::thrift::protocol::TType _vtype719; - xfer += iprot->readMapBegin(_ktype718, _vtype719, _size717); - uint32_t _i721; - for (_i721 = 0; _i721 < _size717; ++_i721) { - ::dsn::rpc_address _key722; - xfer += _key722.read(iprot); - partition_bulk_load_state &_val723 = this->group_bulk_load_state[_key722]; - xfer += _val723.read(iprot); + uint32_t _size734; + ::apache::thrift::protocol::TType _ktype735; + ::apache::thrift::protocol::TType _vtype736; + xfer += iprot->readMapBegin(_ktype735, _vtype736, _size734); + uint32_t _i738; + for (_i738 = 0; _i738 < _size734; ++_i738) { + ::dsn::rpc_address _key739; + xfer += _key739.read(iprot); + partition_bulk_load_state &_val740 = this->group_bulk_load_state[_key739]; + xfer += _val740.read(iprot); } xfer += iprot->readMapEnd(); } @@ -17172,12 +17463,12 @@ uint32_t bulk_load_response::write(::apache::thrift::protocol::TProtocol *oprot) xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRUCT, ::apache::thrift::protocol::T_STRUCT, static_cast(this->group_bulk_load_state.size())); - std::map<::dsn::rpc_address, partition_bulk_load_state>::const_iterator _iter724; - for (_iter724 = this->group_bulk_load_state.begin(); - _iter724 != this->group_bulk_load_state.end(); - ++_iter724) { - xfer += _iter724->first.write(oprot); - xfer += _iter724->second.write(oprot); + std::map<::dsn::rpc_address, partition_bulk_load_state>::const_iterator _iter741; + for (_iter741 = this->group_bulk_load_state.begin(); + _iter741 != this->group_bulk_load_state.end(); + ++_iter741) { + xfer += _iter741->first.write(oprot); + xfer += _iter741->second.write(oprot); } xfer += oprot->writeMapEnd(); } @@ -17233,64 +17524,64 @@ void swap(bulk_load_response &a, bulk_load_response &b) swap(a.__isset, b.__isset); } -bulk_load_response::bulk_load_response(const bulk_load_response &other725) -{ - err = other725.err; - pid = other725.pid; - app_name = other725.app_name; - primary_bulk_load_status = other725.primary_bulk_load_status; - group_bulk_load_state = other725.group_bulk_load_state; - metadata = other725.metadata; - total_download_progress = other725.total_download_progress; - is_group_ingestion_finished = other725.is_group_ingestion_finished; - is_group_bulk_load_context_cleaned_up = other725.is_group_bulk_load_context_cleaned_up; - is_group_bulk_load_paused = other725.is_group_bulk_load_paused; - __isset = other725.__isset; -} -bulk_load_response::bulk_load_response(bulk_load_response &&other726) -{ - err = std::move(other726.err); - pid = std::move(other726.pid); - app_name = std::move(other726.app_name); - primary_bulk_load_status = std::move(other726.primary_bulk_load_status); - group_bulk_load_state = std::move(other726.group_bulk_load_state); - metadata = std::move(other726.metadata); - total_download_progress = std::move(other726.total_download_progress); - is_group_ingestion_finished = std::move(other726.is_group_ingestion_finished); +bulk_load_response::bulk_load_response(const bulk_load_response &other742) +{ + err = other742.err; + pid = other742.pid; + app_name = other742.app_name; + primary_bulk_load_status = other742.primary_bulk_load_status; + group_bulk_load_state = other742.group_bulk_load_state; + metadata = other742.metadata; + total_download_progress = other742.total_download_progress; + is_group_ingestion_finished = other742.is_group_ingestion_finished; + is_group_bulk_load_context_cleaned_up = other742.is_group_bulk_load_context_cleaned_up; + is_group_bulk_load_paused = other742.is_group_bulk_load_paused; + __isset = other742.__isset; +} +bulk_load_response::bulk_load_response(bulk_load_response &&other743) +{ + err = std::move(other743.err); + pid = std::move(other743.pid); + app_name = std::move(other743.app_name); + primary_bulk_load_status = std::move(other743.primary_bulk_load_status); + group_bulk_load_state = std::move(other743.group_bulk_load_state); + metadata = std::move(other743.metadata); + total_download_progress = std::move(other743.total_download_progress); + is_group_ingestion_finished = std::move(other743.is_group_ingestion_finished); is_group_bulk_load_context_cleaned_up = - std::move(other726.is_group_bulk_load_context_cleaned_up); - is_group_bulk_load_paused = std::move(other726.is_group_bulk_load_paused); - __isset = std::move(other726.__isset); -} -bulk_load_response &bulk_load_response::operator=(const bulk_load_response &other727) -{ - err = other727.err; - pid = other727.pid; - app_name = other727.app_name; - primary_bulk_load_status = other727.primary_bulk_load_status; - group_bulk_load_state = other727.group_bulk_load_state; - metadata = other727.metadata; - total_download_progress = other727.total_download_progress; - is_group_ingestion_finished = other727.is_group_ingestion_finished; - is_group_bulk_load_context_cleaned_up = other727.is_group_bulk_load_context_cleaned_up; - is_group_bulk_load_paused = other727.is_group_bulk_load_paused; - __isset = other727.__isset; + std::move(other743.is_group_bulk_load_context_cleaned_up); + is_group_bulk_load_paused = std::move(other743.is_group_bulk_load_paused); + __isset = std::move(other743.__isset); +} +bulk_load_response &bulk_load_response::operator=(const bulk_load_response &other744) +{ + err = other744.err; + pid = other744.pid; + app_name = other744.app_name; + primary_bulk_load_status = other744.primary_bulk_load_status; + group_bulk_load_state = other744.group_bulk_load_state; + metadata = other744.metadata; + total_download_progress = other744.total_download_progress; + is_group_ingestion_finished = other744.is_group_ingestion_finished; + is_group_bulk_load_context_cleaned_up = other744.is_group_bulk_load_context_cleaned_up; + is_group_bulk_load_paused = other744.is_group_bulk_load_paused; + __isset = other744.__isset; return *this; } -bulk_load_response &bulk_load_response::operator=(bulk_load_response &&other728) +bulk_load_response &bulk_load_response::operator=(bulk_load_response &&other745) { - err = std::move(other728.err); - pid = std::move(other728.pid); - app_name = std::move(other728.app_name); - primary_bulk_load_status = std::move(other728.primary_bulk_load_status); - group_bulk_load_state = std::move(other728.group_bulk_load_state); - metadata = std::move(other728.metadata); - total_download_progress = std::move(other728.total_download_progress); - is_group_ingestion_finished = std::move(other728.is_group_ingestion_finished); + err = std::move(other745.err); + pid = std::move(other745.pid); + app_name = std::move(other745.app_name); + primary_bulk_load_status = std::move(other745.primary_bulk_load_status); + group_bulk_load_state = std::move(other745.group_bulk_load_state); + metadata = std::move(other745.metadata); + total_download_progress = std::move(other745.total_download_progress); + is_group_ingestion_finished = std::move(other745.is_group_ingestion_finished); is_group_bulk_load_context_cleaned_up = - std::move(other728.is_group_bulk_load_context_cleaned_up); - is_group_bulk_load_paused = std::move(other728.is_group_bulk_load_paused); - __isset = std::move(other728.__isset); + std::move(other745.is_group_bulk_load_context_cleaned_up); + is_group_bulk_load_paused = std::move(other745.is_group_bulk_load_paused); + __isset = std::move(other745.__isset); return *this; } void bulk_load_response::printTo(std::ostream &out) const @@ -17421,9 +17712,9 @@ uint32_t group_bulk_load_request::read(::apache::thrift::protocol::TProtocol *ip break; case 6: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast729; - xfer += iprot->readI32(ecast729); - this->meta_bulk_load_status = (bulk_load_status::type)ecast729; + int32_t ecast746; + xfer += iprot->readI32(ecast746); + this->meta_bulk_load_status = (bulk_load_status::type)ecast746; this->__isset.meta_bulk_load_status = true; } else { xfer += iprot->skip(ftype); @@ -17501,50 +17792,50 @@ void swap(group_bulk_load_request &a, group_bulk_load_request &b) swap(a.__isset, b.__isset); } -group_bulk_load_request::group_bulk_load_request(const group_bulk_load_request &other730) -{ - app_name = other730.app_name; - target_address = other730.target_address; - config = other730.config; - provider_name = other730.provider_name; - cluster_name = other730.cluster_name; - meta_bulk_load_status = other730.meta_bulk_load_status; - remote_root_path = other730.remote_root_path; - __isset = other730.__isset; -} -group_bulk_load_request::group_bulk_load_request(group_bulk_load_request &&other731) -{ - app_name = std::move(other731.app_name); - target_address = std::move(other731.target_address); - config = std::move(other731.config); - provider_name = std::move(other731.provider_name); - cluster_name = std::move(other731.cluster_name); - meta_bulk_load_status = std::move(other731.meta_bulk_load_status); - remote_root_path = std::move(other731.remote_root_path); - __isset = std::move(other731.__isset); -} -group_bulk_load_request &group_bulk_load_request::operator=(const group_bulk_load_request &other732) -{ - app_name = other732.app_name; - target_address = other732.target_address; - config = other732.config; - provider_name = other732.provider_name; - cluster_name = other732.cluster_name; - meta_bulk_load_status = other732.meta_bulk_load_status; - remote_root_path = other732.remote_root_path; - __isset = other732.__isset; +group_bulk_load_request::group_bulk_load_request(const group_bulk_load_request &other747) +{ + app_name = other747.app_name; + target_address = other747.target_address; + config = other747.config; + provider_name = other747.provider_name; + cluster_name = other747.cluster_name; + meta_bulk_load_status = other747.meta_bulk_load_status; + remote_root_path = other747.remote_root_path; + __isset = other747.__isset; +} +group_bulk_load_request::group_bulk_load_request(group_bulk_load_request &&other748) +{ + app_name = std::move(other748.app_name); + target_address = std::move(other748.target_address); + config = std::move(other748.config); + provider_name = std::move(other748.provider_name); + cluster_name = std::move(other748.cluster_name); + meta_bulk_load_status = std::move(other748.meta_bulk_load_status); + remote_root_path = std::move(other748.remote_root_path); + __isset = std::move(other748.__isset); +} +group_bulk_load_request &group_bulk_load_request::operator=(const group_bulk_load_request &other749) +{ + app_name = other749.app_name; + target_address = other749.target_address; + config = other749.config; + provider_name = other749.provider_name; + cluster_name = other749.cluster_name; + meta_bulk_load_status = other749.meta_bulk_load_status; + remote_root_path = other749.remote_root_path; + __isset = other749.__isset; return *this; } -group_bulk_load_request &group_bulk_load_request::operator=(group_bulk_load_request &&other733) +group_bulk_load_request &group_bulk_load_request::operator=(group_bulk_load_request &&other750) { - app_name = std::move(other733.app_name); - target_address = std::move(other733.target_address); - config = std::move(other733.config); - provider_name = std::move(other733.provider_name); - cluster_name = std::move(other733.cluster_name); - meta_bulk_load_status = std::move(other733.meta_bulk_load_status); - remote_root_path = std::move(other733.remote_root_path); - __isset = std::move(other733.__isset); + app_name = std::move(other750.app_name); + target_address = std::move(other750.target_address); + config = std::move(other750.config); + provider_name = std::move(other750.provider_name); + cluster_name = std::move(other750.cluster_name); + meta_bulk_load_status = std::move(other750.meta_bulk_load_status); + remote_root_path = std::move(other750.remote_root_path); + __isset = std::move(other750.__isset); return *this; } void group_bulk_load_request::printTo(std::ostream &out) const @@ -17610,9 +17901,9 @@ uint32_t group_bulk_load_response::read(::apache::thrift::protocol::TProtocol *i break; case 2: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast734; - xfer += iprot->readI32(ecast734); - this->status = (bulk_load_status::type)ecast734; + int32_t ecast751; + xfer += iprot->readI32(ecast751); + this->status = (bulk_load_status::type)ecast751; this->__isset.status = true; } else { xfer += iprot->skip(ftype); @@ -17670,35 +17961,35 @@ void swap(group_bulk_load_response &a, group_bulk_load_response &b) swap(a.__isset, b.__isset); } -group_bulk_load_response::group_bulk_load_response(const group_bulk_load_response &other735) +group_bulk_load_response::group_bulk_load_response(const group_bulk_load_response &other752) { - err = other735.err; - status = other735.status; - bulk_load_state = other735.bulk_load_state; - __isset = other735.__isset; + err = other752.err; + status = other752.status; + bulk_load_state = other752.bulk_load_state; + __isset = other752.__isset; } -group_bulk_load_response::group_bulk_load_response(group_bulk_load_response &&other736) +group_bulk_load_response::group_bulk_load_response(group_bulk_load_response &&other753) { - err = std::move(other736.err); - status = std::move(other736.status); - bulk_load_state = std::move(other736.bulk_load_state); - __isset = std::move(other736.__isset); + err = std::move(other753.err); + status = std::move(other753.status); + bulk_load_state = std::move(other753.bulk_load_state); + __isset = std::move(other753.__isset); } group_bulk_load_response &group_bulk_load_response:: -operator=(const group_bulk_load_response &other737) +operator=(const group_bulk_load_response &other754) { - err = other737.err; - status = other737.status; - bulk_load_state = other737.bulk_load_state; - __isset = other737.__isset; + err = other754.err; + status = other754.status; + bulk_load_state = other754.bulk_load_state; + __isset = other754.__isset; return *this; } -group_bulk_load_response &group_bulk_load_response::operator=(group_bulk_load_response &&other738) +group_bulk_load_response &group_bulk_load_response::operator=(group_bulk_load_response &&other755) { - err = std::move(other738.err); - status = std::move(other738.status); - bulk_load_state = std::move(other738.bulk_load_state); - __isset = std::move(other738.__isset); + err = std::move(other755.err); + status = std::move(other755.status); + bulk_load_state = std::move(other755.bulk_load_state); + __isset = std::move(other755.__isset); return *this; } void group_bulk_load_response::printTo(std::ostream &out) const @@ -17793,30 +18084,30 @@ void swap(ingestion_request &a, ingestion_request &b) swap(a.__isset, b.__isset); } -ingestion_request::ingestion_request(const ingestion_request &other739) +ingestion_request::ingestion_request(const ingestion_request &other756) { - app_name = other739.app_name; - metadata = other739.metadata; - __isset = other739.__isset; + app_name = other756.app_name; + metadata = other756.metadata; + __isset = other756.__isset; } -ingestion_request::ingestion_request(ingestion_request &&other740) +ingestion_request::ingestion_request(ingestion_request &&other757) { - app_name = std::move(other740.app_name); - metadata = std::move(other740.metadata); - __isset = std::move(other740.__isset); + app_name = std::move(other757.app_name); + metadata = std::move(other757.metadata); + __isset = std::move(other757.__isset); } -ingestion_request &ingestion_request::operator=(const ingestion_request &other741) +ingestion_request &ingestion_request::operator=(const ingestion_request &other758) { - app_name = other741.app_name; - metadata = other741.metadata; - __isset = other741.__isset; + app_name = other758.app_name; + metadata = other758.metadata; + __isset = other758.__isset; return *this; } -ingestion_request &ingestion_request::operator=(ingestion_request &&other742) +ingestion_request &ingestion_request::operator=(ingestion_request &&other759) { - app_name = std::move(other742.app_name); - metadata = std::move(other742.metadata); - __isset = std::move(other742.__isset); + app_name = std::move(other759.app_name); + metadata = std::move(other759.metadata); + __isset = std::move(other759.__isset); return *this; } void ingestion_request::printTo(std::ostream &out) const @@ -17909,30 +18200,30 @@ void swap(ingestion_response &a, ingestion_response &b) swap(a.__isset, b.__isset); } -ingestion_response::ingestion_response(const ingestion_response &other743) +ingestion_response::ingestion_response(const ingestion_response &other760) { - err = other743.err; - rocksdb_error = other743.rocksdb_error; - __isset = other743.__isset; + err = other760.err; + rocksdb_error = other760.rocksdb_error; + __isset = other760.__isset; } -ingestion_response::ingestion_response(ingestion_response &&other744) +ingestion_response::ingestion_response(ingestion_response &&other761) { - err = std::move(other744.err); - rocksdb_error = std::move(other744.rocksdb_error); - __isset = std::move(other744.__isset); + err = std::move(other761.err); + rocksdb_error = std::move(other761.rocksdb_error); + __isset = std::move(other761.__isset); } -ingestion_response &ingestion_response::operator=(const ingestion_response &other745) +ingestion_response &ingestion_response::operator=(const ingestion_response &other762) { - err = other745.err; - rocksdb_error = other745.rocksdb_error; - __isset = other745.__isset; + err = other762.err; + rocksdb_error = other762.rocksdb_error; + __isset = other762.__isset; return *this; } -ingestion_response &ingestion_response::operator=(ingestion_response &&other746) +ingestion_response &ingestion_response::operator=(ingestion_response &&other763) { - err = std::move(other746.err); - rocksdb_error = std::move(other746.rocksdb_error); - __isset = std::move(other746.__isset); + err = std::move(other763.err); + rocksdb_error = std::move(other763.rocksdb_error); + __isset = std::move(other763.__isset); return *this; } void ingestion_response::printTo(std::ostream &out) const @@ -17983,9 +18274,9 @@ uint32_t control_bulk_load_request::read(::apache::thrift::protocol::TProtocol * break; case 2: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast747; - xfer += iprot->readI32(ecast747); - this->type = (bulk_load_control_type::type)ecast747; + int32_t ecast764; + xfer += iprot->readI32(ecast764); + this->type = (bulk_load_control_type::type)ecast764; this->__isset.type = true; } else { xfer += iprot->skip(ftype); @@ -18030,32 +18321,32 @@ void swap(control_bulk_load_request &a, control_bulk_load_request &b) swap(a.__isset, b.__isset); } -control_bulk_load_request::control_bulk_load_request(const control_bulk_load_request &other748) +control_bulk_load_request::control_bulk_load_request(const control_bulk_load_request &other765) { - app_name = other748.app_name; - type = other748.type; - __isset = other748.__isset; + app_name = other765.app_name; + type = other765.type; + __isset = other765.__isset; } -control_bulk_load_request::control_bulk_load_request(control_bulk_load_request &&other749) +control_bulk_load_request::control_bulk_load_request(control_bulk_load_request &&other766) { - app_name = std::move(other749.app_name); - type = std::move(other749.type); - __isset = std::move(other749.__isset); + app_name = std::move(other766.app_name); + type = std::move(other766.type); + __isset = std::move(other766.__isset); } control_bulk_load_request &control_bulk_load_request:: -operator=(const control_bulk_load_request &other750) +operator=(const control_bulk_load_request &other767) { - app_name = other750.app_name; - type = other750.type; - __isset = other750.__isset; + app_name = other767.app_name; + type = other767.type; + __isset = other767.__isset; return *this; } control_bulk_load_request &control_bulk_load_request:: -operator=(control_bulk_load_request &&other751) +operator=(control_bulk_load_request &&other768) { - app_name = std::move(other751.app_name); - type = std::move(other751.type); - __isset = std::move(other751.__isset); + app_name = std::move(other768.app_name); + type = std::move(other768.type); + __isset = std::move(other768.__isset); return *this; } void control_bulk_load_request::printTo(std::ostream &out) const @@ -18153,32 +18444,32 @@ void swap(control_bulk_load_response &a, control_bulk_load_response &b) swap(a.__isset, b.__isset); } -control_bulk_load_response::control_bulk_load_response(const control_bulk_load_response &other752) +control_bulk_load_response::control_bulk_load_response(const control_bulk_load_response &other769) { - err = other752.err; - hint_msg = other752.hint_msg; - __isset = other752.__isset; + err = other769.err; + hint_msg = other769.hint_msg; + __isset = other769.__isset; } -control_bulk_load_response::control_bulk_load_response(control_bulk_load_response &&other753) +control_bulk_load_response::control_bulk_load_response(control_bulk_load_response &&other770) { - err = std::move(other753.err); - hint_msg = std::move(other753.hint_msg); - __isset = std::move(other753.__isset); + err = std::move(other770.err); + hint_msg = std::move(other770.hint_msg); + __isset = std::move(other770.__isset); } control_bulk_load_response &control_bulk_load_response:: -operator=(const control_bulk_load_response &other754) +operator=(const control_bulk_load_response &other771) { - err = other754.err; - hint_msg = other754.hint_msg; - __isset = other754.__isset; + err = other771.err; + hint_msg = other771.hint_msg; + __isset = other771.__isset; return *this; } control_bulk_load_response &control_bulk_load_response:: -operator=(control_bulk_load_response &&other755) +operator=(control_bulk_load_response &&other772) { - err = std::move(other755.err); - hint_msg = std::move(other755.hint_msg); - __isset = std::move(other755.__isset); + err = std::move(other772.err); + hint_msg = std::move(other772.hint_msg); + __isset = std::move(other772.__isset); return *this; } void control_bulk_load_response::printTo(std::ostream &out) const @@ -18257,26 +18548,26 @@ void swap(query_bulk_load_request &a, query_bulk_load_request &b) swap(a.__isset, b.__isset); } -query_bulk_load_request::query_bulk_load_request(const query_bulk_load_request &other756) +query_bulk_load_request::query_bulk_load_request(const query_bulk_load_request &other773) { - app_name = other756.app_name; - __isset = other756.__isset; + app_name = other773.app_name; + __isset = other773.__isset; } -query_bulk_load_request::query_bulk_load_request(query_bulk_load_request &&other757) +query_bulk_load_request::query_bulk_load_request(query_bulk_load_request &&other774) { - app_name = std::move(other757.app_name); - __isset = std::move(other757.__isset); + app_name = std::move(other774.app_name); + __isset = std::move(other774.__isset); } -query_bulk_load_request &query_bulk_load_request::operator=(const query_bulk_load_request &other758) +query_bulk_load_request &query_bulk_load_request::operator=(const query_bulk_load_request &other775) { - app_name = other758.app_name; - __isset = other758.__isset; + app_name = other775.app_name; + __isset = other775.__isset; return *this; } -query_bulk_load_request &query_bulk_load_request::operator=(query_bulk_load_request &&other759) +query_bulk_load_request &query_bulk_load_request::operator=(query_bulk_load_request &&other776) { - app_name = std::move(other759.app_name); - __isset = std::move(other759.__isset); + app_name = std::move(other776.app_name); + __isset = std::move(other776.__isset); return *this; } void query_bulk_load_request::printTo(std::ostream &out) const @@ -18358,9 +18649,9 @@ uint32_t query_bulk_load_response::read(::apache::thrift::protocol::TProtocol *i break; case 3: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast760; - xfer += iprot->readI32(ecast760); - this->app_status = (bulk_load_status::type)ecast760; + int32_t ecast777; + xfer += iprot->readI32(ecast777); + this->app_status = (bulk_load_status::type)ecast777; this->__isset.app_status = true; } else { xfer += iprot->skip(ftype); @@ -18370,15 +18661,15 @@ uint32_t query_bulk_load_response::read(::apache::thrift::protocol::TProtocol *i if (ftype == ::apache::thrift::protocol::T_LIST) { { this->partitions_status.clear(); - uint32_t _size761; - ::apache::thrift::protocol::TType _etype764; - xfer += iprot->readListBegin(_etype764, _size761); - this->partitions_status.resize(_size761); - uint32_t _i765; - for (_i765 = 0; _i765 < _size761; ++_i765) { - int32_t ecast766; - xfer += iprot->readI32(ecast766); - this->partitions_status[_i765] = (bulk_load_status::type)ecast766; + uint32_t _size778; + ::apache::thrift::protocol::TType _etype781; + xfer += iprot->readListBegin(_etype781, _size778); + this->partitions_status.resize(_size778); + uint32_t _i782; + for (_i782 = 0; _i782 < _size778; ++_i782) { + int32_t ecast783; + xfer += iprot->readI32(ecast783); + this->partitions_status[_i782] = (bulk_load_status::type)ecast783; } xfer += iprot->readListEnd(); } @@ -18399,25 +18690,25 @@ uint32_t query_bulk_load_response::read(::apache::thrift::protocol::TProtocol *i if (ftype == ::apache::thrift::protocol::T_LIST) { { this->bulk_load_states.clear(); - uint32_t _size767; - ::apache::thrift::protocol::TType _etype770; - xfer += iprot->readListBegin(_etype770, _size767); - this->bulk_load_states.resize(_size767); - uint32_t _i771; - for (_i771 = 0; _i771 < _size767; ++_i771) { + uint32_t _size784; + ::apache::thrift::protocol::TType _etype787; + xfer += iprot->readListBegin(_etype787, _size784); + this->bulk_load_states.resize(_size784); + uint32_t _i788; + for (_i788 = 0; _i788 < _size784; ++_i788) { { - this->bulk_load_states[_i771].clear(); - uint32_t _size772; - ::apache::thrift::protocol::TType _ktype773; - ::apache::thrift::protocol::TType _vtype774; - xfer += iprot->readMapBegin(_ktype773, _vtype774, _size772); - uint32_t _i776; - for (_i776 = 0; _i776 < _size772; ++_i776) { - ::dsn::rpc_address _key777; - xfer += _key777.read(iprot); - partition_bulk_load_state &_val778 = - this->bulk_load_states[_i771][_key777]; - xfer += _val778.read(iprot); + this->bulk_load_states[_i788].clear(); + uint32_t _size789; + ::apache::thrift::protocol::TType _ktype790; + ::apache::thrift::protocol::TType _vtype791; + xfer += iprot->readMapBegin(_ktype790, _vtype791, _size789); + uint32_t _i793; + for (_i793 = 0; _i793 < _size789; ++_i793) { + ::dsn::rpc_address _key794; + xfer += _key794.read(iprot); + partition_bulk_load_state &_val795 = + this->bulk_load_states[_i788][_key794]; + xfer += _val795.read(iprot); } xfer += iprot->readMapEnd(); } @@ -18471,10 +18762,10 @@ uint32_t query_bulk_load_response::write(::apache::thrift::protocol::TProtocol * { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, static_cast(this->partitions_status.size())); - std::vector::const_iterator _iter779; - for (_iter779 = this->partitions_status.begin(); _iter779 != this->partitions_status.end(); - ++_iter779) { - xfer += oprot->writeI32((int32_t)(*_iter779)); + std::vector::const_iterator _iter796; + for (_iter796 = this->partitions_status.begin(); _iter796 != this->partitions_status.end(); + ++_iter796) { + xfer += oprot->writeI32((int32_t)(*_iter796)); } xfer += oprot->writeListEnd(); } @@ -18489,17 +18780,17 @@ uint32_t query_bulk_load_response::write(::apache::thrift::protocol::TProtocol * xfer += oprot->writeListBegin(::apache::thrift::protocol::T_MAP, static_cast(this->bulk_load_states.size())); std::vector>::const_iterator - _iter780; - for (_iter780 = this->bulk_load_states.begin(); _iter780 != this->bulk_load_states.end(); - ++_iter780) { + _iter797; + for (_iter797 = this->bulk_load_states.begin(); _iter797 != this->bulk_load_states.end(); + ++_iter797) { { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRUCT, ::apache::thrift::protocol::T_STRUCT, - static_cast((*_iter780).size())); - std::map<::dsn::rpc_address, partition_bulk_load_state>::const_iterator _iter781; - for (_iter781 = (*_iter780).begin(); _iter781 != (*_iter780).end(); ++_iter781) { - xfer += _iter781->first.write(oprot); - xfer += _iter781->second.write(oprot); + static_cast((*_iter797).size())); + std::map<::dsn::rpc_address, partition_bulk_load_state>::const_iterator _iter798; + for (_iter798 = (*_iter797).begin(); _iter798 != (*_iter797).end(); ++_iter798) { + xfer += _iter798->first.write(oprot); + xfer += _iter798->second.write(oprot); } xfer += oprot->writeMapEnd(); } @@ -18531,51 +18822,51 @@ void swap(query_bulk_load_response &a, query_bulk_load_response &b) swap(a.__isset, b.__isset); } -query_bulk_load_response::query_bulk_load_response(const query_bulk_load_response &other782) +query_bulk_load_response::query_bulk_load_response(const query_bulk_load_response &other799) { - err = other782.err; - app_name = other782.app_name; - app_status = other782.app_status; - partitions_status = other782.partitions_status; - max_replica_count = other782.max_replica_count; - bulk_load_states = other782.bulk_load_states; - hint_msg = other782.hint_msg; - __isset = other782.__isset; + err = other799.err; + app_name = other799.app_name; + app_status = other799.app_status; + partitions_status = other799.partitions_status; + max_replica_count = other799.max_replica_count; + bulk_load_states = other799.bulk_load_states; + hint_msg = other799.hint_msg; + __isset = other799.__isset; } -query_bulk_load_response::query_bulk_load_response(query_bulk_load_response &&other783) +query_bulk_load_response::query_bulk_load_response(query_bulk_load_response &&other800) { - err = std::move(other783.err); - app_name = std::move(other783.app_name); - app_status = std::move(other783.app_status); - partitions_status = std::move(other783.partitions_status); - max_replica_count = std::move(other783.max_replica_count); - bulk_load_states = std::move(other783.bulk_load_states); - hint_msg = std::move(other783.hint_msg); - __isset = std::move(other783.__isset); + err = std::move(other800.err); + app_name = std::move(other800.app_name); + app_status = std::move(other800.app_status); + partitions_status = std::move(other800.partitions_status); + max_replica_count = std::move(other800.max_replica_count); + bulk_load_states = std::move(other800.bulk_load_states); + hint_msg = std::move(other800.hint_msg); + __isset = std::move(other800.__isset); } query_bulk_load_response &query_bulk_load_response:: -operator=(const query_bulk_load_response &other784) -{ - err = other784.err; - app_name = other784.app_name; - app_status = other784.app_status; - partitions_status = other784.partitions_status; - max_replica_count = other784.max_replica_count; - bulk_load_states = other784.bulk_load_states; - hint_msg = other784.hint_msg; - __isset = other784.__isset; +operator=(const query_bulk_load_response &other801) +{ + err = other801.err; + app_name = other801.app_name; + app_status = other801.app_status; + partitions_status = other801.partitions_status; + max_replica_count = other801.max_replica_count; + bulk_load_states = other801.bulk_load_states; + hint_msg = other801.hint_msg; + __isset = other801.__isset; return *this; } -query_bulk_load_response &query_bulk_load_response::operator=(query_bulk_load_response &&other785) +query_bulk_load_response &query_bulk_load_response::operator=(query_bulk_load_response &&other802) { - err = std::move(other785.err); - app_name = std::move(other785.app_name); - app_status = std::move(other785.app_status); - partitions_status = std::move(other785.partitions_status); - max_replica_count = std::move(other785.max_replica_count); - bulk_load_states = std::move(other785.bulk_load_states); - hint_msg = std::move(other785.hint_msg); - __isset = std::move(other785.__isset); + err = std::move(other802.err); + app_name = std::move(other802.app_name); + app_status = std::move(other802.app_status); + partitions_status = std::move(other802.partitions_status); + max_replica_count = std::move(other802.max_replica_count); + bulk_load_states = std::move(other802.bulk_load_states); + hint_msg = std::move(other802.hint_msg); + __isset = std::move(other802.__isset); return *this; } void query_bulk_load_response::printTo(std::ostream &out) const @@ -18628,9 +18919,9 @@ uint32_t detect_hotkey_request::read(::apache::thrift::protocol::TProtocol *ipro switch (fid) { case 1: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast786; - xfer += iprot->readI32(ecast786); - this->type = (hotkey_type::type)ecast786; + int32_t ecast803; + xfer += iprot->readI32(ecast803); + this->type = (hotkey_type::type)ecast803; this->__isset.type = true; } else { xfer += iprot->skip(ftype); @@ -18638,9 +18929,9 @@ uint32_t detect_hotkey_request::read(::apache::thrift::protocol::TProtocol *ipro break; case 2: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast787; - xfer += iprot->readI32(ecast787); - this->action = (detect_action::type)ecast787; + int32_t ecast804; + xfer += iprot->readI32(ecast804); + this->action = (detect_action::type)ecast804; this->__isset.action = true; } else { xfer += iprot->skip(ftype); @@ -18698,34 +18989,34 @@ void swap(detect_hotkey_request &a, detect_hotkey_request &b) swap(a.__isset, b.__isset); } -detect_hotkey_request::detect_hotkey_request(const detect_hotkey_request &other788) +detect_hotkey_request::detect_hotkey_request(const detect_hotkey_request &other805) { - type = other788.type; - action = other788.action; - pid = other788.pid; - __isset = other788.__isset; + type = other805.type; + action = other805.action; + pid = other805.pid; + __isset = other805.__isset; } -detect_hotkey_request::detect_hotkey_request(detect_hotkey_request &&other789) +detect_hotkey_request::detect_hotkey_request(detect_hotkey_request &&other806) { - type = std::move(other789.type); - action = std::move(other789.action); - pid = std::move(other789.pid); - __isset = std::move(other789.__isset); + type = std::move(other806.type); + action = std::move(other806.action); + pid = std::move(other806.pid); + __isset = std::move(other806.__isset); } -detect_hotkey_request &detect_hotkey_request::operator=(const detect_hotkey_request &other790) +detect_hotkey_request &detect_hotkey_request::operator=(const detect_hotkey_request &other807) { - type = other790.type; - action = other790.action; - pid = other790.pid; - __isset = other790.__isset; + type = other807.type; + action = other807.action; + pid = other807.pid; + __isset = other807.__isset; return *this; } -detect_hotkey_request &detect_hotkey_request::operator=(detect_hotkey_request &&other791) +detect_hotkey_request &detect_hotkey_request::operator=(detect_hotkey_request &&other808) { - type = std::move(other791.type); - action = std::move(other791.action); - pid = std::move(other791.pid); - __isset = std::move(other791.__isset); + type = std::move(other808.type); + action = std::move(other808.action); + pid = std::move(other808.pid); + __isset = std::move(other808.__isset); return *this; } void detect_hotkey_request::printTo(std::ostream &out) const @@ -18845,34 +19136,34 @@ void swap(detect_hotkey_response &a, detect_hotkey_response &b) swap(a.__isset, b.__isset); } -detect_hotkey_response::detect_hotkey_response(const detect_hotkey_response &other792) +detect_hotkey_response::detect_hotkey_response(const detect_hotkey_response &other809) { - err = other792.err; - err_hint = other792.err_hint; - hotkey_result = other792.hotkey_result; - __isset = other792.__isset; + err = other809.err; + err_hint = other809.err_hint; + hotkey_result = other809.hotkey_result; + __isset = other809.__isset; } -detect_hotkey_response::detect_hotkey_response(detect_hotkey_response &&other793) +detect_hotkey_response::detect_hotkey_response(detect_hotkey_response &&other810) { - err = std::move(other793.err); - err_hint = std::move(other793.err_hint); - hotkey_result = std::move(other793.hotkey_result); - __isset = std::move(other793.__isset); + err = std::move(other810.err); + err_hint = std::move(other810.err_hint); + hotkey_result = std::move(other810.hotkey_result); + __isset = std::move(other810.__isset); } -detect_hotkey_response &detect_hotkey_response::operator=(const detect_hotkey_response &other794) +detect_hotkey_response &detect_hotkey_response::operator=(const detect_hotkey_response &other811) { - err = other794.err; - err_hint = other794.err_hint; - hotkey_result = other794.hotkey_result; - __isset = other794.__isset; + err = other811.err; + err_hint = other811.err_hint; + hotkey_result = other811.hotkey_result; + __isset = other811.__isset; return *this; } -detect_hotkey_response &detect_hotkey_response::operator=(detect_hotkey_response &&other795) +detect_hotkey_response &detect_hotkey_response::operator=(detect_hotkey_response &&other812) { - err = std::move(other795.err); - err_hint = std::move(other795.err_hint); - hotkey_result = std::move(other795.hotkey_result); - __isset = std::move(other795.__isset); + err = std::move(other812.err); + err_hint = std::move(other812.err_hint); + hotkey_result = std::move(other812.hotkey_result); + __isset = std::move(other812.__isset); return *this; } void detect_hotkey_response::printTo(std::ostream &out) const diff --git a/src/meta/meta_service.cpp b/src/meta/meta_service.cpp index 42f6b771e8..d6dd0fbaa3 100644 --- a/src/meta/meta_service.cpp +++ b/src/meta/meta_service.cpp @@ -474,6 +474,9 @@ void meta_service::register_rpc_handlers() register_rpc_handler_with_rpc_holder(RPC_CM_CONTROL_PARTITION_SPLIT, "control_partition_split(pause/restart/cancel)", &meta_service::on_control_partition_split); + register_rpc_handler_with_rpc_holder(RPC_CM_QUERY_PARTITION_SPLIT, + "query_partition_split", + &meta_service::on_query_partition_split); register_rpc_handler_with_rpc_holder(RPC_CM_REGISTER_CHILD_REPLICA, "register_child_on_meta", &meta_service::on_register_child_on_meta); @@ -1031,6 +1034,20 @@ void meta_service::on_control_partition_split(control_split_rpc rpc) server_state::sStateHash); } +void meta_service::on_query_partition_split(query_split_rpc rpc) +{ + if (!check_status(rpc)) { + return; + } + + if (_split_svc == nullptr) { + derror_f("meta doesn't support partition split"); + rpc.response().err = ERR_SERVICE_NOT_ACTIVE; + return; + } + _split_svc->query_partition_split(std::move(rpc)); +} + void meta_service::on_register_child_on_meta(register_child_rpc rpc) { if (!check_status(rpc)) { diff --git a/src/meta/meta_service.h b/src/meta/meta_service.h index dcc46204c2..02f71863db 100644 --- a/src/meta/meta_service.h +++ b/src/meta/meta_service.h @@ -184,6 +184,7 @@ class meta_service : public serverlet // split void on_start_partition_split(start_split_rpc rpc); void on_control_partition_split(control_split_rpc rpc); + void on_query_partition_split(query_split_rpc rpc); void on_register_child_on_meta(register_child_rpc rpc); void on_notify_stop_split(notify_stop_split_rpc rpc); diff --git a/src/meta/meta_split_service.cpp b/src/meta/meta_split_service.cpp index a4821a3caf..e7a027dab0 100644 --- a/src/meta/meta_split_service.cpp +++ b/src/meta/meta_split_service.cpp @@ -293,6 +293,37 @@ void meta_split_service::on_add_child_on_remote_storage_reply(error_code ec, parent_context.stage = config_status::not_pending; } +void meta_split_service::query_partition_split(query_split_rpc rpc) const +{ + const std::string &app_name = rpc.request().app_name; + auto &response = rpc.response(); + response.err = ERR_OK; + + zauto_read_lock l(app_lock()); + std::shared_ptr app = _state->get_app(app_name); + if (app == nullptr || app->status != app_status::AS_AVAILABLE) { + response.err = app == nullptr ? ERR_APP_NOT_EXIST : ERR_APP_DROPPED; + response.__set_hint_msg(fmt::format( + "app({}) {}", app_name, response.err == ERR_APP_NOT_EXIST ? "not existed" : "dropped")); + derror_f("query partition split failed, {}", response.hint_msg); + return; + } + + if (app->helpers->split_states.splitting_count <= 0) { + response.err = ERR_INVALID_STATE; + response.__set_hint_msg(fmt::format("app({}) is not splitting", app_name)); + derror_f("query partition split failed, {}", response.hint_msg); + return; + } + + response.new_partition_count = app->partition_count; + response.status = app->helpers->split_states.status; + ddebug_f("query partition split succeed, app({}), partition_count({}), splitting_count({})", + app->app_name, + response.new_partition_count, + response.status.size()); +} + void meta_split_service::control_partition_split(control_split_rpc rpc) { const auto &req = rpc.request(); diff --git a/src/meta/meta_split_service.h b/src/meta/meta_split_service.h index 439d2382c8..fd6f88b118 100644 --- a/src/meta/meta_split_service.h +++ b/src/meta/meta_split_service.h @@ -37,6 +37,10 @@ class meta_split_service private: // client -> meta to start split void start_partition_split(start_split_rpc rpc); + void do_start_partition_split(std::shared_ptr app, start_split_rpc rpc); + + // client -> meta to query split + void query_partition_split(query_split_rpc rpc) const; // client -> meta to pause/restart/cancel split void control_partition_split(control_split_rpc rpc); @@ -50,8 +54,6 @@ class meta_split_service // primary parent -> meta_server to register child void register_child_on_meta(register_child_rpc rpc); - void do_start_partition_split(std::shared_ptr app, start_split_rpc rpc); - // meta -> remote storage to update child replica config dsn::task_ptr add_child_on_remote_storage(register_child_rpc rpc, bool create_new); void diff --git a/src/meta/test/meta_split_service_test.cpp b/src/meta/test/meta_split_service_test.cpp index 7ad072dfbc..a4719ec143 100644 --- a/src/meta/test/meta_split_service_test.cpp +++ b/src/meta/test/meta_split_service_test.cpp @@ -63,6 +63,17 @@ class meta_split_service_test : public meta_test_base return rpc.response().err; } + query_split_response query_partition_split(const std::string &app_name) + { + auto request = dsn::make_unique(); + request->app_name = app_name; + + query_split_rpc rpc(std::move(request), RPC_CM_QUERY_PARTITION_SPLIT); + split_svc().query_partition_split(rpc); + wait_all(); + return rpc.response(); + } + error_code control_partition_split(const std::string &app_name, split_control_type::type type, const int32_t pidx, @@ -265,6 +276,40 @@ TEST_F(meta_split_service_test, start_split_test) } } +// query split unit tests +TEST_F(meta_split_service_test, query_split_test) +{ + // Test case: + // - app not existed + // - app not splitting + // - query split succeed + struct query_test + { + std::string app_name; + bool mock_splitting; + error_code expected_err; + } tests[] = { + {"table_not_exist", false, ERR_APP_NOT_EXIST}, + {NAME, false, ERR_INVALID_STATE}, + {NAME, true, ERR_OK}, + }; + + for (auto test : tests) { + if (test.mock_splitting) { + mock_app_partition_split_context(); + } + auto resp = query_partition_split(test.app_name); + ASSERT_EQ(resp.err, test.expected_err); + if (resp.err == ERR_OK) { + ASSERT_EQ(resp.new_partition_count, NEW_PARTITION_COUNT); + ASSERT_EQ(resp.status.size(), PARTITION_COUNT); + } + if (test.mock_splitting) { + clear_app_partition_split_context(); + } + } +} + // register child unit tests TEST_F(meta_split_service_test, register_child_test) { diff --git a/src/replication.thrift b/src/replication.thrift index ac85aec21b..7c886cb4ac 100644 --- a/src/replication.thrift +++ b/src/replication.thrift @@ -926,6 +926,24 @@ struct control_split_response 2:optional string hint_msg; } +// client->meta server to query partition split status +struct query_split_request +{ + 1:string app_name; +} + +struct query_split_response +{ + // Possible errors: + // - ERR_APP_NOT_EXIST: app not exist + // - ERR_APP_DROPPED: app has been dropped + // - ERR_INVALID_STATE: app is not splitting + 1:dsn.error_code err; + 2:i32 new_partition_count; + 3:map status; + 4:optional string hint_msg; +} + // child to primary parent, notifying that itself has caught up with parent struct notify_catch_up_request {