Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Metz
oceanbase
提交
9b1ec8ad
O
oceanbase
项目概览
Metz
/
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看板
提交
9b1ec8ad
编写于
12月 15, 2021
作者:
C
Charles0429
提交者:
LINGuanRen
12月 15, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
skip building delay deleted index
上级
67b1a08e
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
7 addition
and
5 deletion
+7
-5
src/rootserver/ob_global_index_builder.cpp
src/rootserver/ob_global_index_builder.cpp
+2
-0
src/rootserver/ob_index_builder.cpp
src/rootserver/ob_index_builder.cpp
+2
-2
src/storage/ob_build_index_scheduler.cpp
src/storage/ob_build_index_scheduler.cpp
+3
-3
未找到文件。
src/rootserver/ob_global_index_builder.cpp
浏览文件 @
9b1ec8ad
...
@@ -565,6 +565,8 @@ int ObGlobalIndexBuilder::check_and_get_index_schema(share::schema::ObSchemaGett
...
@@ -565,6 +565,8 @@ int ObGlobalIndexBuilder::check_and_get_index_schema(share::schema::ObSchemaGett
}
else
if
(
OB_UNLIKELY
(
NULL
==
index_schema
))
{
}
else
if
(
OB_UNLIKELY
(
NULL
==
index_schema
))
{
ret
=
OB_ERR_UNEXPECTED
;
ret
=
OB_ERR_UNEXPECTED
;
LOG_WARN
(
"index schema ptr is null"
,
K
(
ret
),
K
(
index_table_id
));
LOG_WARN
(
"index schema ptr is null"
,
K
(
ret
),
K
(
index_table_id
));
}
else
if
(
index_schema
->
is_dropped_schema
())
{
// table delay delete, do not build index
}
else
{
}
else
{
}
// no more to do
}
// no more to do
return
ret
;
return
ret
;
...
...
src/rootserver/ob_index_builder.cpp
浏览文件 @
9b1ec8ad
...
@@ -618,7 +618,7 @@ int ObRSBuildIndexTask::wait_trans_end(bool& is_end)
...
@@ -618,7 +618,7 @@ int ObRSBuildIndexTask::wait_trans_end(bool& is_end)
LOG_WARN
(
"fail to get schema guard"
,
K
(
ret
),
K
(
fetch_tenant_id
),
K_
(
index_id
));
LOG_WARN
(
"fail to get schema guard"
,
K
(
ret
),
K
(
fetch_tenant_id
),
K_
(
index_id
));
}
else
if
(
OB_FAIL
(
schema_guard
.
get_table_schema
(
index_id_
,
index_schema
)))
{
}
else
if
(
OB_FAIL
(
schema_guard
.
get_table_schema
(
index_id_
,
index_schema
)))
{
LOG_WARN
(
"fail to get table schema"
,
K
(
ret
),
K
(
index_id_
));
LOG_WARN
(
"fail to get table schema"
,
K
(
ret
),
K
(
index_id_
));
}
else
if
(
OB_ISNULL
(
index_schema
))
{
}
else
if
(
OB_ISNULL
(
index_schema
)
||
index_schema
->
is_dropped_schema
()
)
{
// index table has been dropped
// index table has been dropped
ret
=
OB_SUCCESS
;
ret
=
OB_SUCCESS
;
is_end
=
true
;
is_end
=
true
;
...
@@ -732,7 +732,7 @@ int ObRSBuildIndexTask::wait_build_index_end(bool& is_end)
...
@@ -732,7 +732,7 @@ int ObRSBuildIndexTask::wait_build_index_end(bool& is_end)
LOG_WARN
(
"fail to get schema guard"
,
K
(
ret
),
K
(
fetch_tenant_id
),
K_
(
index_id
));
LOG_WARN
(
"fail to get schema guard"
,
K
(
ret
),
K
(
fetch_tenant_id
),
K_
(
index_id
));
}
else
if
(
OB_FAIL
(
schema_guard
.
get_table_schema
(
index_id_
,
index_schema
)))
{
}
else
if
(
OB_FAIL
(
schema_guard
.
get_table_schema
(
index_id_
,
index_schema
)))
{
LOG_WARN
(
"fail to get table schema"
,
K
(
ret
),
K
(
index_id_
));
LOG_WARN
(
"fail to get table schema"
,
K
(
ret
),
K
(
index_id_
));
}
else
if
(
OB_ISNULL
(
index_schema
))
{
}
else
if
(
OB_ISNULL
(
index_schema
)
||
index_schema
->
is_dropped_schema
()
)
{
ret
=
OB_SUCCESS
;
ret
=
OB_SUCCESS
;
is_end
=
true
;
is_end
=
true
;
}
else
if
(
OB_FAIL
(
schema_guard
.
get_table_schema
(
index_schema
->
get_data_table_id
(),
table_schema
)))
{
}
else
if
(
OB_FAIL
(
schema_guard
.
get_table_schema
(
index_schema
->
get_data_table_id
(),
table_schema
)))
{
...
...
src/storage/ob_build_index_scheduler.cpp
浏览文件 @
9b1ec8ad
...
@@ -467,7 +467,7 @@ int ObTenantDDLCheckSchemaTask::process_schedule_build_index_task()
...
@@ -467,7 +467,7 @@ int ObTenantDDLCheckSchemaTask::process_schedule_build_index_task()
// do nothing
// do nothing
}
else
if
(
OB_FAIL
(
schema_guard
.
get_table_schema
(
table_ids
.
at
(
i
),
index_schema
)))
{
}
else
if
(
OB_FAIL
(
schema_guard
.
get_table_schema
(
table_ids
.
at
(
i
),
index_schema
)))
{
STORAGE_LOG
(
WARN
,
"fail to get table schema"
,
K
(
ret
));
STORAGE_LOG
(
WARN
,
"fail to get table schema"
,
K
(
ret
));
}
else
if
(
OB_ISNULL
(
index_schema
))
{
}
else
if
(
OB_ISNULL
(
index_schema
)
||
index_schema
->
is_dropped_schema
()
)
{
ret
=
OB_SUCCESS
;
ret
=
OB_SUCCESS
;
STORAGE_LOG
(
INFO
,
"table has been deleted, do not need to create index"
,
K
(
ret
),
"table_id"
,
table_ids
.
at
(
i
));
STORAGE_LOG
(
INFO
,
"table has been deleted, do not need to create index"
,
K
(
ret
),
"table_id"
,
table_ids
.
at
(
i
));
}
else
if
(
OB_FAIL
(
find_build_index_partitions
(
index_schema
,
schema_guard
,
partition_keys
)))
{
}
else
if
(
OB_FAIL
(
find_build_index_partitions
(
index_schema
,
schema_guard
,
partition_keys
)))
{
...
@@ -998,7 +998,7 @@ int ObBuildIndexScheduleTask::send_copy_replica_rpc()
...
@@ -998,7 +998,7 @@ int ObBuildIndexScheduleTask::send_copy_replica_rpc()
STORAGE_LOG
(
WARN
,
"fail to get schema guard"
,
K
(
ret
),
K
(
schema_version_
));
STORAGE_LOG
(
WARN
,
"fail to get schema guard"
,
K
(
ret
),
K
(
schema_version_
));
}
else
if
(
OB_FAIL
(
schema_guard
.
get_table_schema
(
index_id_
,
index_schema
)))
{
}
else
if
(
OB_FAIL
(
schema_guard
.
get_table_schema
(
index_id_
,
index_schema
)))
{
STORAGE_LOG
(
WARN
,
"fail to get table schema"
,
K
(
ret
),
K
(
pkey_
),
K
(
index_id_
));
STORAGE_LOG
(
WARN
,
"fail to get table schema"
,
K
(
ret
),
K
(
pkey_
),
K
(
index_id_
));
}
else
if
(
OB_ISNULL
(
index_schema
))
{
}
else
if
(
OB_ISNULL
(
index_schema
)
||
index_schema
->
is_dropped_schema
()
)
{
ret
=
OB_SUCCESS
;
ret
=
OB_SUCCESS
;
}
else
if
(
OB_FAIL
(
schema_guard
.
get_table_schema
(
index_schema
->
get_data_table_id
(),
data_table_schema
)))
{
}
else
if
(
OB_FAIL
(
schema_guard
.
get_table_schema
(
index_schema
->
get_data_table_id
(),
data_table_schema
)))
{
STORAGE_LOG
(
WARN
,
"fail to get table schema"
,
K
(
ret
));
STORAGE_LOG
(
WARN
,
"fail to get table schema"
,
K
(
ret
));
...
@@ -1414,7 +1414,7 @@ int ObBuildIndexScheduleTask::process()
...
@@ -1414,7 +1414,7 @@ int ObBuildIndexScheduleTask::process()
STORAGE_LOG
(
WARN
,
"fail to get schema guard"
,
K
(
ret
),
K
(
pkey_
),
K
(
index_id_
));
STORAGE_LOG
(
WARN
,
"fail to get schema guard"
,
K
(
ret
),
K
(
pkey_
),
K
(
index_id_
));
}
else
if
(
OB_FAIL
(
schema_guard
.
get_table_schema
(
index_id_
,
index_schema
)))
{
}
else
if
(
OB_FAIL
(
schema_guard
.
get_table_schema
(
index_id_
,
index_schema
)))
{
STORAGE_LOG
(
WARN
,
"fail to get table schema"
,
K
(
ret
),
K
(
pkey_
),
K
(
index_id_
));
STORAGE_LOG
(
WARN
,
"fail to get table schema"
,
K
(
ret
),
K
(
pkey_
),
K
(
index_id_
));
}
else
if
(
OB_ISNULL
(
index_schema
))
{
}
else
if
(
OB_ISNULL
(
index_schema
)
||
index_schema
->
is_dropped_schema
()
)
{
if
(
UNIQUE_INDEX_CHECKING
!=
state_
)
{
if
(
UNIQUE_INDEX_CHECKING
!=
state_
)
{
STORAGE_LOG
(
INFO
,
"index schema has been deleted, skip build it"
,
K
(
pkey_
),
K
(
index_id_
));
STORAGE_LOG
(
INFO
,
"index schema has been deleted, skip build it"
,
K
(
pkey_
),
K
(
index_id_
));
is_end
=
true
;
is_end
=
true
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录