Repository navigation
Assign new IDs to recreated topics - #434
Open
novatechflow wants to merge 1 commit into
Open
novatechflow wants to merge 1 commit into
novatechflow wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Summary
A deleted and recreated topic currently reuses its name-derived topic ID, so clients cannot distinguish its old incarnation from the new one. New API and operator topic creations now allocate random v4 UUIDs and persist them with the metadata snapshot.
Snapshot publication keeps the committed ID across reconciliation, partition expansion and concurrent writers. An optional resource-UID map in the same snapshot distinguishes Kubernetes resource incarnations, survives broker mutations and is cleared on topic deletion. Existing stored IDs remain unchanged, including the legacy name-derived fallback for snapshots without an explicit ID.
Kafka Fetch and Metadata requests carrying a deleted topic's old ID now resolve to
UNKNOWN_TOPIC_ID. The real librdkafka test obtains topic IDs from Metadata rather than deriving them. Protocol documentation and release notes describe persistence and upgrade behavior.Closes #424.
Testing
-race.go test ./pkg/metadata ./pkg/operator.KAFSCALE_E2E=1 go test -race -tags=e2e ./test/e2e -run '^(TestLibrdkafkaCompatibilityE2E|TestSnapshotPublishAndBrokerConsumption)$' -count=1 -timeout=3m.go vet -tags=e2e ./pkg/metadata ./pkg/operator ./cmd/broker ./test/e2e.make commit-checkis running. Local CodeQL 2.27.2 has a known incompatibility with the latest query-model format; the final outcome will be recorded here.Checklist