Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[storage] Add a progress shard for sinks and skip the snapshot when possible #31152

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

bkirwi
Copy link
Contributor

@bkirwi bkirwi commented Jan 22, 2025

Motivation

Design sketch is here: https://github.com/MaterializeInc/database-issues/issues/8603#issuecomment-2611104841

Tips for reviewer

Adding a collection for sinks makes them much more like other types of things that the storage controller manages, which allows (and forces) us to handle them as a type of collection instead of a separate thing. Reworking this is much of the size of the diff - though the net result is slightly less / more uniform controller code, which is nice.

I've left a number of // TODO(sinks) todos for possible followups that I didn't want to bite off here.

Checklist

  • This PR has adequate test coverage / QA involvement has been duly considered. (trigger-ci for additional test/nightly runs)
  • This PR has an associated up-to-date design doc, is a design doc (template), or is sufficiently small to not require a design.
  • If this PR evolves an existing $T ⇔ Proto$T mapping (possibly in a backwards-incompatible way), then it is tagged with a T-proto label.
  • If this PR will require changes to cloud orchestration or tests, there is a companion cloud PR to account for those changes that is tagged with the release-blocker label (example).
  • If this PR includes major user-facing behavior changes, I have pinged the relevant PM to schedule a changelog post.

@bkirwi bkirwi force-pushed the sink-progress branch 6 times, most recently from e2cec57 to aa0797f Compare January 28, 2025 23:27
@bkirwi bkirwi force-pushed the sink-progress branch 8 times, most recently from 0b12035 to b24b2aa Compare February 5, 2025 23:40
@bkirwi bkirwi changed the title [storage] Sink progress WIP [storage] Add a progress shard for sinks and skip the snapshot when possible Feb 5, 2025
@bkirwi
Copy link
Contributor Author

bkirwi commented Feb 6, 2025

Still doing some testing, but I think this feels more or less right. @aljoscha or @petrosagg, able to take a look?


> SELECT status
FROM mz_internal.mz_sink_statuses
WHERE name = 'snk'
dropped
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously, the read frontier was immediately set to {} for sinks, so having the write frontier progress to {} would mark the sink dropped. After this PR, the read frontier can evolve independently, so the sink is not immediately removed from introspection.

Looking at https://github.com/MaterializeInc/database-issues/issues/8842 - this seems like an improvement, though there may be more to do. (In the future, not on this PR.)

@bkirwi bkirwi force-pushed the sink-progress branch 2 times, most recently from 1941c36 to e008647 Compare February 6, 2025 19:14
@bkirwi bkirwi marked this pull request as ready for review February 7, 2025 02:04
@bkirwi bkirwi requested review from a team as code owners February 7, 2025 02:04
@bkirwi bkirwi requested a review from ParkMyCar February 7, 2025 02:04
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