Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
oceanbase
oceanbase
提交
fd321258
O
oceanbase
项目概览
oceanbase
/
oceanbase
8 个月 前同步成功
通知
260
Star
6084
Fork
1301
代码
文件
提交
分支
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 搜索 >>
提交
fd321258
编写于
4月 22, 2024
作者:
K
KyrielightWei
提交者:
ob-robot
4月 22, 2024
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CP] destroy a successfully constructed dup ls member
上级
7f07d633
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
38 addition
and
20 deletion
+38
-20
src/storage/tx/ob_dup_table_base.h
src/storage/tx/ob_dup_table_base.h
+1
-0
src/storage/tx/ob_dup_table_lease.h
src/storage/tx/ob_dup_table_lease.h
+1
-0
src/storage/tx/ob_dup_table_tablets.h
src/storage/tx/ob_dup_table_tablets.h
+1
-0
src/storage/tx/ob_dup_table_ts_sync.h
src/storage/tx/ob_dup_table_ts_sync.h
+1
-0
src/storage/tx/ob_dup_table_util.cpp
src/storage/tx/ob_dup_table_util.cpp
+33
-20
src/storage/tx/ob_dup_table_util.h
src/storage/tx/ob_dup_table_util.h
+1
-0
未找到文件。
src/storage/tx/ob_dup_table_base.h
浏览文件 @
fd321258
...
...
@@ -998,6 +998,7 @@ public:
{
reset
();
}
~
ObDupTableLogOperator
()
{
reset
();
}
void
reuse
();
void
reset
();
...
...
src/storage/tx/ob_dup_table_lease.h
浏览文件 @
fd321258
...
...
@@ -46,6 +46,7 @@ public:
public:
ObDupTableLSLeaseMgr
()
:
lease_diag_info_log_buf_
(
nullptr
)
{
reset
();
}
~
ObDupTableLSLeaseMgr
()
{
destroy
();
}
int
init
(
ObDupTableLSHandler
*
dup_ls_handle
);
int
offline
();
...
...
src/storage/tx/ob_dup_table_tablets.h
浏览文件 @
fd321258
...
...
@@ -605,6 +605,7 @@ public:
{
reset
();
}
~
ObLSDupTabletsMgr
()
{
destroy
();
}
int
init
(
ObDupTableLSHandler
*
dup_ls_handle
);
void
destroy
();
void
reset
();
...
...
src/storage/tx/ob_dup_table_ts_sync.h
浏览文件 @
fd321258
...
...
@@ -60,6 +60,7 @@ public:
const
int64_t
TS_INFO_CACHE_REFRESH_INTERVAL
=
1
*
1000
*
1000
;
// 1s
public:
ObDupTableLSTsSyncMgr
()
:
ts_sync_diag_info_log_buf_
(
nullptr
)
{}
~
ObDupTableLSTsSyncMgr
()
{
destroy
();
}
int
init
(
ObDupTableLSHandler
*
dup_ls_handle
);
int
offline
();
...
...
src/storage/tx/ob_dup_table_util.cpp
浏览文件 @
fd321258
...
...
@@ -308,6 +308,7 @@ int ObDupTabletScanTask::execute_for_dup_ls_()
int
ObDupTableLSHandler
::
init
(
bool
is_dup_table
)
{
int
ret
=
OB_SUCCESS
;
bool
is_constructed_
=
false
;
if
(
is_dup_table
)
{
if
(
is_inited
())
{
ret
=
OB_INIT_TWICE
;
...
...
@@ -338,6 +339,7 @@ int ObDupTableLSHandler::init(bool is_dup_table)
new
(
tmp_log_operator
)
ObDupTableLogOperator
(
ls_id_
,
log_handler_
,
&
dup_ls_ckpt_
,
tmp_lease_mgr_ptr
,
tmp_tablets_mgr_ptr
,
&
interface_stat_
);
is_constructed_
=
true
;
if
(
OB_FAIL
(
tmp_lease_mgr_ptr
->
init
(
this
)))
{
DUP_TABLE_LOG
(
WARN
,
"init lease_mgr failed"
,
K
(
ret
));
...
...
@@ -365,19 +367,27 @@ int ObDupTableLSHandler::init(bool is_dup_table)
tablets_mgr_ptr_
=
nullptr
;
log_operator_
=
nullptr
;
if
(
OB_NOT_NULL
(
tmp_lease_mgr_ptr
))
{
tmp_lease_mgr_ptr
->
destroy
();
if
(
is_constructed_
)
{
tmp_lease_mgr_ptr
->~
ObDupTableLSLeaseMgr
();
}
ob_free
(
tmp_lease_mgr_ptr
);
}
if
(
OB_NOT_NULL
(
tmp_ts_sync_mgr_ptr
))
{
tmp_ts_sync_mgr_ptr
->
destroy
();
if
(
is_constructed_
)
{
tmp_ts_sync_mgr_ptr
->~
ObDupTableLSTsSyncMgr
();
}
ob_free
(
tmp_ts_sync_mgr_ptr
);
}
if
(
OB_NOT_NULL
(
tmp_tablets_mgr_ptr
))
{
tmp_tablets_mgr_ptr
->
destroy
();
if
(
is_constructed_
)
{
tmp_tablets_mgr_ptr
->~
ObLSDupTabletsMgr
();
}
ob_free
(
tmp_tablets_mgr_ptr
);
}
if
(
OB_NOT_NULL
(
tmp_log_operator
))
{
tmp_log_operator
->
reset
();
if
(
is_constructed_
)
{
tmp_log_operator
->~
ObDupTableLogOperator
();
}
ob_free
(
tmp_log_operator
);
}
}
...
...
@@ -520,28 +530,31 @@ void ObDupTableLSHandler::reset()
{
// ATOMIC_STORE(&is_inited_, false);
SpinWLockGuard
w_init_guard
(
init_rw_lock_
);
is_inited_
=
false
;
ls_state_helper_
.
reset
();
dup_ls_ckpt_
.
reset
();
if
(
OB_NOT_NULL
(
lease_mgr_ptr_
))
{
lease_mgr_ptr_
->
destroy
();
ob_free
(
lease_mgr_ptr_
);
}
if
(
OB_NOT_NULL
(
ts_sync_mgr_ptr_
))
{
ts_sync_mgr_ptr_
->
destroy
();
ob_free
(
ts_sync_mgr_ptr_
);
}
if
(
OB_NOT_NULL
(
tablets_mgr_ptr_
))
{
tablets_mgr_ptr_
->
destroy
();
ob_free
(
tablets_mgr_ptr_
);
}
if
(
OB_NOT_NULL
(
log_operator_
))
{
log_operator_
->
reset
();
share
::
mtl_free
(
log_operator_
);
if
(
is_inited_
)
{
if
(
OB_NOT_NULL
(
lease_mgr_ptr_
))
{
lease_mgr_ptr_
->~
ObDupTableLSLeaseMgr
();
ob_free
(
lease_mgr_ptr_
);
}
if
(
OB_NOT_NULL
(
ts_sync_mgr_ptr_
))
{
ts_sync_mgr_ptr_
->~
ObDupTableLSTsSyncMgr
();
ob_free
(
ts_sync_mgr_ptr_
);
}
if
(
OB_NOT_NULL
(
tablets_mgr_ptr_
))
{
tablets_mgr_ptr_
->~
ObLSDupTabletsMgr
();
ob_free
(
tablets_mgr_ptr_
);
}
if
(
OB_NOT_NULL
(
log_operator_
))
{
log_operator_
->~
ObDupTableLogOperator
();
share
::
mtl_free
(
log_operator_
);
}
}
is_inited_
=
false
;
lease_mgr_ptr_
=
nullptr
;
ts_sync_mgr_ptr_
=
nullptr
;
tablets_mgr_ptr_
=
nullptr
;
...
...
src/storage/tx/ob_dup_table_util.h
浏览文件 @
fd321258
...
...
@@ -127,6 +127,7 @@ public:
{
reset
();
}
~
ObDupTableLSHandler
()
{
destroy
();
}
// init by ObDupTabletScanTask or replay
int
init
(
bool
is_dup_table
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录