Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
野花太放肆
oceanbase
提交
e3aa4c5a
O
oceanbase
项目概览
野花太放肆
/
oceanbase
与 Fork 源项目一致
Fork自
oceanbase / oceanbase
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
oceanbase
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
e3aa4c5a
编写于
3月 22, 2023
作者:
Y
yishenglanlingzui
提交者:
ob-robot
3月 22, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add is_lookup flag in query_flag to inform the transaction layer that this is a lookup task
上级
79723299
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
18 addition
and
9 deletion
+18
-9
deps/oblib/src/common/ob_common_types.h
deps/oblib/src/common/ob_common_types.h
+5
-1
src/sql/das/ob_das_scan_op.cpp
src/sql/das/ob_das_scan_op.cpp
+9
-7
src/sql/engine/table/ob_table_scan_op.cpp
src/sql/engine/table/ob_table_scan_op.cpp
+4
-1
未找到文件。
deps/oblib/src/common/ob_common_types.h
浏览文件 @
e3aa4c5a
...
...
@@ -49,7 +49,8 @@ struct ObQueryFlag
#define OBSF_BIT_IS_SSTABLE_CUT 1
#define OBSF_BIT_IS_SHOW_SEED 1
#define OBSF_BIT_SKIP_READ_LOB 1
#define OBSF_BIT_RESERVED 32
#define OBSF_BIT_IS_LOOKUP 1
#define OBSF_BIT_RESERVED 31
static
const
uint64_t
OBSF_MASK_SCAN_ORDER
=
(
0x1UL
<<
OBSF_BIT_SCAN_ORDER
)
-
1
;
static
const
uint64_t
OBSF_MASK_DAILY_MERGE
=
(
0x1UL
<<
OBSF_BIT_DAILY_MERGE
)
-
1
;
...
...
@@ -132,6 +133,7 @@ struct ObQueryFlag
uint64_t
is_sstable_cut_
:
OBSF_BIT_IS_SSTABLE_CUT
;
//0:sstable no need cut, 1: sstable need cut
uint64_t
is_show_seed_
:
OBSF_BIT_IS_SHOW_SEED
;
uint64_t
skip_read_lob_
:
OBSF_BIT_SKIP_READ_LOB
;
uint64_t
is_lookup_
:
OBSF_BIT_IS_LOOKUP
;
uint64_t
reserved_
:
OBSF_BIT_RESERVED
;
};
};
...
...
@@ -183,6 +185,7 @@ struct ObQueryFlag
inline
bool
is_query_stat
()
const
{
return
query_stat_
;
}
inline
bool
is_mysql_mode
()
const
{
return
sql_mode_
==
MysqlMode
;
}
inline
bool
is_read_latest
()
const
{
return
read_latest_
;
}
inline
bool
is_lookup
()
const
{
return
is_lookup_
;
}
inline
bool
is_prewarm
()
const
{
return
prewarm_
;
}
inline
bool
is_index_invalid
()
const
{
return
index_invalid_
;
}
inline
bool
is_use_row_cache
()
const
{
return
!
is_whole_macro_scan
()
&&
use_row_cache_
==
UseCache
;
}
...
...
@@ -246,6 +249,7 @@ struct ObQueryFlag
"is_large_query"
,
is_large_query_
,
"is_sstable_cut"
,
is_sstable_cut_
,
"skip_read_lob"
,
skip_read_lob_
,
"is_lookup"
,
is_lookup_
,
"reserved"
,
reserved_
);
OB_UNIS_VERSION
(
1
);
};
...
...
src/sql/das/ob_das_scan_op.cpp
浏览文件 @
e3aa4c5a
...
...
@@ -1026,13 +1026,15 @@ int ObLocalIndexLookupOp::check_lookup_row_cnt()
ObString
func_name
=
ObString
::
make_string
(
"check_lookup_row_cnt"
);
LOG_USER_ERROR
(
OB_ERR_DEFENSIVE_CHECK
,
func_name
.
length
(),
func_name
.
ptr
());
LOG_ERROR
(
"Fatal Error!!! Catch a defensive error!"
,
K
(
ret
),
K_
(
lookup_rowkey_cnt
),
K_
(
lookup_row_cnt
),
"index_group_cnt"
,
get_index_group_cnt
(),
"lookup_group_cnt"
,
get_lookup_group_cnt
(),
"scan_range"
,
scan_param_
.
key_ranges_
,
"index_table_id"
,
index_ctdef_
->
ref_table_id_
,
"data_table_tablet_id"
,
tablet_id_
,
KPC_
(
lookup_ctdef
),
KPC_
(
lookup_rtdef
));
K
(
ret
),
K_
(
lookup_rowkey_cnt
),
K_
(
lookup_row_cnt
),
"index_group_cnt"
,
get_index_group_cnt
(),
"lookup_group_cnt"
,
get_lookup_group_cnt
(),
"scan_range"
,
scan_param_
.
key_ranges_
,
"index_table_id"
,
index_ctdef_
->
ref_table_id_
,
"data_table_tablet_id"
,
tablet_id_
,
KPC_
(
tx_desc
));
LOG_ERROR
(
"Fatal Error!!! Catch a defensive error!"
,
K
(
ret
),
KPC_
(
lookup_ctdef
),
KPC_
(
lookup_rtdef
));
}
}
return
ret
;
...
...
src/sql/engine/table/ob_table_scan_op.cpp
浏览文件 @
e3aa4c5a
...
...
@@ -880,6 +880,7 @@ OB_INLINE int ObTableScanOp::init_das_scan_rtdef(const ObDASScanCtDef &das_ctdef
if
(
MY_SPEC
.
batch_scan_flag_
||
is_lookup
)
{
das_rtdef
.
scan_flag_
.
scan_order_
=
ObQueryFlag
::
KeepOrder
;
}
das_rtdef
.
scan_flag_
.
is_lookup_
=
is_lookup
;
das_rtdef
.
need_check_output_datum_
=
MY_SPEC
.
need_check_output_datum_
;
das_rtdef
.
sql_mode_
=
my_session
->
get_sql_mode
();
das_rtdef
.
stmt_allocator_
.
set_alloc
(
&
das_ref_
.
get_das_alloc
());
...
...
@@ -3249,6 +3250,7 @@ bool ObGlobalIndexLookupOpImpl::need_next_index_batch() const
int
ObGlobalIndexLookupOpImpl
::
check_lookup_row_cnt
()
{
int
ret
=
OB_SUCCESS
;
ObSQLSessionInfo
*
my_session
=
GET_MY_SESSION
(
table_scan_op_
->
get_exec_ctx
());
if
(
GCONF
.
enable_defensive_check
()
&&
get_lookup_ctdef
()
->
pd_expr_spec_
.
pushdown_filters_
.
empty
())
{
if
(
OB_UNLIKELY
(
lookup_rowkey_cnt_
!=
lookup_row_cnt_
)
...
...
@@ -3260,7 +3262,8 @@ int ObGlobalIndexLookupOpImpl::check_lookup_row_cnt()
K
(
ret
),
K_
(
lookup_rowkey_cnt
),
K_
(
lookup_row_cnt
),
"index_group_cnt"
,
get_index_group_cnt
(),
"lookup_group_cnt"
,
get_lookup_group_cnt
(),
"index_table_id"
,
table_scan_op_
->
get_tsc_spec
().
get_ref_table_id
());
"index_table_id"
,
table_scan_op_
->
get_tsc_spec
().
get_ref_table_id
(),
KPC
(
my_session
->
get_tx_desc
()));
//now to dump lookup das task info
for
(
DASTaskIter
task_iter
=
das_ref_
.
begin_task_iter
();
!
task_iter
.
is_end
();
++
task_iter
)
{
ObDASScanOp
*
das_op
=
static_cast
<
ObDASScanOp
*>
(
*
task_iter
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录