Skip to content

db: reconsider commit error handling #6004

Description

@RaduBerinde

commitWrite currently panics on synchronous WriteRecord errors:

pebble/db.go

Line 951 in f140dd5

panic(err)

The only way this can error is if w.err is set here:

if w.err != nil {

w.err is set on close and when the flusher is in error state when we queue a block:

w.err = w.flusher.err

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions