commitWrite currently panics on synchronous WriteRecord errors:
The only way this can error is if w.err is set here:
w.err is set on close and when the flusher is in error state when we queue a block:
However, the flusher retries, so it's unclear that we should be exposing this error at all.
The error handling when commitWrite (as the commitEnv.write callback) returns an error is incomplete, at least when the error is ErrInvalidBatch.
See #5984
Jira issue: PEBBLE-1429
commitWritecurrently panics on synchronousWriteRecorderrors:pebble/db.go
Line 951 in f140dd5
The only way this can error is if
w.erris set here:pebble/record/log_writer.go
Line 975 in b189a4e
w.erris set on close and when the flusher is in error state when we queue a block:pebble/record/log_writer.go
Line 863 in b189a4e
However, the flusher retries, so it's unclear that we should be exposing this error at all.
The error handling when
commitWrite(as thecommitEnv.writecallback) returns an error is incomplete, at least when the error isErrInvalidBatch.See #5984
Jira issue: PEBBLE-1429