Skip to content

feat(cache): add budgeted leases for resident entries - #9830

Closed
BubbleCal wants to merge 6 commits into
mainfrom
yang/layered-rq-cache-pins
Closed

BubbleCal wants to merge 6 commits into
mainfrom
yang/layered-rq-cache-pins

Conversation

@BubbleCal

@BubbleCal BubbleCal commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Resident columns now use Arc ownership, a Weak registry and ordinary cache admission in #9835. The active stack no longer depends on this pin/lease implementation.

Historical description

Add CachePin/CacheLease and per-shard pin budgets so live owners can retain resident cache entries within a bounded budget. Include single-flight admission, replacement accounting, lease lifetime, and overflow coverage.

Lease ownership is shared by the value, while each live cache admission owns its budget reservation and eviction flag. Reusing a value under multiple keys or in multiple backends cannot transfer or reuse another admission's charge. Ending an admission releases only its reservation; replacements can reserve the freed capacity in the same budget partition. Public signatures are unchanged.

Dependencies

Uses the cache capabilities from merged #9829. Standalone benchmark/POC tools remain excluded.

Validation

On macOS arm64 with the repository's Rust 1.98.1 toolchain:

  • Before the fix, all four alias/multiple-backend regression cases failed in the Quick and strict priority tiers: 1,264 resident bytes in a 1,000-byte cache.
  • cargo test --locked -p lance-core --lib cache::: 130 passed, including per-admission accounting, release order, shard isolation, replacement, and concurrent admissions.
  • cargo fmt --all -- --check and cargo clippy --all --tests --benches -- -D warnings passed.

No new performance measurement is claimed. CI is not awaited.

Tracking

OSS-2558

@BubbleCal
BubbleCal force-pushed the yang/layered-rq-cache-pins branch from ffb720a to e003e44 Compare October 9, 2026 18:55
@BubbleCal
BubbleCal added this pull request to stack #9866 October 10, 2026 04:37
Base automatically changed from yang/layered-rq-cache-reads to main October 10, 2026 07:30
@BubbleCal
BubbleCal marked this pull request as ready for review October 10, 2026 11:11

@claude claude 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.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added the K-changes Latest Gatekeeper recommendation requests changes. label Oct 10, 2026
@lance-gatekeeper lance-gatekeeper Bot removed the K-changes Latest Gatekeeper recommendation requests changes. label Oct 10, 2026

@lance-gatekeeper lance-gatekeeper Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Gate recommendation: approve.

The earlier capacity bypass is fixed: lease ownership remains shared, while each admission retains its own budget reservation and eviction flag. Both original capacity reproducers and all 130 cache tests pass.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Oct 10, 2026
@BubbleCal BubbleCal closed this Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request K-approved Latest Gatekeeper recommendation permits acceptance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant