changefeedccl: Fix cluster ID check logic#106359
Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom Jul 7, 2023
Merged
changefeedccl: Fix cluster ID check logic#106359craig[bot] merged 1 commit intocockroachdb:masterfrom
craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
Member
samiskin
approved these changes
Jul 7, 2023
| `foo: [0]->{"after": null}`, | ||
| }) | ||
| } | ||
| cdcTest(t, testFn, feedTestForceSink("cloudstorage")) |
Contributor
There was a problem hiding this comment.
I assume this would work with feedTestEnterpriseSinks
Contributor
Author
There was a problem hiding this comment.
Sure; I just copied it from elsewhere; changed.
Comment on lines
+1406
to
+1410
| // Resume; we expect to see deleted row. | ||
| require.NoError(t, jobFeed.Resume()) | ||
| assertPayloads(t, foo, []string{ | ||
| `foo: [0]->{"after": null}`, | ||
| }) |
Contributor
There was a problem hiding this comment.
Could add a check for us automatically setting the CreationClusterID correctly afterwards after resuming
Comment on lines
+1111
to
+1112
| // ensureClusterIDMatches verifies that this job record matches | ||
| // the cluster ID of this cluster. |
Contributor
There was a problem hiding this comment.
could help to mention the context (streaming replication) in which this would error
| // the cluster ID of this cluster. | ||
| func (b *changefeedResumer) ensureClusterIDMatches(ctx context.Context, clusterID uuid.UUID) error { | ||
| if createdBy := b.job.Payload().CreationClusterID; createdBy == uuid.Nil { | ||
| // This cluster was upgraded from the version that did not set clusterID |
Contributor
There was a problem hiding this comment.
Suggested change
| // This cluster was upgraded from the version that did not set clusterID | |
| // This cluster was upgraded from a version that did not set clusterID |
Changefeeds created prior to cockroachdb#99841 do not have cluster ID field set in their job record. As a result, when upgrading to 23.1.x version, changefeeds created prior to that version will fail with an error message introduced by the above PR. Fix the cluster ID checking logic to handle this case. Fixes cockroachdb#106358 Release note (enterprise change): Changefeeds should no longer fail when upgrading to version 23.1.5.
Contributor
Author
|
bors r+ |
Contributor
|
Build succeeded: |
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.
Changefeeds created prior to
#99841 do not have cluster ID field set in their job record. As a result, when upgrading to 23.1.x version, changefeeds created prior to that version will fail with an error message introduced by the above PR.
Fix the cluster ID checking logic to handle this case.
Fixes #106358
Release note (enterprise change): Changefeeds should no longer fail when upgrading to version 23.1.5.