Skip to content

Align parquet file rotation with cache chunk boundaries#3280

Open
jewei1997 wants to merge 4 commits intomainfrom
fix-merge-results-log-cache
Open

Align parquet file rotation with cache chunk boundaries#3280
jewei1997 wants to merge 4 commits intomainfrom
fix-merge-results-log-cache

Conversation

@jewei1997
Copy link
Copy Markdown
Contributor

@jewei1997 jewei1997 commented Apr 21, 2026

Describe your changes and provide context

  • Align cache + parquet rotation to block % MaxBlocksPerFile == 0. Coverage is now derived from LatestVersion ([floor(latest/interval)*interval, latest]).
  • Fix: empty blocks short-circuited SetReceipts, so rotation never fired when the boundary block had zero receipts. Oversized files then got pruned from eth_getLogs queries.parquet.Store.ObserveEmptyBlock now rotates on empty-boundary blocks.

Testing performed to validate your change

  • TestFilterLogsSurvivesEmptyRotationBoundary / TestFilterLogsSurvivesBoundaryThatCrossesFileWidth — regress the empty-boundary bug.
  • TestCachedReceiptStoreMergesDuckDBAndCache{AcrossBoundary,ReceiptsAcrossBoundary} — exercise the cache+parquet merge path for logs and receipts.
  • Tested on node and run RPC queries on it

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 21, 2026

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedApr 21, 2026, 2:01 PM

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2026

Codecov Report

❌ Patch coverage is 73.25581% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.37%. Comparing base (f55a48e) to head (df5374f).

Files with missing lines Patch % Lines
sei-db/ledger_db/parquet/store.go 74.54% 8 Missing and 6 partials ⚠️
sei-db/ledger_db/receipt/parquet_store.go 28.57% 3 Missing and 2 partials ⚠️
sei-db/ledger_db/receipt/cached_receipt_store.go 83.33% 2 Missing and 2 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3280      +/-   ##
==========================================
+ Coverage   59.35%   59.37%   +0.01%     
==========================================
  Files        2072     2072              
  Lines      169919   169968      +49     
==========================================
+ Hits       100852   100911      +59     
+ Misses      60279    60264      -15     
- Partials     8788     8793       +5     
Flag Coverage Δ
sei-chain-pr 74.58% <73.25%> (?)
sei-db 70.41% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
sei-db/ledger_db/receipt/cached_receipt_store.go 90.71% <83.33%> (+4.73%) ⬆️
sei-db/ledger_db/receipt/parquet_store.go 69.97% <28.57%> (+2.15%) ⬆️
sei-db/ledger_db/parquet/store.go 69.18% <74.54%> (+0.76%) ⬆️

... and 29 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jewei1997 jewei1997 changed the title Fix merge results log cache Align parquet file rotation with cache chunk boundaries Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants