提交 bda3d4e6 编写于 作者: T Tyshawn 提交者: wangzelin.wzl

[TMP.FILE] reduce tmp file print log

上级 cd2ffe63
......@@ -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;
......
......@@ -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));
}
}
......
......@@ -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.
先完成此消息的编辑!
想要评论请 注册