提交 ca230208 编写于 作者: O obdev 提交者: ob-robot

fix table load general table compact concurrency issue

上级 d2149f86
......@@ -424,6 +424,7 @@ int ObTableLoadGeneralTableCompactor::start_compact()
int ret = OB_SUCCESS;
const int64_t thread_count = store_ctx_->task_scheduler_->get_thread_count();
ObTableLoadTableCtx *ctx = store_ctx_->ctx_;
running_thread_count_ = thread_count;
for (int32_t thread_idx = 0; OB_SUCC(ret) && thread_idx < thread_count; ++thread_idx) {
ObTableLoadTask *task = nullptr;
// 1. 分配task
......@@ -442,10 +443,6 @@ int ObTableLoadGeneralTableCompactor::start_compact()
else if (OB_FAIL(store_ctx_->task_scheduler_->add_task(thread_idx, task))) {
LOG_WARN("fail to add task", KR(ret), K(thread_idx), KPC(task));
}
// 5. inc running_thread_count_
else {
ATOMIC_INC(&running_thread_count_);
}
if (OB_FAIL(ret)) {
if (nullptr != task) {
ctx->free_task(task);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册