Skip to content

adapter: report error to clients when table writer terminates#37001

Draft
DAlperin wants to merge 1 commit into
mainfrom
dovalperin/per-14-persist-group-commit-reports-success-to-clients-when-a689
Draft

adapter: report error to clients when table writer terminates#37001
DAlperin wants to merge 1 commit into
mainfrom
dovalperin/per-14-persist-group-commit-reports-success-to-clients-when-a689

Conversation

@DAlperin

Copy link
Copy Markdown
Member

Motivation

In group_commit_apply, when the persist table writer's oneshot channel returns Err (the sender was dropped before sending a result), the writes are in an indefinite state. Previously we only logged a warning and then fell through to advance the oracle and notify clients of success via ctx.retire(result) — telling clients their writes were durably persisted when they may not have been.

Description

On the Err branch we now record that the write is in an indefinite state and, when retiring each affected client, replace the success result with an AdapterError::Internal rather than reporting success. The rest of the flow (oracle advance, timeline advancement, internal notifies) is unchanged, matching the prior best-effort behavior on this shutdown-adjacent path.

Verification

No automated test added — this is a narrow error-reporting fix on a hard-to-reproduce failure path (writer task aborted mid-append). Verified by review; the change is local to the notification logic in appends.rs.

In `group_commit_apply`, when the persist table writer's oneshot channel
returns `Err` (sender dropped before sending a result), the writes are in
an indefinite state. Previously we only logged a warning and then fell
through to notify clients of success, telling them their writes were
durably persisted when they may not have been.

Now we propagate an error to the affected clients in this case instead of
reporting success.

Generated with [Linear](https://linear.app/materializeinc/issue/PER-14/persist-group-commit-reports-success-to-clients-when-persist-table#agent-session-eb632c19)

Co-authored-by: linear-code[bot] <222613912+linear-code[bot]@users.noreply.github.com>
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