Skip to content

Add prewarm parameters#316

Merged
thweetkomputer merged 1 commit intoeloqdata:mainfrom
eatbreads:add_prewarm_sjh
Nov 26, 2025
Merged

Add prewarm parameters#316
thweetkomputer merged 1 commit intoeloqdata:mainfrom
eatbreads:add_prewarm_sjh

Conversation

@eatbreads
Copy link
Collaborator

@eatbreads eatbreads commented Nov 18, 2025

Summary by CodeRabbit

  • New Features
    • Added a new configuration option to control cloud cache prewarming for the Eloq store (disabled by default). This allows admins to enable prewarming of the store's cloud cache on startup to potentially improve initial access performance.

✏️ Tip: You can customize this high-level summary in your review settings.

@CLAassistant
Copy link

CLAassistant commented Nov 18, 2025

CLA assistant check
All committers have signed the CLA.

@coderabbitai
Copy link

coderabbitai bot commented Nov 18, 2025

Walkthrough

Adds a new boolean global option storage.eloq.storage.eloqStorePrewarmCloudCache (default false), persists it into EloqGlobalOptions, and wires it into the Eloq KV engine so prewarm_cloud_cache in the store config is initialized from that option during engine setup.

Changes

Cohort / File(s) Summary
Eloq global options
src/mongo/db/modules/eloq/src/eloq_global_options.h, src/mongo/db/modules/eloq/src/eloq_global_options.cpp
Add bool eloqStorePrewarmCloudCache{false} to EloqGlobalOptions; register and parse storage.eloq.storage.eloqStorePrewarmCloudCache and store the value during initialization.
KV engine → store config wiring
src/mongo/db/modules/eloq/src/eloq_kv_engine.cpp
Read eloqStorePrewarmCloudCache from EloqGlobalOptions and initialize prewarm_cloud_cache in the EloqStoreConfig used by the engine.

Sequence Diagram

sequenceDiagram
    participant Config as Configuration Source
    participant GlobalOpts as EloqGlobalOptions
    participant KVEngine as EloqKVEngine
    participant Store as EloqStore

    Config->>GlobalOpts: Parse storage.eloq.storage.eloqStorePrewarmCloudCache
    GlobalOpts->>GlobalOpts: Set eloqStorePrewarmCloudCache (bool)
    KVEngine->>GlobalOpts: Read eloqStorePrewarmCloudCache
    KVEngine->>Store: Set prewarm_cloud_cache in store config
    Store->>Store: Apply prewarm_cloud_cache behavior on startup
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Focus review on correct option registration, parsing, default value, and propagation to engine config.
  • Pay extra attention to header/API visibility and any config name typos.

Possibly related PRs

Suggested reviewers

  • xiexiaoy
  • yi-xmu
  • lzxddz

Poem

🐰 I nibble configs, soft and neat,
A little flag makes startup sweet,
Prewarm the cloud with tender care,
Eloq hops ready — caches fair! 🥕✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The title 'Add prewarm parameters' is vague and generic, using non-descriptive language that doesn't clearly convey what specific prewarm parameters are being added or their purpose. Enhance the title to be more specific, such as 'Add EloqStore cloud cache prewarm option' or 'Add prewarm cloud cache configuration parameter' to clearly indicate the feature being added.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/mongo/db/modules/eloq/src/eloq_global_options.cpp (1)

577-582: Option registration matches existing EloqStore patterns

The new storage.eloq.storage.eloqStorePrewarmCloudCache option (and its short form) is wired in the same way as neighboring EloqStore flags, with a sane default and clear description. No issues from the parsing/constraints side.

If you want slightly better discoverability, you might consider grouping this closer to eloqStoreCloudStorePath, since it’s cloud-specific, but that’s purely organizational.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2c00cc9 and 780683e.

📒 Files selected for processing (3)
  • src/mongo/db/modules/eloq/src/eloq_global_options.cpp (2 hunks)
  • src/mongo/db/modules/eloq/src/eloq_global_options.h (1 hunks)
  • src/mongo/db/modules/eloq/src/eloq_kv_engine.cpp (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/mongo/db/modules/eloq/src/eloq_kv_engine.cpp
🔇 Additional comments (2)
src/mongo/db/modules/eloq/src/eloq_global_options.h (1)

121-149: New eloqStorePrewarmCloudCache field is consistent with existing EloqStore options

The added boolean member, its default initialization, and placement among the other EloqStore flags look consistent with the surrounding pattern and with how it’s parsed in the .cpp file.

src/mongo/db/modules/eloq/src/eloq_global_options.cpp (1)

1079-1082: Parsing logic for eloqStorePrewarmCloudCache is correct; just ensure downstream handling is safe

The store logic cleanly mirrors other boolean options: guarded by params.count(...) and assigning to the new struct field with the expected type. No correctness issues here.

If you haven’t already, double‑check that callers (e.g., in eloq_kv_engine.cpp) handle eloqStorePrewarmCloudCache == true gracefully when cloud store is disabled (empty eloqStoreCloudStorePath), so enabling this flag alone can’t produce surprising startup failures.

@thweetkomputer thweetkomputer merged commit cdcae71 into eloqdata:main Nov 26, 2025
3 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Nov 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants