From 1e209fb68617060db5d3ad1f27492139bba84696 Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Fri, 28 Aug 2026 05:34:08 +0000 Subject: [PATCH 1/6] feat: consume brpc Redis maxclients support --- core/src/data_substrate.cpp | 10 ---------- docs/01-architecture-overview.md | 1 + third_party/src/brpc | 2 +- tx_service/include/tx_service.h | 5 +++++ 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/core/src/data_substrate.cpp b/core/src/data_substrate.cpp index 80d5d004..cb66253e 100644 --- a/core/src/data_substrate.cpp +++ b/core/src/data_substrate.cpp @@ -21,7 +21,6 @@ */ #include -#include #include #include @@ -667,15 +666,6 @@ bool DataSubstrate::LoadCoreAndNetworkConfig(const INIReader &config_reader) !CheckCommandLineFlagIsDefault("maxclients") ? FLAGS_maxclients : config_reader.GetInteger("local", "maxclients", FLAGS_maxclients); - struct rlimit ulimit - { - }; - ulimit.rlim_cur = core_config_.maxclients; - ulimit.rlim_max = core_config_.maxclients; - if (setrlimit(RLIMIT_NOFILE, &ulimit) == -1) - { - LOG(WARNING) << "Failed to set maxclients."; - } core_config_.bootstrap = !CheckCommandLineFlagIsDefault("bootstrap") ? FLAGS_bootstrap diff --git a/docs/01-architecture-overview.md b/docs/01-architecture-overview.md index 556e3856..e47093d4 100644 --- a/docs/01-architecture-overview.md +++ b/docs/01-architecture-overview.md @@ -75,6 +75,7 @@ All knobs follow *gflag overrides ini section* (`[local]`, `[cluster]`, `[store] | `auto_redirect` | false | Redirect object commands to remote owner NG internally | | `enable_key_cache` | false | Key cache (non-MVCC only) | | `enable_io_uring` / `raft_log_async_fsync` | false | IO engine options | +| `maxclients` | 500000 | API-server connection admission limit; does not modify the process file-descriptor limits | | `max_standby_lag` | 400000 | Max primary→standby message lag | Build-time options are described in the repo `CLAUDE.md` (`WITH_DATA_STORE`, `WITH_LOG_STATE`, `WITH_LOG_SERVICE`, `EXT_TX_PROC_ENABLED`, `ELOQ_MODULE_ENABLED`). diff --git a/third_party/src/brpc b/third_party/src/brpc index c12822d4..6d56abec 160000 --- a/third_party/src/brpc +++ b/third_party/src/brpc @@ -1 +1 @@ -Subproject commit c12822d4931a59a9c2cc42df061975e114e93590 +Subproject commit 6d56abecbb9ce6c6b862a1bb6389f5bd920b34aa diff --git a/tx_service/include/tx_service.h b/tx_service/include/tx_service.h index 0bdea682..da9b1a6f 100644 --- a/tx_service/include/tx_service.h +++ b/tx_service/include/tx_service.h @@ -1068,6 +1068,11 @@ class TxServiceModule : public eloq::EloqModule public: TxServiceModule() = default; + eloq::ModuleType Type() const override + { + return eloq::ModuleType::kTxService; + } + void Init(std::vector> *tx_processors) { tx_processors_ = tx_processors; From 1bea324526776494795cce922e14f1589b87987b Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Fri, 28 Aug 2026 06:30:44 +0000 Subject: [PATCH 2/6] fix: adapt EloqStore module to updated brpc --- store_handler/eloq_data_store_service/eloqstore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/store_handler/eloq_data_store_service/eloqstore b/store_handler/eloq_data_store_service/eloqstore index f44d59af..7ad9dca9 160000 --- a/store_handler/eloq_data_store_service/eloqstore +++ b/store_handler/eloq_data_store_service/eloqstore @@ -1 +1 @@ -Subproject commit f44d59affa345e2705948cc09716471961983ec1 +Subproject commit 7ad9dca924c1000e2059b8b0638c904fe37bb244 From f362f4d7444c895e43c79681c7dce51f2e7ac63c Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Fri, 28 Aug 2026 08:17:02 +0000 Subject: [PATCH 3/6] build: pin merged brpc and EloqStore revisions --- store_handler/eloq_data_store_service/eloqstore | 2 +- third_party/src/brpc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/store_handler/eloq_data_store_service/eloqstore b/store_handler/eloq_data_store_service/eloqstore index 7ad9dca9..09a42270 160000 --- a/store_handler/eloq_data_store_service/eloqstore +++ b/store_handler/eloq_data_store_service/eloqstore @@ -1 +1 @@ -Subproject commit 7ad9dca924c1000e2059b8b0638c904fe37bb244 +Subproject commit 09a4227028cc0de58bd5e4af4e10577438ca5563 diff --git a/third_party/src/brpc b/third_party/src/brpc index 6d56abec..34e0e01d 160000 --- a/third_party/src/brpc +++ b/third_party/src/brpc @@ -1 +1 @@ -Subproject commit 6d56abecbb9ce6c6b862a1bb6389f5bd920b34aa +Subproject commit 34e0e01d5a528bc9fc91a8abe32b701313791a4b From a9a2f377c0be687c24dfba28d5d52335fbb3d93e Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Fri, 28 Aug 2026 08:50:50 +0000 Subject: [PATCH 4/6] docs: scope maxclients file-limit behavior --- docs/01-architecture-overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/01-architecture-overview.md b/docs/01-architecture-overview.md index e47093d4..691d7b0f 100644 --- a/docs/01-architecture-overview.md +++ b/docs/01-architecture-overview.md @@ -75,7 +75,7 @@ All knobs follow *gflag overrides ini section* (`[local]`, `[cluster]`, `[store] | `auto_redirect` | false | Redirect object commands to remote owner NG internally | | `enable_key_cache` | false | Key cache (non-MVCC only) | | `enable_io_uring` / `raft_log_async_fsync` | false | IO engine options | -| `maxclients` | 500000 | API-server connection admission limit; does not modify the process file-descriptor limits | +| `maxclients` | 500000 | API-server connection admission limit; DataSubstrate leaves the API-server process's `RLIMIT_NOFILE` unchanged. The standalone DataStoreService still maps its separate setting to `RLIMIT_NOFILE` | | `max_standby_lag` | 400000 | Max primary→standby message lag | Build-time options are described in the repo `CLAUDE.md` (`WITH_DATA_STORE`, `WITH_LOG_STATE`, `WITH_LOG_SERVICE`, `EXT_TX_PROC_ENABLED`, `ELOQ_MODULE_ENABLED`). From 63640da94afc3ef986151964fc349cb367b51492 Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Fri, 28 Aug 2026 09:05:08 +0000 Subject: [PATCH 5/6] fix: stop applying maxclients to DataStoreService --- docs/01-architecture-overview.md | 2 +- .../eloq_data_store_service/main.cpp | 19 ------------------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/docs/01-architecture-overview.md b/docs/01-architecture-overview.md index 691d7b0f..5b320fd5 100644 --- a/docs/01-architecture-overview.md +++ b/docs/01-architecture-overview.md @@ -75,7 +75,7 @@ All knobs follow *gflag overrides ini section* (`[local]`, `[cluster]`, `[store] | `auto_redirect` | false | Redirect object commands to remote owner NG internally | | `enable_key_cache` | false | Key cache (non-MVCC only) | | `enable_io_uring` / `raft_log_async_fsync` | false | IO engine options | -| `maxclients` | 500000 | API-server connection admission limit; DataSubstrate leaves the API-server process's `RLIMIT_NOFILE` unchanged. The standalone DataStoreService still maps its separate setting to `RLIMIT_NOFILE` | +| `maxclients` | 500000 | API-server connection admission limit; does not modify process file-descriptor limits | | `max_standby_lag` | 400000 | Max primary→standby message lag | Build-time options are described in the repo `CLAUDE.md` (`WITH_DATA_STORE`, `WITH_LOG_STATE`, `WITH_LOG_SERVICE`, `EXT_TX_PROC_ENABLED`, `ELOQ_MODULE_ENABLED`). diff --git a/store_handler/eloq_data_store_service/main.cpp b/store_handler/eloq_data_store_service/main.cpp index 53848f18..74cc3482 100644 --- a/store_handler/eloq_data_store_service/main.cpp +++ b/store_handler/eloq_data_store_service/main.cpp @@ -23,7 +23,6 @@ #include #include #include -#include #include #include @@ -88,8 +87,6 @@ DEFINE_bool(bootstrap, "Init data store config file and exit. (Only support bootstrap one " "node now.)"); -DEFINE_uint32(maxclients, 300000, "maxclients"); - static bool CheckCommandLineFlagIsDefault(const char *name) { gflags::CommandLineFlagInfo flag_info; @@ -205,22 +202,6 @@ int main(int argc, char *argv[]) std::filesystem::create_directories(data_path); } - // Set maxclients - uint32_t maxclients = - !CheckCommandLineFlagIsDefault("maxclients") - ? FLAGS_maxclients - : config_reader.GetInteger("local", "maxclients", FLAGS_maxclients); - - struct rlimit ulimit - { - }; - ulimit.rlim_cur = maxclients; - ulimit.rlim_max = maxclients; - if (setrlimit(RLIMIT_NOFILE, &ulimit) == -1) - { - LOG(WARNING) << "Failed to set maxclients."; - } - std::string ds_config_file_path = data_path + "/dss_config.ini"; EloqDS::DataStoreServiceClusterManager ds_config; From 1d12310a50e36d6f372103cd223cd9c30c32a5d4 Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Sat, 29 Aug 2026 10:40:19 +0000 Subject: [PATCH 6/6] build: update brpc Redis rejection fix --- third_party/src/brpc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/src/brpc b/third_party/src/brpc index 34e0e01d..bf7c9cb8 160000 --- a/third_party/src/brpc +++ b/third_party/src/brpc @@ -1 +1 @@ -Subproject commit 34e0e01d5a528bc9fc91a8abe32b701313791a4b +Subproject commit bf7c9cb8a233a370c16e3ebb7664c7db57d97ac8