Skip to content

[MOD-17682] NumericIteratorVariant: suspend/resume - #10894

Merged
LukeMathWalker merged 1 commit into
masterfrom
luca-reval-numeric
Aug 17, 2026
Merged

LukeMathWalker merged 1 commit into
masterfrom
luca-reval-numeric

Conversation

@LukeMathWalker

@LukeMathWalker LukeMathWalker commented Aug 12, 2026 •

Copy link
Copy Markdown
Collaborator

Describe the changes in the pull request

  1. Current: the numeric iterator variant enum (unfiltered / filtered / geo arms over the numeric range tree) can only be revalidated in place, so it cannot be held across a release of the index spec read lock.
  2. Change: it implements RQEIteratorBoxed::suspend / RQESuspendedIterator::resume. The enum is re-shaped into a Ref-mode-parametrized RawNumericIteratorVariant, so suspending is a layout-preserving reinterpretation of the same allocation rather than a rebuild, with each arm's inner inverted-index reader transitioned in place. The legacy revalidate is unchanged.
  3. Outcome: no user-visible change — the pipeline does not suspend iterators yet. This is a per-iterator prerequisite for that wiring.

Which additional issues this PR fixes

  1. MOD-16714

Main objects this PR modified

  1. RawNumericIteratorVariant<'query, Rf> plus the NumericIteratorVariant / NumericIteratorVariantSuspended aliases — the enum's active and suspended forms, with the layout proof (and an IsSame witness) that keeps the three arms in lockstep.
  2. suspend / resume on the variant — reuses the heap allocation so external borrows into the iterator's interior stay valid, and delegates the abort decision to each arm's inner reader.
  3. The revalidation decision per arm: abort when the numeric range tree was modified under us, Moved when the current document was collected, Ok otherwise — this is where the arms could most easily drift apart.
  4. tests/integration/inverted_index/numeric.rs — all three scenarios spelled out once per arm against a real NumericIndex: the round trip (including one taken mid-read), the range-tree-modified abort, and the current-document-deleted Moved. The filtered and geo Moved cases deliberately put a document the filter rejects in the re-seek's path, so they exercise FilterNumericReader/FilterGeoReader's reject-and-keep-going seek_record loop — a fall-through the unfiltered reader does not have, and which had no revalidation coverage on either the resume or the legacy path.

Mark if applicable

  • This PR introduces API changes
  • This PR introduces serialization changes

Release Notes

  • This PR requires release notes
  • This PR does not require release notes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bb024fd314

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@codecov

codecov Bot commented Aug 12, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.17949% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.26%. Comparing base (5a83a5b) to head (f9bbf99).
⚠️ Report is 26 commits behind head on master.

Files with missing lines Patch % Lines
...rch_rs/rqe_iterators/src/inverted_index/numeric.rs 87.17% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10894      +/-   ##
==========================================
- Coverage   83.16%   82.26%   -0.91%     
==========================================
  Files         606      635      +29     
  Lines       80987    82411    +1424     
  Branches    36248    37623    +1375     
==========================================
+ Hits        67350    67792     +442     
- Misses      13290    14275     +985     
+ Partials      347      344       -3     
Flag Coverage Δ
flow 84.35% <ø> (-0.04%) ⬇️
unit 55.85% <87.17%> (-0.44%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@LukeMathWalker LukeMathWalker changed the title [MOD-16714] NumericIteratorVariant: suspend/resume [MOD-17682] NumericIteratorVariant: suspend/resume Aug 17, 2026
@sonarqubecloud

Copy link
Copy Markdown

@LukeMathWalker
LukeMathWalker added this pull request to the merge queue Aug 17, 2026
Merged via the queue into master with commit 1f5d339 Aug 17, 2026
61 checks passed
@LukeMathWalker
LukeMathWalker deleted the luca-reval-numeric branch August 17, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants