Skip to content

optimize large scan reqs#347

Merged
liunyl merged 1 commit into
mainfrom
scan
Dec 8, 2025
Merged

optimize large scan reqs#347
liunyl merged 1 commit into
mainfrom
scan

Conversation

@liunyl

@liunyl liunyl commented Dec 5, 2025

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Chores
    • Improved internal logging formatting and added more detailed internal logs for certain record and cursor operations.
    • Adjusted internal cursor prefetch behavior for end-specified index scans to optimize performance; no public APIs or user-facing behavior changed.

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

@coderabbitai

coderabbitai Bot commented Dec 5, 2025

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

Walkthrough

Updates include a submodule pointer bump for src/mongo/db/modules/eloq/data_substrate, addition of a new boolean end-specified flag tracked on EloqCursor, propagation of that flag through indexScanOpen calls, minor logging formatting changes, and a change to prefetch behavior conditioned on the new flag.

Changes

Cohort / File(s) Summary
Submodule Update
src/mongo/db/modules/eloq/data_substrate
Submodule reference updated to a newer commit (pointer bump). No code within this repo changed.
Cursor API & state
src/mongo/db/modules/eloq/src/eloq_cursor.h, src/mongo/db/modules/eloq/src/eloq_cursor.cpp
Added private member _endSpecified{false}, extended indexScanOpen(...) signature with new bool end_specified parameter and stored it into _endSpecified; indexScanIsOpen(...) signature extended to include bool end_specified; PrefetchSize() now branches on _endSpecified to return a larger prefetch when true. Minor log formatting edits.
Index cursor callsites
src/mongo/db/modules/eloq/src/eloq_index.cpp
Propagated new end_specified argument into EloqIndexCursor::indexScanOpen calls (based on endPosition presence). Minor logging formatting changes.
Record store callsites & logs
src/mongo/db/modules/eloq/src/eloq_record_store.cpp
Callers updated to pass extra false argument into indexScanOpen where appropriate (e.g., seek paths); added small log changes (consolidated MONGO_LOG messages) and an added log of tableName in EloqCatalogRecordStore::findRecord.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Pay special attention to:
    • Signature changes for indexScanOpen / indexScanIsOpen and all callsites to ensure correct argument semantics.
    • The new _endSpecified usage affecting PrefetchSize() and any performance implications.
    • Build impact from the changed function signatures (ensure all callers updated).
    • Logging changes for correct message content and formatting.

Possibly related PRs

Suggested reviewers

  • lzxddz
  • xiexiaoy

Poem

🐰 I hopped through code, whiskers all a-twitch,
A flag tucked in—end_specified, oh so rich,
Logs trimmed neat, and a submodule pointer leapt,
Prefetch wakes when end is firmly kept,
A joyful thump—changes landed, hop complete! 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'optimize large scan reqs' is vague and generic. It does not clearly specify what is being optimized or provide meaningful context about the actual change (a submodule reference update). Revise the title to be more specific about the change, such as 'Update data_substrate submodule reference' or 'Bump data_substrate to bb846c44' to accurately reflect the submodule version update.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f267ea3 and 210574b.

📒 Files selected for processing (5)
  • src/mongo/db/modules/eloq/data_substrate (1 hunks)
  • src/mongo/db/modules/eloq/src/eloq_cursor.cpp (4 hunks)
  • src/mongo/db/modules/eloq/src/eloq_cursor.h (2 hunks)
  • src/mongo/db/modules/eloq/src/eloq_index.cpp (5 hunks)
  • src/mongo/db/modules/eloq/src/eloq_record_store.cpp (10 hunks)

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.

@liunyl liunyl merged commit 764ef4f into main Dec 8, 2025
2 of 3 checks passed
@liunyl liunyl deleted the scan branch December 8, 2025 09:59
@coderabbitai coderabbitai Bot mentioned this pull request Dec 11, 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.

1 participant