Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
野花太放肆
oceanbase
提交
5b5c04ff
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,发现更多精彩内容 >>
提交
5b5c04ff
编写于
7月 19, 2021
作者:
O
obdev
提交者:
wangzelin.wzl
7月 19, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cherry-pick from 3_1_x_release to 3.1_opensource_release
上级
1777c976
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
39 addition
and
10 deletion
+39
-10
src/observer/ob_service.cpp
src/observer/ob_service.cpp
+28
-6
src/storage/ob_multi_version_table_store.cpp
src/storage/ob_multi_version_table_store.cpp
+0
-3
src/storage/ob_multi_version_table_store.h
src/storage/ob_multi_version_table_store.h
+1
-0
src/storage/ob_partition_store.cpp
src/storage/ob_partition_store.cpp
+10
-1
未找到文件。
src/observer/ob_service.cpp
浏览文件 @
5b5c04ff
...
...
@@ -920,7 +920,6 @@ int ObService::submit_pt_update_task(
{
int
ret
=
OB_SUCCESS
;
const
bool
is_remove
=
false
;
const
int64_t
version
=
0
;
const
ObSSTableChecksumUpdateType
update_type
=
ObSSTableChecksumUpdateType
::
UPDATE_ALL
;
if
(
!
inited_
)
{
ret
=
OB_NOT_INIT
;
...
...
@@ -930,12 +929,35 @@ int ObService::submit_pt_update_task(
LOG_WARN
(
"invalid argument"
,
K
(
part_key
),
K
(
ret
));
}
else
if
(
OB_FAIL
(
partition_table_updater_
.
async_update
(
part_key
,
with_role
)))
{
LOG_WARN
(
"async_update failed"
,
K
(
part_key
),
K
(
ret
));
}
else
if
(
need_report_checksum
&&
!
part_key
.
is_pg
()
&&
OB_FAIL
(
checksum_updater_
.
add_task
(
part_key
,
is_remove
,
update_type
)))
{
LOG_WARN
(
"fail to async update sstable checksum"
,
K
(
ret
));
}
else
if
(
need_report_checksum
)
{
if
(
part_key
.
is_pg
())
{
ObPartitionArray
pkeys
;
ObIPartitionGroupGuard
guard
;
if
(
OB_FAIL
(
gctx_
.
par_ser_
->
get_partition
(
part_key
,
guard
)))
{
if
(
OB_PARTITION_NOT_EXIST
==
ret
)
{
ret
=
OB_SUCCESS
;
}
else
{
// do nothing
LOG_WARN
(
"fail to get partition"
,
K
(
ret
),
K
(
part_key
));
}
}
else
if
(
OB_ISNULL
(
guard
.
get_partition_group
()))
{
ret
=
OB_ERR_UNEXPECTED
;
LOG_WARN
(
"error unexpected, partition must not be NULL"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
guard
.
get_partition_group
()
->
get_all_pg_partition_keys
(
pkeys
)))
{
LOG_WARN
(
"get pg partition fail"
,
K
(
ret
),
K
(
part_key
));
}
else
{
for
(
int64_t
i
=
0
;
OB_SUCC
(
ret
)
&&
i
<
pkeys
.
count
();
++
i
)
{
if
(
OB_FAIL
(
checksum_updater_
.
add_task
(
pkeys
.
at
(
i
),
is_remove
,
update_type
)))
{
LOG_WARN
(
"failt to async update sstable checksum"
,
K
(
ret
),
K
(
pkeys
.
at
(
i
)));
}
}
}
}
else
{
if
(
OB_FAIL
(
checksum_updater_
.
add_task
(
part_key
,
is_remove
,
update_type
)))
{
LOG_WARN
(
"fail to async update sstable checksum"
,
K
(
ret
));
}
}
}
return
ret
;
}
...
...
src/storage/ob_multi_version_table_store.cpp
浏览文件 @
5b5c04ff
...
...
@@ -1432,9 +1432,6 @@ int ObMultiVersionTableStore::get_schema_version(int64_t& schema_version)
if
(
OB_FAIL
(
table_store
->
get_schema_version
(
schema_version
)))
{
LOG_WARN
(
"failed to get_schema_version"
,
K
(
ret
));
}
}
else
if
(
create_schema_version_
<=
0
)
{
ret
=
OB_ERR_SYS
;
LOG_WARN
(
"create_schema_version should be valid when no table exist"
,
K
(
ret
));
}
else
{
schema_version
=
create_schema_version_
;
}
...
...
src/storage/ob_multi_version_table_store.h
浏览文件 @
5b5c04ff
...
...
@@ -112,6 +112,7 @@ public:
int
set_drop_schema_info
(
const
int64_t
drop_schema_version
);
int
get_drop_schema_info
(
int64_t
&
drop_schema_version
,
int64_t
&
drop_schema_refreshed_ts
);
int
get_recovery_point_tables
(
const
int64_t
snapshot_version
,
ObTablesHandle
&
handle
);
void
set_create_schema_version
(
const
int64_t
schema_version
)
{
create_schema_version_
=
schema_version
;
}
DECLARE_VIRTUAL_TO_STRING
;
...
...
src/storage/ob_partition_store.cpp
浏览文件 @
5b5c04ff
...
...
@@ -749,8 +749,17 @@ int ObPartitionStore::create_multi_version_store_(
if
(
OB_HASH_EXIST
!=
ret
)
{
LOG_WARN
(
"failed to set table store to map"
,
K
(
ret
),
K
(
table_id
));
}
else
{
ObMultiVersionTableStore
*
get_table_store
=
nullptr
;
if
(
OB_FAIL
(
store_map_
->
get
(
table_id
,
get_table_store
)))
{
LOG_WARN
(
"get store map failed"
,
K
(
ret
),
K
(
table_id
));
}
else
if
(
OB_ISNULL
(
get_table_store
))
{
ret
=
OB_ERR_UNEXPECTED
;
LOG_WARN
(
"error unexpected, get table store must not be nullptr"
,
K
(
ret
));
}
else
{
get_table_store
->
set_create_schema_version
(
schema_version
);
ret
=
OB_ENTRY_EXIST
;
}
}
}
else
{
LOG_INFO
(
"succeed to create multi version table store"
,
KPC
(
tmp_table_store
),
KP
(
tmp_table_store
),
K
(
table_id
));
if
(
table_id
==
meta_
->
pkey_
.
get_table_id
())
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录