From b6065f23c99e2d46690fa81035946f48070be954 Mon Sep 17 00:00:00 2001 From: sharpeye Date: Wed, 25 Sep 2024 20:04:25 +0000 Subject: [PATCH] tweak --- cloud/blockstore/config/disk.proto | 4 ++-- cloud/blockstore/libs/daemon/common/bootstrap.cpp | 3 ++- cloud/blockstore/libs/daemon/ydb/bootstrap.cpp | 6 +++--- cloud/blockstore/libs/disk_agent/bootstrap.cpp | 6 +++--- .../libs/service_local/file_io_service_provider.cpp | 8 ++++---- .../libs/service_local/file_io_service_provider.h | 2 +- .../libs/service_local/file_io_service_provider_ut.cpp | 2 +- .../libs/service_local/storage_aio_ut_large.cpp | 2 +- cloud/blockstore/libs/storage/disk_agent/model/config.cpp | 2 +- cloud/blockstore/libs/storage/disk_agent/model/config.h | 2 +- .../libs/storage/disk_agent/testlib/test_env.cpp | 2 +- cloud/blockstore/tests/python/lib/config.py | 2 +- cloud/blockstore/tests/python/lib/nonreplicated_setup.py | 2 +- 13 files changed, 22 insertions(+), 21 deletions(-) diff --git a/cloud/blockstore/config/disk.proto b/cloud/blockstore/config/disk.proto index 1f6715aad3b..e6585e26984 100644 --- a/cloud/blockstore/config/disk.proto +++ b/cloud/blockstore/config/disk.proto @@ -252,12 +252,12 @@ message TDiskAgentConfig // Max. count of concurrently processing operations (io_setup). optional uint32 MaxAIOContextEvents = 33; - // Number of file paths per each IO service. + // Number of paths per each FileIOService. // 0 means that only one IO service will be created. // 1 means that one IO service per file path will be created. // 2 means that one IO service will be created for every two file paths. // etc. - optional uint32 FilePathsPerIOServiceCount = 34; + optional uint32 PathsPerFileIOService = 34; } //////////////////////////////////////////////////////////////////////////////// diff --git a/cloud/blockstore/libs/daemon/common/bootstrap.cpp b/cloud/blockstore/libs/daemon/common/bootstrap.cpp index b15364451d2..f8606b52aaa 100644 --- a/cloud/blockstore/libs/daemon/common/bootstrap.cpp +++ b/cloud/blockstore/libs/daemon/common/bootstrap.cpp @@ -741,7 +741,8 @@ void TBootstrapBase::InitLocalService() ? *Configs->ServerConfig->GetLocalServiceConfig() : NProto::TLocalServiceConfig(); - FileIOServiceProvider = CreateFileIOServiceProviderStub(CreateAIOService()); + FileIOServiceProvider = + CreateSingleFileIOServiceProvider(CreateAIOService()); NvmeManager = CreateNvmeManager( Configs->DiskAgentConfig->GetSecureEraseTimeout()); diff --git a/cloud/blockstore/libs/daemon/ydb/bootstrap.cpp b/cloud/blockstore/libs/daemon/ydb/bootstrap.cpp index a5113bafbc6..68ee6dda56e 100644 --- a/cloud/blockstore/libs/daemon/ydb/bootstrap.cpp +++ b/cloud/blockstore/libs/daemon/ydb/bootstrap.cpp @@ -447,11 +447,11 @@ void TBootstrapYdb::InitKikimrService() }; FileIOServiceProvider = - config.GetFilePathsPerIOServiceCount() + config.GetPathsPerFileIOService() ? CreateFileIOServiceProvider( - config.GetFilePathsPerIOServiceCount(), + config.GetPathsPerFileIOService(), factory) - : CreateFileIOServiceProviderStub(factory()); + : CreateSingleFileIOServiceProvider(factory()); AioStorageProvider = CreateAioStorageProvider( FileIOServiceProvider, diff --git a/cloud/blockstore/libs/disk_agent/bootstrap.cpp b/cloud/blockstore/libs/disk_agent/bootstrap.cpp index 2f997f79208..f704d0c4c99 100644 --- a/cloud/blockstore/libs/disk_agent/bootstrap.cpp +++ b/cloud/blockstore/libs/disk_agent/bootstrap.cpp @@ -439,11 +439,11 @@ bool TBootstrap::InitKikimrService() }; FileIOServiceProvider = - config.GetFilePathsPerIOServiceCount() + config.GetPathsPerFileIOService() ? CreateFileIOServiceProvider( - config.GetFilePathsPerIOServiceCount(), + config.GetPathsPerFileIOService(), factory) - : CreateFileIOServiceProviderStub(factory()); + : CreateSingleFileIOServiceProvider(factory()); AioStorageProvider = CreateAioStorageProvider( FileIOServiceProvider, diff --git a/cloud/blockstore/libs/service_local/file_io_service_provider.cpp b/cloud/blockstore/libs/service_local/file_io_service_provider.cpp index 3101d3c5ea7..9f681b49892 100644 --- a/cloud/blockstore/libs/service_local/file_io_service_provider.cpp +++ b/cloud/blockstore/libs/service_local/file_io_service_provider.cpp @@ -64,12 +64,12 @@ class TFileIOServiceProvider final //////////////////////////////////////////////////////////////////////////////// -struct TFileIOServiceProviderStub final +struct TSingleFileIOServiceProvider final : IFileIOServiceProvider { IFileIOServicePtr FileIO; - explicit TFileIOServiceProviderStub( + explicit TSingleFileIOServiceProvider( IFileIOServicePtr fileIO) : FileIO{std::move(fileIO)} {} @@ -96,10 +96,10 @@ struct TFileIOServiceProviderStub final //////////////////////////////////////////////////////////////////////////////// -IFileIOServiceProviderPtr CreateFileIOServiceProviderStub( +IFileIOServiceProviderPtr CreateSingleFileIOServiceProvider( IFileIOServicePtr fileIO) { - return std::make_shared(std::move(fileIO)); + return std::make_shared(std::move(fileIO)); } IFileIOServiceProviderPtr CreateFileIOServiceProvider( diff --git a/cloud/blockstore/libs/service_local/file_io_service_provider.h b/cloud/blockstore/libs/service_local/file_io_service_provider.h index e0feceeff6a..2f2f6c8f50c 100644 --- a/cloud/blockstore/libs/service_local/file_io_service_provider.h +++ b/cloud/blockstore/libs/service_local/file_io_service_provider.h @@ -21,7 +21,7 @@ struct IFileIOServiceProvider //////////////////////////////////////////////////////////////////////////////// -IFileIOServiceProviderPtr CreateFileIOServiceProviderStub( +IFileIOServiceProviderPtr CreateSingleFileIOServiceProvider( IFileIOServicePtr fileIO); IFileIOServiceProviderPtr CreateFileIOServiceProvider( diff --git a/cloud/blockstore/libs/service_local/file_io_service_provider_ut.cpp b/cloud/blockstore/libs/service_local/file_io_service_provider_ut.cpp index 28ee2f44789..691118820ef 100644 --- a/cloud/blockstore/libs/service_local/file_io_service_provider_ut.cpp +++ b/cloud/blockstore/libs/service_local/file_io_service_provider_ut.cpp @@ -98,7 +98,7 @@ Y_UNIT_TEST_SUITE(TFileIOServiceProviderTest) auto fileIO = std::make_shared(); UNIT_ASSERT_VALUES_EQUAL(0, fileIO->Started); - auto provider = CreateFileIOServiceProviderStub(fileIO); + auto provider = CreateSingleFileIOServiceProvider(fileIO); provider->Start(); UNIT_ASSERT_VALUES_EQUAL(1, fileIO->Started); diff --git a/cloud/blockstore/libs/service_local/storage_aio_ut_large.cpp b/cloud/blockstore/libs/service_local/storage_aio_ut_large.cpp index 8a58dcac169..5a8ad8000af 100644 --- a/cloud/blockstore/libs/service_local/storage_aio_ut_large.cpp +++ b/cloud/blockstore/libs/service_local/storage_aio_ut_large.cpp @@ -47,7 +47,7 @@ Y_UNIT_TEST_SUITE(TAioStorageTest) fileData.Resize(blockSize * totalBlockCount); auto fileIOServiceProvider = - CreateFileIOServiceProviderStub(CreateAIOService()); + CreateSingleFileIOServiceProvider(CreateAIOService()); fileIOServiceProvider->Start(); Y_DEFER { fileIOServiceProvider->Stop(); }; diff --git a/cloud/blockstore/libs/storage/disk_agent/model/config.cpp b/cloud/blockstore/libs/storage/disk_agent/model/config.cpp index 1f39783a11a..f69a214135f 100644 --- a/cloud/blockstore/libs/storage/disk_agent/model/config.cpp +++ b/cloud/blockstore/libs/storage/disk_agent/model/config.cpp @@ -43,7 +43,7 @@ namespace { xxx(OffloadAllIORequestsParsingEnabled, bool, false )\ xxx(DisableNodeBrokerRegisterationOnDevicelessAgent, bool, false )\ xxx(MaxAIOContextEvents, ui32, 1024 )\ - xxx(FilePathsPerIOServiceCount, ui32, 0 )\ + xxx(PathsPerFileIOService, ui32, 0 )\ // BLOCKSTORE_AGENT_CONFIG #define BLOCKSTORE_DECLARE_CONFIG(name, type, value) \ diff --git a/cloud/blockstore/libs/storage/disk_agent/model/config.h b/cloud/blockstore/libs/storage/disk_agent/model/config.h index 3158b7d0f3c..ccccb94219d 100644 --- a/cloud/blockstore/libs/storage/disk_agent/model/config.h +++ b/cloud/blockstore/libs/storage/disk_agent/model/config.h @@ -112,7 +112,7 @@ class TDiskAgentConfig bool GetOffloadAllIORequestsParsingEnabled() const; bool GetDisableNodeBrokerRegisterationOnDevicelessAgent() const; ui32 GetMaxAIOContextEvents() const; - ui32 GetFilePathsPerIOServiceCount() const; + ui32 GetPathsPerFileIOService() const; void Dump(IOutputStream& out) const; void DumpHtml(IOutputStream& out) const; diff --git a/cloud/blockstore/libs/storage/disk_agent/testlib/test_env.cpp b/cloud/blockstore/libs/storage/disk_agent/testlib/test_env.cpp index 82b58e1bc93..5d4b9e08e12 100644 --- a/cloud/blockstore/libs/storage/disk_agent/testlib/test_env.cpp +++ b/cloud/blockstore/libs/storage/disk_agent/testlib/test_env.cpp @@ -656,7 +656,7 @@ IStorageProviderPtr CreateTestStorageProvider( { return std::make_shared( NServer::CreateAioStorageProvider( - NServer::CreateFileIOServiceProviderStub(std::move(fileIO)), + NServer::CreateSingleFileIOServiceProvider(std::move(fileIO)), std::move(nvmeManager), false, // directIO NServer::EAioSubmitQueueOpt::DontUse diff --git a/cloud/blockstore/tests/python/lib/config.py b/cloud/blockstore/tests/python/lib/config.py index 1e36f4c55bd..8cbe85e925e 100644 --- a/cloud/blockstore/tests/python/lib/config.py +++ b/cloud/blockstore/tests/python/lib/config.py @@ -302,7 +302,7 @@ def generate_disk_agent_txt( config.ShutdownTimeout = 0 config.IOParserActorCount = 4 config.OffloadAllIORequestsParsingEnabled = True - config.FilePathsPerIOServiceCount = 1 + config.PathsPerFileIOService = 1 if device_erase_method is not None: config.DeviceEraseMethod = EDeviceEraseMethod.Value(device_erase_method) diff --git a/cloud/blockstore/tests/python/lib/nonreplicated_setup.py b/cloud/blockstore/tests/python/lib/nonreplicated_setup.py index afc1f333963..7378ad0a474 100644 --- a/cloud/blockstore/tests/python/lib/nonreplicated_setup.py +++ b/cloud/blockstore/tests/python/lib/nonreplicated_setup.py @@ -222,7 +222,7 @@ def setup_disk_agent_config( config.ShutdownTimeout = get_shutdown_agent_interval() config.IOParserActorCount = 4 config.OffloadAllIORequestsParsingEnabled = True - config.FilePathsPerIOServiceCount = 1 + config.PathsPerFileIOService = 1 if cached_sessions_path is not None: config.CachedSessionsPath = cached_sessions_path