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

sql: add parser support for XA transactions #129298

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

nvanbenschoten
Copy link
Member

@nvanbenschoten nvanbenschoten commented Aug 20, 2024

Informs #22329.

This commit adds new syntax for PREPARE TRANSACTION <gid>, COMMIT PREPARED <gid>, and ROLLBACK PREPARED <gid>, for parity with Postgres support.

Handling of the syntax is currently unimplemented.

Release note: None

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@nvanbenschoten nvanbenschoten force-pushed the nvanbenschoten/2pcSyntax branch from 4f9288e to 8bbc691 Compare August 20, 2024 13:57
@cockroachdb cockroachdb deleted a comment from blathers-crl bot Aug 20, 2024
@nvanbenschoten nvanbenschoten force-pushed the nvanbenschoten/2pcSyntax branch from 8bbc691 to 0b32909 Compare August 20, 2024 16:55
Copy link

blathers-crl bot commented Aug 20, 2024

Your pull request contains more than 1000 changes. It is strongly encouraged to split big PRs into smaller chunks.

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

Informs cockroachdb#22329.

This commit adds new syntax for `PREPARE TRANSACTION <gid>`,
`COMMIT PREPARED <gid>`, and `ROLLBACK PREPARED <gid>`, for
parity with Postgres support.

Handling of the syntax is currently unimplemented.

Release note: None
@nvanbenschoten nvanbenschoten force-pushed the nvanbenschoten/2pcSyntax branch from 0b32909 to c66a374 Compare December 12, 2024 02:51
@nvanbenschoten nvanbenschoten marked this pull request as ready for review December 12, 2024 03:44
@nvanbenschoten nvanbenschoten requested review from a team as code owners December 12, 2024 03:44
Copy link
Collaborator

@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.

lgtm!

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

@nvanbenschoten
Copy link
Member Author

TFTR!

bors r=rafiss

craig bot pushed a commit that referenced this pull request Dec 12, 2024
129295: sql: add max_prepared_transactions variable r=rafiss a=nvanbenschoten

Informs #22329.

This commit adds the `max_prepared_transactions` session variable, returning a value of math.MaxInt32 to indicate that there is no limit on the number of prepared transactions that can be created.

This change has the effect of unblocking the pgjdbc `XADataSourceTest` test suite, which was previously failing during initialization. Is also includes a small patch to work around #31632 (unsupported deferrable qualifier) so that each test in the XA test suite actually runs (and fails, for the most part).

Release note: None

129298: sql: add parser support for XA transactions r=rafiss a=nvanbenschoten

Informs #22329.

This commit adds new syntax for `PREPARE TRANSACTION <gid>`, `COMMIT PREPARED <gid>`, and `ROLLBACK PREPARED <gid>`, for parity with Postgres support.

Handling of the syntax is currently unimplemented.

Release note: None

Co-authored-by: Nathan VanBenschoten <[email protected]>
@craig
Copy link
Contributor

craig bot commented Dec 12, 2024

Build failed (retrying...):

craig bot pushed a commit that referenced this pull request Dec 12, 2024
129298: sql: add parser support for XA transactions r=rafiss a=nvanbenschoten

Informs #22329.

This commit adds new syntax for `PREPARE TRANSACTION <gid>`, `COMMIT PREPARED <gid>`, and `ROLLBACK PREPARED <gid>`, for parity with Postgres support.

Handling of the syntax is currently unimplemented.

Release note: None

Co-authored-by: Nathan VanBenschoten <[email protected]>
@craig
Copy link
Contributor

craig bot commented Dec 12, 2024

Build failed:

@nvanbenschoten
Copy link
Member Author

bors retry

craig bot pushed a commit that referenced this pull request Dec 12, 2024
129295: sql: add max_prepared_transactions variable r=rafiss a=nvanbenschoten

Informs #22329.

This commit adds the `max_prepared_transactions` session variable, returning a value of math.MaxInt32 to indicate that there is no limit on the number of prepared transactions that can be created.

This change has the effect of unblocking the pgjdbc `XADataSourceTest` test suite, which was previously failing during initialization. Is also includes a small patch to work around #31632 (unsupported deferrable qualifier) so that each test in the XA test suite actually runs (and fails, for the most part).

Release note: None

129297: sql: create system.prepared_transactions table r=rafiss a=nvanbenschoten

Informs #22329.

This commit adds a new `system.prepared_transactions` table, which will be used to track prepared transactions. The table includes all of the information needed to implement XA two-phase commit transactions, along with additional metadata needed to implement `pg_catalog.pg_prepared_xacts`.

Release note: None

129298: sql: add parser support for XA transactions r=rafiss a=nvanbenschoten

Informs #22329.

This commit adds new syntax for `PREPARE TRANSACTION <gid>`, `COMMIT PREPARED <gid>`, and `ROLLBACK PREPARED <gid>`, for parity with Postgres support.

Handling of the syntax is currently unimplemented.

Release note: None

Co-authored-by: Nathan VanBenschoten <[email protected]>
@craig
Copy link
Contributor

craig bot commented Dec 12, 2024

Build failed (retrying...):

craig bot pushed a commit that referenced this pull request Dec 12, 2024
129297: sql: create system.prepared_transactions table r=rafiss a=nvanbenschoten

Informs #22329.

This commit adds a new `system.prepared_transactions` table, which will be used to track prepared transactions. The table includes all of the information needed to implement XA two-phase commit transactions, along with additional metadata needed to implement `pg_catalog.pg_prepared_xacts`.

Release note: None

129298: sql: add parser support for XA transactions r=rafiss a=nvanbenschoten

Informs #22329.

This commit adds new syntax for `PREPARE TRANSACTION <gid>`, `COMMIT PREPARED <gid>`, and `ROLLBACK PREPARED <gid>`, for parity with Postgres support.

Handling of the syntax is currently unimplemented.

Release note: None

Co-authored-by: Nathan VanBenschoten <[email protected]>
@craig
Copy link
Contributor

craig bot commented Dec 12, 2024

Build failed (retrying...):

craig bot pushed a commit that referenced this pull request Dec 12, 2024
129298: sql: add parser support for XA transactions r=rafiss a=nvanbenschoten

Informs #22329.

This commit adds new syntax for `PREPARE TRANSACTION <gid>`, `COMMIT PREPARED <gid>`, and `ROLLBACK PREPARED <gid>`, for parity with Postgres support.

Handling of the syntax is currently unimplemented.

Release note: None

Co-authored-by: Nathan VanBenschoten <[email protected]>
@craig
Copy link
Contributor

craig bot commented Dec 12, 2024

Build failed:

@nvanbenschoten
Copy link
Member Author

EngFlow issues this morning.

bors retry

@craig craig bot merged commit 1a038d8 into cockroachdb:master Dec 12, 2024
22 checks passed
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