Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Metz
oceanbase
提交
6b4f10f4
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6b4f10f4
编写于
3月 28, 2022
作者:
C
Charles0429
提交者:
LINGuanRen
3月 28, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix wait transation bug
上级
a496e671
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
11 addition
and
17 deletion
+11
-17
src/storage/ob_partition_service.cpp
src/storage/ob_partition_service.cpp
+1
-2
src/storage/ob_pg_partition.cpp
src/storage/ob_pg_partition.cpp
+9
-14
src/storage/ob_pg_partition.h
src/storage/ob_pg_partition.h
+1
-1
未找到文件。
src/storage/ob_partition_service.cpp
浏览文件 @
6b4f10f4
...
...
@@ -9247,7 +9247,6 @@ int ObPartitionService::check_schema_version_elapsed(const ObPartitionKey& targe
K(latest_schema_version),
K(schema_version));
} else {
refreshed_schema_ts = ObTimeUtility::current_time();
const int64_t timeout = 10 * 1000 * 1000;
if (OB_FAIL(guard.get_partition_group()->get_pg_storage().replay_partition_schema_version_change_log(
schema_version))) {
...
...
@@ -9266,7 +9265,7 @@ int ObPartitionService::check_schema_version_elapsed(const ObPartitionKey& targe
// override ret
ret = OB_EAGAIN;
} else if (OB_FAIL(pg_partition->update_build_index_schema_info(
schema_version,
refreshed_schema_ts, log_id, log
_ts))) {
schema_version,
log_id, log_ts, refreshed_schema
_ts))) {
STORAGE_LOG(WARN, "update build index schema info error", K(ret), K(target_pkey), K(pg_key), K(schema_version));
} else {
STORAGE_LOG(INFO,
...
...
src/storage/ob_pg_partition.cpp
浏览文件 @
6b4f10f4
...
...
@@ -214,33 +214,25 @@ int ObPGPartition::get_refreshed_schema_info(int64_t& schema_version, int64_t& r
// There will be no concurrency here, so there is no need to lock
int
ObPGPartition
::
update_build_index_schema_info
(
const
int64_t
schema_version
,
const
int64_t
schema_refreshed_ts
,
const
uint64_t
log_id
,
const
int64_t
log
_ts
)
const
int64_t
schema_version
,
const
uint64_t
log_id
,
const
int64_t
log_ts
,
int64_t
&
schema_refreshed
_ts
)
{
int
ret
=
OB_SUCCESS
;
ObSpinLockGuard
guard
(
lock_
);
if
(
schema_version
<
0
||
schema_refreshed_ts
<
0
||
log_id
<=
0
||
log_ts
<=
0
)
{
if
(
schema_version
<
0
||
log_id
<=
0
||
log_ts
<=
0
)
{
ret
=
OB_INVALID_ARGUMENT
;
TRANS_LOG
(
WARN
,
"invalid argument"
,
K
(
schema_version
),
K
(
schema_refreshed_ts
),
K
(
log_id
),
K
(
log_ts
));
TRANS_LOG
(
WARN
,
"invalid argument"
,
K
(
schema_version
),
K
(
log_id
),
K
(
log_ts
));
}
else
if
(
build_index_schema_version_
<
schema_version
)
{
// First record
if
(
INT64_MAX
==
build_index_schema_version_refreshed_ts_
)
{
// Ensure that the schema version is updated at the end
build_index_schema_version_refreshed_ts_
=
schema_refreshed_ts
;
build_index_schema_version_refreshed_ts_
=
ObTimeUtility
::
current_time
()
;
schema_version_change_log_id_
=
log_id
;
schema_version_change_log_ts_
=
log_ts
;
ATOMIC_STORE
(
&
build_index_schema_version_
,
schema_version
);
}
else
if
(
build_index_schema_version_refreshed_ts_
>
schema_refreshed_ts
)
{
ret
=
OB_ERR_UNEXPECTED
;
TRANS_LOG
(
ERROR
,
"unexpected schema version refreshed ts"
,
K
(
ret
),
K_
(
pkey
),
K_
(
build_index_schema_version_refreshed_ts
),
K
(
schema_version
),
K
(
schema_refreshed_ts
));
}
else
{
// Ensure that the schema version is updated at the end
build_index_schema_version_refreshed_ts_
=
schema_refreshed_ts
;
build_index_schema_version_refreshed_ts_
=
std
::
max
(
ObTimeUtility
::
current_time
(),
build_index_schema_version_refreshed_ts_
);
schema_version_change_log_id_
=
log_id
;
schema_version_change_log_ts_
=
log_ts
;
ATOMIC_STORE
(
&
build_index_schema_version_
,
schema_version
);
...
...
@@ -248,6 +240,9 @@ int ObPGPartition::update_build_index_schema_info(
}
else
{
// do nothing
}
if
(
OB_SUCC
(
ret
))
{
schema_refreshed_ts
=
build_index_schema_version_refreshed_ts_
;
}
return
ret
;
}
...
...
src/storage/ob_pg_partition.h
浏览文件 @
6b4f10f4
...
...
@@ -116,7 +116,7 @@ public:
// During the indexing process, after the new version of the schema version is refreshed,
// a clog needs to be persisted
int
update_build_index_schema_info
(
const
int64_t
schema_version
,
const
int64_t
schema_refreshed_ts
,
const
uint64_t
log_id
,
const
int64_t
log
_ts
);
const
int64_t
schema_version
,
const
uint64_t
log_id
,
const
int64_t
log_ts
,
int64_t
&
schema_refreshed
_ts
);
int
get_refreshed_schema_info
(
int64_t
&
schema_version
,
int64_t
&
refreshed_schema_ts
,
uint64_t
&
log_id
,
int64_t
&
log_ts
);
TO_STRING_KV
(
K_
(
pkey
),
KP_
(
cp_fty
),
KP_
(
storage
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录