From 780683e2f12cc000dce724d083a113bd0787d8a0 Mon Sep 17 00:00:00 2001 From: eatbreads <1852611363@qq.com> Date: Thu, 20 Nov 2025 03:05:32 +0000 Subject: [PATCH 1/2] add prewarm paremeters fix --- src/mongo/db/modules/eloq/src/eloq_global_options.cpp | 10 ++++++++++ src/mongo/db/modules/eloq/src/eloq_global_options.h | 1 + src/mongo/db/modules/eloq/src/eloq_kv_engine.cpp | 3 +++ 3 files changed, 14 insertions(+) diff --git a/src/mongo/db/modules/eloq/src/eloq_global_options.cpp b/src/mongo/db/modules/eloq/src/eloq_global_options.cpp index 62b20a7201..4465b483da 100644 --- a/src/mongo/db/modules/eloq/src/eloq_global_options.cpp +++ b/src/mongo/db/modules/eloq/src/eloq_global_options.cpp @@ -574,6 +574,12 @@ Status EloqGlobalOptions::add(moe::OptionSection* options) { moe::Bool, "EloqStore enable compression") .setDefault(moe::Value(false)); + eloqOptions + .addOptionChaining("storage.eloq.storage.eloqStorePrewarmCloudCache", + "eloqEloqStorePrewarmCloudCache", + moe::Bool, + "EloqStore prewarm cloud cache on startup") + .setDefault(moe::Value(false)); // Options for metrics eloqOptions @@ -1070,6 +1076,10 @@ Status EloqGlobalOptions::store(const moe::Environment& params, eloqGlobalOptions.eloqStoreEnableCompression = params["storage.eloq.storage.eloqStoreEnableCompression"].as(); } + if (params.count("storage.eloq.storage.eloqStorePrewarmCloudCache")) { + eloqGlobalOptions.eloqStorePrewarmCloudCache = + params["storage.eloq.storage.eloqStorePrewarmCloudCache"].as(); + } // Parse metrics options diff --git a/src/mongo/db/modules/eloq/src/eloq_global_options.h b/src/mongo/db/modules/eloq/src/eloq_global_options.h index 826f150cd9..c3ba07f0dc 100644 --- a/src/mongo/db/modules/eloq/src/eloq_global_options.h +++ b/src/mongo/db/modules/eloq/src/eloq_global_options.h @@ -122,6 +122,7 @@ class EloqGlobalOptions { bool eloqStoreSkipVerifyChecksum{false}; bool eloqStoreDataAppendMode{false}; bool eloqStoreEnableCompression{false}; + bool eloqStorePrewarmCloudCache{false}; uint32_t eloqStoreWorkerCount{1}; uint32_t eloqStoreOpenFilesLimit{1024}; uint32_t eloqStoreDataPageRestartInterval{16}; diff --git a/src/mongo/db/modules/eloq/src/eloq_kv_engine.cpp b/src/mongo/db/modules/eloq/src/eloq_kv_engine.cpp index db39debd3a..e07688b471 100644 --- a/src/mongo/db/modules/eloq/src/eloq_kv_engine.cpp +++ b/src/mongo/db/modules/eloq/src/eloq_kv_engine.cpp @@ -249,6 +249,9 @@ static void configureEloqStore(EloqDS::EloqStoreConfig& eloq_store_config, eloq_store_config.eloqstore_configs_.enable_compression = eloqGlobalOptions.eloqStoreEnableCompression; + + eloq_store_config.eloqstore_configs_.prewarm_cloud_cache = + eloqGlobalOptions.eloqStorePrewarmCloudCache; } #endif From c6b5cfe6adef693d1e9b0a3c78fc44fadefb3475 Mon Sep 17 00:00:00 2001 From: eatbreads <1852611363@qq.com> Date: Fri, 28 Nov 2025 09:38:15 +0000 Subject: [PATCH 2/2] adapt rclone parameter --- .../db/modules/eloq/src/eloq_global_options.cpp | 10 ++++++++++ .../db/modules/eloq/src/eloq_global_options.h | 1 + src/mongo/db/modules/eloq/src/eloq_kv_engine.cpp | 15 +++++++++++++++ 3 files changed, 26 insertions(+) diff --git a/src/mongo/db/modules/eloq/src/eloq_global_options.cpp b/src/mongo/db/modules/eloq/src/eloq_global_options.cpp index 4465b483da..59f735b2f7 100644 --- a/src/mongo/db/modules/eloq/src/eloq_global_options.cpp +++ b/src/mongo/db/modules/eloq/src/eloq_global_options.cpp @@ -425,6 +425,12 @@ Status EloqGlobalOptions::add(moe::OptionSection* options) { moe::String, "EloqStore cloud store path (Disable cloud store if empty)") .setDefault(moe::Value("")); + eloqOptions + .addOptionChaining("storage.eloq.storage.eloqStoreCloudStoreDaemonPorts", + "eloqEloqStoreCloudStoreDaemonPorts", + moe::String, + "Comma-separated cloud store daemon ports, e.g. \"5572,5573,5574\"") + .setDefault(moe::Value("")); eloqOptions .addOptionChaining("storage.eloq.storage.eloqStoreDataPageRestartInterval", "eloqEloqStoreDataPageRestartInterval", @@ -988,6 +994,10 @@ Status EloqGlobalOptions::store(const moe::Environment& params, eloqGlobalOptions.eloqStoreCloudStorePath = params["storage.eloq.storage.eloqStoreCloudStorePath"].as(); } + if (params.count("storage.eloq.storage.eloqStoreCloudStoreDaemonPorts")) { + eloqGlobalOptions.eloqStoreCloudStoreDaemonPorts = + params["storage.eloq.storage.eloqStoreCloudStoreDaemonPorts"].as(); + } if (params.count("storage.eloq.storage.eloqStoreDataPageRestartInterval")) { eloqGlobalOptions.eloqStoreDataPageRestartInterval = params["storage.eloq.storage.eloqStoreDataPageRestartInterval"].as(); diff --git a/src/mongo/db/modules/eloq/src/eloq_global_options.h b/src/mongo/db/modules/eloq/src/eloq_global_options.h index c3ba07f0dc..b6cdb0d812 100644 --- a/src/mongo/db/modules/eloq/src/eloq_global_options.h +++ b/src/mongo/db/modules/eloq/src/eloq_global_options.h @@ -143,6 +143,7 @@ class EloqGlobalOptions { uint32_t eloqStorePagesPerFileShift{11}; uint32_t eloqStoreOverflowPointers{16}; std::string eloqStoreCloudStorePath; + std::string eloqStoreCloudStoreDaemonPorts; std::string eloqStoreLocalSpaceLimit; std::string eloqStoreStoragePathList; std::string eloqStoreIndexBufferPoolSize; diff --git a/src/mongo/db/modules/eloq/src/eloq_kv_engine.cpp b/src/mongo/db/modules/eloq/src/eloq_kv_engine.cpp index e07688b471..6341ba78ad 100644 --- a/src/mongo/db/modules/eloq/src/eloq_kv_engine.cpp +++ b/src/mongo/db/modules/eloq/src/eloq_kv_engine.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include "mongo/base/error_codes.h" #include "mongo/db/auth/authorization_manager.h" @@ -186,6 +187,20 @@ static void configureEloqStore(EloqDS::EloqStoreConfig& eloq_store_config, log() << "EloqStore cloud store enabled"; } + if (!eloqGlobalOptions.eloqStoreCloudStoreDaemonPorts.empty()) { + std::vector ports; + std::string token; + std::istringstream tokenStream(eloqGlobalOptions.eloqStoreCloudStoreDaemonPorts); + while (std::getline(tokenStream, token, ',')) { + if (!token.empty()) { + ports.emplace_back(token); + } + } + if (!ports.empty()) { + eloq_store_config.eloqstore_configs_.cloud_store_daemon_ports = std::move(ports); + } + } + eloq_store_config.eloqstore_configs_.data_page_restart_interval = eloqGlobalOptions.eloqStoreDataPageRestartInterval;