Skip to content

Conversation

@MrCroxx
Copy link
Contributor

@MrCroxx MrCroxx commented Dec 9, 2025

Description of changes

Summarize the changes made by this PR.

  • Improvements & Bug fixes
    • Upgrade foyer from v0.17.3 to v0.21.0.
    • Adapt to the new API.
  • New functionality
    • No user-facing changes.

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?

Signed-off-by: MrCroxx <mrcroxx@outlook.com>
@github-actions
Copy link

github-actions bot commented Dec 9, 2025

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)

@propel-code-bot
Copy link
Contributor

Upgrade foyer dependency and align cache APIs

Upgrades the Rust chroma-cache crate from foyer v0.17.3 to v0.21.0 and rewires the cache builders to the new async engine/device configuration API. Removes the legacy obtain method from the Cache trait, updates all cache implementations and callers to use get, and adjusts telemetry/trace configuration to the new foyer tracing options. Also refreshes the blockstore provider so its cache lookups follow the updated trait and propagates the new FoyerError into CacheError handling.

Key Changes

• Bump foyer to v0.21.0 and mixtrics to v0.2.3 in rust/cache/Cargo.toml.
• Refactor rust/cache/src/foyer.rs to use FsDeviceBuilder, PsyncIoEngineBuilder, and BlockEngineBuilder, drop deprecated config fields (flush, trace_obtain_us), and align tracing thresholds with the new API.
• Expose foyer::Error as FoyerError, add a CacheError::FoyerError variant, and remove the Cache::obtain requirement from rust/cache/src/lib.rs.
• Update cache implementations (foyer, unbounded, nop) and blockstore provider code to rely solely on Cache::get for retrieval.

Affected Areas

rust/cache/src/foyer.rs
rust/cache/src/lib.rs
rust/cache/src/unbounded.rs
rust/cache/src/nop.rs
rust/blockstore/src/arrow/provider.rs
rust/cache/Cargo.toml

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

LargeEngineOptions::new()
.with_indexer_shards(config.shards)
.storage()
.with_recover_mode(foyer::RecoverMode::Quiet)
Copy link
Contributor

Choose a reason for hiding this comment

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

Recommended

[Documentation] This changes the cache recovery behavior from Strict (which panics on error) to Quiet (which logs the error and continues). This is a good improvement for service resilience. It would be beneficial to mention this intentional behavior change in the PR description for visibility.

Context for Agents
This changes the cache recovery behavior from `Strict` (which panics on error) to `Quiet` (which logs the error and continues). This is a good improvement for service resilience. It would be beneficial to mention this intentional behavior change in the PR description for visibility.

File: rust/cache/src/foyer.rs
Line: 388

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.

1 participant