[CP] fix bug of coordinator setting flush status

This commit is contained in:
obdev
2024-04-17 07:44:39 +00:00
committed by ob-robot
parent 6570b1eb6c
commit 0e45fe3bf4
2 changed files with 2 additions and 4 deletions

View File

@ -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;

View File

@ -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_)) {