[CP] fix bug of coordinator setting flush status
This commit is contained in:
@ -1281,8 +1281,6 @@ int ObTableLoadCoordinator::finish_trans(const ObTableLoadTransId &trans_id)
|
||||
ObTableLoadCoordinatorTrans *trans = nullptr;
|
||||
if (OB_FAIL(coordinator_ctx_->get_trans(trans_id, trans))) {
|
||||
LOG_WARN("fail to get trans", KR(ret), K(trans_id));
|
||||
} else if (OB_FAIL(trans->set_trans_status_frozen())) {
|
||||
LOG_WARN("fail to freeze trans", KR(ret));
|
||||
} else if (OB_FAIL(flush(trans))) {
|
||||
LOG_WARN("fail to flush", KR(ret));
|
||||
}
|
||||
@ -1880,6 +1878,8 @@ int ObTableLoadCoordinator::flush(ObTableLoadCoordinatorTrans *trans)
|
||||
// 取出bucket_writer
|
||||
if (OB_FAIL(trans->get_bucket_writer_for_flush(bucket_writer))) {
|
||||
LOG_WARN("fail to get bucket writer", KR(ret));
|
||||
} else if (OB_FAIL(trans->set_trans_status_frozen())) {
|
||||
LOG_WARN("fail to freeze trans", KR(ret));
|
||||
} else {
|
||||
for (int32_t session_id = 1; OB_SUCC(ret) && session_id <= param_.write_session_count_; ++session_id) {
|
||||
ObTableLoadTask *task = nullptr;
|
||||
|
||||
@ -137,8 +137,6 @@ int ObTableLoadCoordinatorTrans::get_bucket_writer_for_flush(
|
||||
if (IS_NOT_INIT) {
|
||||
ret = OB_NOT_INIT;
|
||||
LOG_WARN("ObTableLoadCoordinatorTrans not init", KR(ret), KP(this));
|
||||
} else if (OB_FAIL(check_trans_status(ObTableLoadTransStatusType::FROZEN))) {
|
||||
LOG_WARN("fail to check trans status", KR(ret));
|
||||
} else {
|
||||
obsys::ObRLockGuard guard(trans_ctx_->rwlock_);
|
||||
if (OB_ISNULL(trans_bucket_writer_)) {
|
||||
|
||||
Reference in New Issue
Block a user