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

changefeedccl: emit mvcc_timestamp for avro format #129840

Merged

Conversation

rharding6373
Copy link
Collaborator

This PR adds support for the mvcc_timestamp option with the avro format. Before this change, changefeeds using avro would not fail if mvcc_timestamp was specified, but would ignore the option. Now avro supports the mvcc_timestamp by adding mvcc_timestamp to the schema and emitting the mvcc value with the row data.

Epic: none
Fixes: #123078

Release note (enterprise change): Adds changefeed support for the mvcc_timestamp option with the avro format. If both options are specified, the avro schema includes an mvcc_timestamp metadata field and emits the row's mvcc timestamp with the row data.

@rharding6373 rharding6373 requested a review from a team as a code owner August 28, 2024 23:50
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@andyyang890 andyyang890 left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @rharding6373)


pkg/ccl/changefeedccl/changefeed_test.go line 1001 at r1 (raw file):

}

func TestChangefeedMVCCTimestampsAvro(t *testing.T) {

Nice test!


pkg/ccl/changefeedccl/changefeed_test.go line 1009 at r1 (raw file):

		sqlDB.Exec(t, `CREATE TABLE mvcc_timestamp_test_table (id UUID PRIMARY KEY DEFAULT gen_random_uuid())`)

		rowCount := 5

nit: use const

This PR adds support for the mvcc_timestamp option with the avro format.
Before this change, changefeeds using avro would not fail if
mvcc_timestamp was specified, but would ignore the option. Now avro
supports the mvcc_timestamp by adding mvcc_timestamp to the schema and
emitting the mvcc value with the row data.

Epic: none
Fixes: cockroachdb#123078

Release note (enterprise change): Adds changefeed support for the
mvcc_timestamp option with the avro format. If both options are
specified, the avro schema includes an mvcc_timestamp metadata field and
emits the row's mvcc timestamp with the row data.
@rharding6373 rharding6373 force-pushed the 20240828_avro_mvcc_timestamp_123078 branch from f1365a4 to 597bf39 Compare August 31, 2024 02:50
@rharding6373
Copy link
Collaborator Author

TFTR!

bors r=andyyang890

@craig craig bot merged commit 8551145 into cockroachdb:master Aug 31, 2024
20 checks passed
@rharding6373 rharding6373 deleted the 20240828_avro_mvcc_timestamp_123078 branch September 3, 2024 18:26
@rharding6373
Copy link
Collaborator Author

blathers backport 24.2 24.1 23.2

@rharding6373
Copy link
Collaborator Author

blathers backport 24.1.8-rc

Copy link

blathers-crl bot commented Dec 2, 2024

Based on the specified backports for this PR, I applied new labels to the following linked issue(s). Please adjust the labels as needed to match the branches actually affected by the issue(s), including adding any known older branches.


Issue #123078: branch-release-24.1.8-rc.


🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

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.

Changefeed in Avro format does not include mvcc_timestamp when option is specified
3 participants