-
Notifications
You must be signed in to change notification settings - Fork 121
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
feat: add option for retrying DML as PDML #3480
Merged
Merged
Conversation
This file contains 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
Adds an option to the Connection API for automatically retrying DML statements as Partitioned DML, if the DML statement fails due to exceeding the Spanner mutation limit. The retry as Partitiond DML fails if the DML statement is not suitable for Partitioned DML. The option can be enabled with the `fallback_to_partitioned_dml` connection variable. This can be set with a SQL statement like this: ``` SET FALLBACK_TO_PARTITIONED_DML = TRUE; UPDATE my_table SET active=true WHERE true; ``` The property can also be set in the connection URL and by calling the method `Connection#setFallbackToPartitionedDml(boolean)`. This option can also be used in the Spanner JDBC driver and PGAdapter, once those libraries include a version of the Spanner client that includes this change.
product-auto-label
bot
added
size: xl
Pull request size is extra large.
api: spanner
Issues related to the googleapis/java-spanner API.
labels
Nov 19, 2024
olavloite
force-pushed
the
retry-dml-as-pdml
branch
from
November 25, 2024 10:53
644cbdb
to
f3d6226
Compare
rayudu3745
approved these changes
Nov 25, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
sakthivelmanii
approved these changes
Nov 25, 2024
svc-squareup-copybara
pushed a commit
to cashapp/misk
that referenced
this pull request
Dec 4, 2024
| Package | Type | Package file | Manager | Update | Change | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-spanner](https://github.com/googleapis/java-spanner) | dependencies | misk/gradle/libs.versions.toml | gradle | minor | `6.81.2` -> `6.82.0` | | [org.flywaydb:flyway-gradle-plugin](https://flywaydb.org) ([source](https://github.com/flyway/flyway)) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `11.0.0` -> `11.0.1` | | [software.amazon.awssdk:sdk-core](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.29.24` -> `2.29.27` | | [software.amazon.awssdk:dynamodb-enhanced](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.29.24` -> `2.29.27` | | [software.amazon.awssdk:dynamodb](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.29.24` -> `2.29.27` | | [software.amazon.awssdk:aws-core](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.29.24` -> `2.29.27` | | [software.amazon.awssdk:bom](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.29.24` -> `2.29.27` | | [software.amazon.awssdk:auth](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.29.24` -> `2.29.27` | --- ### Release Notes <details> <summary>googleapis/java-spanner (com.google.cloud:google-cloud-spanner)</summary> ### [`v6.82.0`](https://github.com/googleapis/java-spanner/blob/HEAD/CHANGELOG.md#6820-2024-12-04) ##### Features - Add option for retrying DML as PDML ([#​3480](googleapis/java-spanner#3480)) ([b545557](googleapis/java-spanner@b545557)) - Add the last statement option to ExecuteSqlRequest and ExecuteBatchDmlRequest ([76ab801](googleapis/java-spanner@76ab801)) ##### Bug Fixes - **deps:** Update the Java code generator (gapic-generator-java) to 2.50.0 ([76ab801](googleapis/java-spanner@76ab801)) - Shutdown built in metrics meter provider ([#​3518](googleapis/java-spanner#3518)) ([c935e2e](googleapis/java-spanner@c935e2e)) - **spanner:** GetEdition() is returning null for Instance ([#​3496](googleapis/java-spanner#3496)) ([77cb585](googleapis/java-spanner@77cb585)) ##### Dependencies - Update dependency commons-io:commons-io to v2.18.0 ([#​3492](googleapis/java-spanner#3492)) ([5c8b3ad](googleapis/java-spanner@5c8b3ad)) ##### Documentation - Add Multi Region Encryption samples ([#​3524](googleapis/java-spanner#3524)) ([316f971](googleapis/java-spanner@316f971)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 6pm every weekday,before 2am every weekday" in timezone Australia/Melbourne, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). GitOrigin-RevId: 20ef292c9bda52c160283aea5bcf8ed8c6a44e21
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
api: spanner
Issues related to the googleapis/java-spanner API.
size: xl
Pull request size is extra large.
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.
Adds an option to the Connection API for automatically retrying DML statements as Partitioned DML, if the DML statement fails due to exceeding the Spanner mutation limit. The retry as Partitiond DML fails if the DML statement is not suitable for Partitioned DML.
The option can be enabled with a new value for the
autocommit_dml_mode
connection variable. This can be set with a SQL statement like this:The property can also be set in the connection URL and by calling the method
Connection#setAutoCommitDmlMode(com.google.cloud.spanner.connection.AutoCommitDmlMode)
.This option can also be used in the Spanner JDBC driver and PGAdapter, once those libraries include a version of the Spanner client that includes this change.