Skip to content

Conversation

@Sicheng-Pan
Copy link
Contributor

@Sicheng-Pan Sicheng-Pan commented Jan 3, 2026

Description of changes

Summarize the changes made by this PR.

  • Improvements & Bug fixes
    • N/A
  • New functionality
    • Eagerly commit blocks in ordered blockfile writer to avoid excessive memory usage

Test plan

How are these changes tested?

  • Tests pass locally with pytest for python, yarn test for js, cargo test for rust

Migration plan

Are there any migrations, or any forwards/backwards compatibility changes needed in order to make sure this change deploys reliably?

Observability plan

What is the plan to instrument and monitor this change?

Documentation Changes

Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs section?

@github-actions
Copy link

github-actions bot commented Jan 3, 2026

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Sicheng-Pan Sicheng-Pan marked this pull request as ready for review January 3, 2026 03:13
@propel-code-bot
Copy link
Contributor

propel-code-bot bot commented Jan 3, 2026

The writer now persists each completed delta into a finalized block as soon as it closes—whether through commits, swaps, or split handling—keeping track of the committed blocks, updating their sparse index counts, and routing their identifiers into the migration pipeline through an async helper used across the relevant call paths.

Key Changes

• Maintain Inner.completed_blocks (Vec) and eagerly populate it by committing deltas within complete_current_delta, swap_current_delta, and split-handling logic
• Adjust commit to await complete_current_delta, update sparse-index counts for each finalized block, and pass the committed block IDs to apply_migrations_to_blockfile
• Propagate the async complete_current_delta helper through call sites (commit, swap_current_delta) and eagerly commit oversize deltas detected during set-time splits
• Remove now-unused OrderedBlockDelta::len method

Affected Areas

rust/blockstore/src/arrow/ordered_blockfile_writer.rs
rust/blockstore/src/arrow/block/delta/ordered_block_delta.rs

This summary was automatically generated by @propel-code-bot

@Sicheng-Pan Sicheng-Pan merged commit acde656 into main Jan 3, 2026
65 checks passed
@Sicheng-Pan Sicheng-Pan deleted the 01-02-_enh_commit_eagerly_in_ordered_blockfile_writer branch January 3, 2026 04:24
chroma-droid pushed a commit that referenced this pull request Jan 3, 2026
## Description of changes

_Summarize the changes made by this PR._

- Improvements & Bug fixes
  - N/A
- New functionality
- Eagerly commit blocks in ordered blockfile writer to avoid excessive
memory usage

## Test plan

_How are these changes tested?_

- [ ] Tests pass locally with `pytest` for python, `yarn test` for js,
`cargo test` for rust

## Migration plan

_Are there any migrations, or any forwards/backwards compatibility
changes needed in order to make sure this change deploys reliably?_

## Observability plan

_What is the plan to instrument and monitor this change?_

## Documentation Changes

_Are all docstrings for user-facing APIs updated if required? Do we need
to make documentation changes in the [docs
section](https://github.com/chroma-core/chroma/tree/main/docs/docs.trychroma.com)?_
Sicheng-Pan added a commit that referenced this pull request Jan 3, 2026
This PR cherry-picks the commit acde656
onto rc/2026-01-02. If there are unresolved conflicts, please resolve
them manually.

Co-authored-by: Macronova <[email protected]>
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