Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
clmforever
oceanbase
提交
b2e66c1c
O
oceanbase
项目概览
clmforever
/
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,发现更多精彩内容 >>
提交
b2e66c1c
编写于
9月 22, 2021
作者:
R
raywill
提交者:
wangzelin.wzl
9月 22, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
batch patch to opensource
上级
b276491a
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
29 addition
and
8 deletion
+29
-8
src/share/system_variable/ob_system_variable.cpp
src/share/system_variable/ob_system_variable.cpp
+10
-1
src/sql/code_generator/ob_code_generator_impl.cpp
src/sql/code_generator/ob_code_generator_impl.cpp
+1
-0
src/sql/engine/ob_exec_context.cpp
src/sql/engine/ob_exec_context.cpp
+2
-1
src/sql/executor/ob_slice_calc.cpp
src/sql/executor/ob_slice_calc.cpp
+0
-2
src/sql/optimizer/ob_optimizer.cpp
src/sql/optimizer/ob_optimizer.cpp
+0
-4
src/sql/optimizer/ob_px_resource_analyzer.cpp
src/sql/optimizer/ob_px_resource_analyzer.cpp
+14
-0
src/sql/optimizer/ob_px_resource_analyzer.h
src/sql/optimizer/ob_px_resource_analyzer.h
+2
-0
未找到文件。
src/share/system_variable/ob_system_variable.cpp
浏览文件 @
b2e66c1c
...
@@ -1809,7 +1809,16 @@ int ObSysVarOnCheckFuncs::check_and_convert_tx_isolation(ObExecContext& ctx, con
...
@@ -1809,7 +1809,16 @@ int ObSysVarOnCheckFuncs::check_and_convert_tx_isolation(ObExecContext& ctx, con
LOG_USER_ERROR
(
OB_NOT_SUPPORTED
,
"Isolation level SERIALIZABLE not supported in system tenant"
);
LOG_USER_ERROR
(
OB_NOT_SUPPORTED
,
"Isolation level SERIALIZABLE not supported in system tenant"
);
LOG_WARN
(
"Isolation level SERIALIZABLE not supported in system tenant"
,
K
(
ret
),
K
(
in_val
));
LOG_WARN
(
"Isolation level SERIALIZABLE not supported in system tenant"
,
K
(
ret
),
K
(
in_val
));
}
else
{
}
else
{
out_val
=
in_val
;
if
(
OB_FAIL
(
ob_write_obj
(
ctx
.
get_allocator
(),
in_val
,
out_val
)))
{
LOG_WARN
(
"deep copy out_val obj failed"
,
K
(
ret
));
}
ObString
tmp_out_val
=
out_val
.
get_string
();
if
(
OB_FAIL
(
ob_simple_low_to_up
(
ctx
.
get_allocator
(),
in_val
.
get_string
(),
tmp_out_val
)))
{
LOG_WARN
(
"Isolation level change to upper string failed"
,
K
(
ret
));
}
out_val
.
set_varchar
(
tmp_out_val
);
}
}
return
ret
;
return
ret
;
}
}
...
...
src/sql/code_generator/ob_code_generator_impl.cpp
浏览文件 @
b2e66c1c
...
@@ -4109,6 +4109,7 @@ int ObCodeGeneratorImpl::convert_pdml_delete(ObLogDelete& op, const PhyOpsDesc&
...
@@ -4109,6 +4109,7 @@ int ObCodeGeneratorImpl::convert_pdml_delete(ObLogDelete& op, const PhyOpsDesc&
pdml_delete
->
get_dml_row_desc
().
set_part_id_index
(
partition_expr_idx
);
pdml_delete
->
get_dml_row_desc
().
set_part_id_index
(
partition_expr_idx
);
}
}
if
(
OB_SUCC
(
ret
)
&&
op
.
is_index_maintenance
())
{
if
(
OB_SUCC
(
ret
)
&&
op
.
is_index_maintenance
())
{
// find shadow pk expr and add it to out row desc and calc_exprs
if
(
OB_FAIL
(
handle_pdml_shadow_pk
(
index_dml_info
.
column_exprs_
,
out_row_desc
,
out_row_desc
,
pdml_delete
)))
{
if
(
OB_FAIL
(
handle_pdml_shadow_pk
(
index_dml_info
.
column_exprs_
,
out_row_desc
,
out_row_desc
,
pdml_delete
)))
{
LOG_WARN
(
"failed to handle pdml shadow pk"
,
K
(
ret
),
K
(
index_dml_info
.
column_exprs_
));
LOG_WARN
(
"failed to handle pdml shadow pk"
,
K
(
ret
),
K
(
index_dml_info
.
column_exprs_
));
}
}
...
...
src/sql/engine/ob_exec_context.cpp
浏览文件 @
b2e66c1c
...
@@ -162,7 +162,8 @@ ObExecContext::ObExecContext(ObIAllocator& allocator)
...
@@ -162,7 +162,8 @@ ObExecContext::ObExecContext(ObIAllocator& allocator)
calc_type_
(
CALC_NORMAL
),
calc_type_
(
CALC_NORMAL
),
fixed_id_
(
OB_INVALID_ID
),
fixed_id_
(
OB_INVALID_ID
),
expr_partition_id_
(
OB_INVALID_ID
),
expr_partition_id_
(
OB_INVALID_ID
),
iters_
(
256
,
allocator
)
iters_
(
256
,
allocator
),
check_status_times_
(
0
)
{}
{}
ObExecContext
::
ObExecContext
()
ObExecContext
::
ObExecContext
()
...
...
src/sql/executor/ob_slice_calc.cpp
浏览文件 @
b2e66c1c
...
@@ -229,7 +229,6 @@ int ObRepartSliceIdxCalc::get_previous_row_partition_id(ObObj& partition_id)
...
@@ -229,7 +229,6 @@ int ObRepartSliceIdxCalc::get_previous_row_partition_id(ObObj& partition_id)
int
ObSlaveMapRepartIdxCalcBase
::
init
()
int
ObSlaveMapRepartIdxCalcBase
::
init
()
{
{
int
ret
=
OB_SUCCESS
;
int
ret
=
OB_SUCCESS
;
if
(
OB_FAIL
(
ObRepartSliceIdxCalc
::
init
()))
{
if
(
OB_FAIL
(
ObRepartSliceIdxCalc
::
init
()))
{
LOG_WARN
(
"fail init base"
,
K
(
ret
));
LOG_WARN
(
"fail init base"
,
K
(
ret
));
}
}
...
@@ -446,7 +445,6 @@ int ObRepartSliceIdxCalc::build_repart_ch_map(ObPxPartChMap& affinity_map)
...
@@ -446,7 +445,6 @@ int ObRepartSliceIdxCalc::build_repart_ch_map(ObPxPartChMap& affinity_map)
LOG_WARN
(
"fail create hashmap"
,
"count"
,
part_ch_array
.
count
(),
K
(
ret
));
LOG_WARN
(
"fail create hashmap"
,
"count"
,
part_ch_array
.
count
(),
K
(
ret
));
}
}
int64_t
partition_id
=
common
::
OB_INVALID_INDEX_INT64
;
int64_t
partition_id
=
common
::
OB_INVALID_INDEX_INT64
;
ARRAY_FOREACH_X
(
part_ch_array
,
idx
,
cnt
,
OB_SUCC
(
ret
))
ARRAY_FOREACH_X
(
part_ch_array
,
idx
,
cnt
,
OB_SUCC
(
ret
))
{
{
...
...
src/sql/optimizer/ob_optimizer.cpp
浏览文件 @
b2e66c1c
...
@@ -304,10 +304,6 @@ int ObOptimizer::check_pdml_supported_feature(const ObDMLStmt& stmt, const ObSQL
...
@@ -304,10 +304,6 @@ int ObOptimizer::check_pdml_supported_feature(const ObDMLStmt& stmt, const ObSQL
}
else
if
(
table_schema
->
get_foreign_key_infos
().
count
()
>
0
)
{
}
else
if
(
table_schema
->
get_foreign_key_infos
().
count
()
>
0
)
{
LOG_TRACE
(
"dml has foreign key, disable pdml"
,
K
(
ret
));
LOG_TRACE
(
"dml has foreign key, disable pdml"
,
K
(
ret
));
is_use_pdml
=
false
;
is_use_pdml
=
false
;
}
else
if
(
stmt
::
T_DELETE
==
stmt
.
get_stmt_type
())
{
// https://code.aone.alibaba-inc.com/oceanbase/oceanbase/codereview/5345309
// if no trigger, no foreign key, delete can do pdml, even if with local unique index
is_use_pdml
=
true
;
}
else
if
(
!
session
.
use_static_typing_engine
()
&&
stmt
.
get_check_constraint_exprs_size
()
>
0
)
{
}
else
if
(
!
session
.
use_static_typing_engine
()
&&
stmt
.
get_check_constraint_exprs_size
()
>
0
)
{
LOG_TRACE
(
"dml has constraint, old engine, disable pdml"
,
K
(
ret
));
LOG_TRACE
(
"dml has constraint, old engine, disable pdml"
,
K
(
ret
));
is_use_pdml
=
false
;
is_use_pdml
=
false
;
...
...
src/sql/optimizer/ob_px_resource_analyzer.cpp
浏览文件 @
b2e66c1c
...
@@ -182,10 +182,22 @@ int ObPxResourceAnalyzer::analyze(ObLogicalOperator& root_op, int64_t& max_paral
...
@@ -182,10 +182,22 @@ int ObPxResourceAnalyzer::analyze(ObLogicalOperator& root_op, int64_t& max_paral
LOG_WARN
(
"fail convert log plan to nested px tree"
,
K
(
ret
));
LOG_WARN
(
"fail convert log plan to nested px tree"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
walk_through_px_trees
(
px_trees
,
max_parallel_thread_group_count
)))
{
}
else
if
(
OB_FAIL
(
walk_through_px_trees
(
px_trees
,
max_parallel_thread_group_count
)))
{
LOG_WARN
(
"fail calc max parallel thread group count for resource reservation"
,
K
(
ret
));
LOG_WARN
(
"fail calc max parallel thread group count for resource reservation"
,
K
(
ret
));
}
else
{
release
();
}
}
return
ret
;
return
ret
;
}
}
void
ObPxResourceAnalyzer
::
release
()
{
for
(
int64_t
i
=
0
;
i
<
dfos_
.
count
();
++
i
)
{
DfoInfo
*
dfo
=
dfos_
.
at
(
i
);
if
(
OB_LIKELY
(
nullptr
!=
dfo
))
{
dfo
->~
DfoInfo
();
}
}
}
int
ObPxResourceAnalyzer
::
convert_log_plan_to_nested_px_tree
(
ObIArray
<
PxInfo
>&
px_trees
,
ObLogicalOperator
&
root_op
)
int
ObPxResourceAnalyzer
::
convert_log_plan_to_nested_px_tree
(
ObIArray
<
PxInfo
>&
px_trees
,
ObLogicalOperator
&
root_op
)
{
{
int
ret
=
OB_SUCCESS
;
int
ret
=
OB_SUCCESS
;
...
@@ -296,6 +308,8 @@ int ObPxResourceAnalyzer::create_dfo(DfoInfo*& dfo, int64_t dop)
...
@@ -296,6 +308,8 @@ int ObPxResourceAnalyzer::create_dfo(DfoInfo*& dfo, int64_t dop)
}
else
if
(
nullptr
==
(
dfo
=
new
(
mem_ptr
)
DfoInfo
()))
{
}
else
if
(
nullptr
==
(
dfo
=
new
(
mem_ptr
)
DfoInfo
()))
{
ret
=
OB_ERR_UNEXPECTED
;
ret
=
OB_ERR_UNEXPECTED
;
LOG_WARN
(
"Null ptr unexpected"
,
KP
(
mem_ptr
),
K
(
ret
));
LOG_WARN
(
"Null ptr unexpected"
,
KP
(
mem_ptr
),
K
(
ret
));
}
else
if
(
OB_FAIL
(
dfos_
.
push_back
(
dfo
)))
{
LOG_WARN
(
"fail push dfo. no memory!"
,
K
(
ret
));
}
else
{
}
else
{
dfo
->
set_dop
(
dop
);
dfo
->
set_dop
(
dop
);
}
}
...
...
src/sql/optimizer/ob_px_resource_analyzer.h
浏览文件 @
b2e66c1c
...
@@ -139,10 +139,12 @@ private:
...
@@ -139,10 +139,12 @@ private:
int
walk_through_px_trees
(
common
::
ObIArray
<
PxInfo
>&
px_trees
,
int64_t
&
max_parallel_thread_group_count
);
int
walk_through_px_trees
(
common
::
ObIArray
<
PxInfo
>&
px_trees
,
int64_t
&
max_parallel_thread_group_count
);
int
walk_through_dfo_tree
(
PxInfo
&
px_root
,
int64_t
&
max_parallel_thread_group_count
);
int
walk_through_dfo_tree
(
PxInfo
&
px_root
,
int64_t
&
max_parallel_thread_group_count
);
int
create_dfo
(
DfoInfo
*&
dfo
,
int64_t
dop
);
int
create_dfo
(
DfoInfo
*&
dfo
,
int64_t
dop
);
void
release
();
private:
private:
/* variables */
/* variables */
common
::
ObArenaAllocator
dfo_allocator_
;
common
::
ObArenaAllocator
dfo_allocator_
;
common
::
ObArray
<
DfoInfo
*>
dfos_
;
DISALLOW_COPY_AND_ASSIGN
(
ObPxResourceAnalyzer
);
DISALLOW_COPY_AND_ASSIGN
(
ObPxResourceAnalyzer
);
};
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录