adapter: introduce internal-only subscribes#36845
Merged
Merged
Conversation
Add an `internal: bool` field on `ActiveSubscribe` so that callers can mark a subscribe as system-internal. Internal subscribes are not advertised via `mz_subscriptions` (no row write/retract on set up or tear down). The existing user-facing call site in `sequence_subscribe` sets the flag to `false`, preserving today's behavior. Also demote the "drop_compute_sinks called on nonexistent sink" log from `error!` to `debug!`: an internal subscribe may be torn down through its own path while session-disconnect cleanup is in flight, and that race is benign. This is preparation for the upcoming frontend OCC read-then-write path, which uses a long-lived internal SUBSCRIBE to maintain accumulated diffs. Work towards MaterializeInc/database-issues#6686
ggevay
approved these changes
Jun 2, 2026
Contributor
Author
|
tyty, as always! 🙇♂️ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add an
internal: boolfield onActiveSubscribeso that callers can mark a subscribe as system-internal. Internal subscribes are not advertised viamz_subscriptions(no row write/retract on set up or tear down).The existing user-facing call site in
sequence_subscribesets the flag tofalse, preserving today's behavior.Also demote the "drop_compute_sinks called on nonexistent sink" log from
error!todebug!: an internal subscribe may be torn down through its own path while session-disconnect cleanup is in flight, and that race is benign.This is preparation for the upcoming frontend OCC read-then-write path, which uses a long-lived internal SUBSCRIBE to maintain accumulated diffs.
Work towards https://github.com/MaterializeInc/database-issues/issues/6686