Skip to content

Conversation

@rafiss
Copy link
Collaborator

@rafiss rafiss commented Aug 12, 2024

This will avoid errors of the form: "cannot perform other schema changes in the same transaction as a primary key change."

informs: #128615
Release note: None

@rafiss rafiss requested review from a team and annrpom August 12, 2024 18:46
@rafiss rafiss requested a review from a team as a code owner August 12, 2024 18:46
@rafiss rafiss requested review from herkolategan and vidit-bhat and removed request for a team August 12, 2024 18:46
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@fqazi fqazi left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @annrpom, @herkolategan, @rafiss, and @vidit-bhat)


pkg/workload/schemachange/operation_generator.go line 200 at r1 (raw file):

		if numOpsInTxn != 1 {
			// DML and PK changes are only allowed in single-statement transactions.
			if isDMLOpType(op) || op == alterTableAlterPrimaryKey {

We should allow this for declarative txns? Those support doing multiple operations

…actions

This will avoid errors of the form: "cannot perform other schema changes
in the same transaction as a primary key change."

Release note: None
@rafiss rafiss force-pushed the fix-rsw-pk-change branch from 6f185a6 to 0c84c13 Compare August 12, 2024 20:59
Copy link
Collaborator Author

@rafiss rafiss left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @annrpom, @fqazi, @herkolategan, and @vidit-bhat)


pkg/workload/schemachange/operation_generator.go line 200 at r1 (raw file):

Previously, fqazi (Faizan Qazi) wrote…

We should allow this for declarative txns? Those support doing multiple operations

done

@rafiss rafiss requested a review from fqazi August 12, 2024 20:59
Copy link
Collaborator

@fqazi fqazi 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 1 of 2 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @annrpom, @herkolategan, and @vidit-bhat)

@rafiss
Copy link
Collaborator Author

rafiss commented Aug 12, 2024

bors r+

@craig
Copy link
Contributor

craig bot commented Aug 12, 2024

@craig craig bot merged commit 6bae06f into cockroachdb:master Aug 12, 2024
@rafiss rafiss deleted the fix-rsw-pk-change branch August 13, 2024 16:02
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.

3 participants