add task hash map to das ref

This commit is contained in:
obdev
2022-11-03 02:38:31 +00:00
committed by wangzelin.wzl
parent 3eef7b053a
commit 71d86596e7
20 changed files with 428 additions and 91 deletions

View File

@ -62,7 +62,7 @@ int ObRemoteIdentityTaskSpliter::get_next_task(ObTaskInfo *&task)
// t1 union t1这种情况, t1(p0) union t2(p0)这种情况,等等,
// 都是remote模式,但table_loc_list的count可能大于1
// 优化器必须保证:remote模式下,所有表的location都是一致的,并且都是单分区。
ObDASTabletLoc *first_tablet_loc = first_table_loc->tablet_locs_.get_first();
ObDASTabletLoc *first_tablet_loc = first_table_loc->get_first_tablet_loc();
if (OB_ISNULL(ptr = allocator_->alloc(sizeof(ObTaskInfo)))) {
ret = OB_ALLOCATE_MEMORY_FAILED;
LOG_ERROR("fail to alloc ObTaskInfo", K(ret));

View File

@ -161,7 +161,7 @@ int ObRemoteScheduler::build_remote_task(ObExecContext &ctx,
remote_task.set_query_schema_version(task_exec_ctx.get_query_tenant_begin_schema_version(),
task_exec_ctx.get_query_sys_begin_schema_version());
remote_task.set_remote_sql_info(&plan_ctx->get_remote_sql_info());
ObDASTabletLoc *first_tablet_loc = DAS_CTX(ctx).get_table_loc_list().get_first()->tablet_locs_.get_first();
ObDASTabletLoc *first_tablet_loc = DAS_CTX(ctx).get_table_loc_list().get_first()->get_first_tablet_loc();
if (OB_ISNULL(session = ctx.get_my_session())) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("session is null", K(ret));

View File

@ -326,7 +326,8 @@ int ObTaskExecutorCtxUtil::refresh_location_cache(ObTaskExecutorCtx &task_exec_c
DASTableLocList &table_locs = DAS_CTX(*task_exec_ctx.get_exec_context()).get_table_loc_list();
FOREACH_X(tmp_node, table_locs, OB_SUCC(ret)) {
ObDASTableLoc *table_loc = *tmp_node;
FOREACH_X(tablet_node, table_loc->tablet_locs_, OB_SUCC(ret)) {
for (DASTabletLocListIter tablet_node = table_loc->tablet_locs_begin();
OB_SUCC(ret) && tablet_node != table_loc->tablet_locs_end(); ++tablet_node) {
const ObDASTabletLoc *tablet_loc = *tablet_node;
if (is_nonblock) {
const int64_t expire_renew_time = 0; //表示在刷location cache之前不清空现有的location cache