Fix bug that unitmanager hung when creating tenant.
This commit is contained in:
@ -7355,43 +7355,6 @@ struct ObEstPartRes
|
||||
OB_UNIS_VERSION(1);
|
||||
};
|
||||
|
||||
struct TenantServerUnitConfig
|
||||
{
|
||||
public:
|
||||
TenantServerUnitConfig()
|
||||
: tenant_id_(common::OB_INVALID_ID),
|
||||
unit_id_(common::OB_INVALID_ID),
|
||||
compat_mode_(lib::Worker::CompatMode::INVALID),
|
||||
unit_config_(),
|
||||
replica_type_(common::ObReplicaType::REPLICA_TYPE_MAX),
|
||||
if_not_grant_(false),
|
||||
is_delete_(false) {}
|
||||
int init(const uint64_t tenant_id,
|
||||
const uint64_t unit_id,
|
||||
const lib::Worker::CompatMode compat_mode,
|
||||
const share::ObUnitConfig &unit_config,
|
||||
const common::ObReplicaType replica_type,
|
||||
const bool if_not_grant,
|
||||
const bool is_delete);
|
||||
uint64_t tenant_id_;
|
||||
uint64_t unit_id_;
|
||||
lib::Worker::CompatMode compat_mode_;
|
||||
share::ObUnitConfig unit_config_;
|
||||
common::ObReplicaType replica_type_;
|
||||
bool if_not_grant_;
|
||||
bool is_delete_;
|
||||
bool is_valid() const;
|
||||
TO_STRING_KV(K_(tenant_id),
|
||||
K_(unit_id),
|
||||
K_(unit_config),
|
||||
K_(compat_mode),
|
||||
K_(replica_type),
|
||||
K_(if_not_grant),
|
||||
K_(is_delete));
|
||||
public:
|
||||
OB_UNIS_VERSION(1);
|
||||
};
|
||||
|
||||
struct ObGetWRSArg
|
||||
{
|
||||
OB_UNIS_VERSION(1);
|
||||
@ -8616,6 +8579,7 @@ public:
|
||||
{}
|
||||
~ObRootKeyResult() {}
|
||||
int assign(const ObRootKeyResult &other);
|
||||
void reset();
|
||||
TO_STRING_KV(K_(key_type), K_(root_key));
|
||||
enum RootKeyType key_type_;
|
||||
common::ObString root_key_;
|
||||
@ -8624,6 +8588,63 @@ private:
|
||||
};
|
||||
#endif
|
||||
|
||||
struct TenantServerUnitConfig
|
||||
{
|
||||
public:
|
||||
TenantServerUnitConfig()
|
||||
: tenant_id_(common::OB_INVALID_ID),
|
||||
unit_id_(common::OB_INVALID_ID),
|
||||
compat_mode_(lib::Worker::CompatMode::INVALID),
|
||||
#ifdef OB_BUILD_TDE_SECURITY
|
||||
with_root_key_(false),
|
||||
root_key_(),
|
||||
#endif
|
||||
unit_config_(),
|
||||
replica_type_(common::ObReplicaType::REPLICA_TYPE_MAX),
|
||||
if_not_grant_(false),
|
||||
is_delete_(false) {}
|
||||
int assign(const TenantServerUnitConfig &other);
|
||||
int init(const uint64_t tenant_id,
|
||||
const uint64_t unit_id,
|
||||
const lib::Worker::CompatMode compat_mode,
|
||||
#ifdef OB_BUILD_TDE_SECURITY
|
||||
const ObRootKeyResult &root_key,
|
||||
#endif
|
||||
const share::ObUnitConfig &unit_config,
|
||||
const common::ObReplicaType replica_type,
|
||||
const bool if_not_grant,
|
||||
const bool is_delete);
|
||||
int init_for_dropping(const uint64_t tenant_id,
|
||||
const bool is_delete);
|
||||
void reset();
|
||||
uint64_t tenant_id_;
|
||||
uint64_t unit_id_;
|
||||
lib::Worker::CompatMode compat_mode_;
|
||||
#ifdef OB_BUILD_TDE_SECURITY
|
||||
bool with_root_key_; // true if root_key_ is explicitly assigned
|
||||
ObRootKeyResult root_key_;
|
||||
#endif
|
||||
share::ObUnitConfig unit_config_;
|
||||
common::ObReplicaType replica_type_;
|
||||
bool if_not_grant_;
|
||||
bool is_delete_;
|
||||
bool is_valid() const;
|
||||
TO_STRING_KV(K_(tenant_id),
|
||||
K_(unit_id),
|
||||
K_(unit_config),
|
||||
K_(compat_mode),
|
||||
K_(replica_type),
|
||||
K_(if_not_grant),
|
||||
K_(is_delete)
|
||||
#ifdef OB_BUILD_TDE_SECURITY
|
||||
, K_(with_root_key)
|
||||
, K_(root_key)
|
||||
#endif
|
||||
);
|
||||
public:
|
||||
OB_UNIS_VERSION(1);
|
||||
};
|
||||
|
||||
enum TransToolCmd
|
||||
{
|
||||
MODIFY = 0,
|
||||
|
||||
Reference in New Issue
Block a user