Add new IOModule SSTABLE_MACRO_BLOCK_WRITE_IO

This commit is contained in:
Hooper9973 2023-11-13 04:09:19 +00:00 committed by ob-robot
parent 611580e753
commit 6eb611fab0
3 changed files with 6 additions and 1 deletions

View File

@ -121,6 +121,9 @@ const char *oceanbase::common::get_io_sys_group_name(ObIOModule module)
case ObIOModule::TMP_TENANT_MEM_BLOCK_IO:
ret_name = "TMP_TENANT_MEM_BLOCK_IO";
break;
case ObIOModule::SSTABLE_MACRO_BLOCK_WRITE_IO:
ret_name = "SSTABLE_MACRO_BLOCK_WRITE_IO";
break;
default:
break;
}

View File

@ -66,7 +66,8 @@ enum ObIOModule {
LINKED_MACRO_BLOCK_IO = 20017,
HA_MACRO_BLOCK_WRITER_IO = 20018,
TMP_TENANT_MEM_BLOCK_IO = 20019,
MAX_IO = 20020
SSTABLE_MACRO_BLOCK_WRITE_IO = 20020,
MAX_IO = 20021
};
const char *get_io_sys_group_name(ObIOModule module);

View File

@ -378,6 +378,7 @@ int ObMacroBlock::flush(ObMacroBlockHandle &macro_handle,
write_info.buffer_ = data_.data();
write_info.size_ = data_.upper_align_length();
write_info.io_desc_.set_wait_event(ObWaitEventIds::DB_FILE_COMPACT_WRITE);
write_info.io_desc_.set_group_id(ObIOModule::SSTABLE_MACRO_BLOCK_WRITE_IO);
write_info.io_timeout_ms_ = std::max(GCONF._data_storage_io_timeout / 1000, DEFAULT_IO_WAIT_TIME_MS);
if (OB_FAIL(macro_handle.async_write(write_info))) {
STORAGE_LOG(WARN, "Fail to async write block", K(ret), K(macro_handle), K(write_info));