Skip to content

Commit d21c697

Browse files
obdevfootka
authored andcommitted
[CP] [fix] hybrid vector index refresh task return 5024
Co-authored-by: footka <672528926@qq.com>
1 parent fa91585 commit d21c697

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

src/share/vector_index/ob_hybrid_vector_refresh_task.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,7 @@ int ObHybridVectorRefreshTask::prepare_for_embedding(ObPluginVectorIndexAdaptor
527527
ret = OB_ALLOCATE_MEMORY_FAILED;
528528
LOG_WARN("allocate memory failed", K(ret), K(table_param));
529529
} else if (FALSE_IT(table_param = new(table_param)schema::ObTableParam(task_ctx->allocator_))) {
530+
} else if (FALSE_IT(ctx_->task_status_.target_scn_.convert_from_ts(ObTimeUtility::current_time()))) {
530531
} else if (OB_FAIL(ObPluginVectorIndexUtils::read_local_tablet(ls_id_,
531532
&adaptor,
532533
ctx_->task_status_.target_scn_,

src/share/vector_index/ob_vector_index_async_task_util.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -557,10 +557,12 @@ int ObVecIndexAsyncTaskUtil::resume_task_from_inner_table(
557557
LOG_INFO("resume task succ", K(tenant_id), KPC(task_ctx));
558558
}
559559
// free on failed
560-
if (OB_FAIL(ret) && OB_NOT_NULL(task_ctx)) {
561-
task_ctx->~ObVecIndexAsyncTaskCtx();
562-
allocator->free(task_ctx);
563-
task_ctx = nullptr;
560+
if (OB_FAIL(ret) || !inc_new_task) {
561+
if (OB_NOT_NULL(task_ctx)) {
562+
task_ctx->~ObVecIndexAsyncTaskCtx();
563+
allocator->free(task_ctx);
564+
task_ctx = nullptr;
565+
}
564566
}
565567
}
566568
}

0 commit comments

Comments
 (0)