fix(db/remote): Fix remote db issues - #4030
Conversation
|
Claude finished @brbrr's task in 6m 48s —— View job Review: PR #4030 — fix(db/remote): Fix remote db issues
The four fixes described in the PR body all check out against the code:
Couldn't inline these because they land outside the diff hunks GitHub allows comments on, so noting them here: Important
Nit
No blockers — the core logic changes are sound and match the described root causes. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4030 +/- ##
==========================================
- Coverage 79.28% 79.16% -0.12%
==========================================
Files 464 464
Lines 35793 35815 +22
==========================================
- Hits 28377 28354 -23
- Misses 7407 7452 +45
Partials 9 9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Claude finished @brbrr's task in 6m 8s —— View job Review: PR #4030 — fix(db/remote): Fix remote db issues
SummaryThis revision (
I traced every production call site of Also verified: Nit
No blockers. The core fixes (missing |
|
Claude finished @brbrr's task in 4m 20s —— View job Review: PR #4030 — fix(db/remote): Fix remote db issues
SummaryThis push ( I re-reviewed the full diff against
Both previously-flagged Important issues (unclosed batch in
No blockers, no new findings. This PR looks ready to merge pending CI. |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
User description
Op_FIRSTwas not implemented. The server's cursor switch fell through tounknown operation, which killed the stream. Every prefixedScanstarts withit.First(), so all of them failed.NewIteratordiscarded the prefix and the upper-bound flag, so the server opened a whole-database iterator andFirstreturned a key from a foreign bucket - silently wrong scan results, not an error.blockchain/statebackend/deprecated.goopened anIndexedBatchper state read and returnedNoopStateCloser. Free on pebble, but on a remote DB that batch is a live stream plus a pinned server-side batch.PR Type
Bug fix, Tests
Description
Disable migrations for remote databases
Release state read batches via proper closers
Fix remote iterator bounds and
Op_FIRSTClose remote transactions with context cancellation
File Walkthrough
7 files
Release indexed batches after state readsAdd transaction context and discard helpersIntroduce ownedIterator closing its transactionSend iterator bounds and release stream contextHandle Op_FIRST and pass cursor boundsCreate cursors with bounds and close transactionSkip migrations when using remote database2 files
Add remote iterator bounds and first testsTest migration skip for remote database1 files
Document Op_FIRST and V flag semantics