fix ddl_epoch bug promote_ddl_epoch cocurrent ignore return value
This commit is contained in:
@ -71,6 +71,7 @@ int ObDDLEpochMgr::remove_ddl_epoch(const uint64_t tenant_id)
|
|||||||
LOG_WARN("ObDDLEpochMgr not init", KR(ret));
|
LOG_WARN("ObDDLEpochMgr not init", KR(ret));
|
||||||
} else {
|
} else {
|
||||||
SpinWLockGuard guard(lock_);
|
SpinWLockGuard guard(lock_);
|
||||||
|
LOG_INFO("remove_ddl_epoch", K(ddl_epoch_stat_), K(tenant_id));
|
||||||
for (int i = 0; i < ddl_epoch_stat_.count(); i++) {
|
for (int i = 0; i < ddl_epoch_stat_.count(); i++) {
|
||||||
if (ddl_epoch_stat_.at(i).tenant_id_ == tenant_id) {
|
if (ddl_epoch_stat_.at(i).tenant_id_ == tenant_id) {
|
||||||
if (OB_FAIL(ddl_epoch_stat_.remove(i))) {
|
if (OB_FAIL(ddl_epoch_stat_.remove(i))) {
|
||||||
@ -91,6 +92,7 @@ int ObDDLEpochMgr::remove_all_ddl_epoch()
|
|||||||
LOG_WARN("ObDDLEpochMgr not init", KR(ret));
|
LOG_WARN("ObDDLEpochMgr not init", KR(ret));
|
||||||
} else {
|
} else {
|
||||||
SpinWLockGuard guard(lock_);
|
SpinWLockGuard guard(lock_);
|
||||||
|
LOG_INFO("remove_all_ddl_epoch", K(ddl_epoch_stat_));
|
||||||
ddl_epoch_stat_.reuse();
|
ddl_epoch_stat_.reuse();
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
@ -149,6 +151,8 @@ int ObDDLEpochMgr::promote_ddl_epoch(const uint64_t tenant_id, int64_t wait_us,
|
|||||||
} else {
|
} else {
|
||||||
LOG_WARN("get_ddl_epoch fail", KR(ret), K(tenant_id));
|
LOG_WARN("get_ddl_epoch fail", KR(ret), K(tenant_id));
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
ddl_epoch_ret = ddl_epoch_tmp;
|
||||||
}
|
}
|
||||||
if (OB_SUCC(ret) && need_promote) {
|
if (OB_SUCC(ret) && need_promote) {
|
||||||
int64_t new_ddl_epoch = 0;
|
int64_t new_ddl_epoch = 0;
|
||||||
|
@ -31,6 +31,9 @@ int ObDDLTransController::init(share::schema::ObMultiVersionSchemaService *schem
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (OB_FAIL(ret)) {
|
if (OB_FAIL(ret)) {
|
||||||
|
} else if (OB_ISNULL(schema_service)) {
|
||||||
|
ret = OB_INVALID_ARGUMENT;
|
||||||
|
LOG_WARN("schema_service is null", KR(ret));
|
||||||
} else if (OB_FAIL(tenants_.create(10))) {
|
} else if (OB_FAIL(tenants_.create(10))) {
|
||||||
LOG_WARN("hashset create fail", KR(ret));
|
LOG_WARN("hashset create fail", KR(ret));
|
||||||
} else if (OB_FAIL(tenant_for_ddl_trans_new_lock_.create(10))) {
|
} else if (OB_FAIL(tenant_for_ddl_trans_new_lock_.create(10))) {
|
||||||
@ -51,8 +54,10 @@ ObDDLTransController::~ObDDLTransController()
|
|||||||
wait_cond_.signal();
|
wait_cond_.signal();
|
||||||
ObThreadPool::wait();
|
ObThreadPool::wait();
|
||||||
ObThreadPool::destroy();
|
ObThreadPool::destroy();
|
||||||
schema_service_ = NULL;
|
tasks_.destroy();
|
||||||
|
tenants_.destroy();
|
||||||
tenant_for_ddl_trans_new_lock_.destroy();
|
tenant_for_ddl_trans_new_lock_.destroy();
|
||||||
|
schema_service_ = NULL;
|
||||||
inited_ = false;
|
inited_ = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,7 +63,6 @@ private:
|
|||||||
share::schema::ObMultiVersionSchemaService *schema_service_;
|
share::schema::ObMultiVersionSchemaService *schema_service_;
|
||||||
|
|
||||||
common::hash::ObHashSet<uint64_t> tenants_;
|
common::hash::ObHashSet<uint64_t> tenants_;
|
||||||
common::ObTimer timer_;
|
|
||||||
|
|
||||||
// for compat
|
// for compat
|
||||||
common::SpinRWLock lock_for_tenant_set_;
|
common::SpinRWLock lock_for_tenant_set_;
|
||||||
|
Reference in New Issue
Block a user