Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
大炮V587
oceanbase
提交
e785ebb4
O
oceanbase
项目概览
大炮V587
/
oceanbase
与 Fork 源项目一致
Fork自
oceanbase / oceanbase
通知
1
Star
0
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,发现更多精彩内容 >>
提交
e785ebb4
编写于
3月 08, 2023
作者:
O
obdev
提交者:
ob-robot
3月 08, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Reduce rescan pin too much cache handle
上级
91980f61
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
6 addition
and
20 deletion
+6
-20
deps/oblib/src/common/ob_common_types.h
deps/oblib/src/common/ob_common_types.h
+1
-0
src/storage/access/ob_index_tree_prefetcher.cpp
src/storage/access/ob_index_tree_prefetcher.cpp
+2
-14
src/storage/access/ob_table_scan_range.cpp
src/storage/access/ob_table_scan_range.cpp
+3
-6
未找到文件。
deps/oblib/src/common/ob_common_types.h
浏览文件 @
e785ebb4
...
...
@@ -174,6 +174,7 @@ struct ObQueryFlag
}
void
reset
()
{
flag_
=
0
;
}
inline
bool
is_reverse_scan
()
const
{
return
scan_order_
==
Reverse
;
}
inline
bool
is_ordered_scan
()
const
{
return
scan_order_
==
ObQueryFlag
::
Forward
||
scan_order_
==
ObQueryFlag
::
Reverse
;
}
inline
bool
is_daily_merge
()
const
{
return
daily_merge_
;
}
inline
bool
is_rmmb_optimized
()
const
{
return
rmmb_optimize_
;
}
inline
bool
is_whole_macro_scan
()
const
{
return
whole_macro_scan_
;
}
...
...
src/storage/access/ob_index_tree_prefetcher.cpp
浏览文件 @
e785ebb4
...
...
@@ -105,10 +105,6 @@ int ObIndexTreePrefetcher::switch_context(
for
(
int64_t
i
=
0
;
i
<
DEFAULT_GET_MICRO_DATA_HANDLE_CNT
;
++
i
)
{
micro_handles_
[
i
].
reset
();
}
micro_block_handle_mgr_
.
reset
();
if
(
OB_FAIL
(
micro_block_handle_mgr_
.
init
(
true
,
false
,
*
access_ctx
.
stmt_allocator_
)))
{
LOG_WARN
(
"failed to init block handle mgr"
,
K
(
ret
));
}
}
else
{
rescan_cnt_
++
;
if
(
rescan_cnt_
>=
MAX_RESCAN_HOLD_LIMIT
)
{
...
...
@@ -449,7 +445,7 @@ int ObIndexTreeMultiPrefetcher::init(
LOG_WARN
(
"range count should be greater than 0"
,
K
(
ret
),
K
(
range_count
));
}
else
if
(
OB_FAIL
(
ext_read_handles_
.
prepare_reallocate
(
max_handle_prefetching_cnt_
)))
{
LOG_WARN
(
"Fail to init read_handles"
,
K
(
ret
),
K
(
max_handle_prefetching_cnt_
));
}
else
if
(
OB_FAIL
(
micro_block_handle_mgr_
.
init
(
range_count
>
1
,
false
,
*
access_ctx
.
stmt_allocator_
)))
{
}
else
if
(
OB_FAIL
(
micro_block_handle_mgr_
.
init
(
range_count
>
1
,
access_ctx_
->
query_flag_
.
is_ordered_scan
()
,
*
access_ctx
.
stmt_allocator_
)))
{
LOG_WARN
(
"failed to init block handle mgr"
,
K
(
ret
));
}
else
{
is_inited_
=
true
;
...
...
@@ -488,10 +484,6 @@ int ObIndexTreeMultiPrefetcher::switch_context(
for
(
int64_t
i
=
0
;
i
<
ext_read_handles_
.
count
();
++
i
)
{
ext_read_handles_
.
at
(
i
).
reset
();
}
micro_block_handle_mgr_
.
reset
();
if
(
OB_FAIL
(
micro_block_handle_mgr_
.
init
(
true
,
false
,
*
access_ctx
.
stmt_allocator_
)))
{
LOG_WARN
(
"failed to init block handle mgr"
,
K
(
ret
));
}
}
else
{
rescan_cnt_
++
;
if
(
rescan_cnt_
>=
MAX_RESCAN_HOLD_LIMIT
)
{
...
...
@@ -740,7 +732,7 @@ int ObIndexTreeMultiPassPrefetcher::init(
bool
is_multi_range
=
false
;
if
(
OB_FAIL
(
init_basic_info
(
iter_type
,
sstable
,
access_ctx
,
query_range
,
is_multi_range
)))
{
LOG_WARN
(
"Fail to init basic info"
,
K
(
ret
),
K
(
access_ctx
));
}
else
if
(
OB_FAIL
(
micro_block_handle_mgr_
.
init
(
is_multi_range
,
false
,
*
access_ctx
.
stmt_allocator_
)))
{
}
else
if
(
OB_FAIL
(
micro_block_handle_mgr_
.
init
(
is_multi_range
,
access_ctx_
->
query_flag_
.
is_ordered_scan
()
,
*
access_ctx
.
stmt_allocator_
)))
{
LOG_WARN
(
"failed to init block handle mgr"
,
K
(
ret
));
}
else
{
for
(
int64_t
level
=
0
;
OB_SUCC
(
ret
)
&&
level
<
index_tree_height_
;
level
++
)
{
...
...
@@ -781,10 +773,6 @@ int ObIndexTreeMultiPassPrefetcher::switch_context(
for
(
int16_t
level
=
0
;
level
<
tree_handles_
.
count
();
level
++
)
{
tree_handles_
.
at
(
level
).
reset
();
}
micro_block_handle_mgr_
.
reset
();
if
(
OB_FAIL
(
micro_block_handle_mgr_
.
init
(
true
,
false
,
*
access_ctx
.
stmt_allocator_
)))
{
LOG_WARN
(
"failed to init block handle mgr"
,
K
(
ret
));
}
}
}
if
(
OB_SUCC
(
ret
))
{
...
...
src/storage/access/ob_table_scan_range.cpp
浏览文件 @
e785ebb4
...
...
@@ -191,8 +191,7 @@ int ObTableScanRange::init_rowkeys(const common::ObIArray<common::ObNewRange> &r
if
(
OB_SUCC
(
ret
))
{
if
(
rowkeys_
.
empty
())
{
status_
=
EMPTY
;
}
else
if
(
rowkeys_
.
count
()
>
1
&&
nullptr
!=
datum_utils
&&
(
scan_flag
.
scan_order_
==
ObQueryFlag
::
Forward
||
scan_flag
.
scan_order_
==
ObQueryFlag
::
Reverse
))
{
}
else
if
(
rowkeys_
.
count
()
>
1
&&
nullptr
!=
datum_utils
&&
scan_flag
.
is_ordered_scan
())
{
ObDatumComparor
<
ObDatumRowkey
>
comparor
(
*
datum_utils
,
ret
,
scan_flag
.
is_reverse_scan
());
std
::
sort
(
rowkeys_
.
begin
(),
rowkeys_
.
end
(),
comparor
);
if
(
OB_FAIL
(
ret
))
{
...
...
@@ -240,8 +239,7 @@ int ObTableScanRange::init_ranges(const common::ObIArray<common::ObNewRange> &ra
if
(
OB_SUCC
(
ret
))
{
if
(
ranges_
.
empty
())
{
status_
=
EMPTY
;
}
else
if
(
ranges_
.
count
()
>
1
&&
nullptr
!=
datum_utils
&&
(
scan_flag
.
scan_order_
==
ObQueryFlag
::
Forward
||
scan_flag
.
scan_order_
==
ObQueryFlag
::
Reverse
))
{
}
else
if
(
ranges_
.
count
()
>
1
&&
nullptr
!=
datum_utils
&&
scan_flag
.
is_ordered_scan
())
{
ObDatumComparor
<
ObDatumRange
>
comparor
(
*
datum_utils
,
ret
,
scan_flag
.
is_reverse_scan
());
std
::
sort
(
ranges_
.
begin
(),
ranges_
.
end
(),
comparor
);
if
(
OB_FAIL
(
ret
))
{
...
...
@@ -288,8 +286,7 @@ int ObTableScanRange::init_ranges_in_skip_scan(const common::ObIArray<common::Ob
if
(
OB_SUCC
(
ret
))
{
if
(
wrapped_ranges_
.
empty
())
{
status_
=
EMPTY
;
}
else
if
(
wrapped_ranges_
.
count
()
>
1
&&
nullptr
!=
datum_utils
&&
(
scan_flag
.
scan_order_
==
ObQueryFlag
::
Forward
||
scan_flag
.
scan_order_
==
ObQueryFlag
::
Reverse
))
{
}
else
if
(
wrapped_ranges_
.
count
()
>
1
&&
nullptr
!=
datum_utils
&&
scan_flag
.
is_ordered_scan
())
{
ObDatumComparor
<
ObSkipScanWrappedRange
>
comparor
(
*
datum_utils
,
ret
,
scan_flag
.
is_reverse_scan
());
std
::
sort
(
wrapped_ranges_
.
begin
(),
wrapped_ranges_
.
end
(),
comparor
);
if
(
OB_FAIL
(
ret
))
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录