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

Remove obsolete sink partition strategy #31463

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

Conversation

martykulma
Copy link
Contributor

@martykulma martykulma commented Feb 11, 2025

Refactors Kafka sink to only use v1 strategy for publishing. This removes the concept of a partitioning strategy version, which was use for migration from old (v0) to new (v1).

Motivation

Migration for existing users is completed, removing legacy code.

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.

@martykulma martykulma marked this pull request as ready for review February 12, 2025 16:57
@martykulma martykulma requested review from a team as code owners February 12, 2025 16:57
Copy link
Contributor

@def- def- left a comment

Choose a reason for hiding this comment

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

Test changes lgtm. I like removing old code. I have triggered a nightly run (using https://trigger-ci.dev.materialize.com/): https://buildkite.com/materialize/nightly/builds/11125

Copy link
Contributor

@def- def- left a comment

Choose a reason for hiding this comment

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

Nightly shows some fun panics after upgrading: https://buildkite.com/materialize/nightly/builds/11125

platform-checks-materialized-1  | 2025-02-12T18:26:47.574399Z  thread 'main' panicked at src/sql-parser/src/parser.rs:3198:18: internal error: entered unreachable code

Something like this might reproduce it, but haven't run it locally yet: bin/mzcompose --find platform-checks down && bin/mzcompose --find platform-checks run default --scenario=UpgradeEntireMz --check=SinkUpsert
I guess we persist the SQL with the old partition strategy, and then try to parse it in the new version during startup. We should probably still support parsing it so that we can migrate.

@martykulma
Copy link
Contributor Author

I guess we persist the SQL with the old partition strategy, and then try to parse it in the new version during startup. We should probably still support parsing it so that we can migrate.

aye, definitely looks like that's the case 😁

@def-
Copy link
Contributor

def- commented Feb 12, 2025

The reproducer I posted above works locally.

@martykulma
Copy link
Contributor Author

The reproducer I posted above works locally.

Ditto for me, I believe I've fixed the issue - just waiting for tests to run locally. Thanks @def- !

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.

2 participants