Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Metz
oceanbase
提交
acef9d21
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,发现更多精彩内容 >>
提交
acef9d21
编写于
7月 27, 2021
作者:
Z
zh0
提交者:
wangzelin.wzl
7月 27, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix sys tenant no fast freeze bug
上级
a0978c20
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
18 addition
and
6 deletion
+18
-6
src/storage/memtable/mvcc/ob_mvcc_trans_ctx.cpp
src/storage/memtable/mvcc/ob_mvcc_trans_ctx.cpp
+4
-0
src/storage/memtable/ob_memtable.h
src/storage/memtable/ob_memtable.h
+1
-1
src/storage/ob_partition_scheduler.cpp
src/storage/ob_partition_scheduler.cpp
+5
-4
src/storage/ob_pg_storage.cpp
src/storage/ob_pg_storage.cpp
+8
-1
未找到文件。
src/storage/memtable/mvcc/ob_mvcc_trans_ctx.cpp
浏览文件 @
acef9d21
...
...
@@ -1141,6 +1141,10 @@ int ObMvccRowCallback::trans_commit(const bool for_replay)
if
(
value_
.
total_trans_node_cnt_
>=
MAX_TRANS_NODE_CNT
)
{
ctx_
.
set_contain_hotspot_row
();
}
//print debug log when total trans node cnt great to 200 * 10000;
if
(
value_
.
total_trans_node_cnt_
>
2000000
&&
REACH_TIME_INTERVAL
(
120
*
1000
*
1000
))
{
TRANS_LOG
(
INFO
,
"[FF] trans commit succ"
,
K_
(
ctx
),
K_
(
value
));
}
(
void
)
ATOMIC_FAA
(
&
value_
.
update_since_compact_
,
1
);
if
(
value_
.
need_compact
(
for_read
,
for_replay
))
{
if
(
for_replay
)
{
...
...
src/storage/memtable/ob_memtable.h
浏览文件 @
acef9d21
...
...
@@ -362,7 +362,7 @@ public:
INHERIT_TO_STRING_KV
(
"ObITable"
,
ObITable
,
KP
(
this
),
K_
(
timestamp
),
K_
(
active_trx_count
),
K_
(
state
),
K_
(
max_schema_version
),
K_
(
write_ref_cnt
),
K_
(
local_allocator
),
K_
(
with_accurate_log_ts_range
),
K_
(
frozen
),
K_
(
frozen_log_applied
),
K_
(
mark_finish
),
K_
(
pending_cb_cnt
),
K_
(
pending_lob_cnt
),
K_
(
pending_batch_commit_cnt
),
K_
(
pending_elr_cnt
));
K_
(
pending_elr_cnt
)
,
K_
(
contain_hotspot_row
)
);
private:
static
const
int64_t
OB_EMPTY_MEMSTORE_MAX_SIZE
=
10L
<<
20
;
// 10MB
...
...
src/storage/ob_partition_scheduler.cpp
浏览文件 @
acef9d21
...
...
@@ -1204,8 +1204,10 @@ int ObPartitionScheduler::schedule_pg(
if
(
OB_ENTRY_NOT_EXIST
!=
tmp_ret
)
{
LOG_WARN
(
"Failed to check need fast freeze for hotspot table"
,
K
(
tmp_ret
),
K
(
pg_key
));
}
}
else
if
(
!
need_fast_freeze
)
{
}
// ignore tmp_ret
if
(
!
need_fast_freeze
)
{
// do nothing
}
else
if
(
OB_SUCCESS
!=
(
tmp_ret
=
partition_service_
->
minor_freeze
(
pg_key
)))
{
LOG_WARN
(
"Failed to schedule fast freeze"
,
K
(
tmp_ret
),
K
(
pg_key
));
}
else
{
...
...
@@ -2510,8 +2512,7 @@ ObFastFreezeChecker::ObFastFreezeChecker(const int64_t tenant_id)
reset
();
if
(
OB_UNLIKELY
(
tenant_id
==
OB_INVALID_TENANT_ID
))
{
LOG_WARN
(
"Invalid tenant id to init fast freeze checker"
,
K
(
tenant_id
));
}
else
if
(
OB_SYS_TENANT_ID
!=
tenant_id
)
{
// fast freeze only trigger for user tenant
}
else
{
tenant_id_
=
tenant_id
;
omt
::
ObTenantConfigGuard
tenant_config
(
TENANT_CONF
(
tenant_id_
));
if
(
tenant_config
.
is_valid
())
{
...
...
src/storage/ob_pg_storage.cpp
浏览文件 @
acef9d21
...
...
@@ -1901,7 +1901,11 @@ int ObPGStorage::check_active_mt_hotspot_row_exist(bool& has_hotspot_row, const
}
else
if
(
OB_FAIL
(
get_all_pg_partition_keys_
(
pkeys
)))
{
STORAGE_LOG
(
WARN
,
"get all pg partition keys error"
,
K
(
ret
),
K
(
pkey_
),
K
(
pkeys
));
}
else
if
(
pkeys
.
count
()
<=
0
||
ObTimeUtility
::
current_time
()
<
last_freeze_ts_
+
fast_freeze_interval
)
{
// do nothing
if
(
REACH_TIME_INTERVAL
(
120
*
1000
*
1000
))
{
TRANS_LOG
(
INFO
,
"[FF] no need to check active hotspot row"
,
K_
(
pkey
),
K_
(
last_freeze_ts
),
K
(
fast_freeze_interval
));
}
}
else
{
ObTableHandle
handle
;
memtable
::
ObMemtable
*
memtable
=
NULL
;
...
...
@@ -1918,6 +1922,9 @@ int ObPGStorage::check_active_mt_hotspot_row_exist(bool& has_hotspot_row, const
STORAGE_LOG
(
ERROR
,
" memtable is NULL"
,
K
(
ret
),
K
(
pkey_
));
}
else
{
has_hotspot_row
=
memtable
->
has_hotspot_row
();
if
(
has_hotspot_row
&&
REACH_TIME_INTERVAL
(
120
*
1000
*
1000
))
{
TRANS_LOG
(
INFO
,
"[FF] current memtable has hotspot row"
,
K
(
pkey_
),
K
(
*
memtable
),
K
(
fast_freeze_interval
));
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录