Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
大炮V587
oceanbase
提交
6892b58c
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,体验更适合开发者的 AI 搜索 >>
提交
6892b58c
编写于
3月 20, 2023
作者:
G
godyangfight
提交者:
ob-robot
3月 20, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix ls migration online succeed but inner retry return 4016 bug
上级
1f1001b6
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
40 addition
and
10 deletion
+40
-10
src/storage/blocksstable/ob_macro_block_checker.cpp
src/storage/blocksstable/ob_macro_block_checker.cpp
+2
-0
src/storage/blocksstable/ob_macro_block_checker.h
src/storage/blocksstable/ob_macro_block_checker.h
+3
-2
src/storage/high_availability/ob_ls_migration.cpp
src/storage/high_availability/ob_ls_migration.cpp
+25
-3
src/storage/high_availability/ob_ls_migration.h
src/storage/high_availability/ob_ls_migration.h
+1
-0
src/storage/high_availability/ob_storage_ha_macro_block_writer.cpp
...ge/high_availability/ob_storage_ha_macro_block_writer.cpp
+9
-5
未找到文件。
src/storage/blocksstable/ob_macro_block_checker.cpp
浏览文件 @
6892b58c
...
...
@@ -38,6 +38,8 @@ int ObSSTableMacroBlockChecker::check(
ret
=
OB_INVALID_ARGUMENT
;
STORAGE_LOG
(
WARN
,
"Invalid argument"
,
K
(
ret
),
KP
(
macro_block_buf
),
K
(
macro_block_buf_size
),
K
(
check_level
));
}
else
if
(
ObMacroBlockCheckLevel
::
CHECK_LEVEL_NONE
==
check_level
)
{
//do nothing
}
else
if
(
OB_FAIL
(
common_header
.
deserialize
(
macro_block_buf
,
macro_block_buf_size
,
pos
)))
{
STORAGE_LOG
(
ERROR
,
"fail to deserialize common header"
,
K
(
ret
),
KP
(
macro_block_buf
),
K
(
macro_block_buf_size
),
K
(
pos
),
K
(
common_header
));
...
...
src/storage/blocksstable/ob_macro_block_checker.h
浏览文件 @
6892b58c
...
...
@@ -26,8 +26,9 @@ namespace blocksstable
{
enum
ObMacroBlockCheckLevel
{
CHECK_LEVEL_PHYSICAL
=
0
,
// verify data checksum
CHECK_LEVEL_LOGICAL
=
1
,
// verify column checksum
CHECK_LEVEL_NONE
=
0
,
// no check
CHECK_LEVEL_PHYSICAL
=
1
,
// verify data checksum
CHECK_LEVEL_LOGICAL
=
2
,
// verify column checksum
CHECK_LEVEL_MAX
,
};
...
...
src/storage/high_availability/ob_ls_migration.cpp
浏览文件 @
6892b58c
...
...
@@ -2915,7 +2915,6 @@ int ObDataTabletsMigrationTask::process()
{
int
ret
=
OB_SUCCESS
;
int
tmp_ret
=
OB_SUCCESS
;
bool
is_ls_online_success
=
false
;
LOG_INFO
(
"start do data tablets migration task"
,
K
(
ret
),
KPC
(
ctx_
));
#ifdef ERRSIM
SERVER_EVENT_SYNC_ADD
(
"storage_ha"
,
"before_data_tablets_migration_task"
,
...
...
@@ -2935,7 +2934,6 @@ int ObDataTabletsMigrationTask::process()
LOG_WARN
(
"failed to try remove unneeded tablets"
,
K
(
ret
),
KPC
(
ctx_
));
}
else
if
(
OB_FAIL
(
ls_online_
()))
{
LOG_WARN
(
"failed to start realy log"
,
K
(
ret
),
K
(
*
ctx_
));
}
else
if
(
FALSE_IT
(
is_ls_online_success
=
true
))
{
}
else
if
(
OB_FAIL
(
build_tablet_group_info_
()))
{
LOG_WARN
(
"failed to build tablet group info"
,
K
(
ret
),
KPC
(
ctx_
));
}
else
{
...
...
@@ -2966,7 +2964,12 @@ int ObDataTabletsMigrationTask::process()
if
(
OB_FAIL
(
ret
))
{
int
tmp_ret
=
OB_SUCCESS
;
const
bool
allow_retry
=
!
is_ls_online_success
;
bool
allow_retry
=
true
;
if
(
OB_SUCCESS
!=
(
tmp_ret
=
try_offline_ls_
()))
{
LOG_WARN
(
"failed to try offline ls"
,
K
(
tmp_ret
));
}
else
if
(
FALSE_IT
(
allow_retry
=
OB_SUCCESS
==
tmp_ret
))
{
}
if
(
OB_SUCCESS
!=
(
tmp_ret
=
ObStorageHADagUtils
::
deal_with_fo
(
ret
,
this
->
get_dag
(),
allow_retry
)))
{
LOG_WARN
(
"failed to deal with fo"
,
K
(
ret
),
K
(
tmp_ret
),
K
(
*
ctx_
));
}
...
...
@@ -3303,6 +3306,25 @@ int ObDataTabletsMigrationTask::try_remove_unneeded_tablets_()
return
ret
;
}
int
ObDataTabletsMigrationTask
::
try_offline_ls_
()
{
int
ret
=
OB_SUCCESS
;
ObLSHandle
ls_handle
;
ObLS
*
ls
=
nullptr
;
if
(
!
is_inited_
)
{
ret
=
OB_NOT_INIT
;
LOG_WARN
(
"start migration task do not init"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
ObStorageHADagUtils
::
get_ls
(
ctx_
->
arg_
.
ls_id_
,
ls_handle
)))
{
LOG_WARN
(
"failed to get ls"
,
K
(
ret
),
KPC
(
ctx_
));
}
else
if
(
OB_ISNULL
(
ls
=
ls_handle
.
get_ls
()))
{
ret
=
OB_ERR_UNEXPECTED
;
LOG_WARN
(
"ls should not be NULL"
,
K
(
ret
),
KPC
(
ctx_
));
}
else
if
(
OB_FAIL
(
ls
->
offline
()))
{
LOG_WARN
(
"failed to offline ls"
,
K
(
ret
),
KPC
(
ctx_
));
}
return
ret
;
}
int
ObDataTabletsMigrationTask
::
record_server_event_
()
{
...
...
src/storage/high_availability/ob_ls_migration.h
浏览文件 @
6892b58c
...
...
@@ -418,6 +418,7 @@ private:
int
build_tablet_group_info_
();
int
generate_tablet_group_dag_
();
int
try_remove_unneeded_tablets_
();
int
try_offline_ls_
();
int
record_server_event_
();
private:
...
...
src/storage/high_availability/ob_storage_ha_macro_block_writer.cpp
浏览文件 @
6892b58c
...
...
@@ -69,10 +69,15 @@ int ObStorageHAMacroBlockWriter::check_macro_block_(
ObMacroBlockCheckLevel
check_level
=
ObMacroBlockCheckLevel
::
CHECK_LEVEL_MAX
;
switch
(
migrate_verify_level
)
{
case
0
:
check_level
=
ObMacroBlockCheckLevel
::
CHECK_LEVEL_
PHYSICAL
;
check_level
=
ObMacroBlockCheckLevel
::
CHECK_LEVEL_
NONE
;
break
;
case
1
:
check_level
=
ObMacroBlockCheckLevel
::
CHECK_LEVEL_LOGICAL
;
check_level
=
ObMacroBlockCheckLevel
::
CHECK_LEVEL_PHYSICAL
;
break
;
case
2
:
//check_level = ObMacroBlockCheckLevel::CHECK_LEVEL_LOGICAL;
//Here using logical has a bug.
check_level
=
ObMacroBlockCheckLevel
::
CHECK_LEVEL_PHYSICAL
;
break
;
default:
check_level
=
ObMacroBlockCheckLevel
::
CHECK_LEVEL_MAX
;
...
...
@@ -80,10 +85,9 @@ int ObStorageHAMacroBlockWriter::check_macro_block_(
STORAGE_LOG
(
WARN
,
"invalid check level"
,
K
(
ret
),
K
(
migrate_verify_level
));
break
;
}
//Here using logical has a bug.
check_level
=
ObMacroBlockCheckLevel
::
CHECK_LEVEL_PHYSICAL
;
if
(
OB_FAIL
(
macro_checker_
.
check
(
data
.
data
(),
data
.
length
(),
check_level
)))
{
if
(
OB_FAIL
(
ret
))
{
}
else
if
(
OB_FAIL
(
macro_checker_
.
check
(
data
.
data
(),
data
.
length
(),
check_level
)))
{
STORAGE_LOG
(
ERROR
,
"failed to check macro block"
,
K
(
ret
),
K
(
data
),
K
(
check_level
));
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录