Skip to content

adapter: rename staged_cancellation to connection_cancel_watches#36631

Open
aljoscha wants to merge 1 commit into
MaterializeInc:mainfrom
aljoscha:push-owvstuolwsvm
Open

adapter: rename staged_cancellation to connection_cancel_watches#36631
aljoscha wants to merge 1 commit into
MaterializeInc:mainfrom
aljoscha:push-owvstuolwsvm

Conversation

@aljoscha
Copy link
Copy Markdown
Contributor

The map of per-connection cancel watch channels was named for its historical sole consumer (staged sequencing in sequence_staged / handle_spawn), but the mechanism itself is generic: any code path that wants a connection-scoped "has this been cancelled?" signal can install/remove an entry. handle_privileged_cancel already pokes the sender from outside the staged path.

Rename the field to connection_cancel_watches and rewrite the doc comment to describe the abstraction (a per-connection watch consumed by whatever has cancellable work in flight) rather than naming a single caller. Also tighten the docs on sequence_staged / handle_spawn to point at the renamed map.

Work towards https://github.com/MaterializeInc/database-issues/issues/6686

The map of per-connection cancel watch channels was named for its
historical sole consumer (staged sequencing in `sequence_staged` /
`handle_spawn`), but the mechanism itself is generic: any code path
that wants a connection-scoped "has this been cancelled?" signal can
install/remove an entry. `handle_privileged_cancel` already pokes the
sender from outside the staged path.

Rename the field to `connection_cancel_watches` and rewrite the doc
comment to describe the abstraction (a per-connection watch consumed by
whatever has cancellable work in flight) rather than naming a single
caller. Also tighten the docs on `sequence_staged` / `handle_spawn` to
point at the renamed map.

Work towards MaterializeInc/database-issues#6686

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@aljoscha aljoscha requested a review from a team as a code owner May 20, 2026 08:54
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