Skip to content

[MOD-17393] NotOptimized: suspend/resume - #10891

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

LukeMathWalker merged 1 commit into
masterfrom
luca-reval-notoptimized

Conversation

@LukeMathWalker

Copy link
Copy Markdown
Collaborator

Describe the changes in the pull request

  1. Current: NotOptimized (the NOT iterator, wildcard plus excluded child) can only be revalidated in place, so it cannot be held while the index spec read lock is dropped.
  2. Change: it now implements RQEIteratorBoxed::suspend / RQESuspendedIterator::resume — the boxed iterator is weakened to a Suspended form, its wildcard and its child transitioned inside their own slots, and re-narrowed on resume in the same allocation. The legacy revalidate is left in place and unchanged.
  3. Outcome: no user-visible change. Nothing in the query pipeline suspends iterators yet; this is one of the per-iterator prerequisites for the later PR that wires suspension into query execution.

Which additional issues this PR fixes

  1. MOD-17393

Main objects this PR modified

  1. RawNotOptimized<Rf, W, I, TC> — the Ref-mode-parametrized form, with the const layout-invariant proof that pairs its active and suspended instantiations.
  2. NotOptimized::suspend — transitions both the wildcard slot and the child slot in place, routed through the trait so a type-erased child swaps its vtable.
  3. FreeSuspendedShell — drop guard that tears down the half-transitioned shell when one of the two children aborts or errors mid-resume, so nothing gets re-narrowed onto a consumed child.
  4. resume's status combination: how the wildcard's and the child's outcomes fold into one ResumeOutcome, and the re-scan that finds the next non-excluded document when either moved.
  5. tests/integration/not_optimized.rs — the resume matrix mirrors the existing revalidate matrix case for case, plus box-address preservation and type-erased children.

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: 304adcc2f9

ℹ️ 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

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.22%. Comparing base (63e8ca2) to head (412d266).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10891      +/-   ##
==========================================
- Coverage   83.16%   82.22%   -0.94%     
==========================================
  Files         611      635      +24     
  Lines       81176    82351    +1175     
  Branches    36388    37563    +1175     
==========================================
+ Hits        67512    67716     +204     
- Misses      13317    14291     +974     
+ Partials      347      344       -3     
Flag Coverage Δ
flow 84.35% <ø> (-0.04%) ⬇️
unit 55.79% <100.00%> (-0.55%) ⬇️

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.

@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 9702682 Aug 17, 2026
59 checks passed
@LukeMathWalker
LukeMathWalker deleted the luca-reval-notoptimized branch August 17, 2026 10:42
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