feat(parquet): Store sized listing + blocking delete for the RFC 0019 compactor migration - #293
Conversation
|
Warning Review limit reached
More reviews will be available in 54 minutes and 13 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughStore listing now returns ChangesStore blocking bridges and size-aware listing
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Adds two synchronous Store primitives needed for the RFC 0019 compactor migration by exposing (1) size-aware listings and (2) a blocking delete, both implemented as thin bridges over existing async object_store operations while preserving existing listing isolation/ordering behavior.
Changes:
- Introduce
Store::list_with_sizes_blocking(prefix) -> Vec<(String, u64)>backed by a sharedlist_entriescore that enforces segment-wise prefix gating and lexicographic ordering. - Add
Store::delete_blocking(key)as a sync bridge overStore::delete. - Add local unit tests plus ignored LocalStack S3 integration tests for the new APIs.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| crates/ourios-parquet/src/store.rs | Adds delete_blocking, factors listing into list_entries, and exposes list_with_sizes_blocking while keeping ordering + prefix gating centralized. |
| crates/ourios-parquet/tests/rfc0013_object_store.rs | Adds ignored S3 integration coverage for size-aware listing and blocking delete behavior on the AmazonS3 backend. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The RFC 0019 compactor migration (slice 2b) needs two backend-agnostic Store primitives the querier path didn't: list_with_sizes_blocking, for the small-file candidate check (sizes come from the listing's ObjectMeta, no per-object head), and delete_blocking, for orphan/input GC. Both bridge the existing async core; list_with_sizes factors the listing core into a shared list_entries so list and the sized variant share the segment-wise tenant-isolation gate and key ordering. A missing delete surfaces as is_not_found (the GC loops treat it as already-reclaimed). Local unit tests plus localstack-ignored S3 tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
58ea171 to
1864e3c
Compare
Copilot: S3 DELETE is idempotent (absent key -> success), unlike LocalFileSystem (absent -> not-found). Document the backend-dependent behaviour on delete_blocking, scope the local unit test's assertion to the local backend, and make the S3 test tolerant (success or not-found) rather than asserting not-found, which would fail against real AWS. The compactor's GC treats either outcome as already-reclaimed, so no head round-trip is added. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The test doc still said a missing S3 key surfaces as is_not_found, which contradicts the now-tolerant assertion (S3 DELETE is idempotent). Reword to match. (PR description updated likewise.) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
What
Two backend-agnostic
Storeprimitives the RFC 0019 compactor migration (slice 2b) needs and the querier path (#290/#291) didn't:list_with_sizes_blocking(prefix) -> Vec<(String, u64)>— the compactor's small-file candidate check needs each object's byte length; the backend already reports it in the listing (ObjectMeta::size), so it comes for free here rather than via a per-objecthead. The listing core is factored into a sharedlist_entries, solistand the sized variant share the segment-wise tenant-isolation gate (RFC0019.5) and the lexicographic key ordering — no duplicated filter logic.delete_blocking(key)— the compactor's orphan / post-commit input GC. A thin bridge over the asyncdelete; it adds no existence check, so missing-key behaviour is backend-dependent:LocalFileSystemmaps an absent key tois_not_found, while S3 DELETE is idempotent and returns success. The compactor's GC loops treat both as "already reclaimed" (matchis_not_found, otherwise count a failure), so the difference is invisible to them — noheadround-trip is added to force a uniform contract.Both are thin
block_on_off_runtimebridges over the existing async core.Why
Foundational, independently-mergeable prereq for the compactor's move off raw
std::fsontoStore(so data compaction can target S3 as well as local), the analog of #290 (list_blocking) / #291 (AuditReader::open_bytes) before the querier migration (#292).Invariants (CLAUDE.md §3.7)
Tenant isolation is preserved:
list_with_sizes_blockingreuses the same segment-wiseprefix_matchgate aslist_blocking, so a string-prefix sibling (tenant_id=abwhen listingtenant_id=a) is excluded. No on-disk format change (§3.5). No behavior change to existing call sites.Tests
list_with_sizes_reports_byte_lengths_in_key_order(sizes + ordering + sibling exclusion),delete_blocking_removes_and_local_missing_is_not_found(local backend's not-found-on-absent).#[ignore]d S3 tests (run in thes3-integrationCI job):store_list_with_sizes_reports_byte_lengths_on_s3,store_delete_blocking_removes_on_s3(asserts a redundant delete is tolerated — success or not-found — matching S3's idempotent DELETE, so it won't fail against real AWS).Local gate
cargo fmt --all --check,cargo clippy -p ourios-parquet --all-targets --all-features -D warnings,RUSTDOCFLAGS=-D warnings cargo doc -p ourios-parquet,cargo test -p ourios-parquet— all green. S3 tests run in CI'ss3-integrationjob.🤖 Generated with Claude Code