Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: googleapis/java-spanner
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v6.65.1
Choose a base ref
...
head repository: googleapis/java-spanner
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v6.66.0
Choose a head ref
  • 14 commits
  • 69 files changed
  • 5 contributors

Commits on Apr 30, 2024

  1. chore(main): release 6.65.2-SNAPSHOT (#3076)

    🤖 I have created a release *beep* *boop*
    ---
    
    
    ### Updating meta-information for bleeding-edge SNAPSHOT release.
    
    ---
    This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
    release-please[bot] authored Apr 30, 2024
    Copy the full SHA
    42341c2 View commit details
  2. chore(deps): update dependency com.google.cloud:google-cloud-spanner …

    …to v6.65.1 (#3070)
    
    * chore(deps): update dependency com.google.cloud:google-cloud-spanner to v6.65.1
    
    * 🦉 Updates from OwlBot post-processor
    
    See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
    
    ---------
    
    Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
    renovate-bot and gcf-owl-bot[bot] authored Apr 30, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    gustavste Gustav
    Copy the full SHA
    3804160 View commit details

Commits on May 2, 2024

  1. chore: propagate otel context in Connection API (#3078)

    * chore: propagate otel context in Connection API
    
    Use a TaskWrapping executor in the Connection API to propagate the
    current OpenTelemetry context to the executor thread. This ensures
    that the context that is used in the end-user application is
    propagated to the Spanner client library, and tracing shows a full
    view of the spans from the application to the gRPC layer.
    
    * 🦉 Updates from OwlBot post-processor
    
    See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
    
    ---------
    
    Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
    olavloite and gcf-owl-bot[bot] authored May 2, 2024
    Copy the full SHA
    0894893 View commit details
  2. refactor: move multiplexed session handling to separate class (#3063)

    * chore: try with random channel hint
    
    * chore: add option for random channel
    
    * chore: actually use random channel option
    
    * chore: only lock the specific wrapper
    
    * chore: simplify creation and assignment
    
    * chore: make more variables final
    
    * chore: use separate pool
    
    * chore: use a separate mux client
    
    * chore: make init blocking
    
    * chore: disable pending tx check
    
    * chore: add call durations to client lib
    
    * chore: add call_durations
    
    * chore: use session pool for mux session
    
    * chore: use mux database client
    
    * chore: make mux client optional
    
    * refactor: move multiplexed session handling to separate class
    
    * chore: cleanup
    
    * feat: add maintainer
    
    * chore: add more tests
    
    * chore: fix test failures
    
    * fix: ChannelUsageTest should keep session in use for longer
    
    * test: skip ChannelUsageTest in all cases
    
    * chore: keep track of DatabaseDeleted errors
    
    * fix: freeze server to prevent flakiness
    
    * fix: freeze server to prevent flakiness
    
    * test: add retry loop for second query
    
    * chore: remove print statements and add emulator handling in test
    
    * test: add tests for maintainer
    
    * chore: register SessionConsumer for reflection
    
    * chore: skip test as it fails on native build
    
    Just skip the entire test, as the scenario is already covered by
    other tests, and spending time on trying to figure out what is
    happening in this failure is just a waste of time.
    
    * 🦉 Updates from OwlBot post-processor
    
    See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
    
    * chore: add random channel hint as option
    
    * chore: add single-use channel hint
    
    * 🦉 Updates from OwlBot post-processor
    
    See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
    
    * chore: single-use hint
    
    * 🦉 Updates from OwlBot post-processor
    
    See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
    
    * chore: use next available channel
    
    * chore: keep track of num transactions and channels in use
    
    * chore: remove println
    
    * chore: remove option for using session pool for mux
    
    * feat: add UNIMPLEMENTED handler
    
    * chore: cleanup
    
    * chore: add TODO for removing the unimplemented handling
    
    * 🦉 Updates from OwlBot post-processor
    
    See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
    
    * chore: run formatter
    
    * test: fix flaky tests
    
    Fixes #3050
    Fixes #3081
    Fixes #3080
    
    ---------
    
    Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
    olavloite and gcf-owl-bot[bot] authored May 2, 2024
    Copy the full SHA
    b2795a7 View commit details

Commits on May 3, 2024

  1. chore: add flag to force-disable multiplexed sessions (#3083)

    Adds an environment variable that can be used to force-disable the
    use of multiplexed sessions.
    olavloite authored May 3, 2024
    Copy the full SHA
    e595157 View commit details
  2. feat: allow DDL with autocommit=false (#3057)

    Adds support for running DDL statements when a connection is in autocommit=false mode. By default, DDL statements are only allowed when no transaction is active. That is; no query or DML statement has been executed which activated a read/write transaction.
    
    A new flag is added that can be used to revert the behavior back to the original behavior where DDL is always refused when autocommit=false. The same flag can also be used to make the API behave the same as MySQL and Oracle, where any active transaction is automatically committed whenever a DDL statement is encountered.
    
    Concretely this means that the following is now allowed:
    
    ```
    set autocommit=false;
    create table Singers (SingerId INT64, Name STRING(MAX)) PRIMARY KEY (SingerId);
    ```
    
    The following is by default NOT allowed, unless
    ddlInTransactionMode=AUTO_COMMIT_TRANSACTION
    
    ```
    set autocommit=false;
    select * from singers; -- This starts a transaction
    create table Albums (AlbumId INT64) PRIMARY KEY (AlbumId); -- This is not allowed
    ```
    olavloite authored May 3, 2024
    Copy the full SHA
    22833ac View commit details
  3. chore: wait for all spans to finish to fix flakiness in test (#3087)

    Fixes #3084
    olavloite authored May 3, 2024
    Copy the full SHA
    c64c8f8 View commit details
  4. chore: use gson Java version util (#3085)

    Uses the gson Java version checker, which is more production-hardened than the custom one in the Spanner client. It seems that the Spanner implementation does not get it right on all versions on Windows.
    olavloite authored May 3, 2024
    Copy the full SHA
    86481b5 View commit details
  5. fix: multiplexed session metrics were not included in refactor move (#…

    …3088)
    
    The metrics for multiplexed sessions were not included in the
    refactoring that moved multiplexed sessions out of the session pool.
    This change re-adds those metrics based on the new client for
    multiplexed sessions.
    olavloite authored May 3, 2024
    Copy the full SHA
    f3589c4 View commit details
  6. chore: mark multiplexed session integration test as required (#3089)

    rahul2393 authored May 3, 2024
    Copy the full SHA
    7e8ca2c View commit details
  7. chore: ignore irrelevant CreateSession calls in test (#3091)

    The CreateSession calls are irrelevant to the test, as multiplexed sessions are not used for read/write transactions.
    
    Fixes #3090
    olavloite authored May 3, 2024
    Copy the full SHA
    789b0fb View commit details
  8. feat: include stack trace of checked out sessions in exception (#3092)

    Include the stack trace of where a session was checked out when the session pool is exhausted. This makes it easier to find the place in application code that is responsible for having checked out sessions, and potentially having leaked these.
    olavloite authored May 3, 2024
    Copy the full SHA
    ba6a0f6 View commit details
  9. deps: update dependency com.google.cloud:sdk-platform-java-config to …

    …v3.30.0 (#3082)
    renovate-bot authored May 3, 2024
    Copy the full SHA
    ddfc98e View commit details
  10. chore(main): release 6.66.0 (#3086)

    Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
    release-please[bot] authored May 3, 2024
    Copy the full SHA
    5394139 View commit details
Showing with 5,683 additions and 585 deletions.
  1. +1 −0 .github/sync-repo-settings.yaml
  2. +1 −1 .github/workflows/unmanaged_dependency_check.yaml
  3. +1 −1 .kokoro/presubmit/graalvm-native-17.cfg
  4. +1 −1 .kokoro/presubmit/graalvm-native.cfg
  5. +18 −0 CHANGELOG.md
  6. +5 −5 README.md
  7. +2 −2 benchmarks/pom.xml
  8. +10 −10 google-cloud-spanner-bom/pom.xml
  9. +2 −2 google-cloud-spanner-executor/pom.xml
  10. +12 −0 google-cloud-spanner/clirr-ignored-differences.xml
  11. +2 −2 google-cloud-spanner/pom.xml
  12. +96 −0 ...loud-spanner/src/main/java/com/google/cloud/spanner/AbstractMultiplexedSessionDatabaseClient.java
  13. +5 −1 google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbstractReadContext.java
  14. +28 −3 google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClientImpl.java
  15. +122 −0 ...le-cloud-spanner/src/main/java/com/google/cloud/spanner/DelayedMultiplexedSessionTransaction.java
  16. +157 −0 google-cloud-spanner/src/main/java/com/google/cloud/spanner/DelayedReadContext.java
  17. +16 −8 google-cloud-spanner/src/main/java/com/google/cloud/spanner/ForwardingAsyncResultSet.java
  18. +6 −2 google-cloud-spanner/src/main/java/com/google/cloud/spanner/ForwardingResultSet.java
  19. +8 −1 google-cloud-spanner/src/main/java/com/google/cloud/spanner/GrpcResultSet.java
  20. +458 −0 google-cloud-spanner/src/main/java/com/google/cloud/spanner/MultiplexedSessionDatabaseClient.java
  21. +4 −0 google-cloud-spanner/src/main/java/com/google/cloud/spanner/PartitionedDmlTransaction.java
  22. +32 −1 google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionImpl.java
  23. +116 −44 google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPool.java
  24. +43 −1 google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPoolOptions.java
  25. +26 −5 google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerImpl.java
  26. +7 −2 google-cloud-spanner/src/main/java/com/google/cloud/spanner/TransactionRunnerImpl.java
  27. +6 −0 google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/Connection.java
  28. +64 −10 google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionImpl.java
  29. +23 −0 google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionOptions.java
  30. +35 −0 google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/DdlInTransactionMode.java
  31. +11 −7 google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/StatementExecutor.java
  32. +4 −5 google-cloud-spanner/src/test/java/com/google/cloud/spanner/AsyncRunnerTest.java
  33. +20 −40 google-cloud-spanner/src/test/java/com/google/cloud/spanner/AsyncTransactionManagerTest.java
  34. +28 −28 google-cloud-spanner/src/test/java/com/google/cloud/spanner/ChannelUsageTest.java
  35. +193 −66 google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseClientImplTest.java
  36. +3 −2 ...le-cloud-spanner/src/test/java/com/google/cloud/spanner/IntegrationTestWithClosedSessionsEnv.java
  37. +3 −10 google-cloud-spanner/src/test/java/com/google/cloud/spanner/JavaVersionUtil.java
  38. +1 −1 google-cloud-spanner/src/test/java/com/google/cloud/spanner/MockSpannerServiceImpl.java
  39. +321 −0 ...panner/src/test/java/com/google/cloud/spanner/MultiplexedSessionDatabaseClientMockServerTest.java
  40. +153 −0 ...le-cloud-spanner/src/test/java/com/google/cloud/spanner/MultiplexedSessionDatabaseClientTest.java
  41. +8 −2 google-cloud-spanner/src/test/java/com/google/cloud/spanner/MultiplexedSessionMaintainerTest.java
  42. +8 −2 google-cloud-spanner/src/test/java/com/google/cloud/spanner/MultiplexedSessionPoolTest.java
  43. +43 −18 google-cloud-spanner/src/test/java/com/google/cloud/spanner/OpenTelemetrySpanTest.java
  44. +3 −1 google-cloud-spanner/src/test/java/com/google/cloud/spanner/ReadAsyncTest.java
  45. +7 −2 google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolTest.java
  46. +70 −2 google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpanTest.java
  47. +6 −3 google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerGaxRetryTest.java
  48. +1 −1 google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionImplTest.java
  49. +14 −7 ...r/src/test/java/com/google/cloud/spanner/connection/ConnectionImplTransactionalReadWriteTest.java
  50. +4 −1 google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionTest.java
  51. +124 −0 google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/DdlTest.java
  52. +38 −8 google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITDatabaseTest.java
  53. +1,189 −0 ...cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/ClientSideStatementsTest.sql
  54. +112 −119 ...r/src/test/resources/com/google/cloud/spanner/connection/ConnectionImplGeneratedSqlScriptTest.sql
  55. +2 −0 ...le-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/ITTransactionModeTest.sql
  56. +1,859 −0 ...er/src/test/resources/com/google/cloud/spanner/connection/postgresql/ClientSideStatementsTest.sql
  57. +112 −119 ...resources/com/google/cloud/spanner/connection/postgresql/ConnectionImplGeneratedSqlScriptTest.sql
  58. +2 −2 grpc-google-cloud-spanner-admin-database-v1/pom.xml
  59. +2 −2 grpc-google-cloud-spanner-admin-instance-v1/pom.xml
  60. +2 −2 grpc-google-cloud-spanner-executor-v1/pom.xml
  61. +2 −2 grpc-google-cloud-spanner-v1/pom.xml
  62. +11 −11 pom.xml
  63. +2 −2 proto-google-cloud-spanner-admin-database-v1/pom.xml
  64. +2 −2 proto-google-cloud-spanner-admin-instance-v1/pom.xml
  65. +2 −2 proto-google-cloud-spanner-executor-v1/pom.xml
  66. +2 −2 proto-google-cloud-spanner-v1/pom.xml
  67. +1 −1 samples/install-without-bom/pom.xml
  68. +1 −1 samples/snapshot/pom.xml
  69. +10 −10 versions.txt
1 change: 1 addition & 0 deletions .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
@@ -14,6 +14,7 @@ branchProtectionRules:
- units (8)
- units (11)
- 'Kokoro - Test: Integration'
- 'Kokoro - Test: Integration with Multiplexed Sessions'
- cla/google
- checkstyle
- compile (8)
2 changes: 1 addition & 1 deletion .github/workflows/unmanaged_dependency_check.yaml
Original file line number Diff line number Diff line change
@@ -17,6 +17,6 @@ jobs:
# repository
.kokoro/build.sh
- name: Unmanaged dependency check
uses: googleapis/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@google-cloud-shared-dependencies/v3.29.0
uses: googleapis/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@google-cloud-shared-dependencies/v3.30.0
with:
bom-path: google-cloud-spanner-bom/pom.xml
2 changes: 1 addition & 1 deletion .kokoro/presubmit/graalvm-native-17.cfg
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.29.0"
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.30.0"
}

env_vars: {
2 changes: 1 addition & 1 deletion .kokoro/presubmit/graalvm-native.cfg
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.29.0"
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.30.0"
}

env_vars: {
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

## [6.66.0](https://github.com/googleapis/java-spanner/compare/v6.65.1...v6.66.0) (2024-05-03)


### Features

* Allow DDL with autocommit=false ([#3057](https://github.com/googleapis/java-spanner/issues/3057)) ([22833ac](https://github.com/googleapis/java-spanner/commit/22833acf9f073271ce0ee10f2b496f3a1d39566a))
* Include stack trace of checked out sessions in exception ([#3092](https://github.com/googleapis/java-spanner/issues/3092)) ([ba6a0f6](https://github.com/googleapis/java-spanner/commit/ba6a0f644b6caa4d2f3aa130c6061341b70957dd))


### Bug Fixes

* Multiplexed session metrics were not included in refactor move ([#3088](https://github.com/googleapis/java-spanner/issues/3088)) ([f3589c4](https://github.com/googleapis/java-spanner/commit/f3589c430b0e84933a91008bb306c26089788357))


### Dependencies

* Update dependency com.google.cloud:sdk-platform-java-config to v3.30.0 ([#3082](https://github.com/googleapis/java-spanner/issues/3082)) ([ddfc98e](https://github.com/googleapis/java-spanner/commit/ddfc98e240fb47ef51075ba4461bf9a98aa25ce0))

## [6.65.1](https://github.com/googleapis/java-spanner/compare/v6.65.0...v6.65.1) (2024-04-30)


10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -42,28 +42,28 @@ If you are using Maven without the BOM, add this to your dependencies:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-spanner</artifactId>
<version>6.65.0</version>
<version>6.65.1</version>
</dependency>

```

If you are using Gradle 5.x or later, add this to your dependencies:

```Groovy
implementation platform('com.google.cloud:libraries-bom:26.37.0')
implementation platform('com.google.cloud:libraries-bom:26.38.0')
implementation 'com.google.cloud:google-cloud-spanner'
```
If you are using Gradle without BOM, add this to your dependencies:

```Groovy
implementation 'com.google.cloud:google-cloud-spanner:6.65.0'
implementation 'com.google.cloud:google-cloud-spanner:6.65.1'
```

If you are using SBT, add this to your dependencies:

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-spanner" % "6.65.0"
libraryDependencies += "com.google.cloud" % "google-cloud-spanner" % "6.65.1"
```
<!-- {x-version-update-end} -->

@@ -651,7 +651,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-spanner/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-spanner.svg
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-spanner/6.65.0
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-spanner/6.65.1
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
4 changes: 2 additions & 2 deletions benchmarks/pom.xml
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-spanner-parent</artifactId>
<version>6.65.1</version><!-- {x-version-update:google-cloud-spanner:current} -->
<version>6.66.0</version><!-- {x-version-update:google-cloud-spanner:current} -->
</parent>

<properties>
@@ -92,7 +92,7 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-spanner</artifactId>
<version>6.63.0</version>
<version>6.65.1</version>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
20 changes: 10 additions & 10 deletions google-cloud-spanner-bom/pom.xml
Original file line number Diff line number Diff line change
@@ -3,12 +3,12 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-spanner-bom</artifactId>
<version>6.65.1</version><!-- {x-version-update:google-cloud-spanner:current} -->
<version>6.66.0</version><!-- {x-version-update:google-cloud-spanner:current} -->
<packaging>pom</packaging>
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>sdk-platform-java-config</artifactId>
<version>3.29.0</version>
<version>3.30.0</version>
</parent>

<name>Google Cloud Spanner BOM</name>
@@ -53,43 +53,43 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-spanner</artifactId>
<version>6.65.1</version><!-- {x-version-update:google-cloud-spanner:current} -->
<version>6.66.0</version><!-- {x-version-update:google-cloud-spanner:current} -->
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-spanner</artifactId>
<type>test-jar</type>
<version>6.65.1</version><!-- {x-version-update:google-cloud-spanner:current} -->
<version>6.66.0</version><!-- {x-version-update:google-cloud-spanner:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>grpc-google-cloud-spanner-v1</artifactId>
<version>6.65.1</version><!-- {x-version-update:grpc-google-cloud-spanner-v1:current} -->
<version>6.66.0</version><!-- {x-version-update:grpc-google-cloud-spanner-v1:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>grpc-google-cloud-spanner-admin-instance-v1</artifactId>
<version>6.65.1</version><!-- {x-version-update:grpc-google-cloud-spanner-admin-instance-v1:current} -->
<version>6.66.0</version><!-- {x-version-update:grpc-google-cloud-spanner-admin-instance-v1:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>grpc-google-cloud-spanner-admin-database-v1</artifactId>
<version>6.65.1</version><!-- {x-version-update:grpc-google-cloud-spanner-admin-database-v1:current} -->
<version>6.66.0</version><!-- {x-version-update:grpc-google-cloud-spanner-admin-database-v1:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-cloud-spanner-admin-instance-v1</artifactId>
<version>6.65.1</version><!-- {x-version-update:proto-google-cloud-spanner-admin-instance-v1:current} -->
<version>6.66.0</version><!-- {x-version-update:proto-google-cloud-spanner-admin-instance-v1:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-cloud-spanner-v1</artifactId>
<version>6.65.1</version><!-- {x-version-update:proto-google-cloud-spanner-v1:current} -->
<version>6.66.0</version><!-- {x-version-update:proto-google-cloud-spanner-v1:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-cloud-spanner-admin-database-v1</artifactId>
<version>6.65.1</version><!-- {x-version-update:proto-google-cloud-spanner-admin-database-v1:current} -->
<version>6.66.0</version><!-- {x-version-update:proto-google-cloud-spanner-admin-database-v1:current} -->
</dependency>
</dependencies>
</dependencyManagement>
4 changes: 2 additions & 2 deletions google-cloud-spanner-executor/pom.xml
Original file line number Diff line number Diff line change
@@ -5,14 +5,14 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-spanner-executor</artifactId>
<version>6.65.1</version><!-- {x-version-update:google-cloud-spanner-executor:current} -->
<version>6.66.0</version><!-- {x-version-update:google-cloud-spanner-executor:current} -->
<packaging>jar</packaging>
<name>Google Cloud Spanner Executor</name>

<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-spanner-parent</artifactId>
<version>6.65.1</version><!-- {x-version-update:google-cloud-spanner:current} -->
<version>6.66.0</version><!-- {x-version-update:google-cloud-spanner:current} -->
</parent>

<properties>
12 changes: 12 additions & 0 deletions google-cloud-spanner/clirr-ignored-differences.xml
Original file line number Diff line number Diff line change
@@ -656,5 +656,17 @@
<className>com/google/cloud/spanner/connection/Connection</className>
<method>com.google.cloud.spanner.Spanner getSpanner()</method>
</difference>

<!-- Add DdlInTransactionMode -->
<difference>
<differenceType>7012</differenceType>
<className>com/google/cloud/spanner/connection/Connection</className>
<method>void setDdlInTransactionMode(com.google.cloud.spanner.connection.DdlInTransactionMode)</method>
</difference>
<difference>
<differenceType>7012</differenceType>
<className>com/google/cloud/spanner/connection/Connection</className>
<method>com.google.cloud.spanner.connection.DdlInTransactionMode getDdlInTransactionMode()</method>
</difference>

</differences>
4 changes: 2 additions & 2 deletions google-cloud-spanner/pom.xml
Original file line number Diff line number Diff line change
@@ -3,15 +3,15 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-spanner</artifactId>
<version>6.65.1</version><!-- {x-version-update:google-cloud-spanner:current} -->
<version>6.66.0</version><!-- {x-version-update:google-cloud-spanner:current} -->
<packaging>jar</packaging>
<name>Google Cloud Spanner</name>
<url>https://github.com/googleapis/java-spanner</url>
<description>Java idiomatic client for Google Cloud Spanner.</description>
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-spanner-parent</artifactId>
<version>6.65.1</version><!-- {x-version-update:google-cloud-spanner:current} -->
<version>6.66.0</version><!-- {x-version-update:google-cloud-spanner:current} -->
</parent>
<properties>
<site.installationModule>google-cloud-spanner</site.installationModule>
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.google.cloud.spanner;

import com.google.api.gax.rpc.ServerStream;
import com.google.cloud.Timestamp;
import com.google.cloud.spanner.Options.TransactionOption;
import com.google.cloud.spanner.Options.UpdateOption;
import com.google.spanner.v1.BatchWriteResponse;

/**
* Base class for the Multiplexed Session {@link DatabaseClient} implementation. Throws {@link
* UnsupportedOperationException} for all methods that are currently not supported for multiplexed
* sessions. The concrete implementation implements the methods that are supported with multiplexed
* sessions.
*/
abstract class AbstractMultiplexedSessionDatabaseClient implements DatabaseClient {

@Override
public Dialect getDialect() {
throw new UnsupportedOperationException();
}

@Override
public String getDatabaseRole() {
throw new UnsupportedOperationException();
}

@Override
public Timestamp write(Iterable<Mutation> mutations) throws SpannerException {
throw new UnsupportedOperationException();
}

@Override
public CommitResponse writeWithOptions(Iterable<Mutation> mutations, TransactionOption... options)
throws SpannerException {
throw new UnsupportedOperationException();
}

@Override
public Timestamp writeAtLeastOnce(Iterable<Mutation> mutations) throws SpannerException {
throw new UnsupportedOperationException();
}

@Override
public CommitResponse writeAtLeastOnceWithOptions(
Iterable<Mutation> mutations, TransactionOption... options) throws SpannerException {
throw new UnsupportedOperationException();
}

@Override
public ServerStream<BatchWriteResponse> batchWriteAtLeastOnce(
Iterable<MutationGroup> mutationGroups, TransactionOption... options)
throws SpannerException {
throw new UnsupportedOperationException();
}

@Override
public TransactionRunner readWriteTransaction(TransactionOption... options) {
throw new UnsupportedOperationException();
}

@Override
public TransactionManager transactionManager(TransactionOption... options) {
throw new UnsupportedOperationException();
}

@Override
public AsyncRunner runAsync(TransactionOption... options) {
throw new UnsupportedOperationException();
}

@Override
public AsyncTransactionManager transactionManagerAsync(TransactionOption... options) {
throw new UnsupportedOperationException();
}

@Override
public long executePartitionedUpdate(Statement stmt, UpdateOption... options) {
throw new UnsupportedOperationException();
}
}
Original file line number Diff line number Diff line change
@@ -809,6 +809,7 @@ public final void invalidate() {

@Override
public void close() {
session.onTransactionDone();
span.end();
synchronized (lock) {
isClosed = true;
@@ -844,11 +845,14 @@ public void onTransactionMetadata(Transaction transaction, boolean shouldInclude

@Override
public SpannerException onError(SpannerException e, boolean withBeginTransaction) {
this.session.onError(e);
return e;
}

@Override
public void onDone(boolean withBeginTransaction) {}
public void onDone(boolean withBeginTransaction) {
this.session.onReadDone();
}

private ResultSet readInternal(
String table,
Loading