Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
大炮V587
oceanbase
提交
cf9f170b
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,发现更多精彩内容 >>
提交
cf9f170b
编写于
3月 14, 2023
作者:
O
obdev
提交者:
ob-robot
3月 14, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
set allocator frozen
上级
1c41b3c1
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
18 addition
and
7 deletion
+18
-7
src/storage/memtable/ob_memtable.cpp
src/storage/memtable/ob_memtable.cpp
+5
-1
src/storage/memtable/ob_memtable.h
src/storage/memtable/ob_memtable.h
+1
-1
src/storage/ob_i_memtable_mgr.cpp
src/storage/ob_i_memtable_mgr.cpp
+1
-1
src/storage/tablet/ob_tablet_memtable_mgr.cpp
src/storage/tablet/ob_tablet_memtable_mgr.cpp
+11
-4
未找到文件。
src/storage/memtable/ob_memtable.cpp
浏览文件 @
cf9f170b
...
...
@@ -218,11 +218,15 @@ void ObMemtable::destroy()
ObTimeGuard
time_guard
(
"ObMemtable::destroy()"
,
100
*
1000
);
int
ret
=
OB_SUCCESS
;
if
(
is_inited_
)
{
const
common
::
ObTabletID
tablet_id
=
key_
.
tablet_id_
;
const
int64_t
cost_time
=
ObTimeUtility
::
current_time
()
-
mt_stat_
.
release_time_
;
if
(
cost_time
>
1
*
1000
*
1000
)
{
STORAGE_LOG
(
WARN
,
"it costs too much time from release to destroy"
,
K
(
cost_time
),
K
(
tablet_id
),
KP
(
this
));
}
STORAGE_LOG
(
INFO
,
"memtable destroyed"
,
K
(
*
this
));
time_guard
.
click
();
ObMemtableStat
::
get_instance
().
unregister_memtable
(
this
);
time_guard
.
click
();
const
common
::
ObTabletID
tablet_id
=
key_
.
tablet_id_
;
ObTenantFreezer
*
freezer
=
nullptr
;
freezer
=
MTL
(
ObTenantFreezer
*
);
if
(
OB_SUCCESS
!=
freezer
->
unset_tenant_slow_freeze
(
tablet_id
))
{
...
...
src/storage/memtable/ob_memtable.h
浏览文件 @
cf9f170b
...
...
@@ -466,7 +466,7 @@ public:
bool
&
is_all_delay_cleanout
,
int64_t
&
count
);
int
dump2text
(
const
char
*
fname
);
INHERIT_TO_STRING_KV
(
"ObITable"
,
ObITable
,
KP
(
this
),
K_
(
timestamp
),
K_
(
state
),
INHERIT_TO_STRING_KV
(
"ObITable"
,
ObITable
,
KP
(
this
),
K
P_
(
memtable_mgr
),
K
_
(
timestamp
),
K_
(
state
),
K_
(
freeze_clock
),
K_
(
max_schema_version
),
K_
(
write_ref_cnt
),
K_
(
local_allocator
),
K_
(
unsubmitted_cnt
),
K_
(
unsynced_cnt
),
K_
(
logging_blocked
),
K_
(
unset_active_memtable_logging_blocked
),
K_
(
resolve_active_memtable_left_boundary
),
...
...
src/storage/ob_i_memtable_mgr.cpp
浏览文件 @
cf9f170b
...
...
@@ -349,7 +349,7 @@ int ObIMemtableMgr::add_memtable_(ObTableHandleV2 &memtable_handle)
memtable_tail_
++
;
ObTaskController
::
get
().
allow_next_syslog
();
// FIXME : delete lbt()
STORAGE_LOG
(
INFO
,
"succeed to add memtable"
,
K
(
get_memtable_count_
()),
STORAGE_LOG
(
INFO
,
"succeed to add memtable"
,
K
P
(
this
),
K
(
get_memtable_count_
()),
K
(
memtable_handle
),
K
(
lbt
()));
}
}
...
...
src/storage/tablet/ob_tablet_memtable_mgr.cpp
浏览文件 @
cf9f170b
...
...
@@ -64,6 +64,7 @@ void ObTabletMemtableMgr::destroy()
}
else
if
(
imemtable
->
is_data_memtable
())
{
memtable
::
ObMemtable
*
memtable
=
static_cast
<
memtable
::
ObMemtable
*>
(
imemtable
);
memtable
->
remove_from_data_checkpoint
();
memtable
->
set_frozen
();
}
}
reset_tables
();
...
...
@@ -644,9 +645,7 @@ int ObTabletMemtableMgr::release_head_memtable_(memtable::ObIMemtable *imemtable
memtable
->
remove_from_data_checkpoint
();
memtable
->
set_is_flushed
();
memtable
->
set_freeze_state
(
ObMemtableFreezeState
::
RELEASED
);
if
(
force
)
{
memtable
->
set_frozen
();
}
memtable
->
set_frozen
();
release_head_memtable
();
FLOG_INFO
(
"succeed to release head data memtable"
,
K
(
ret
),
K
(
ls_id
),
K
(
tablet_id_
));
}
...
...
@@ -754,7 +753,15 @@ int64_t ObTabletMemtableMgr::get_unmerged_memtable_count_() const
void
ObTabletMemtableMgr
::
clean_tail_memtable_
()
{
ObIMemtableMgr
::
release_tail_memtable
();
if
(
memtable_tail_
>
memtable_head_
)
{
ObMemtable
*
memtable
=
get_memtable_
(
memtable_tail_
-
1
);
if
(
OB_NOT_NULL
(
memtable
))
{
memtable
->
set_frozen
();
}
else
{
LOG_WARN_RET
(
OB_ERR_UNEXPECTED
,
"memtable is null when clean_tail_memtable_"
,
KPC
(
this
));
}
ObIMemtableMgr
::
release_tail_memtable
();
}
}
int
ObTabletMemtableMgr
::
get_memtables_
(
ObTableHdlArray
&
handle
,
const
int64_t
start_point
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录