Add offset support to MemoryFreezer #1965
+195
−17
Open
Claude / Claude Code Review
completed
May 15, 2026 in 12m 44s
Code review found 1 important issue
Found 5 candidates, confirmed 1. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 1 |
| 🟡 Nit | 0 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🔴 Important | core/rawdb/freezer_memory.go:266-276 |
AncientBytes left non-offset-aware while Ancient/AncientRange were updated |
Annotations
Check failure on line 276 in core/rawdb/freezer_memory.go
claude / Claude Code Review
AncientBytes left non-offset-aware while Ancient/AncientRange were updated
MemoryFreezer.AncientBytes (core/rawdb/freezer_memory.go:467-490) was not updated to be offset-aware, while this PR adds offset translation to Ancient and AncientRange. With offset > 0, AncientBytes silently disagrees with Ancient/AncientRange: e.g. AncientBytes("test", 12, 0, n) on a freezer with offset=10 and items at absolute ids 10..12 hits the t.items<=start guard and returns errOutOfBounds, while AncientBytes("test", 2, 0, n) — below the absolute start — would silently return data for what
Loading