From 55611d58ccc36059ecd1ccc41709b06835e1053c Mon Sep 17 00:00:00 2001 From: gaishun Date: Wed, 10 Jul 2024 10:03:23 +0000 Subject: [PATCH] update time_out configuration --- src/storage/blocksstable/ob_shared_macro_block_manager.cpp | 1 + src/storage/blockstore/ob_shared_block_reader_writer.cpp | 3 +++ src/storage/slog_ckpt/ob_tenant_checkpoint_slog_handler.cpp | 1 + src/storage/slog_ckpt/ob_tenant_storage_checkpoint_writer.cpp | 1 + src/storage/tablet/ob_tablet_obj_load_helper.cpp | 1 + src/storage/tablet/ob_tablet_persister.cpp | 1 + 6 files changed, 8 insertions(+) diff --git a/src/storage/blocksstable/ob_shared_macro_block_manager.cpp b/src/storage/blocksstable/ob_shared_macro_block_manager.cpp index c9aeb930d..b84c8fc4c 100644 --- a/src/storage/blocksstable/ob_shared_macro_block_manager.cpp +++ b/src/storage/blocksstable/ob_shared_macro_block_manager.cpp @@ -199,6 +199,7 @@ int ObSharedMacroBlockMgr::write_block( write_info.buffer_ = buf; write_info.io_desc_.set_wait_event(ObWaitEventIds::DB_FILE_COMPACT_WRITE); write_info.size_ = size; + write_info.io_timeout_ms_ = GCONF._data_storage_io_timeout / 1000; lib::ObMutexGuard guard(mutex_); if (size >= SMALL_SSTABLE_STHRESHOLD_SIZE) { diff --git a/src/storage/blockstore/ob_shared_block_reader_writer.cpp b/src/storage/blockstore/ob_shared_block_reader_writer.cpp index ce338299d..49b390a4a 100644 --- a/src/storage/blockstore/ob_shared_block_reader_writer.cpp +++ b/src/storage/blockstore/ob_shared_block_reader_writer.cpp @@ -543,6 +543,7 @@ int ObSharedBlockLinkIter::read_next_block(ObSharedBlockReadHandle &block_handle ObSharedBlockReadInfo read_info; read_info.addr_ = cur_; read_info.io_desc_.set_wait_event(ObWaitEventIds::DB_FILE_DATA_READ); + read_info.io_timeout_ms_ = GCONF._data_storage_io_timeout / 1000; if (OB_FAIL(ObSharedBlockReaderWriter::async_read(read_info, block_handle))) { LOG_WARN("Fail to read block", K(ret), K(read_info)); } else if (OB_FAIL(block_handle.wait())) { @@ -810,6 +811,7 @@ int ObSharedBlockReaderWriter::switch_block(ObMacroBlockHandle ¯o_handle) macro_info.offset_ = align_offset_; macro_info.size_ = upper_align(offset_ - align_offset_, write_align_size_); macro_info.io_desc_.set_wait_event(ObWaitEventIds::DB_FILE_COMPACT_WRITE); + macro_info.io_timeout_ms_ = GCONF._data_storage_io_timeout / 1000; // io_callback // do not use macro_handle_ to write, since it will be reset if failed macro_handle = macro_handle_; @@ -901,6 +903,7 @@ int ObSharedBlockReaderWriter::inner_write_block( macro_info.io_desc_.set_wait_event(ObWaitEventIds::DB_FILE_COMPACT_WRITE); macro_info.io_desc_.set_resource_group_id(THIS_WORKER.get_group_id()); macro_info.io_desc_.set_sys_module_id(ObIOModule::SHARED_BLOCK_RW_IO); + macro_info.io_timeout_ms_ = GCONF._data_storage_io_timeout / 1000; // io_callback if (OB_FAIL(addr.set_block_addr(macro_handle_.get_macro_id(), offset_, diff --git a/src/storage/slog_ckpt/ob_tenant_checkpoint_slog_handler.cpp b/src/storage/slog_ckpt/ob_tenant_checkpoint_slog_handler.cpp index f4c092c91..e833c0ede 100644 --- a/src/storage/slog_ckpt/ob_tenant_checkpoint_slog_handler.cpp +++ b/src/storage/slog_ckpt/ob_tenant_checkpoint_slog_handler.cpp @@ -607,6 +607,7 @@ int ObTenantCheckpointSlogHandler::read_from_share_blk( ObSharedBlockReadHandle read_handle(allocator); ObSharedBlockReadInfo read_info; read_info.io_desc_.set_wait_event(ObWaitEventIds::DB_FILE_DATA_READ); + read_info.io_timeout_ms_ = GCONF._data_storage_io_timeout / 1000; read_info.addr_ = addr; if (OB_FAIL(ObSharedBlockReaderWriter::async_read(read_info, read_handle))) { LOG_WARN("fail to read tablet from macro block", K(ret), K(read_info)); diff --git a/src/storage/slog_ckpt/ob_tenant_storage_checkpoint_writer.cpp b/src/storage/slog_ckpt/ob_tenant_storage_checkpoint_writer.cpp index 7706c8411..aac0b0ec3 100644 --- a/src/storage/slog_ckpt/ob_tenant_storage_checkpoint_writer.cpp +++ b/src/storage/slog_ckpt/ob_tenant_storage_checkpoint_writer.cpp @@ -698,6 +698,7 @@ int ObTenantStorageCheckpointWriter::get_tablet_with_addr( int64_t buf_len; char *buf = nullptr; read_info.addr_ = addr_info.new_addr_; + read_info.io_timeout_ms_ = GCONF._data_storage_io_timeout / 1000; ObTabletPoolType tablet_pool_type = addr_info.tablet_pool_type_; // only need load first-level meta if (addr_info.new_addr_.is_raw_block()) { diff --git a/src/storage/tablet/ob_tablet_obj_load_helper.cpp b/src/storage/tablet/ob_tablet_obj_load_helper.cpp index 5a5e10a74..ae4fa6387 100644 --- a/src/storage/tablet/ob_tablet_obj_load_helper.cpp +++ b/src/storage/tablet/ob_tablet_obj_load_helper.cpp @@ -41,6 +41,7 @@ int ObTabletObjLoadHelper::read_from_addr( read_info.addr_ = meta_addr; read_info.io_desc_.set_mode(ObIOMode::READ); read_info.io_desc_.set_wait_event(ObWaitEventIds::DB_FILE_DATA_READ); + read_info.io_timeout_ms_ = GCONF._data_storage_io_timeout / 1000; ObSharedBlockReadHandle io_handle(allocator); if (OB_FAIL(ObSharedBlockReaderWriter::async_read(read_info, io_handle))) { diff --git a/src/storage/tablet/ob_tablet_persister.cpp b/src/storage/tablet/ob_tablet_persister.cpp index b4b54b2fe..a32175f2c 100644 --- a/src/storage/tablet/ob_tablet_persister.cpp +++ b/src/storage/tablet/ob_tablet_persister.cpp @@ -1450,6 +1450,7 @@ int ObTabletPersister::load_table_store( read_info.addr_ = addr; read_info.io_desc_.set_mode(ObIOMode::READ); read_info.io_desc_.set_wait_event(ObWaitEventIds::DB_FILE_DATA_READ); + read_info.io_timeout_ms_ = GCONF._data_storage_io_timeout / 1000; if (OB_FAIL(multi_stats_.acquire_stats("load_table_store", time_stats))) { LOG_WARN("fail to acquire stats", K(ret)); } else if (OB_FAIL(ObSharedBlockReaderWriter::async_read(read_info, io_handle))) {