Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Metz
oceanbase
提交
bda3d4e6
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,发现更多精彩内容 >>
提交
bda3d4e6
编写于
9月 24, 2021
作者:
T
Tyshawn
提交者:
wangzelin.wzl
9月 24, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TMP.FILE] reduce tmp file print log
上级
cd2ffe63
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
16 addition
and
3 deletion
+16
-3
src/storage/blocksstable/ob_tmp_file.cpp
src/storage/blocksstable/ob_tmp_file.cpp
+5
-0
src/storage/blocksstable/ob_tmp_file_cache.cpp
src/storage/blocksstable/ob_tmp_file_cache.cpp
+6
-2
src/storage/blocksstable/ob_tmp_file_store.cpp
src/storage/blocksstable/ob_tmp_file_store.cpp
+5
-1
未找到文件。
src/storage/blocksstable/ob_tmp_file.cpp
浏览文件 @
bda3d4e6
...
...
@@ -14,9 +14,12 @@
#include "ob_tmp_file_cache.h"
#include "observer/ob_server_struct.h"
#include "storage/ob_file_system_util.h"
#include "share/ob_task_define.h"
namespace
oceanbase
{
using
namespace
storage
;
using
namespace
share
;
namespace
blocksstable
{
ObTmpFileIOInfo
::
ObTmpFileIOInfo
()
:
fd_
(
0
),
dir_id_
(
0
),
size_
(
0
),
tenant_id_
(
OB_INVALID_ID
),
buf_
(
NULL
),
io_desc_
()
...
...
@@ -1023,6 +1026,7 @@ int ObTmpFileManager::open(int64_t& fd, int64_t& dir)
}
else
if
(
OB_FAIL
(
files_
.
set
(
fd
,
file
)))
{
STORAGE_LOG
(
WARN
,
"fail to set tmp file"
,
K
(
ret
));
}
else
{
ObTaskController
::
get
().
allow_next_syslog
();
STORAGE_LOG
(
INFO
,
"succeed to open a tmp file"
,
K
(
fd
),
K
(
dir
),
K
(
common
::
lbt
()));
}
return
ret
;
...
...
@@ -1209,6 +1213,7 @@ int ObTmpFileManager::remove(const int64_t fd)
}
else
if
(
OB_FAIL
(
files_
.
erase
(
fd
)))
{
STORAGE_LOG
(
WARN
,
"fail to erase from map"
,
K
(
ret
));
}
else
{
ObTaskController
::
get
().
allow_next_syslog
();
STORAGE_LOG
(
INFO
,
"succeed to remove a tmp file"
,
K
(
fd
),
K
(
common
::
lbt
()));
}
return
ret
;
...
...
src/storage/blocksstable/ob_tmp_file_cache.cpp
浏览文件 @
bda3d4e6
...
...
@@ -13,12 +13,15 @@
#include "observer/omt/ob_tenant_config_mgr.h"
#include "lib/stat/ob_diagnose_info.h"
#include "common/ob_smart_var.h"
#include "storage/ob_file_system_router.h"
#include "share/ob_task_define.h"
#include "ob_tmp_file_cache.h"
#include "ob_tmp_file.h"
#include "ob_tmp_file_store.h"
#include "ob_store_file.h"
using
namespace
oceanbase
::
storage
;
using
namespace
oceanbase
::
share
;
namespace
oceanbase
{
namespace
blocksstable
{
...
...
@@ -760,7 +763,7 @@ int ObTmpTenantMemBlockManager::alloc_extent(const int64_t dir_id, const uint64_
}
}
}
else
if
(
OB_FAIL
(
t_mblk_map_
.
get_refactored
(
block_id
,
t_mblk
)))
{
STORAGE_LOG
(
INFO
,
"the tmp macro block has been washed"
,
K
(
ret
),
K
(
block_id
));
STORAGE_LOG
(
DEBUG
,
"the tmp macro block has been washed"
,
K
(
ret
),
K
(
block_id
));
if
(
OB_FAIL
(
get_macro_block
(
dir_id
,
tenant_id
,
page_nums
,
t_mblk
,
free_blocks
)))
{
if
(
OB_ITER_END
!=
ret
)
{
STORAGE_LOG
(
WARN
,
"fail to get macro block"
,
K
(
ret
));
...
...
@@ -926,7 +929,7 @@ int ObTmpTenantMemBlockManager::refresh_dir_to_blk_map(const int64_t dir_id, con
if
(
OB_FAIL
(
t_mblk_map_
.
get_refactored
(
block_id
,
dir_mblk
)))
{
if
(
OB_HASH_NOT_EXIST
==
ret
)
{
ret
=
dir_to_blk_map_
.
set_refactored
(
dir_id
,
t_mblk
->
get_block_id
(),
1
);
STORAGE_LOG
(
INFO
,
"the tmp macro block has been removed or washed"
,
K
(
ret
),
K
(
block_id
));
STORAGE_LOG
(
DEBUG
,
"the tmp macro block has been removed or washed"
,
K
(
ret
),
K
(
block_id
));
}
else
{
STORAGE_LOG
(
WARN
,
"fail to get block"
,
K
(
ret
),
K
(
block_id
));
}
...
...
@@ -997,6 +1000,7 @@ int ObTmpTenantMemBlockManager::wash_with_no_wait(const uint64_t tenant_id, ObTm
if
(
OB_FAIL
(
t_mblk_map_
.
erase_refactored
(
wash_block
->
get_block_id
(),
&
wash_block
)))
{
STORAGE_LOG
(
WARN
,
"fail to erase t_mblk_map"
,
K
(
ret
));
}
else
{
ObTaskController
::
get
().
allow_next_syslog
();
STORAGE_LOG
(
INFO
,
"succeed to wash a block"
,
K
(
*
wash_block
));
}
}
...
...
src/storage/blocksstable/ob_tmp_file_store.cpp
浏览文件 @
bda3d4e6
...
...
@@ -12,6 +12,9 @@
#include "ob_tmp_file_store.h"
#include "ob_tmp_file.h"
#include "share/ob_task_define.h"
using
namespace
oceanbase
::
share
;
namespace
oceanbase
{
namespace
blocksstable
{
...
...
@@ -408,7 +411,7 @@ int ObTmpMacroBlock::get_block_cache_handle(ObTmpBlockValueHandle& handle)
}
else
if
(
OB_FAIL
(
ObTmpBlockCache
::
get_instance
().
get_block
(
key
,
handle
)))
{
if
(
OB_UNLIKELY
(
OB_ENTRY_NOT_EXIST
!=
ret
))
{
STORAGE_LOG
(
WARN
,
"fail to get tmp block from cache"
,
K
(
ret
),
K
(
key
));
}
else
{
}
else
if
(
REACH_COUNT_INTERVAL
(
100
))
{
// print one log per 100 times.
STORAGE_LOG
(
INFO
,
"block cache miss"
,
K
(
ret
),
K
(
key
));
}
}
...
...
@@ -942,6 +945,7 @@ int ObTmpTenantFileStore::free_macro_block(ObTmpMacroBlock*& t_mblk)
OB_FAIL
(
tmp_mem_block_manager_
.
wait_write_io_finish
()))
{
// in case of doing write io
STORAGE_LOG
(
WARN
,
"fail to wait write io finish"
,
K
(
ret
),
K
(
t_mblk
));
}
ObTaskController
::
get
().
allow_next_syslog
();
STORAGE_LOG
(
INFO
,
"finish to free a block"
,
K
(
ret
),
K
(
*
t_mblk
));
t_mblk
->~
ObTmpMacroBlock
();
allocator_
.
free
(
t_mblk
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录