Skip to content

persist: log full error chain for indeterminate compare_and_append er… - #37901

Open
peterdukelarsen wants to merge 1 commit into
MaterializeInc:mainfrom
peterdukelarsen:pl/persist-log-error-causes
Open

persist: log full error chain for indeterminate compare_and_append er…#37901
peterdukelarsen wants to merge 1 commit into
MaterializeInc:mainfrom
peterdukelarsen:pl/persist-log-error-causes

Conversation

@peterdukelarsen

Copy link
Copy Markdown
Contributor

Motivation

Unable to see detailed error about why persist failed to compare_and_append.

"compare_and_append received an indeterminate error, retrying in 16s: indeterminate: db error"

Description

Format with display_with_causes(), matching retry_external, so the cause chain reaches the log line.

Verification

…rors

The compare_and_append retry loop logged the Indeterminate error with
its plain Display. A tokio_postgres error renders as just "db error"
there, because the underlying DbError (SQLSTATE, message, detail, hint)
is only reachable through the source chain. Format with
display_with_causes(), matching retry_external, so the cause chain
reaches the log line.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@peterdukelarsen
peterdukelarsen requested a review from a team as a code owner July 27, 2026 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant