Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
大炮V587
oceanbase
提交
2f701118
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 搜索 >>
提交
2f701118
编写于
3月 20, 2023
作者:
T
Tyshawn
提交者:
ob-robot
3月 21, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[BUG.FIX] Bad block inspection skips temporary file macro blocks
上级
3b4d188e
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
11 addition
and
4 deletion
+11
-4
src/storage/blocksstable/ob_block_manager.cpp
src/storage/blocksstable/ob_block_manager.cpp
+2
-2
src/storage/blocksstable/ob_block_manager.h
src/storage/blocksstable/ob_block_manager.h
+3
-1
src/storage/blocksstable/ob_tmp_file_cache.cpp
src/storage/blocksstable/ob_tmp_file_cache.cpp
+3
-0
src/storage/meta_mem/ob_meta_obj_struct.h
src/storage/meta_mem/ob_meta_obj_struct.h
+1
-1
src/storage/meta_mem/ob_tenant_meta_mem_mgr.cpp
src/storage/meta_mem/ob_tenant_meta_mem_mgr.cpp
+2
-0
未找到文件。
src/storage/blocksstable/ob_block_manager.cpp
浏览文件 @
2f701118
...
...
@@ -775,7 +775,7 @@ int ObBlockManager::dec_disk_ref(const MacroBlockId ¯o_id)
return
ret
;
}
int
ObBlockManager
::
update_write_time
(
const
MacroBlockId
&
macro_id
)
int
ObBlockManager
::
update_write_time
(
const
MacroBlockId
&
macro_id
,
const
bool
update_to_max_time
)
{
int
ret
=
OB_SUCCESS
;
BlockInfo
block_info
;
...
...
@@ -790,7 +790,7 @@ int ObBlockManager::update_write_time(const MacroBlockId ¯o_id)
if
(
OB_FAIL
(
block_map_
.
get
(
macro_id
,
block_info
)))
{
LOG_WARN
(
"get block_info fail"
,
K
(
ret
),
K
(
macro_id
));
}
else
{
block_info
.
last_write_time_
=
ObTimeUtility
::
fast_current_time
();
block_info
.
last_write_time_
=
update_to_max_time
?
INT64_MAX
:
ObTimeUtility
::
fast_current_time
();
if
(
OB_FAIL
(
block_map_
.
insert_or_update
(
macro_id
,
block_info
)))
{
LOG_WARN
(
"update block info fail"
,
K
(
ret
),
K
(
macro_id
),
K
(
block_info
));
}
...
...
src/storage/blocksstable/ob_block_manager.h
浏览文件 @
2f701118
...
...
@@ -215,7 +215,9 @@ public:
int
dec_ref
(
const
MacroBlockId
&
macro_id
);
int
inc_disk_ref
(
const
MacroBlockId
&
macro_id
);
int
dec_disk_ref
(
const
MacroBlockId
&
macro_id
);
int
update_write_time
(
const
MacroBlockId
&
macro_id
);
// If update_to_max_time is true, it means modify the last_write_time_ of the block to max,
// which is used to skip the bad block inspection.
int
update_write_time
(
const
MacroBlockId
&
macro_id
,
const
bool
update_to_max_time
=
false
);
// mark and sweep
int
get_marker_status
(
ObMacroBlockMarkerStatus
&
status
);
...
...
src/storage/blocksstable/ob_tmp_file_cache.cpp
浏览文件 @
2f701118
...
...
@@ -1211,6 +1211,9 @@ int ObTmpTenantMemBlockManager::write_io(
STORAGE_LOG
(
WARN
,
"Fail to async write block"
,
K
(
ret
),
K
(
write_info
),
K
(
handle
));
}
else
if
(
OB_FAIL
(
block_write_ctx_
.
add_macro_block_id
(
handle
.
get_macro_id
())))
{
STORAGE_LOG
(
WARN
,
"fail to add macro id"
,
K
(
ret
),
"macro id"
,
handle
.
get_macro_id
());
}
else
if
(
OB_FAIL
(
OB_SERVER_BLOCK_MGR
.
update_write_time
(
handle
.
get_macro_id
(),
true
/*update_to_max_time*/
)))
{
//just to skip bad block inspect
STORAGE_LOG
(
WARN
,
"fail to update macro id write time"
,
K
(
ret
),
"macro id"
,
handle
.
get_macro_id
());
}
}
return
ret
;
...
...
src/storage/meta_mem/ob_meta_obj_struct.h
浏览文件 @
2f701118
...
...
@@ -305,7 +305,7 @@ void ObMetaObjGuard<T>::reset_obj()
if
(
OB_UNLIKELY
(
hold_time
>
HOLD_OBJ_MAX_TIME
&&
need_hold_time_check
()))
{
int
ret
=
OB_ERR_TOO_MUCH_TIME
;
STORAGE_LOG
(
WARN
,
"The meta obj reference count was held for more "
"than two hours "
,
K
(
ref_cnt
),
KP
(
this
),
K
(
hold_time
),
K
(
hold_start_time_
),
KPC
(
this
));
"than two hours "
,
K
(
ref_cnt
),
KP
(
this
),
K
(
hold_time
),
K
(
hold_start_time_
),
KPC
(
this
)
,
K
(
common
::
lbt
())
);
}
if
(
0
==
ref_cnt
)
{
if
(
nullptr
!=
obj_pool_
)
{
...
...
src/storage/meta_mem/ob_tenant_meta_mem_mgr.cpp
浏览文件 @
2f701118
...
...
@@ -1871,6 +1871,8 @@ int ObTenantTabletPtrWithInMemObjIterator::get_next_tablet_pointer(
if
(
OB_ENTRY_NOT_EXIST
!=
ret
){
LOG_WARN
(
"fail to get in memory tablet handle"
,
K
(
ret
),
K
(
key
));
}
}
else
if
(
success
)
{
in_memory_tablet_handle
.
set_wash_priority
(
WashTabletPriority
::
WTP_LOW
);
}
if
(
OB_SUCC
(
ret
)
||
ignore_err_code
(
ret
))
{
++
idx_
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录