Repository navigation
Conversation
tamirms
force-pushed
the
tamirms/cold-read-panics-to-errors
branch
from
October 21, 2026 08:48
514857a to
80fbd4e
Compare
tamirms
force-pushed
the
tamirms/cold-read-panics-to-errors
branch
from
October 21, 2026 09:12
80fbd4e to
9c5401e
Compare
tamirms
force-pushed
the
tamirms/cold-read-panics-to-errors
branch
from
October 21, 2026 11:16
9c5401e to
0fab37e
Compare
tamirms
force-pushed
the
tamirms/cold-read-panics-to-errors
branch
from
October 21, 2026 14:04
0fab37e to
8f6a81d
Compare
tamirms
force-pushed
the
tamirms/cold-read-panics-to-errors
branch
from
October 21, 2026 14:07
8f6a81d to
89eafaf
Compare
tamirms
force-pushed
the
tamirms/cold-read-panics-to-errors
branch
2 times, most recently
from
October 21, 2026 17:05
20d0029 to
5aefee6
Compare
tamirms
force-pushed
the
tamirms/cold-read-panics-to-errors
branch
from
October 21, 2026 17:15
5aefee6 to
cc9c643
Compare
tamirms
force-pushed
the
tamirms/cold-read-panics-to-errors
branch
2 times, most recently
from
October 22, 2026 19:46
06facb1 to
f5786df
Compare
tamirms
force-pushed
the
tamirms/cold-read-panics-to-errors
branch
6 times, most recently
from
October 26, 2026 09:12
32cdb16 to
0b548b7
Compare
tamirms
force-pushed
the
tamirms/cold-read-panics-to-errors
branch
from
November 12, 2026 09:00
e673df0 to
5232a4a
Compare
tamirms
force-pushed
the
tamirms/cold-read-panics-to-errors
branch
4 times, most recently
from
November 12, 2026 14:38
0172f91 to
c62725e
Compare
tamirms
force-pushed
the
tamirms/cold-read-panics-to-errors
branch
2 times, most recently
from
November 13, 2026 07:50
b4ea76e to
af5bd6b
Compare
tamirms
force-pushed
the
tamirms/cold-read-panics-to-errors
branch
from
November 13, 2026 09:55
af5bd6b to
c3f92fb
Compare
tamirms
force-pushed
the
tamirms/cold-read-panics-to-errors
branch
2 times, most recently
from
November 13, 2026 12:34
472ac9f to
d1b56b2
Compare
tamirms
force-pushed
the
tamirms/cold-read-panics-to-errors
branch
2 times, most recently
from
November 13, 2026 13:16
41a411e to
46f859e
Compare
tamirms
force-pushed
the
tamirms/cold-read-panics-to-errors
branch
from
November 14, 2026 08:41
46f859e to
0edfbc7
Compare
tamirms
force-pushed
the
tamirms/cold-read-panics-to-errors
branch
from
November 16, 2026 07:51
0edfbc7 to
5856b76
Compare
tamirms
force-pushed
the
tamirms/cold-read-panics-to-errors
branch
from
November 16, 2026 10:29
5856b76 to
148d81e
Compare
tamirms
force-pushed
the
tamirms/cold-read-panics-to-errors
branch
from
November 16, 2026 13:17
148d81e to
5928aa4
Compare
Three goroutines on the cold read path ran outside the bridge's recover, so a panic in any of them ended the process. A ReadItems worker now recovers a panic into a packfile.PanicError and keeps its record workspace out of the pool. The MPHF load sends a panic the same way as its load error. The error's message is plain, because queryEvents and getEvents copy internal error messages into client responses; the panic value and stack ride on the error instead, and both handlers log them as fields when they log the failure. The packfile open goroutine only swallows a panic: sync.OnceValue repeats it in the request's own waitOpen, where the bridge recovers it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wwsd8qTEGeSb7poFEYcgg9
doOpen closed the file on each error return, but a panic in openFile skipped those closes. With the open goroutine now recovering the panic, the file stayed open until the garbage collector closed it. A deferred close now covers every path that does not hand the file to the Reader. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A panic on one of the cold read path's background goroutines now fails the request instead of ending the process.
ReadItemsworker recovers a panic into apackfile.PanicErrorand keeps its record workspace out of the pool, since the workspace may be half written.OpenColdReadersends a panic the same way, as its load error.sync.OnceValuerepeats it in the request's ownwaitOpencall, where the bridge recovers it.A
PanicError's message is only the operation and "panicked", because queryEvents and getEvents copy internal error messages into client responses. The panic value and stack ride on the error, and both handlers log them as fields when they log the failure.Tests:
TestReadItemsWorkerPanicIsAnErrormakes a worker panic and requires a plain error that carries the value and stack, and a reader that keeps serving;TestWithPanicLogsValueAndStackrequires the handlers' log entry to carry both.Why
The bridge turns a handler panic into a failed request and logs its stack, but these three goroutines run outside its recover, so a panic in any of them exits the process. The
ReadItemsworkers run on the request path since #1086 reads cold data 8 at a time; the other two predate this stack. No input is known to make them panic: records carry CRC32C, zstd checks its frames, and counts are checked at open. A bug that does panic now fails the requests that reach it and logs its stack, the same trade the bridge makes for handler panics.🤖 Generated with Claude Code