Skip to content

Release RAM-backed splits after serialization - #6904

Merged
PSeitz merged 2 commits into
quickwit-oss:mainfrom
PSeitz:fix/release-ram-after-serialization
Oct 16, 2026
Merged

PSeitz merged 2 commits into
quickwit-oss:mainfrom
PSeitz:fix/release-ram-after-serialization

Conversation

@PSeitz

@PSeitz PSeitz commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

With in-memory indexing enabled, persisting a split copies its files to disk but leaves the returned Tantivy Index owning the RAM directory. This keeps the RAM files alive through packaging.

Reopen the persisted split from disk so the original RAM owners drop before the finalized split reaches the packager.

Changes

  • Return a disk-backed Index through the existing ControlledDirectory.
  • Explain when the builder's RAM handle and the shadowed original Index drop.
  • Add one ownership regression test and one integration smoke test for in-memory ingestion through publication and search. The integration test sets the cached environment flag in a child process, without modifying other tests' environment.

User impact

Shorter RAM retention when QW_ENABLE_IN_MEMORY_INDEXING=true.

Verification

  • Indexing library tests plus the new integration test: 234 passed. Other integration tests and the existing ignored indexing test were not run.
  • make fmt and git diff --check passed.
  • No production memory benchmark performed.
cargo nextest run --locked --offline \
  -p quickwit-integration-tests -p quickwit-indexing --lib \
  -E 'package(quickwit-indexing) | test(in_memory_indexing_tests)'

@PSeitz
PSeitz requested a review from a team as a code owner October 14, 2026 09:48
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T11:40:44.322737Z 4dbaa11 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@PSeitz
PSeitz enabled auto-merge October 16, 2026 11:35
@PSeitz
PSeitz disabled auto-merge October 16, 2026 12:29
@PSeitz
PSeitz added this pull request to the merge queue Oct 16, 2026
Merged via the queue into quickwit-oss:main with commit 40eb74e Oct 16, 2026
8 checks passed
@PSeitz
PSeitz deleted the fix/release-ram-after-serialization branch October 16, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants