From 1c6d909f5a5cc50ce0af034c93b4cbf8244cde3e Mon Sep 17 00:00:00 2001
From: "release-please[bot]"
<55107282+release-please[bot]@users.noreply.github.com>
Date: Sat, 21 Oct 2023 08:24:13 +0000
Subject: [PATCH 01/28] chore(main): release 6.52.2-SNAPSHOT (#2694)
:robot: 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).
---
google-cloud-spanner-bom/pom.xml | 20 +++++++++----------
google-cloud-spanner-executor/pom.xml | 4 ++--
google-cloud-spanner/pom.xml | 4 ++--
.../pom.xml | 4 ++--
.../pom.xml | 4 ++--
grpc-google-cloud-spanner-v1/pom.xml | 4 ++--
pom.xml | 16 +++++++--------
.../pom.xml | 4 ++--
.../pom.xml | 4 ++--
proto-google-cloud-spanner-v1/pom.xml | 4 ++--
samples/snapshot/pom.xml | 2 +-
versions.txt | 16 +++++++--------
12 files changed, 43 insertions(+), 43 deletions(-)
diff --git a/google-cloud-spanner-bom/pom.xml b/google-cloud-spanner-bom/pom.xml
index 7ff4de49bd..00988d2659 100644
--- a/google-cloud-spanner-bom/pom.xml
+++ b/google-cloud-spanner-bom/pom.xml
@@ -3,7 +3,7 @@
4.0.0
com.google.cloud
google-cloud-spanner-bom
- 6.52.1
+ 6.52.2-SNAPSHOT
pom
com.google.cloud
@@ -53,48 +53,48 @@
com.google.cloud
google-cloud-spanner
- 6.52.1
+ 6.52.2-SNAPSHOT
com.google.cloud
google-cloud-spanner-executor
- 6.52.1
+ 6.52.2-SNAPSHOT
com.google.cloud
google-cloud-spanner
test-jar
- 6.52.1
+ 6.52.2-SNAPSHOT
com.google.api.grpc
grpc-google-cloud-spanner-v1
- 6.52.1
+ 6.52.2-SNAPSHOT
com.google.api.grpc
grpc-google-cloud-spanner-admin-instance-v1
- 6.52.1
+ 6.52.2-SNAPSHOT
com.google.api.grpc
grpc-google-cloud-spanner-admin-database-v1
- 6.52.1
+ 6.52.2-SNAPSHOT
com.google.api.grpc
proto-google-cloud-spanner-admin-instance-v1
- 6.52.1
+ 6.52.2-SNAPSHOT
com.google.api.grpc
proto-google-cloud-spanner-v1
- 6.52.1
+ 6.52.2-SNAPSHOT
com.google.api.grpc
proto-google-cloud-spanner-admin-database-v1
- 6.52.1
+ 6.52.2-SNAPSHOT
diff --git a/google-cloud-spanner-executor/pom.xml b/google-cloud-spanner-executor/pom.xml
index c48ac956aa..7d019537dc 100644
--- a/google-cloud-spanner-executor/pom.xml
+++ b/google-cloud-spanner-executor/pom.xml
@@ -5,14 +5,14 @@
4.0.0
com.google.cloud
google-cloud-spanner-executor
- 6.52.1
+ 6.52.2-SNAPSHOT
jar
Google Cloud Spanner Executor
com.google.cloud
google-cloud-spanner-parent
- 6.52.1
+ 6.52.2-SNAPSHOT
diff --git a/google-cloud-spanner/pom.xml b/google-cloud-spanner/pom.xml
index b32ea723a0..37c92ccd0e 100644
--- a/google-cloud-spanner/pom.xml
+++ b/google-cloud-spanner/pom.xml
@@ -3,7 +3,7 @@
4.0.0
com.google.cloud
google-cloud-spanner
- 6.52.1
+ 6.52.2-SNAPSHOT
jar
Google Cloud Spanner
https://github.com/googleapis/java-spanner
@@ -11,7 +11,7 @@
com.google.cloud
google-cloud-spanner-parent
- 6.52.1
+ 6.52.2-SNAPSHOT
google-cloud-spanner
diff --git a/grpc-google-cloud-spanner-admin-database-v1/pom.xml b/grpc-google-cloud-spanner-admin-database-v1/pom.xml
index 85680856eb..ce38573125 100644
--- a/grpc-google-cloud-spanner-admin-database-v1/pom.xml
+++ b/grpc-google-cloud-spanner-admin-database-v1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
grpc-google-cloud-spanner-admin-database-v1
- 6.52.1
+ 6.52.2-SNAPSHOT
grpc-google-cloud-spanner-admin-database-v1
GRPC library for grpc-google-cloud-spanner-admin-database-v1
com.google.cloud
google-cloud-spanner-parent
- 6.52.1
+ 6.52.2-SNAPSHOT
diff --git a/grpc-google-cloud-spanner-admin-instance-v1/pom.xml b/grpc-google-cloud-spanner-admin-instance-v1/pom.xml
index 7ae7f0536e..5ff8a18120 100644
--- a/grpc-google-cloud-spanner-admin-instance-v1/pom.xml
+++ b/grpc-google-cloud-spanner-admin-instance-v1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
grpc-google-cloud-spanner-admin-instance-v1
- 6.52.1
+ 6.52.2-SNAPSHOT
grpc-google-cloud-spanner-admin-instance-v1
GRPC library for grpc-google-cloud-spanner-admin-instance-v1
com.google.cloud
google-cloud-spanner-parent
- 6.52.1
+ 6.52.2-SNAPSHOT
diff --git a/grpc-google-cloud-spanner-v1/pom.xml b/grpc-google-cloud-spanner-v1/pom.xml
index 67b0384958..1dfc4281de 100644
--- a/grpc-google-cloud-spanner-v1/pom.xml
+++ b/grpc-google-cloud-spanner-v1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
grpc-google-cloud-spanner-v1
- 6.52.1
+ 6.52.2-SNAPSHOT
grpc-google-cloud-spanner-v1
GRPC library for grpc-google-cloud-spanner-v1
com.google.cloud
google-cloud-spanner-parent
- 6.52.1
+ 6.52.2-SNAPSHOT
diff --git a/pom.xml b/pom.xml
index 3419035568..d7b3bf678e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com.google.cloud
google-cloud-spanner-parent
pom
- 6.52.1
+ 6.52.2-SNAPSHOT
Google Cloud Spanner Parent
https://github.com/googleapis/java-spanner
@@ -62,37 +62,37 @@
com.google.api.grpc
proto-google-cloud-spanner-admin-instance-v1
- 6.52.1
+ 6.52.2-SNAPSHOT
com.google.api.grpc
proto-google-cloud-spanner-v1
- 6.52.1
+ 6.52.2-SNAPSHOT
com.google.api.grpc
proto-google-cloud-spanner-admin-database-v1
- 6.52.1
+ 6.52.2-SNAPSHOT
com.google.api.grpc
grpc-google-cloud-spanner-v1
- 6.52.1
+ 6.52.2-SNAPSHOT
com.google.api.grpc
grpc-google-cloud-spanner-admin-instance-v1
- 6.52.1
+ 6.52.2-SNAPSHOT
com.google.api.grpc
grpc-google-cloud-spanner-admin-database-v1
- 6.52.1
+ 6.52.2-SNAPSHOT
com.google.cloud
google-cloud-spanner
- 6.52.1
+ 6.52.2-SNAPSHOT
diff --git a/proto-google-cloud-spanner-admin-database-v1/pom.xml b/proto-google-cloud-spanner-admin-database-v1/pom.xml
index 0577b8168b..bf60d00752 100644
--- a/proto-google-cloud-spanner-admin-database-v1/pom.xml
+++ b/proto-google-cloud-spanner-admin-database-v1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
proto-google-cloud-spanner-admin-database-v1
- 6.52.1
+ 6.52.2-SNAPSHOT
proto-google-cloud-spanner-admin-database-v1
PROTO library for proto-google-cloud-spanner-admin-database-v1
com.google.cloud
google-cloud-spanner-parent
- 6.52.1
+ 6.52.2-SNAPSHOT
diff --git a/proto-google-cloud-spanner-admin-instance-v1/pom.xml b/proto-google-cloud-spanner-admin-instance-v1/pom.xml
index 44a1c463ad..fa283c38d0 100644
--- a/proto-google-cloud-spanner-admin-instance-v1/pom.xml
+++ b/proto-google-cloud-spanner-admin-instance-v1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
proto-google-cloud-spanner-admin-instance-v1
- 6.52.1
+ 6.52.2-SNAPSHOT
proto-google-cloud-spanner-admin-instance-v1
PROTO library for proto-google-cloud-spanner-admin-instance-v1
com.google.cloud
google-cloud-spanner-parent
- 6.52.1
+ 6.52.2-SNAPSHOT
diff --git a/proto-google-cloud-spanner-v1/pom.xml b/proto-google-cloud-spanner-v1/pom.xml
index 9e5e46d0d3..d3710ea9ae 100644
--- a/proto-google-cloud-spanner-v1/pom.xml
+++ b/proto-google-cloud-spanner-v1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
proto-google-cloud-spanner-v1
- 6.52.1
+ 6.52.2-SNAPSHOT
proto-google-cloud-spanner-v1
PROTO library for proto-google-cloud-spanner-v1
com.google.cloud
google-cloud-spanner-parent
- 6.52.1
+ 6.52.2-SNAPSHOT
diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml
index 6cbb778374..da3834c195 100644
--- a/samples/snapshot/pom.xml
+++ b/samples/snapshot/pom.xml
@@ -31,7 +31,7 @@
com.google.cloud
google-cloud-spanner
- 6.52.1
+ 6.52.2-SNAPSHOT
diff --git a/versions.txt b/versions.txt
index 5e4d5f787c..b9949513d4 100644
--- a/versions.txt
+++ b/versions.txt
@@ -1,11 +1,11 @@
# Format:
# module:released-version:current-version
-proto-google-cloud-spanner-admin-instance-v1:6.52.1:6.52.1
-proto-google-cloud-spanner-v1:6.52.1:6.52.1
-proto-google-cloud-spanner-admin-database-v1:6.52.1:6.52.1
-grpc-google-cloud-spanner-v1:6.52.1:6.52.1
-grpc-google-cloud-spanner-admin-instance-v1:6.52.1:6.52.1
-grpc-google-cloud-spanner-admin-database-v1:6.52.1:6.52.1
-google-cloud-spanner:6.52.1:6.52.1
-google-cloud-spanner-executor:6.52.1:6.52.1
+proto-google-cloud-spanner-admin-instance-v1:6.52.1:6.52.2-SNAPSHOT
+proto-google-cloud-spanner-v1:6.52.1:6.52.2-SNAPSHOT
+proto-google-cloud-spanner-admin-database-v1:6.52.1:6.52.2-SNAPSHOT
+grpc-google-cloud-spanner-v1:6.52.1:6.52.2-SNAPSHOT
+grpc-google-cloud-spanner-admin-instance-v1:6.52.1:6.52.2-SNAPSHOT
+grpc-google-cloud-spanner-admin-database-v1:6.52.1:6.52.2-SNAPSHOT
+google-cloud-spanner:6.52.1:6.52.2-SNAPSHOT
+google-cloud-spanner-executor:6.52.1:6.52.2-SNAPSHOT
From 76fa90cce07c829a460c0644447b0b8a234c86b1 Mon Sep 17 00:00:00 2001
From: Mend Renovate
Date: Thu, 26 Oct 2023 22:34:14 +0200
Subject: [PATCH 02/28] build(deps): update dependency
com.google.cloud:google-cloud-shared-config to v1.6.0 (#2687)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[](https://renovatebot.com)
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:google-cloud-shared-config](https://togithub.com/googleapis/java-shared-config) | `1.5.8` -> `1.6.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) |
---
### Release Notes
googleapis/java-shared-config (com.google.cloud:google-cloud-shared-config)
### [`v1.6.0`](https://togithub.com/googleapis/java-shared-config/blob/HEAD/CHANGELOG.md#160-2023-10-17)
[Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v1.5.8...v1.6.0)
##### Features
- Add graal-sdk dependency management to java-shared-config ([#683](https://togithub.com/googleapis/java-shared-config/issues/683)) ([5cd1d84](https://togithub.com/googleapis/java-shared-config/commit/5cd1d84bf2d68dbe8f9fa7e02d9065082bd56726))
---
### Configuration
π
**Schedule**: Branch creation - At any time (no schedule defined), 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.
π **Ignore**: Close this PR and you won't be reminded about this update again.
---
- [ ] If you want to rebase/retry this PR, check this box
---
This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/googleapis/java-spanner).
---
README.md | 6 +++---
google-cloud-spanner-bom/pom.xml | 2 +-
pom.xml | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index b29575e58e..16650a0644 100644
--- a/README.md
+++ b/README.md
@@ -57,13 +57,13 @@ 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.52.0'
+implementation 'com.google.cloud:google-cloud-spanner:6.52.1'
```
If you are using SBT, add this to your dependencies:
```Scala
-libraryDependencies += "com.google.cloud" % "google-cloud-spanner" % "6.52.0"
+libraryDependencies += "com.google.cloud" % "google-cloud-spanner" % "6.52.1"
```
@@ -432,7 +432,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.52.0
+[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-spanner/6.52.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
diff --git a/google-cloud-spanner-bom/pom.xml b/google-cloud-spanner-bom/pom.xml
index 00988d2659..387f154a78 100644
--- a/google-cloud-spanner-bom/pom.xml
+++ b/google-cloud-spanner-bom/pom.xml
@@ -8,7 +8,7 @@
com.google.cloud
google-cloud-shared-config
- 1.5.8
+ 1.6.0
Google Cloud Spanner BOM
diff --git a/pom.xml b/pom.xml
index d7b3bf678e..fc464377ff 100644
--- a/pom.xml
+++ b/pom.xml
@@ -14,7 +14,7 @@
com.google.cloud
google-cloud-shared-config
- 1.5.8
+ 1.6.0
From d8a2b02d43a68e04bebb2349af61cc8901ccd667 Mon Sep 17 00:00:00 2001
From: Mend Renovate
Date: Fri, 27 Oct 2023 16:10:29 +0200
Subject: [PATCH 03/28] deps: update dependency
org.graalvm.buildtools:junit-platform-native to v0.9.28 (#2692)
---
samples/native-image/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/native-image/pom.xml b/samples/native-image/pom.xml
index 96b54027ac..bd3e852bf1 100644
--- a/samples/native-image/pom.xml
+++ b/samples/native-image/pom.xml
@@ -109,7 +109,7 @@
org.graalvm.buildtools
junit-platform-native
- 0.9.27
+ 0.9.28
test
From cfab83ad3bd1a026e0b3da5a4cc2154b0f8c3ddf Mon Sep 17 00:00:00 2001
From: Mridula <66699525+mpeddada1@users.noreply.github.com>
Date: Fri, 27 Oct 2023 14:10:55 +0000
Subject: [PATCH 04/28] feat: rely on graal-sdk version declaration from
property in java-shared-config (#2696)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* feat: rely on graal-sdk version declaration from property
* π¦ 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
---
google-cloud-spanner/pom.xml | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/google-cloud-spanner/pom.xml b/google-cloud-spanner/pom.xml
index 37c92ccd0e..9664b827e4 100644
--- a/google-cloud-spanner/pom.xml
+++ b/google-cloud-spanner/pom.xml
@@ -16,7 +16,6 @@
google-cloud-spanner
0.31.1
- 22.3.3
com.google.cloud.spanner.GceTestEnvConfig
projects/gcloud-devel/instances/spanner-testing-east1
gcloud-devel
@@ -318,7 +317,7 @@
org.graalvm.sdk
graal-sdk
- ${graalvm.version}
+ ${graal-sdk.version}
provided
From c164772873c63b7748700ca488a3dd2286723515 Mon Sep 17 00:00:00 2001
From: Mend Renovate
Date: Sat, 28 Oct 2023 07:35:27 +0200
Subject: [PATCH 05/28] build(deps): update dependency
org.apache.maven.plugins:maven-surefire-plugin to v3.2.1 (#2708)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* build(deps): update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.2.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
---
README.md | 2 +-
samples/native-image/pom.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 16650a0644..3749099f1d 100644
--- a/README.md
+++ b/README.md
@@ -50,7 +50,7 @@ If you are using Maven without the BOM, add this to your dependencies:
If you are using Gradle 5.x or later, add this to your dependencies:
```Groovy
-implementation platform('com.google.cloud:libraries-bom:26.25.0')
+implementation platform('com.google.cloud:libraries-bom:26.26.0')
implementation 'com.google.cloud:google-cloud-spanner'
```
diff --git a/samples/native-image/pom.xml b/samples/native-image/pom.xml
index bd3e852bf1..d5161b6dd4 100644
--- a/samples/native-image/pom.xml
+++ b/samples/native-image/pom.xml
@@ -120,7 +120,7 @@
org.apache.maven.plugins
maven-surefire-plugin
- 3.1.2
+ 3.2.1
**/*IT
From b589e5a3af55295c03674daced40c5f3d7a910a7 Mon Sep 17 00:00:00 2001
From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com>
Date: Sat, 28 Oct 2023 11:06:14 +0530
Subject: [PATCH 06/28] chore: bump urllib3 from 2.0.6 to 2.0.7 in
/docker/owlbot/java/src (#1883) (#2702)
Source-Link: https://github.com/googleapis/synthtool/commit/247239027cad7678adea8f57e529ebd12600ee93
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:fb7584f6adb3847ac480ed49a4bfe1463965026b2919a1be270e3174f3ce1191
Co-authored-by: Owl Bot
---
.github/.OwlBot.lock.yaml | 4 ++--
.kokoro/nightly/integration.cfg | 1 +
.kokoro/nightly/java11-integration.cfg | 1 +
.kokoro/presubmit/integration.cfg | 1 +
.kokoro/requirements.txt | 6 +++---
5 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml
index 11fe20466f..208af34382 100644
--- a/.github/.OwlBot.lock.yaml
+++ b/.github/.OwlBot.lock.yaml
@@ -13,5 +13,5 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest
- digest: sha256:6e2fc7eba84c3100cde964ebcfd0e553d4664ec4a74989c978a143812785ff23
-# created: 2023-10-03T23:18:35.620358763Z
+ digest: sha256:fb7584f6adb3847ac480ed49a4bfe1463965026b2919a1be270e3174f3ce1191
+# created: 2023-10-26T23:22:21.357007231Z
diff --git a/.kokoro/nightly/integration.cfg b/.kokoro/nightly/integration.cfg
index a2907a257b..5a95c68284 100644
--- a/.kokoro/nightly/integration.cfg
+++ b/.kokoro/nightly/integration.cfg
@@ -35,3 +35,4 @@ env_vars: {
key: "SECRET_MANAGER_KEYS"
value: "java-it-service-account"
}
+
diff --git a/.kokoro/nightly/java11-integration.cfg b/.kokoro/nightly/java11-integration.cfg
index 58049cc38f..6a6ef94eff 100644
--- a/.kokoro/nightly/java11-integration.cfg
+++ b/.kokoro/nightly/java11-integration.cfg
@@ -35,3 +35,4 @@ env_vars: {
key: "SECRET_MANAGER_KEYS"
value: "java-it-service-account"
}
+
diff --git a/.kokoro/presubmit/integration.cfg b/.kokoro/presubmit/integration.cfg
index dded67a9d5..5864c603e5 100644
--- a/.kokoro/presubmit/integration.cfg
+++ b/.kokoro/presubmit/integration.cfg
@@ -31,3 +31,4 @@ env_vars: {
key: "SECRET_MANAGER_KEYS"
value: "java-it-service-account"
}
+
diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt
index 59de492340..c5c11bbe79 100644
--- a/.kokoro/requirements.txt
+++ b/.kokoro/requirements.txt
@@ -470,9 +470,9 @@ typing-extensions==4.7.1 \
--hash=sha256:440d5dd3af93b060174bf433bccd69b0babc3b15b1a8dca43789fd7f61514b36 \
--hash=sha256:b75ddc264f0ba5615db7ba217daeb99701ad295353c45f9e95963337ceeeffb2
# via -r requirements.in
-urllib3==1.26.17 \
- --hash=sha256:24d6a242c28d29af46c3fae832c36db3bbebcc533dd1bb549172cd739c82df21 \
- --hash=sha256:94a757d178c9be92ef5539b8840d48dc9cf1b2709c9d6b588232a055c524458b
+urllib3==1.26.18 \
+ --hash=sha256:34b97092d7e0a3a8cf7cd10e386f401b3737364026c45e622aa02903dffe0f07 \
+ --hash=sha256:f8ecc1bba5667413457c529ab955bf8c67b45db799d159066261719e328580a0
# via
# google-auth
# requests
From 947551b4c2103917ecef92a1e41972bcfeee7076 Mon Sep 17 00:00:00 2001
From: Mend Renovate
Date: Sat, 28 Oct 2023 08:26:17 +0200
Subject: [PATCH 07/28] build(deps): update dependency
org.jacoco:jacoco-maven-plugin to v0.8.11 (#2683)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[](https://renovatebot.com)
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [org.jacoco:jacoco-maven-plugin](https://www.jacoco.org/jacoco/trunk/doc/maven.html) ([source](https://togithub.com/jacoco/jacoco)) | `0.8.10` -> `0.8.11` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) |
---
### Release Notes
jacoco/jacoco (org.jacoco:jacoco-maven-plugin)
### [`v0.8.11`](https://togithub.com/jacoco/jacoco/releases/tag/v0.8.11): 0.8.11
[Compare Source](https://togithub.com/jacoco/jacoco/compare/v0.8.10...v0.8.11)
#### New Features
- JaCoCo now officially supports Java 21 (GitHub [#1520](https://togithub.com/jacoco/jacoco/issues/1520)).
- Experimental support for Java 22 class files (GitHub [#1479](https://togithub.com/jacoco/jacoco/issues/1479)).
- Part of bytecode generated by the Java compilers for exhaustive switch expressions is filtered out during generation of report (GitHub [#1472](https://togithub.com/jacoco/jacoco/issues/1472)).
- Part of bytecode generated by the Java compilers for record patterns is filtered out during generation of report (GitHub [#1473](https://togithub.com/jacoco/jacoco/issues/1473)).
#### Fixed bugs
- Instrumentation should not cause `VerifyError` when the last local variable of method parameters is overridden in the method body to store a value of type long or double (GitHub [#893](https://togithub.com/jacoco/jacoco/issues/893)).
- Restore exec file compatibility with versions from 0.7.5 to 0.8.8 in case of class files with zero line numbers (GitHub [#1492](https://togithub.com/jacoco/jacoco/issues/1492)).
#### Non-functional Changes
- jacoco-maven-plugin now requires at least Java 8 (GitHub [#1466](https://togithub.com/jacoco/jacoco/issues/1466), [#1468](https://togithub.com/jacoco/jacoco/issues/1468)).
- JaCoCo build now requires at least Maven 3.5.4 (GitHub [#1467](https://togithub.com/jacoco/jacoco/issues/1467)).
- Maven 3.9.2 should not produce warnings for jacoco-maven-plugin (GitHub [#1468](https://togithub.com/jacoco/jacoco/issues/1468)).
- JaCoCo build now requires JDK 17 (GitHub [#1482](https://togithub.com/jacoco/jacoco/issues/1482)).
- JaCoCo now depends on ASM 9.6 (GitHub [#1518](https://togithub.com/jacoco/jacoco/issues/1518)).
---
### Configuration
π
**Schedule**: Branch creation - At any time (no schedule defined), 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.
π **Ignore**: Close this PR and you won't be reminded about this update again.
---
- [ ] If you want to rebase/retry this PR, check this box
---
This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/googleapis/java-spanner).
---
google-cloud-spanner/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/google-cloud-spanner/pom.xml b/google-cloud-spanner/pom.xml
index 9664b827e4..0e19cdde8c 100644
--- a/google-cloud-spanner/pom.xml
+++ b/google-cloud-spanner/pom.xml
@@ -28,7 +28,7 @@
org.jacoco
jacoco-maven-plugin
- 0.8.10
+ 0.8.11
From 4ac37e63925febef0db0f18f41d447215d54d6f0 Mon Sep 17 00:00:00 2001
From: Mend Renovate
Date: Sat, 28 Oct 2023 08:40:16 +0200
Subject: [PATCH 08/28] chore(deps): update dependency
com.google.cloud:libraries-bom to v26.25.0 (#2679)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[](https://renovatebot.com)
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/googleapis/java-cloud-bom)) | `26.24.0` -> `26.25.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) |
---
### Release Notes
googleapis/java-cloud-bom (com.google.cloud:libraries-bom)
### [`v26.25.0`](https://togithub.com/googleapis/java-cloud-bom/blob/HEAD/CHANGELOG.md#26250-2023-10-14)
##### Dependencies
- update dependency com.google.cloud:first-party-dependencies to v3.17.0 ([#6226](https://togithub.com/googleapis/java-cloud-bom/issues/6226)) ([df72701](https://togithub.com/googleapis/java-cloud-bom/commit/df72701ecb3b339cdc1b3af9d137de7d95ed50aa))
- update dependency com.google.cloud:gapic-libraries-bom to v1.22.0 ([#6240](https://togithub.com/googleapis/java-cloud-bom/issues/6240)) ([addef06](https://togithub.com/googleapis/java-cloud-bom/commit/addef066873995631b99009f8ea6f7cd58088b5f))
- update dependency com.google.cloud:google-cloud-bigquery to v2.33.2 ([#6236](https://togithub.com/googleapis/java-cloud-bom/issues/6236)) ([68c7e4e](https://togithub.com/googleapis/java-cloud-bom/commit/68c7e4e4197db0da9d776b93d1fe0efdaa3165db))
- update dependency com.google.cloud:google-cloud-bigquerystorage-bom to v2.44.0 ([#6235](https://togithub.com/googleapis/java-cloud-bom/issues/6235)) ([53d1f18](https://togithub.com/googleapis/java-cloud-bom/commit/53d1f18c3f63e28a69db44e37724b7eba6146bc9))
- update dependency com.google.cloud:google-cloud-bigtable-bom to v2.28.0 ([#6241](https://togithub.com/googleapis/java-cloud-bom/issues/6241)) ([9b145d6](https://togithub.com/googleapis/java-cloud-bom/commit/9b145d6e3883fe91a78d7b097be1358d34e41d54))
- update dependency com.google.cloud:google-cloud-datastore-bom to v2.17.3 ([#6228](https://togithub.com/googleapis/java-cloud-bom/issues/6228)) ([f2d317d](https://togithub.com/googleapis/java-cloud-bom/commit/f2d317def4b5f7f5e924136acbd07314976ef15e))
- update dependency com.google.cloud:google-cloud-firestore-bom to v3.15.1 ([#6233](https://togithub.com/googleapis/java-cloud-bom/issues/6233)) ([43553e8](https://togithub.com/googleapis/java-cloud-bom/commit/43553e81ffc9d134652e8da7995917e11a9ae5c6))
- update dependency com.google.cloud:google-cloud-logging-bom to v3.15.11 ([#6230](https://togithub.com/googleapis/java-cloud-bom/issues/6230)) ([6e9467a](https://togithub.com/googleapis/java-cloud-bom/commit/6e9467a4fa2c3e42b92792b3c8266d72e4982722))
- update dependency com.google.cloud:google-cloud-logging-logback to v0.130.24-alpha ([#6234](https://togithub.com/googleapis/java-cloud-bom/issues/6234)) ([16a9be9](https://togithub.com/googleapis/java-cloud-bom/commit/16a9be91e49cf82c20d6bea56fd25c3905b2b14f))
- update dependency com.google.cloud:google-cloud-nio to v0.127.5 ([#6238](https://togithub.com/googleapis/java-cloud-bom/issues/6238)) ([db7424d](https://togithub.com/googleapis/java-cloud-bom/commit/db7424d9b1368e5f437dcbc5f14a0b2e6d5cd0b2))
- update dependency com.google.cloud:google-cloud-pubsub-bom to v1.125.6 ([#6231](https://togithub.com/googleapis/java-cloud-bom/issues/6231)) ([6a2418b](https://togithub.com/googleapis/java-cloud-bom/commit/6a2418be05d99470831dcf1ba3b1f0927cdfdd30))
- update dependency com.google.cloud:google-cloud-pubsublite-bom to v1.12.16 ([#6239](https://togithub.com/googleapis/java-cloud-bom/issues/6239)) ([585750a](https://togithub.com/googleapis/java-cloud-bom/commit/585750a437826986c180b07f866a5133126f4455))
- update dependency com.google.cloud:google-cloud-spanner-bom to v6.50.1 ([#6229](https://togithub.com/googleapis/java-cloud-bom/issues/6229)) ([9ce48f0](https://togithub.com/googleapis/java-cloud-bom/commit/9ce48f0a0967ce164a61fe8d8f63bbbdddbaf664))
- update dependency com.google.cloud:google-cloud-spanner-jdbc to v2.14.0 ([#6242](https://togithub.com/googleapis/java-cloud-bom/issues/6242)) ([ff93f99](https://togithub.com/googleapis/java-cloud-bom/commit/ff93f99ebfdc0226a59487cb8c91e4baaac96bcd))
- update dependency com.google.cloud:google-cloud-storage-bom to v2.28.0 ([#6243](https://togithub.com/googleapis/java-cloud-bom/issues/6243)) ([a2a0d44](https://togithub.com/googleapis/java-cloud-bom/commit/a2a0d44b9f1dacbd964ef15939eb9f02805093f4))
- update dependency com.google.googlejavaformat:google-java-format to v1.18.1 ([#6221](https://togithub.com/googleapis/java-cloud-bom/issues/6221)) ([8a07930](https://togithub.com/googleapis/java-cloud-bom/commit/8a07930be3b3f86536af5dc0fb6906401772fd08))
---
### Configuration
π
**Schedule**: Branch creation - At any time (no schedule defined), 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.
π **Ignore**: Close this PR and you won't be reminded about this update again.
---
- [ ] If you want to rebase/retry this PR, check this box
---
This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/googleapis/java-spanner).
---
README.md | 2 +-
samples/native-image/pom.xml | 2 +-
samples/snippets/pom.xml | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index 3749099f1d..2f31a7902a 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
com.google.cloud
libraries-bom
- 26.24.0
+ 26.25.0
pom
import
diff --git a/samples/native-image/pom.xml b/samples/native-image/pom.xml
index d5161b6dd4..68f71639a1 100644
--- a/samples/native-image/pom.xml
+++ b/samples/native-image/pom.xml
@@ -28,7 +28,7 @@
com.google.cloud
libraries-bom
- 26.24.0
+ 26.25.0
pom
import
diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml
index 4e987868d2..e5257ca0c3 100644
--- a/samples/snippets/pom.xml
+++ b/samples/snippets/pom.xml
@@ -34,7 +34,7 @@
com.google.cloud
libraries-bom
- 26.24.0
+ 26.25.0
pom
import
From f0fbd67ab40efb9bbd49d535d9c746bd5ff8a197 Mon Sep 17 00:00:00 2001
From: Mend Renovate
Date: Sun, 29 Oct 2023 12:26:15 +0100
Subject: [PATCH 09/28] chore(deps): update dependency
com.google.cloud:libraries-bom to v26.26.0 (#2711)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* chore(deps): update dependency com.google.cloud:libraries-bom to v26.26.0
* π¦ 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
---
README.md | 2 +-
samples/native-image/pom.xml | 2 +-
samples/snippets/pom.xml | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index 2f31a7902a..9e042108e1 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
com.google.cloud
libraries-bom
- 26.25.0
+ 26.26.0
pom
import
diff --git a/samples/native-image/pom.xml b/samples/native-image/pom.xml
index 68f71639a1..c61d73d611 100644
--- a/samples/native-image/pom.xml
+++ b/samples/native-image/pom.xml
@@ -28,7 +28,7 @@
com.google.cloud
libraries-bom
- 26.25.0
+ 26.26.0
pom
import
diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml
index e5257ca0c3..154ce8cca3 100644
--- a/samples/snippets/pom.xml
+++ b/samples/snippets/pom.xml
@@ -34,7 +34,7 @@
com.google.cloud
libraries-bom
- 26.25.0
+ 26.26.0
pom
import
From e3e8f6ac82d827280299038d3962fe66b110e0c4 Mon Sep 17 00:00:00 2001
From: Mend Renovate
Date: Sun, 29 Oct 2023 12:26:52 +0100
Subject: [PATCH 10/28] deps: update dependency commons-cli:commons-cli to
v1.6.0 (#2710)
---
google-cloud-spanner-executor/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/google-cloud-spanner-executor/pom.xml b/google-cloud-spanner-executor/pom.xml
index 7d019537dc..242f2f0c0c 100644
--- a/google-cloud-spanner-executor/pom.xml
+++ b/google-cloud-spanner-executor/pom.xml
@@ -122,7 +122,7 @@
commons-cli
commons-cli
- 1.5.0
+ 1.6.0
commons-io
From 20a9141d1cd8db8ac06d6ae5f50c8d81cb0d26c5 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sun, 29 Oct 2023 12:04:14 +0000
Subject: [PATCH 11/28] build(deps): bump cryptography from 41.0.2 to 41.0.4 in
/.kokoro (#2701)
Bumps [cryptography](https://togithub.com/pyca/cryptography) from 41.0.2 to 41.0.4.
Changelog
Sourced from cryptography's changelog .
41.0.4 - 2023-09-19
* Updated Windows, macOS, and Linux wheels to be compiled with OpenSSL 3.1.3.
.. _v41-0-3:
41.0.3 - 2023-08-01
Fixed performance regression loading DH public keys.
Fixed a memory leak when using
:class:~cryptography.hazmat.primitives.ciphers.aead.ChaCha20Poly1305.
Updated Windows, macOS, and Linux wheels to be compiled with OpenSSL 3.1.2.
.. _v41-0-2:
Commits
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://togithub.com/googleapis/java-spanner/network/alerts).
From e2ca09237d6d1ca034e844a99a5eb433d70eeeff Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sun, 29 Oct 2023 12:08:13 +0000
Subject: [PATCH 12/28] build(deps-dev): bump org.json:json from 20230618 to
20231013 in /google-cloud-spanner (#2689)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Bumps [org.json:json](https://togithub.com/douglascrockford/JSON-java) from 20230618 to 20231013.
Release notes
Sourced from org.json:json's releases .
20231013
Pull Request
Description
#793
Reverted #761
#792
update the docs for release 20231013
#783
optLong vs getLong inconsistencies
#782
Fix XMLTest.testIndentComplicatedJsonObjectWithArrayAndWithConfig() for Windows
#779
add validity check for JSONObject constructors
#778
Fix XMLTest.testIndentComplicatedJsonObjectWithArrayAndWithConfig() for Windows
#776
Update [JUnit to version 4.13.2
#774
Removing unneeded synchronization
#773
Add optJSONArray method to JSONObject with a default value
#772
Disallow nested objects and arrays as keys in objects
#779
Unit test cleanup
#769
Addressed Java 17 compile warnings
#764
Update CodeQL action version
#761
Add module-info
#759
JSON parsing should detect embeddedΒ
#753
Updated new object methods
#752
Fixes possible unit test bug when compiling/testing on Windows
Changelog
Sourced from org.json:json's changelog .
20231013 First release with minimum Java version 1.8. Recent commits, including fixes for CVE-2023-5072.
Commits
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://togithub.com/googleapis/java-spanner/network/alerts).
---
google-cloud-spanner/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/google-cloud-spanner/pom.xml b/google-cloud-spanner/pom.xml
index 0e19cdde8c..158f4039e2 100644
--- a/google-cloud-spanner/pom.xml
+++ b/google-cloud-spanner/pom.xml
@@ -361,7 +361,7 @@
org.json
json
- 20230618
+ 20231013
test
From 1b4132857da108a0c1d978d8a41bf73841bc4a7c Mon Sep 17 00:00:00 2001
From: Mend Renovate
Date: Sun, 29 Oct 2023 14:56:14 +0100
Subject: [PATCH 13/28] chore(deps): update dependency
com.google.cloud:google-cloud-spanner to v6.50.1 (#2669)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[](https://renovatebot.com)
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:google-cloud-spanner](https://togithub.com/googleapis/java-spanner) | `6.50.0` -> `6.50.1` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) |
---
### Release Notes
googleapis/java-spanner (com.google.cloud:google-cloud-spanner)
### [`v6.50.1`](https://togithub.com/googleapis/java-spanner/blob/HEAD/CHANGELOG.md#6501-2023-10-11)
[Compare Source](https://togithub.com/googleapis/java-spanner/compare/v6.50.0...v6.50.1)
##### Bug Fixes
- Noop in case there is no change in autocommit value for setAutocommit() method ([#2662](https://togithub.com/googleapis/java-spanner/issues/2662)) ([9f51b64](https://togithub.com/googleapis/java-spanner/commit/9f51b6445f064439379af752372a3490a2fd5087))
##### Dependencies
- Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.17.0 ([#2660](https://togithub.com/googleapis/java-spanner/issues/2660)) ([96b9dd6](https://togithub.com/googleapis/java-spanner/commit/96b9dd6b6a0ee7b1a0a1cc58a8880a10799665e6))
- Update dependency commons-io:commons-io to v2.14.0 ([#2649](https://togithub.com/googleapis/java-spanner/issues/2649)) ([fa1b73c](https://togithub.com/googleapis/java-spanner/commit/fa1b73c1bf4700be5e8865211817e2bc7cc77119))
---
### Configuration
π
**Schedule**: Branch creation - At any time (no schedule defined), 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.
π **Ignore**: Close this PR and you won't be reminded about this update again.
---
- [ ] If you want to rebase/retry this PR, check this box
---
This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/googleapis/java-spanner).
---
README.md | 2 +-
samples/install-without-bom/pom.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 9e042108e1..36f439b7d7 100644
--- a/README.md
+++ b/README.md
@@ -42,7 +42,7 @@ If you are using Maven without the BOM, add this to your dependencies:
com.google.cloud
google-cloud-spanner
- 6.50.0
+ 6.50.1
```
diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml
index 05be4ba11d..985f8856d9 100644
--- a/samples/install-without-bom/pom.xml
+++ b/samples/install-without-bom/pom.xml
@@ -32,7 +32,7 @@
com.google.cloud
google-cloud-spanner
- 6.50.0
+ 6.50.1
From 078b7ca95548ac984c79d29197032b3f813abbcf Mon Sep 17 00:00:00 2001
From: Mend Renovate
Date: Sun, 29 Oct 2023 15:14:13 +0100
Subject: [PATCH 14/28] deps: update dependency
com.google.cloud:google-cloud-trace to v2.28.0 (#2670)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[](https://renovatebot.com)
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:google-cloud-trace](https://togithub.com/googleapis/google-cloud-java) | `2.24.0` -> `2.28.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) |
---
### Configuration
π
**Schedule**: Branch creation - At any time (no schedule defined), 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.
π **Ignore**: Close this PR and you won't be reminded about this update again.
---
- [ ] If you want to rebase/retry this PR, check this box
---
This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/googleapis/java-spanner).
---
samples/install-without-bom/pom.xml | 2 +-
samples/snapshot/pom.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml
index 985f8856d9..1942238757 100644
--- a/samples/install-without-bom/pom.xml
+++ b/samples/install-without-bom/pom.xml
@@ -22,7 +22,7 @@
1.8
UTF-8
0.31.1
- 2.24.0
+ 2.28.0
3.23.0
diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml
index da3834c195..87f364153b 100644
--- a/samples/snapshot/pom.xml
+++ b/samples/snapshot/pom.xml
@@ -22,7 +22,7 @@
1.8
UTF-8
0.31.1
- 2.24.0
+ 2.28.0
3.23.0
From 6cb53fbe444e44bbc97627fbaed80b4bbed94efa Mon Sep 17 00:00:00 2001
From: Mend Renovate
Date: Mon, 30 Oct 2023 14:10:23 +0100
Subject: [PATCH 15/28] chore(deps): update dependency
com.google.cloud:google-cloud-spanner to v6.52.1 (#2713)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* chore(deps): update dependency com.google.cloud:google-cloud-spanner to v6.52.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
---
README.md | 2 +-
samples/install-without-bom/pom.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 36f439b7d7..9f5b837c99 100644
--- a/README.md
+++ b/README.md
@@ -42,7 +42,7 @@ If you are using Maven without the BOM, add this to your dependencies:
com.google.cloud
google-cloud-spanner
- 6.50.1
+ 6.52.1
```
diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml
index 1942238757..141773e21f 100644
--- a/samples/install-without-bom/pom.xml
+++ b/samples/install-without-bom/pom.xml
@@ -32,7 +32,7 @@
com.google.cloud
google-cloud-spanner
- 6.50.1
+ 6.52.1
From 806f1895c326de930b7630df6a7911a4386fc6f4 Mon Sep 17 00:00:00 2001
From: Mend Renovate
Date: Mon, 30 Oct 2023 14:13:40 +0100
Subject: [PATCH 16/28] build(deps): update dependency
org.apache.maven.plugins:maven-dependency-plugin to v3.6.1 (#2700)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* build(deps): update dependency org.apache.maven.plugins:maven-dependency-plugin to v3.6.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
---
samples/native-image/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/native-image/pom.xml b/samples/native-image/pom.xml
index c61d73d611..b83820a6d8 100644
--- a/samples/native-image/pom.xml
+++ b/samples/native-image/pom.xml
@@ -75,7 +75,7 @@
org.apache.maven.plugins
maven-dependency-plugin
- 3.6.0
+ 3.6.1
copy-dependencies
From b400ecabb9fa6f262befa903163746fac2c7c15e Mon Sep 17 00:00:00 2001
From: Mend Renovate
Date: Mon, 30 Oct 2023 16:33:21 +0100
Subject: [PATCH 17/28] deps: update dependency
com.google.cloud:google-cloud-trace to v2.29.0 (#2714)
---
samples/install-without-bom/pom.xml | 2 +-
samples/snapshot/pom.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml
index 141773e21f..125155cec5 100644
--- a/samples/install-without-bom/pom.xml
+++ b/samples/install-without-bom/pom.xml
@@ -22,7 +22,7 @@
1.8
UTF-8
0.31.1
- 2.28.0
+ 2.29.0
3.23.0
diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml
index 87f364153b..c8559074ee 100644
--- a/samples/snapshot/pom.xml
+++ b/samples/snapshot/pom.xml
@@ -22,7 +22,7 @@
1.8
UTF-8
0.31.1
- 2.28.0
+ 2.29.0
3.23.0
From a5f59aa3e992d0594519983880a29f17301923e7 Mon Sep 17 00:00:00 2001
From: Mend Renovate
Date: Mon, 30 Oct 2023 16:33:53 +0100
Subject: [PATCH 18/28] deps: update dependency commons-io:commons-io to
v2.15.0 (#2712)
---
google-cloud-spanner-executor/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/google-cloud-spanner-executor/pom.xml b/google-cloud-spanner-executor/pom.xml
index 242f2f0c0c..869ec4004d 100644
--- a/google-cloud-spanner-executor/pom.xml
+++ b/google-cloud-spanner-executor/pom.xml
@@ -127,7 +127,7 @@
commons-io
commons-io
- 2.14.0
+ 2.15.0
From 77c708d2b47b5844441a4f610b538488e52a8aa3 Mon Sep 17 00:00:00 2001
From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com>
Date: Mon, 30 Oct 2023 18:00:27 +0000
Subject: [PATCH 19/28] chore: for Java repos RenovateBot to ignore GitHub
Actions workflow file (#1855) (#2609)
chore: for Java repos RenovateBot to ignore GitHub Actions workflow file
The actions used in the GitHub Actions workflow files do not appear in libraries' dependencies and mostly maintained by Java postprocessor templates.
IgnorePath option document: https://docs.renovatebot.com/configuration-options/
Source-Link: https://togithub.com/googleapis/synthtool/commit/1543029c843989702adbe789acdead153ad696d1
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:88ba8dcc5c2c7792e1c3511381f4ab329002a1c42c512f66ca87ced572dfbf9f
---
.github/.OwlBot.lock.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml
index 208af34382..a51efca0e8 100644
--- a/.github/.OwlBot.lock.yaml
+++ b/.github/.OwlBot.lock.yaml
@@ -14,4 +14,4 @@
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest
digest: sha256:fb7584f6adb3847ac480ed49a4bfe1463965026b2919a1be270e3174f3ce1191
-# created: 2023-10-26T23:22:21.357007231Z
+# created: 2023-10-26T23:22:21.357007231Z
\ No newline at end of file
From 2b17f095a294defa5ea022c243fa750486b7d496 Mon Sep 17 00:00:00 2001
From: Mend Renovate
Date: Mon, 30 Oct 2023 19:12:14 +0100
Subject: [PATCH 20/28] deps: update dependency
org.graalvm.buildtools:native-maven-plugin to v0.9.28 (#2705)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[](https://renovatebot.com)
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [org.graalvm.buildtools:native-maven-plugin](https://togithub.com/graalvm/native-build-tools) | `0.9.27` -> `0.9.28` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) |
---
### Release Notes
graalvm/native-build-tools (org.graalvm.buildtools:native-maven-plugin)
### [`v0.9.28`](https://togithub.com/graalvm/native-build-tools/releases/tag/0.9.28)
[Compare Source](https://togithub.com/graalvm/native-build-tools/compare/0.9.27...0.9.28)
#### What's Changed
- Revert to previous version of `escapeArg()`. by [@fniephaus](https://togithub.com/fniephaus) in [https://togithub.com/graalvm/native-build-tools/pull/515](https://togithub.com/graalvm/native-build-tools/pull/515)
- Document test binary configuration by [@abelsromero](https://togithub.com/abelsromero) in [https://togithub.com/graalvm/native-build-tools/pull/509](https://togithub.com/graalvm/native-build-tools/pull/509)
- Fixes the problem that `org.junit.jupiter.api.condition.EnabledOnOs` cannot be used in NativeTest by [@linghengqian](https://togithub.com/linghengqian) in [https://togithub.com/graalvm/native-build-tools/pull/504](https://togithub.com/graalvm/native-build-tools/pull/504)
- Remove deprecated use of `getConvention` by [@melix](https://togithub.com/melix) in [https://togithub.com/graalvm/native-build-tools/pull/522](https://togithub.com/graalvm/native-build-tools/pull/522)
- Fix and improve major JDK version detection. by [@fniephaus](https://togithub.com/fniephaus) in [https://togithub.com/graalvm/native-build-tools/pull/523](https://togithub.com/graalvm/native-build-tools/pull/523)
- Bump com.h2database:h2 from 2.1.210 to 2.2.220 in /samples/metadata-repo-integration by [@dependabot](https://togithub.com/dependabot) in [https://togithub.com/graalvm/native-build-tools/pull/499](https://togithub.com/graalvm/native-build-tools/pull/499)
- Fix toolchain documentation by [@dnestoro](https://togithub.com/dnestoro) in [https://togithub.com/graalvm/native-build-tools/pull/525](https://togithub.com/graalvm/native-build-tools/pull/525)
- Re-enable Windows builds. by [@fniephaus](https://togithub.com/fniephaus) in [https://togithub.com/graalvm/native-build-tools/pull/524](https://togithub.com/graalvm/native-build-tools/pull/524)
- Fix h2-related tests. by [@fniephaus](https://togithub.com/fniephaus) in [https://togithub.com/graalvm/native-build-tools/pull/526](https://togithub.com/graalvm/native-build-tools/pull/526)
- Make metadata repo test version-agnostic. by [@fniephaus](https://togithub.com/fniephaus) in [https://togithub.com/graalvm/native-build-tools/pull/527](https://togithub.com/graalvm/native-build-tools/pull/527)
- Make metadata repo Gradle test version-agnostic. by [@fniephaus](https://togithub.com/fniephaus) in [https://togithub.com/graalvm/native-build-tools/pull/528](https://togithub.com/graalvm/native-build-tools/pull/528)
#### New Contributors
- [@dependabot](https://togithub.com/dependabot) made their first contribution in [https://togithub.com/graalvm/native-build-tools/pull/499](https://togithub.com/graalvm/native-build-tools/pull/499)
**Full Changelog**: https://togithub.com/graalvm/native-build-tools/compare/0.9.27...0.9.28
---
### Configuration
π
**Schedule**: Branch creation - At any time (no schedule defined), 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.
π **Ignore**: Close this PR and you won't be reminded about this update again.
---
- [ ] If you want to rebase/retry this PR, check this box
---
This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/googleapis/java-spanner).
---
samples/native-image/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/native-image/pom.xml b/samples/native-image/pom.xml
index b83820a6d8..37e66db65a 100644
--- a/samples/native-image/pom.xml
+++ b/samples/native-image/pom.xml
@@ -130,7 +130,7 @@
org.graalvm.buildtools
native-maven-plugin
- 0.9.27
+ 0.9.28
true
com.example.spanner.NativeImageSpannerSample
From 1c26cf60efa1b98203af9b21a47e37c8fb1e0e97 Mon Sep 17 00:00:00 2001
From: Arpan Mishra
Date: Tue, 31 Oct 2023 15:36:14 +0530
Subject: [PATCH 21/28] fix: prevent illegal negative timeout values into
thread sleep() method in ITTransactionManagerTest. (#2715)
* Issue - https://togithub.com/googleapis/java-spanner/issues/2634
* Root Cause - In cases where we are receiving AbortedException, the retry delay is set as -1 for the exception. Negative value is not an acceptable input to Thread.sleep() method and hence we are getting IllegalArgumentException. This is resulting in flaky unit test behaviour.
---
.../spanner/it/ITTransactionManagerTest.java | 25 +++++++++++++++----
1 file changed, 20 insertions(+), 5 deletions(-)
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITTransactionManagerTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITTransactionManagerTest.java
index 736f00ebd6..116d6c2436 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITTransactionManagerTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITTransactionManagerTest.java
@@ -134,7 +134,10 @@ public void simpleInsert() throws InterruptedException {
assertThat(row.getBoolean(1)).isTrue();
break;
} catch (AbortedException e) {
- Thread.sleep(e.getRetryDelayInMillis());
+ long retryDelayInMillis = e.getRetryDelayInMillis();
+ if (retryDelayInMillis > 0) {
+ Thread.sleep(retryDelayInMillis);
+ }
txn = manager.resetForRetry();
}
}
@@ -158,7 +161,10 @@ public void invalidInsert() throws InterruptedException {
manager.commit();
fail("Expected exception");
} catch (AbortedException e) {
- Thread.sleep(e.getRetryDelayInMillis());
+ long retryDelayInMillis = e.getRetryDelayInMillis();
+ if (retryDelayInMillis > 0) {
+ Thread.sleep(retryDelayInMillis);
+ }
txn = manager.resetForRetry();
} catch (SpannerException e) {
// expected
@@ -188,7 +194,10 @@ public void rollback() throws InterruptedException {
manager.rollback();
break;
} catch (AbortedException e) {
- Thread.sleep(e.getRetryDelayInMillis());
+ long retryDelayInMillis = e.getRetryDelayInMillis();
+ if (retryDelayInMillis > 0) {
+ Thread.sleep(retryDelayInMillis);
+ }
txn = manager.resetForRetry();
}
}
@@ -231,7 +240,10 @@ public void abortAndRetry() throws InterruptedException {
manager1.commit();
break;
} catch (AbortedException e) {
- Thread.sleep(e.getRetryDelayInMillis());
+ long retryDelayInMillis = e.getRetryDelayInMillis();
+ if (retryDelayInMillis > 0) {
+ Thread.sleep(retryDelayInMillis);
+ }
// It is possible that it was txn2 that aborted.
// In that case we should just retry without resetting anything.
if (manager1.getState() == TransactionState.ABORTED) {
@@ -278,7 +290,10 @@ public void testTransactionManagerReturnsCommitStats() throws InterruptedExcepti
assertEquals(2L, manager.getCommitResponse().getCommitStats().getMutationCount());
break;
} catch (AbortedException e) {
- Thread.sleep(e.getRetryDelayInMillis());
+ long retryDelayInMillis = e.getRetryDelayInMillis();
+ if (retryDelayInMillis > 0) {
+ Thread.sleep(retryDelayInMillis);
+ }
transaction = manager.resetForRetry();
}
}
From c52526f45310493f1fad29802f330e035d98e656 Mon Sep 17 00:00:00 2001
From: Mend Renovate
Date: Wed, 1 Nov 2023 07:43:40 +0100
Subject: [PATCH 22/28] build(deps): update dependency
com.google.cloud:google-cloud-shared-config to v1.6.1 (#2718)
---
google-cloud-spanner-bom/pom.xml | 2 +-
pom.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/google-cloud-spanner-bom/pom.xml b/google-cloud-spanner-bom/pom.xml
index 387f154a78..3e79fefe4a 100644
--- a/google-cloud-spanner-bom/pom.xml
+++ b/google-cloud-spanner-bom/pom.xml
@@ -8,7 +8,7 @@
com.google.cloud
google-cloud-shared-config
- 1.6.0
+ 1.6.1
Google Cloud Spanner BOM
diff --git a/pom.xml b/pom.xml
index fc464377ff..c598548fae 100644
--- a/pom.xml
+++ b/pom.xml
@@ -14,7 +14,7 @@
com.google.cloud
google-cloud-shared-config
- 1.6.0
+ 1.6.1
From a44f6aa31fa07e475ea6ce469178ee0e2a567abf Mon Sep 17 00:00:00 2001
From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com>
Date: Wed, 1 Nov 2023 12:14:24 +0530
Subject: [PATCH 23/28] chore: update graalvm version to 22.3.3 in kokoro cfg
files. (#1889) (#2717)
Source-Link: https://github.com/googleapis/synthtool/commit/1547f9a33de075d31d434bb3c9d7f53f068e0ff3
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:bc2bf47c7370f1b1a8a46b0c104ce7e43644ac58902c9de265fe1f253fcc2506
Co-authored-by: Owl Bot
---
.github/.OwlBot.lock.yaml | 4 ++--
.kokoro/presubmit/graalvm-native-17.cfg | 2 +-
.kokoro/presubmit/graalvm-native.cfg | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml
index a51efca0e8..f930d4846f 100644
--- a/.github/.OwlBot.lock.yaml
+++ b/.github/.OwlBot.lock.yaml
@@ -13,5 +13,5 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest
- digest: sha256:fb7584f6adb3847ac480ed49a4bfe1463965026b2919a1be270e3174f3ce1191
-# created: 2023-10-26T23:22:21.357007231Z
\ No newline at end of file
+ digest: sha256:bc2bf47c7370f1b1a8a46b0c104ce7e43644ac58902c9de265fe1f253fcc2506
+# created: 2023-10-31T13:44:21.909247346Z
diff --git a/.kokoro/presubmit/graalvm-native-17.cfg b/.kokoro/presubmit/graalvm-native-17.cfg
index f525335458..fb5bb678ff 100644
--- a/.kokoro/presubmit/graalvm-native-17.cfg
+++ b/.kokoro/presubmit/graalvm-native-17.cfg
@@ -3,7 +3,7 @@
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
- value: "gcr.io/cloud-devrel-kokoro-resources/graalvm17:22.3.2"
+ value: "gcr.io/cloud-devrel-kokoro-resources/graalvm17:22.3.3"
}
env_vars: {
diff --git a/.kokoro/presubmit/graalvm-native.cfg b/.kokoro/presubmit/graalvm-native.cfg
index 44b1004875..59efee340c 100644
--- a/.kokoro/presubmit/graalvm-native.cfg
+++ b/.kokoro/presubmit/graalvm-native.cfg
@@ -3,7 +3,7 @@
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
- value: "gcr.io/cloud-devrel-kokoro-resources/graalvm:22.3.2"
+ value: "gcr.io/cloud-devrel-kokoro-resources/graalvm:22.3.3"
}
env_vars: {
From e320753b2bd125f94775db9c71a4b7803fa49c38 Mon Sep 17 00:00:00 2001
From: Mend Renovate
Date: Wed, 1 Nov 2023 07:44:44 +0100
Subject: [PATCH 24/28] deps: update dependency
com.google.cloud:google-cloud-shared-dependencies to v3.19.0 (#2719)
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index c598548fae..dbc961aefe 100644
--- a/pom.xml
+++ b/pom.xml
@@ -54,7 +54,7 @@
UTF-8
github
google-cloud-spanner-parent
- 3.18.0
+ 3.19.0
From e75a2818124621a3ab837151a8e1094fa6c3b8f3 Mon Sep 17 00:00:00 2001
From: Arpan Mishra
Date: Fri, 3 Nov 2023 12:10:07 +0530
Subject: [PATCH 25/28] feat: move session lastUseTime parameter from
PooledSession to SessionImpl class. Fix updation of the parameter for chained
RPCs within one transaction. (#2704)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* fix: prevent illegal negative timeout values into thread sleep() method while retrying exceptions in unit tests.
* For details on issue see - https://github.com/googleapis/java-spanner/issues/2206
* Fixing lint issues.
* refactor: move session lastUseTime parameter from PooledSession to SessionImpl class. Fix updation of the parameter for chained RPCs within one transaction.
* chore: add clock instances in callees of SessionImpl.
* chore: partially fix failing unit tests in SessionPoolTest and SessionPoolMaintainerTest.
* chore: fix failing tests in SessionPoolStressTest.
* chore: update lastUseTime for methods in SessionPoolTransactionContext. Add a couple of unit tests for testing the new behaviour.
* chore: lint errors.
* chore: fix tests in DatabaseClientImplTest by passing the mocked clock instance.
* fix: update session lastUseTime field for AbstractReadContext class. Fix the unit test to test this change.
* fix: failing tests in TransactionRunnerImplTest.
* fix: failing test in SessionPoolMaintainerTest.
* refactor: move FakeClock to a new class.
* refactor: move Clock to a new class.
* chore: resolving PR comments.
* chore: address review comments.
* chore: updating lastUseTime state in TransactionRunnerImpl. Removing redundant updates from SessionPool class.
* chore: remove redundant update statements from SessionPool class. Add more unit tests.
* chore: add more tests for TransactionRunner.
* chore: remove dead code from constructor of SessionPoolTransactionContext.
* π¦ Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
* Update google-cloud-spanner/src/main/java/com/google/cloud/spanner/TransactionRunnerImpl.java
Co-authored-by: Knut Olav LΓΈite
* Update google-cloud-spanner/src/main/java/com/google/cloud/spanner/TransactionRunnerImpl.java
Co-authored-by: Knut Olav LΓΈite
* Update google-cloud-spanner/src/main/java/com/google/cloud/spanner/TransactionRunnerImpl.java
Co-authored-by: Knut Olav LΓΈite
* chore: fixing precondition errors due to null clock.
---------
Co-authored-by: Owl Bot
---
.../cloud/spanner/AbstractReadContext.java | 12 +
.../java/com/google/cloud/spanner/Clock.java | 29 +
.../com/google/cloud/spanner/SessionImpl.java | 15 +
.../com/google/cloud/spanner/SessionPool.java | 24 +-
.../cloud/spanner/SessionPoolOptions.java | 1 -
.../cloud/spanner/TransactionRunnerImpl.java | 29 +-
.../cloud/spanner/BaseSessionPoolTest.java | 50 +-
.../cloud/spanner/DatabaseClientImplTest.java | 762 +++++++++++++++++-
.../com/google/cloud/spanner/FakeClock.java | 31 +
.../spanner/SessionPoolMaintainerTest.java | 8 +-
.../cloud/spanner/SessionPoolStressTest.java | 101 ++-
.../google/cloud/spanner/SessionPoolTest.java | 52 +-
.../spanner/TransactionRunnerImplTest.java | 7 +-
13 files changed, 1009 insertions(+), 112 deletions(-)
create mode 100644 google-cloud-spanner/src/main/java/com/google/cloud/spanner/Clock.java
create mode 100644 google-cloud-spanner/src/test/java/com/google/cloud/spanner/FakeClock.java
diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbstractReadContext.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbstractReadContext.java
index d5b1abe0b5..a0b25cb64c 100644
--- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbstractReadContext.java
+++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbstractReadContext.java
@@ -38,6 +38,7 @@
import com.google.cloud.spanner.SessionImpl.SessionTransaction;
import com.google.cloud.spanner.spi.v1.SpannerRpc;
import com.google.common.annotations.VisibleForTesting;
+import com.google.common.base.Preconditions;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.protobuf.ByteString;
import com.google.spanner.v1.BeginTransactionRequest;
@@ -72,6 +73,7 @@ abstract static class Builder, T extends AbstractReadCon
private int defaultPrefetchChunks = SpannerOptions.Builder.DEFAULT_PREFETCH_CHUNKS;
private QueryOptions defaultQueryOptions = SpannerOptions.Builder.DEFAULT_QUERY_OPTIONS;
private ExecutorProvider executorProvider;
+ private Clock clock = new Clock();
Builder() {}
@@ -110,6 +112,11 @@ B setExecutorProvider(ExecutorProvider executorProvider) {
return self();
}
+ B setClock(Clock clock) {
+ this.clock = Preconditions.checkNotNull(clock);
+ return self();
+ }
+
abstract T build();
}
@@ -392,6 +399,8 @@ void initTransaction() {
private final int defaultPrefetchChunks;
private final QueryOptions defaultQueryOptions;
+ private final Clock clock;
+
@GuardedBy("lock")
private boolean isValid = true;
@@ -416,6 +425,7 @@ void initTransaction() {
this.defaultQueryOptions = builder.defaultQueryOptions;
this.span = builder.span;
this.executorProvider = builder.executorProvider;
+ this.clock = builder.clock;
}
@Override
@@ -689,6 +699,7 @@ CloseableIterator startStream(@Nullable ByteString resumeToken
SpannerRpc.StreamingCall call =
rpc.executeQuery(
request.build(), stream.consumer(), session.getOptions(), isRouteToLeader());
+ session.markUsed(clock.instant());
call.request(prefetchChunks);
stream.setCall(call, request.getTransaction().hasBegin());
return stream;
@@ -826,6 +837,7 @@ CloseableIterator startStream(@Nullable ByteString resumeToken
SpannerRpc.StreamingCall call =
rpc.read(
builder.build(), stream.consumer(), session.getOptions(), isRouteToLeader());
+ session.markUsed(clock.instant());
call.request(prefetchChunks);
stream.setCall(call, /* withBeginTransaction = */ builder.getTransaction().hasBegin());
return stream;
diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Clock.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Clock.java
new file mode 100644
index 0000000000..bb3507eeb4
--- /dev/null
+++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Clock.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2023 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 org.threeten.bp.Instant;
+
+/**
+ * Wrapper around current time so that we can fake it in tests. TODO(user): Replace with Java 8
+ * Clock.
+ */
+class Clock {
+ Instant instant() {
+ return Instant.now();
+ }
+}
diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionImpl.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionImpl.java
index 002a00134f..0e763dbc93 100644
--- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionImpl.java
+++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionImpl.java
@@ -53,6 +53,7 @@
import java.util.Map;
import java.util.concurrent.ExecutionException;
import javax.annotation.Nullable;
+import org.threeten.bp.Instant;
/**
* Implementation of {@link Session}. Sessions are managed internally by the client library, and
@@ -98,12 +99,14 @@ interface SessionTransaction {
ByteString readyTransactionId;
private final Map options;
private Span currentSpan;
+ private volatile Instant lastUseTime;
SessionImpl(SpannerImpl spanner, String name, Map options) {
this.spanner = spanner;
this.options = options;
this.name = checkNotNull(name);
this.databaseId = SessionId.of(name).getDatabaseId();
+ this.lastUseTime = Instant.now();
}
@Override
@@ -123,6 +126,14 @@ Span getCurrentSpan() {
return currentSpan;
}
+ Instant getLastUseTime() {
+ return lastUseTime;
+ }
+
+ void markUsed(Instant instant) {
+ lastUseTime = instant;
+ }
+
@Override
public long executePartitionedUpdate(Statement stmt, UpdateOption... options) {
setActive(null);
@@ -385,6 +396,9 @@ ApiFuture beginTransactionAsync(Options transactionOptions, boolean
}
TransactionContextImpl newTransaction(Options options) {
+ // A clock instance is passed in {@code SessionPoolOptions} in order to allow mocking via tests.
+ final Clock poolMaintainerClock =
+ spanner.getOptions().getSessionPoolOptions().getPoolMaintainerClock();
return TransactionContextImpl.newBuilder()
.setSession(this)
.setOptions(options)
@@ -396,6 +410,7 @@ TransactionContextImpl newTransaction(Options options) {
.setDefaultPrefetchChunks(spanner.getDefaultPrefetchChunks())
.setSpan(currentSpan)
.setExecutorProvider(spanner.getAsyncExecutorProvider())
+ .setClock(poolMaintainerClock == null ? new Clock() : poolMaintainerClock)
.build();
}
diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPool.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPool.java
index ca61da8058..54a0a292cd 100644
--- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPool.java
+++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPool.java
@@ -144,16 +144,6 @@ void maybeWaitOnMinSessions() {
}
}
- /**
- * Wrapper around current time so that we can fake it in tests. TODO(user): Replace with Java 8
- * Clock.
- */
- static class Clock {
- Instant instant() {
- return Instant.now();
- }
- }
-
private abstract static class CachedResultSetSupplier implements Supplier {
private ResultSet cached;
@@ -1370,7 +1360,6 @@ PooledSession get(final boolean eligibleForLongRunning) {
class PooledSession implements Session {
@VisibleForTesting SessionImpl delegate;
- private volatile Instant lastUseTime;
private volatile SpannerException lastException;
private volatile boolean allowReplacing = true;
@@ -1409,7 +1398,9 @@ class PooledSession implements Session {
private PooledSession(SessionImpl delegate) {
this.delegate = delegate;
this.state = SessionState.AVAILABLE;
- this.lastUseTime = clock.instant();
+
+ // initialise the lastUseTime field for each session.
+ this.markUsed();
}
int getChannel() {
@@ -1631,7 +1622,7 @@ private void markClosing() {
}
void markUsed() {
- lastUseTime = clock.instant();
+ delegate.markUsed(clock.instant());
}
@Override
@@ -1827,7 +1818,7 @@ private void removeIdleSessions(Instant currTime) {
Iterator iterator = sessions.descendingIterator();
while (iterator.hasNext()) {
PooledSession session = iterator.next();
- if (session.lastUseTime.isBefore(minLastUseTime)) {
+ if (session.delegate.getLastUseTime().isBefore(minLastUseTime)) {
if (session.state != SessionState.CLOSING) {
boolean isRemoved = removeFromPool(session);
if (isRemoved) {
@@ -1929,7 +1920,8 @@ private void removeLongRunningSessions(
// collection is populated only when the get() method in {@code PooledSessionFuture} is
// called.
final PooledSession session = sessionFuture.get();
- final Duration durationFromLastUse = Duration.between(session.lastUseTime, currentTime);
+ final Duration durationFromLastUse =
+ Duration.between(session.delegate.getLastUseTime(), currentTime);
if (!session.eligibleForLongRunning
&& durationFromLastUse.compareTo(
inactiveTransactionRemovalOptions.getIdleTimeThreshold())
@@ -2327,7 +2319,7 @@ private PooledSession findSessionToKeepAlive(
&& (numChecked + numAlreadyChecked)
< (options.getMinSessions() + options.getMaxIdleSessions() - numSessionsInUse)) {
PooledSession session = iterator.next();
- if (session.lastUseTime.isBefore(keepAliveThreshold)) {
+ if (session.delegate.getLastUseTime().isBefore(keepAliveThreshold)) {
iterator.remove();
return session;
}
diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPoolOptions.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPoolOptions.java
index e29767abab..cbea149536 100644
--- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPoolOptions.java
+++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPoolOptions.java
@@ -16,7 +16,6 @@
package com.google.cloud.spanner;
-import com.google.cloud.spanner.SessionPool.Clock;
import com.google.cloud.spanner.SessionPool.Position;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Preconditions;
diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TransactionRunnerImpl.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TransactionRunnerImpl.java
index ef937e993b..21c74a400f 100644
--- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TransactionRunnerImpl.java
+++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TransactionRunnerImpl.java
@@ -85,12 +85,19 @@ class TransactionRunnerImpl implements SessionTransaction, TransactionRunner {
@VisibleForTesting
static class TransactionContextImpl extends AbstractReadContext implements TransactionContext {
static class Builder extends AbstractReadContext.Builder {
+
+ private Clock clock = new Clock();
private ByteString transactionId;
private Options options;
private boolean trackTransactionStarter;
private Builder() {}
+ Builder setClock(Clock clock) {
+ this.clock = Preconditions.checkNotNull(clock);
+ return self();
+ }
+
Builder setTransactionId(ByteString transactionId) {
this.transactionId = transactionId;
return self();
@@ -189,6 +196,7 @@ public void removeListener(Runnable listener) {
volatile ByteString transactionId;
private CommitResponse commitResponse;
+ private final Clock clock;
private TransactionContextImpl(Builder builder) {
super(builder);
@@ -196,6 +204,7 @@ private TransactionContextImpl(Builder builder) {
this.trackTransactionStarter = builder.trackTransactionStarter;
this.options = builder.options;
this.finishedAsyncOperations.set(null);
+ this.clock = builder.clock;
}
@Override
@@ -389,6 +398,7 @@ public void run() {
tracer.spanBuilderWithExplicitParent(SpannerImpl.COMMIT, span).startSpan();
final ApiFuture commitFuture =
rpc.commitAsync(commitRequest, session.getOptions());
+ session.markUsed(clock.instant());
commitFuture.addListener(
tracer.withSpan(
opSpan,
@@ -463,12 +473,15 @@ ApiFuture rollbackAsync() {
// is still in flight. That transaction will then automatically be terminated by the server.
if (transactionId != null) {
span.addAnnotation("Starting Rollback");
- return rpc.rollbackAsync(
- RollbackRequest.newBuilder()
- .setSession(session.getName())
- .setTransactionId(transactionId)
- .build(),
- session.getOptions());
+ ApiFuture apiFuture =
+ rpc.rollbackAsync(
+ RollbackRequest.newBuilder()
+ .setSession(session.getName())
+ .setTransactionId(transactionId)
+ .build(),
+ session.getOptions());
+ session.markUsed(clock.instant());
+ return apiFuture;
} else {
return ApiFutures.immediateFuture(Empty.getDefaultInstance());
}
@@ -723,6 +736,7 @@ private ResultSet internalExecuteUpdate(
try {
com.google.spanner.v1.ResultSet resultSet =
rpc.executeQuery(builder.build(), session.getOptions(), isRouteToLeader());
+ session.markUsed(clock.instant());
if (resultSet.getMetadata().hasTransaction()) {
onTransactionMetadata(
resultSet.getMetadata().getTransaction(), builder.getTransaction().hasBegin());
@@ -753,6 +767,7 @@ public ApiFuture executeUpdateAsync(Statement statement, UpdateOption... o
// commit.
increaseAsyncOperations();
resultSet = rpc.executeQueryAsync(builder.build(), session.getOptions(), isRouteToLeader());
+ session.markUsed(clock.instant());
} catch (Throwable t) {
decreaseAsyncOperations();
throw t;
@@ -824,6 +839,7 @@ public long[] batchUpdate(Iterable statements, UpdateOption... option
try {
com.google.spanner.v1.ExecuteBatchDmlResponse response =
rpc.executeBatchDml(builder.build(), session.getOptions());
+ session.markUsed(clock.instant());
long[] results = new long[response.getResultSetsCount()];
for (int i = 0; i < response.getResultSetsCount(); ++i) {
results[i] = response.getResultSets(i).getStats().getRowCountExact();
@@ -863,6 +879,7 @@ public ApiFuture batchUpdateAsync(
// commit.
increaseAsyncOperations();
response = rpc.executeBatchDmlAsync(builder.build(), session.getOptions());
+ session.markUsed(clock.instant());
} catch (Throwable t) {
decreaseAsyncOperations();
throw t;
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BaseSessionPoolTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BaseSessionPoolTest.java
index 7f8cf5cc1b..d36d32bda2 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BaseSessionPoolTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BaseSessionPoolTest.java
@@ -23,9 +23,10 @@
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.when;
+import com.google.api.core.ApiFuture;
import com.google.api.core.ApiFutures;
import com.google.cloud.grpc.GrpcTransportOptions.ExecutorFactory;
-import com.google.cloud.spanner.SessionPool.Clock;
+import com.google.cloud.spanner.Options.TransactionOption;
import com.google.cloud.spanner.spi.v1.SpannerRpc.Option;
import com.google.protobuf.Empty;
import java.util.HashMap;
@@ -35,7 +36,6 @@
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
-import org.threeten.bp.Instant;
abstract class BaseSessionPoolTest {
ScheduledExecutorService mockExecutor;
@@ -84,19 +84,47 @@ SessionImpl mockSession() {
return session;
}
+ SessionImpl buildMockSession(ReadContext context) {
+ SpannerImpl spanner = mock(SpannerImpl.class);
+ Map options = new HashMap<>();
+ options.put(Option.CHANNEL_HINT, channelHint.getAndIncrement());
+ final SessionImpl session =
+ new SessionImpl(
+ spanner,
+ "projects/dummy/instances/dummy/databases/dummy/sessions/session" + sessionIndex,
+ options) {
+ @Override
+ public ReadContext singleUse(TimestampBound bound) {
+ // The below stubs are added so that we can mock keep-alive.
+ return context;
+ }
+
+ @Override
+ public ApiFuture asyncClose() {
+ return ApiFutures.immediateFuture(Empty.getDefaultInstance());
+ }
+
+ @Override
+ public CommitResponse writeAtLeastOnceWithOptions(
+ Iterable mutations, TransactionOption... transactionOptions)
+ throws SpannerException {
+ return new CommitResponse(com.google.spanner.v1.CommitResponse.getDefaultInstance());
+ }
+
+ @Override
+ public CommitResponse writeWithOptions(
+ Iterable mutations, TransactionOption... options) throws SpannerException {
+ return new CommitResponse(com.google.spanner.v1.CommitResponse.getDefaultInstance());
+ }
+ };
+ sessionIndex++;
+ return session;
+ }
+
void runMaintenanceLoop(FakeClock clock, SessionPool pool, long numCycles) {
for (int i = 0; i < numCycles; i++) {
pool.poolMaintainer.maintainPool();
clock.currentTimeMillis += pool.poolMaintainer.loopFrequency;
}
}
-
- static class FakeClock extends Clock {
- volatile long currentTimeMillis;
-
- @Override
- public Instant instant() {
- return Instant.ofEpochMilli(currentTimeMillis);
- }
- }
}
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseClientImplTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseClientImplTest.java
index 029ea471cd..aea8a4dcb6 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseClientImplTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseClientImplTest.java
@@ -53,7 +53,6 @@
import com.google.cloud.spanner.Options.RpcPriority;
import com.google.cloud.spanner.Options.TransactionOption;
import com.google.cloud.spanner.ReadContext.QueryAnalyzeMode;
-import com.google.cloud.spanner.SessionPool.Clock;
import com.google.cloud.spanner.SessionPool.PooledSessionFuture;
import com.google.cloud.spanner.SessionPoolOptions.ActionOnInactiveTransaction;
import com.google.cloud.spanner.SessionPoolOptions.InactiveTransactionRemovalOptions;
@@ -64,6 +63,7 @@
import com.google.cloud.spanner.connection.RandomResultSetGenerator;
import com.google.common.base.Stopwatch;
import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Lists;
import com.google.common.io.BaseEncoding;
import com.google.common.util.concurrent.SettableFuture;
import com.google.protobuf.AbstractMessage;
@@ -536,6 +536,757 @@ public void testPoolMaintainer_whenPDMLFollowedByInactiveTransaction_removeSessi
assertTrue(client.pool.getNumberOfSessionsInPool() <= client.pool.totalSessions());
}
+ @Test
+ public void
+ testPoolMaintainer_whenLongRunningReadsUsingTransactionRunner_retainSessionForTransaction()
+ throws Exception {
+ FakeClock poolMaintainerClock = new FakeClock();
+ InactiveTransactionRemovalOptions inactiveTransactionRemovalOptions =
+ InactiveTransactionRemovalOptions.newBuilder()
+ .setIdleTimeThreshold(
+ Duration.ofSeconds(
+ 3L)) // any session not used for more than 3s will be long-running
+ .setActionOnInactiveTransaction(ActionOnInactiveTransaction.CLOSE)
+ .setExecutionFrequency(Duration.ofSeconds(1)) // execute thread every 1s
+ .build();
+ SessionPoolOptions sessionPoolOptions =
+ SessionPoolOptions.newBuilder()
+ .setMinSessions(1)
+ .setMaxSessions(1) // to ensure there is 1 session and pool is 100% utilized
+ .setInactiveTransactionRemovalOptions(inactiveTransactionRemovalOptions)
+ .setLoopFrequency(1000L) // main thread runs every 1s
+ .setPoolMaintainerClock(poolMaintainerClock)
+ .build();
+ spanner =
+ SpannerOptions.newBuilder()
+ .setProjectId(TEST_PROJECT)
+ .setDatabaseRole(TEST_DATABASE_ROLE)
+ .setChannelProvider(channelProvider)
+ .setCredentials(NoCredentials.getInstance())
+ .setSessionPoolOption(sessionPoolOptions)
+ .build()
+ .getService();
+ DatabaseClientImpl client =
+ (DatabaseClientImpl)
+ spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE));
+ Instant initialExecutionTime = client.pool.poolMaintainer.lastExecutionTime;
+
+ TransactionRunner runner = client.readWriteTransaction();
+ runner.run(
+ transaction -> {
+ try (ResultSet resultSet =
+ transaction.read(
+ READ_TABLE_NAME,
+ KeySet.singleKey(Key.of(1L)),
+ READ_COLUMN_NAMES,
+ Options.priority(RpcPriority.HIGH))) {
+ while (resultSet.next()) {}
+ }
+ poolMaintainerClock.currentTimeMillis += Duration.ofMillis(1050).toMillis();
+
+ try (ResultSet resultSet =
+ transaction.read(
+ READ_TABLE_NAME,
+ KeySet.singleKey(Key.of(1L)),
+ READ_COLUMN_NAMES,
+ Options.priority(RpcPriority.HIGH))) {
+ while (resultSet.next()) {}
+ }
+ poolMaintainerClock.currentTimeMillis += Duration.ofMillis(2050).toMillis();
+
+ // force trigger pool maintainer to check for long-running sessions
+ client.pool.poolMaintainer.maintainPool();
+
+ return null;
+ });
+
+ Instant endExecutionTime = client.pool.poolMaintainer.lastExecutionTime;
+
+ assertNotEquals(
+ endExecutionTime,
+ initialExecutionTime); // if session clean up task runs then these timings won't match
+ assertEquals(0, client.pool.numLeakedSessionsRemoved());
+ }
+
+ @Test
+ public void
+ testPoolMaintainer_whenLongRunningQueriesUsingTransactionRunner_retainSessionForTransaction()
+ throws Exception {
+ FakeClock poolMaintainerClock = new FakeClock();
+ InactiveTransactionRemovalOptions inactiveTransactionRemovalOptions =
+ InactiveTransactionRemovalOptions.newBuilder()
+ .setIdleTimeThreshold(
+ Duration.ofSeconds(
+ 3L)) // any session not used for more than 3s will be long-running
+ .setActionOnInactiveTransaction(ActionOnInactiveTransaction.CLOSE)
+ .setExecutionFrequency(Duration.ofSeconds(1)) // execute thread every 1s
+ .build();
+ SessionPoolOptions sessionPoolOptions =
+ SessionPoolOptions.newBuilder()
+ .setMinSessions(1)
+ .setMaxSessions(1) // to ensure there is 1 session and pool is 100% utilized
+ .setInactiveTransactionRemovalOptions(inactiveTransactionRemovalOptions)
+ .setLoopFrequency(1000L) // main thread runs every 1s
+ .setPoolMaintainerClock(poolMaintainerClock)
+ .build();
+ spanner =
+ SpannerOptions.newBuilder()
+ .setProjectId(TEST_PROJECT)
+ .setDatabaseRole(TEST_DATABASE_ROLE)
+ .setChannelProvider(channelProvider)
+ .setCredentials(NoCredentials.getInstance())
+ .setSessionPoolOption(sessionPoolOptions)
+ .build()
+ .getService();
+ DatabaseClientImpl client =
+ (DatabaseClientImpl)
+ spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE));
+ Instant initialExecutionTime = client.pool.poolMaintainer.lastExecutionTime;
+
+ TransactionRunner runner = client.readWriteTransaction();
+ runner.run(
+ transaction -> {
+ try (ResultSet resultSet = transaction.executeQuery(SELECT1)) {
+ while (resultSet.next()) {}
+ }
+ poolMaintainerClock.currentTimeMillis += Duration.ofMillis(1050).toMillis();
+
+ try (ResultSet resultSet = transaction.executeQuery(SELECT1)) {
+ while (resultSet.next()) {}
+ }
+ poolMaintainerClock.currentTimeMillis += Duration.ofMillis(2050).toMillis();
+
+ // force trigger pool maintainer to check for long-running sessions
+ client.pool.poolMaintainer.maintainPool();
+
+ return null;
+ });
+
+ Instant endExecutionTime = client.pool.poolMaintainer.lastExecutionTime;
+
+ assertNotEquals(
+ endExecutionTime,
+ initialExecutionTime); // if session clean up task runs then these timings won't match
+ assertEquals(0, client.pool.numLeakedSessionsRemoved());
+ }
+
+ @Test
+ public void
+ testPoolMaintainer_whenLongRunningUpdatesUsingTransactionManager_retainSessionForTransaction()
+ throws Exception {
+ FakeClock poolMaintainerClock = new FakeClock();
+ InactiveTransactionRemovalOptions inactiveTransactionRemovalOptions =
+ InactiveTransactionRemovalOptions.newBuilder()
+ .setIdleTimeThreshold(
+ Duration.ofSeconds(
+ 3L)) // any session not used for more than 3s will be long-running
+ .setActionOnInactiveTransaction(ActionOnInactiveTransaction.CLOSE)
+ .setExecutionFrequency(Duration.ofSeconds(1)) // execute thread every 1s
+ .build();
+ SessionPoolOptions sessionPoolOptions =
+ SessionPoolOptions.newBuilder()
+ .setMinSessions(1)
+ .setMaxSessions(1) // to ensure there is 1 session and pool is 100% utilized
+ .setInactiveTransactionRemovalOptions(inactiveTransactionRemovalOptions)
+ .setLoopFrequency(1000L) // main thread runs every 1s
+ .setPoolMaintainerClock(poolMaintainerClock)
+ .build();
+ spanner =
+ SpannerOptions.newBuilder()
+ .setProjectId(TEST_PROJECT)
+ .setDatabaseRole(TEST_DATABASE_ROLE)
+ .setChannelProvider(channelProvider)
+ .setCredentials(NoCredentials.getInstance())
+ .setSessionPoolOption(sessionPoolOptions)
+ .build()
+ .getService();
+ DatabaseClientImpl client =
+ (DatabaseClientImpl)
+ spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE));
+ Instant initialExecutionTime = client.pool.poolMaintainer.lastExecutionTime;
+
+ try (TransactionManager manager = client.transactionManager()) {
+ TransactionContext transaction = manager.begin();
+ while (true) {
+ try {
+ transaction.executeUpdate(UPDATE_STATEMENT);
+ poolMaintainerClock.currentTimeMillis += Duration.ofMillis(1050).toMillis();
+
+ transaction.executeUpdate(UPDATE_STATEMENT);
+ poolMaintainerClock.currentTimeMillis += Duration.ofMillis(2050).toMillis();
+
+ // force trigger pool maintainer to check for long-running sessions
+ client.pool.poolMaintainer.maintainPool();
+
+ manager.commit();
+ assertNotNull(manager.getCommitTimestamp());
+ break;
+ } catch (AbortedException e) {
+ transaction = manager.resetForRetry();
+ }
+ }
+ }
+ Instant endExecutionTime = client.pool.poolMaintainer.lastExecutionTime;
+
+ assertNotEquals(
+ endExecutionTime,
+ initialExecutionTime); // if session clean up task runs then these timings won't match
+ assertEquals(0, client.pool.numLeakedSessionsRemoved());
+ assertTrue(client.pool.getNumberOfSessionsInPool() <= client.pool.totalSessions());
+ }
+
+ @Test
+ public void
+ testPoolMaintainer_whenLongRunningReadsUsingTransactionManager_retainSessionForTransaction() {
+ FakeClock poolMaintainerClock = new FakeClock();
+ InactiveTransactionRemovalOptions inactiveTransactionRemovalOptions =
+ InactiveTransactionRemovalOptions.newBuilder()
+ .setIdleTimeThreshold(
+ Duration.ofSeconds(
+ 3L)) // any session not used for more than 3s will be long-running
+ .setActionOnInactiveTransaction(ActionOnInactiveTransaction.CLOSE)
+ .setExecutionFrequency(Duration.ofSeconds(1)) // execute thread every 1s
+ .build();
+ SessionPoolOptions sessionPoolOptions =
+ SessionPoolOptions.newBuilder()
+ .setMinSessions(1)
+ .setMaxSessions(1) // to ensure there is 1 session and pool is 100% utilized
+ .setInactiveTransactionRemovalOptions(inactiveTransactionRemovalOptions)
+ .setLoopFrequency(1000L) // main thread runs every 1s
+ .setPoolMaintainerClock(poolMaintainerClock)
+ .build();
+ spanner =
+ SpannerOptions.newBuilder()
+ .setProjectId(TEST_PROJECT)
+ .setDatabaseRole(TEST_DATABASE_ROLE)
+ .setChannelProvider(channelProvider)
+ .setCredentials(NoCredentials.getInstance())
+ .setSessionPoolOption(sessionPoolOptions)
+ .build()
+ .getService();
+ DatabaseClientImpl client =
+ (DatabaseClientImpl)
+ spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE));
+ Instant initialExecutionTime = client.pool.poolMaintainer.lastExecutionTime;
+
+ try (TransactionManager manager = client.transactionManager()) {
+ TransactionContext transaction = manager.begin();
+ while (true) {
+ try {
+ try (ResultSet resultSet =
+ transaction.read(
+ READ_TABLE_NAME,
+ KeySet.singleKey(Key.of(1L)),
+ READ_COLUMN_NAMES,
+ Options.priority(RpcPriority.HIGH))) {
+
+ while (resultSet.next()) {}
+ }
+ poolMaintainerClock.currentTimeMillis += Duration.ofMillis(1050).toMillis();
+
+ try (ResultSet resultSet =
+ transaction.read(
+ READ_TABLE_NAME,
+ KeySet.singleKey(Key.of(1L)),
+ READ_COLUMN_NAMES,
+ Options.priority(RpcPriority.HIGH))) {
+
+ while (resultSet.next()) {}
+ }
+ poolMaintainerClock.currentTimeMillis += Duration.ofMillis(2050).toMillis();
+
+ // force trigger pool maintainer to check for long-running sessions
+ client.pool.poolMaintainer.maintainPool();
+
+ manager.commit();
+ assertNotNull(manager.getCommitTimestamp());
+ break;
+ } catch (AbortedException e) {
+ transaction = manager.resetForRetry();
+ }
+ }
+ }
+ Instant endExecutionTime = client.pool.poolMaintainer.lastExecutionTime;
+
+ assertNotEquals(
+ endExecutionTime,
+ initialExecutionTime); // if session clean up task runs then these timings won't match
+ assertEquals(0, client.pool.numLeakedSessionsRemoved());
+ assertTrue(client.pool.getNumberOfSessionsInPool() <= client.pool.totalSessions());
+ }
+
+ @Test
+ public void
+ testPoolMaintainer_whenLongRunningReadRowUsingTransactionManager_retainSessionForTransaction() {
+ FakeClock poolMaintainerClock = new FakeClock();
+ InactiveTransactionRemovalOptions inactiveTransactionRemovalOptions =
+ InactiveTransactionRemovalOptions.newBuilder()
+ .setIdleTimeThreshold(
+ Duration.ofSeconds(
+ 3L)) // any session not used for more than 3s will be long-running
+ .setActionOnInactiveTransaction(ActionOnInactiveTransaction.CLOSE)
+ .setExecutionFrequency(Duration.ofSeconds(1)) // execute thread every 1s
+ .build();
+ SessionPoolOptions sessionPoolOptions =
+ SessionPoolOptions.newBuilder()
+ .setMinSessions(1)
+ .setMaxSessions(1) // to ensure there is 1 session and pool is 100% utilized
+ .setInactiveTransactionRemovalOptions(inactiveTransactionRemovalOptions)
+ .setLoopFrequency(1000L) // main thread runs every 1s
+ .setPoolMaintainerClock(poolMaintainerClock)
+ .build();
+ spanner =
+ SpannerOptions.newBuilder()
+ .setProjectId(TEST_PROJECT)
+ .setDatabaseRole(TEST_DATABASE_ROLE)
+ .setChannelProvider(channelProvider)
+ .setCredentials(NoCredentials.getInstance())
+ .setSessionPoolOption(sessionPoolOptions)
+ .build()
+ .getService();
+ DatabaseClientImpl client =
+ (DatabaseClientImpl)
+ spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE));
+ Instant initialExecutionTime = client.pool.poolMaintainer.lastExecutionTime;
+
+ try (TransactionManager manager = client.transactionManager()) {
+ TransactionContext transaction = manager.begin();
+ while (true) {
+ try {
+ transaction.readRow(READ_TABLE_NAME, Key.of(1L), READ_COLUMN_NAMES);
+
+ poolMaintainerClock.currentTimeMillis += Duration.ofMillis(1050).toMillis();
+
+ transaction.readRow(READ_TABLE_NAME, Key.of(1L), READ_COLUMN_NAMES);
+
+ poolMaintainerClock.currentTimeMillis += Duration.ofMillis(2050).toMillis();
+
+ // force trigger pool maintainer to check for long-running sessions
+ client.pool.poolMaintainer.maintainPool();
+
+ manager.commit();
+ assertNotNull(manager.getCommitTimestamp());
+ break;
+ } catch (AbortedException e) {
+ transaction = manager.resetForRetry();
+ }
+ }
+ }
+ Instant endExecutionTime = client.pool.poolMaintainer.lastExecutionTime;
+
+ assertNotEquals(
+ endExecutionTime,
+ initialExecutionTime); // if session clean up task runs then these timings won't match
+ assertEquals(0, client.pool.numLeakedSessionsRemoved());
+ assertTrue(client.pool.getNumberOfSessionsInPool() <= client.pool.totalSessions());
+ }
+
+ @Test
+ public void
+ testPoolMaintainer_whenLongRunningAnalyzeUpdateStatementUsingTransactionManager_retainSessionForTransaction() {
+ FakeClock poolMaintainerClock = new FakeClock();
+ InactiveTransactionRemovalOptions inactiveTransactionRemovalOptions =
+ InactiveTransactionRemovalOptions.newBuilder()
+ .setIdleTimeThreshold(
+ Duration.ofSeconds(
+ 3L)) // any session not used for more than 3s will be long-running
+ .setActionOnInactiveTransaction(ActionOnInactiveTransaction.CLOSE)
+ .setExecutionFrequency(Duration.ofSeconds(1)) // execute thread every 1s
+ .build();
+ SessionPoolOptions sessionPoolOptions =
+ SessionPoolOptions.newBuilder()
+ .setMinSessions(1)
+ .setMaxSessions(1) // to ensure there is 1 session and pool is 100% utilized
+ .setInactiveTransactionRemovalOptions(inactiveTransactionRemovalOptions)
+ .setLoopFrequency(1000L) // main thread runs every 1s
+ .setPoolMaintainerClock(poolMaintainerClock)
+ .build();
+ spanner =
+ SpannerOptions.newBuilder()
+ .setProjectId(TEST_PROJECT)
+ .setDatabaseRole(TEST_DATABASE_ROLE)
+ .setChannelProvider(channelProvider)
+ .setCredentials(NoCredentials.getInstance())
+ .setSessionPoolOption(sessionPoolOptions)
+ .build()
+ .getService();
+ DatabaseClientImpl client =
+ (DatabaseClientImpl)
+ spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE));
+ Instant initialExecutionTime = client.pool.poolMaintainer.lastExecutionTime;
+
+ try (TransactionManager manager = client.transactionManager()) {
+ TransactionContext transaction = manager.begin();
+ while (true) {
+ try {
+ try (ResultSet resultSet =
+ transaction.analyzeUpdateStatement(UPDATE_STATEMENT, QueryAnalyzeMode.PROFILE); ) {
+ while (resultSet.next()) {}
+ }
+ poolMaintainerClock.currentTimeMillis += Duration.ofMillis(1050).toMillis();
+
+ try (ResultSet resultSet =
+ transaction.analyzeUpdateStatement(UPDATE_STATEMENT, QueryAnalyzeMode.PROFILE); ) {
+ while (resultSet.next()) {}
+ }
+ poolMaintainerClock.currentTimeMillis += Duration.ofMillis(2050).toMillis();
+
+ // force trigger pool maintainer to check for long-running sessions
+ client.pool.poolMaintainer.maintainPool();
+
+ manager.commit();
+ assertNotNull(manager.getCommitTimestamp());
+ break;
+ } catch (AbortedException e) {
+ transaction = manager.resetForRetry();
+ }
+ }
+ }
+ Instant endExecutionTime = client.pool.poolMaintainer.lastExecutionTime;
+
+ assertNotEquals(
+ endExecutionTime,
+ initialExecutionTime); // if session clean up task runs then these timings won't match
+ assertEquals(0, client.pool.numLeakedSessionsRemoved());
+ assertTrue(client.pool.getNumberOfSessionsInPool() <= client.pool.totalSessions());
+ }
+
+ @Test
+ public void
+ testPoolMaintainer_whenLongRunningBatchUpdatesUsingTransactionManager_retainSessionForTransaction() {
+ FakeClock poolMaintainerClock = new FakeClock();
+ InactiveTransactionRemovalOptions inactiveTransactionRemovalOptions =
+ InactiveTransactionRemovalOptions.newBuilder()
+ .setIdleTimeThreshold(
+ Duration.ofSeconds(
+ 3L)) // any session not used for more than 3s will be long-running
+ .setActionOnInactiveTransaction(ActionOnInactiveTransaction.CLOSE)
+ .setExecutionFrequency(Duration.ofSeconds(1)) // execute thread every 1s
+ .build();
+ SessionPoolOptions sessionPoolOptions =
+ SessionPoolOptions.newBuilder()
+ .setMinSessions(1)
+ .setMaxSessions(1) // to ensure there is 1 session and pool is 100% utilized
+ .setInactiveTransactionRemovalOptions(inactiveTransactionRemovalOptions)
+ .setLoopFrequency(1000L) // main thread runs every 1s
+ .setPoolMaintainerClock(poolMaintainerClock)
+ .build();
+ spanner =
+ SpannerOptions.newBuilder()
+ .setProjectId(TEST_PROJECT)
+ .setDatabaseRole(TEST_DATABASE_ROLE)
+ .setChannelProvider(channelProvider)
+ .setCredentials(NoCredentials.getInstance())
+ .setSessionPoolOption(sessionPoolOptions)
+ .build()
+ .getService();
+ DatabaseClientImpl client =
+ (DatabaseClientImpl)
+ spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE));
+ Instant initialExecutionTime = client.pool.poolMaintainer.lastExecutionTime;
+
+ try (TransactionManager manager = client.transactionManager()) {
+ TransactionContext transaction = manager.begin();
+ while (true) {
+ try {
+ transaction.batchUpdate(Lists.newArrayList(UPDATE_STATEMENT));
+
+ poolMaintainerClock.currentTimeMillis += Duration.ofMillis(1050).toMillis();
+
+ transaction.batchUpdate(Lists.newArrayList(UPDATE_STATEMENT));
+
+ poolMaintainerClock.currentTimeMillis += Duration.ofMillis(2050).toMillis();
+
+ // force trigger pool maintainer to check for long-running sessions
+ client.pool.poolMaintainer.maintainPool();
+
+ manager.commit();
+ assertNotNull(manager.getCommitTimestamp());
+ break;
+ } catch (AbortedException e) {
+ transaction = manager.resetForRetry();
+ }
+ }
+ }
+ Instant endExecutionTime = client.pool.poolMaintainer.lastExecutionTime;
+
+ assertNotEquals(
+ endExecutionTime,
+ initialExecutionTime); // if session clean up task runs then these timings won't match
+ assertEquals(0, client.pool.numLeakedSessionsRemoved());
+ assertTrue(client.pool.getNumberOfSessionsInPool() <= client.pool.totalSessions());
+ }
+
+ @Test
+ public void
+ testPoolMaintainer_whenLongRunningBatchUpdatesAsyncUsingTransactionManager_retainSessionForTransaction() {
+ FakeClock poolMaintainerClock = new FakeClock();
+ InactiveTransactionRemovalOptions inactiveTransactionRemovalOptions =
+ InactiveTransactionRemovalOptions.newBuilder()
+ .setIdleTimeThreshold(
+ Duration.ofSeconds(
+ 3L)) // any session not used for more than 3s will be long-running
+ .setActionOnInactiveTransaction(ActionOnInactiveTransaction.CLOSE)
+ .setExecutionFrequency(Duration.ofSeconds(1)) // execute thread every 1s
+ .build();
+ SessionPoolOptions sessionPoolOptions =
+ SessionPoolOptions.newBuilder()
+ .setMinSessions(1)
+ .setMaxSessions(1) // to ensure there is 1 session and pool is 100% utilized
+ .setInactiveTransactionRemovalOptions(inactiveTransactionRemovalOptions)
+ .setLoopFrequency(1000L) // main thread runs every 1s
+ .setPoolMaintainerClock(poolMaintainerClock)
+ .build();
+ spanner =
+ SpannerOptions.newBuilder()
+ .setProjectId(TEST_PROJECT)
+ .setDatabaseRole(TEST_DATABASE_ROLE)
+ .setChannelProvider(channelProvider)
+ .setCredentials(NoCredentials.getInstance())
+ .setSessionPoolOption(sessionPoolOptions)
+ .build()
+ .getService();
+ DatabaseClientImpl client =
+ (DatabaseClientImpl)
+ spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE));
+ Instant initialExecutionTime = client.pool.poolMaintainer.lastExecutionTime;
+
+ try (TransactionManager manager = client.transactionManager()) {
+ TransactionContext transaction = manager.begin();
+ while (true) {
+ try {
+ transaction.batchUpdateAsync(Lists.newArrayList(UPDATE_STATEMENT));
+
+ poolMaintainerClock.currentTimeMillis += Duration.ofMillis(1050).toMillis();
+
+ transaction.batchUpdateAsync(Lists.newArrayList(UPDATE_STATEMENT));
+
+ poolMaintainerClock.currentTimeMillis += Duration.ofMillis(2050).toMillis();
+
+ // force trigger pool maintainer to check for long-running sessions
+ client.pool.poolMaintainer.maintainPool();
+
+ manager.commit();
+ assertNotNull(manager.getCommitTimestamp());
+ break;
+ } catch (AbortedException e) {
+ transaction = manager.resetForRetry();
+ }
+ }
+ }
+ Instant endExecutionTime = client.pool.poolMaintainer.lastExecutionTime;
+
+ assertNotEquals(
+ endExecutionTime,
+ initialExecutionTime); // if session clean up task runs then these timings won't match
+ assertEquals(0, client.pool.numLeakedSessionsRemoved());
+ assertTrue(client.pool.getNumberOfSessionsInPool() <= client.pool.totalSessions());
+ }
+
+ @Test
+ public void
+ testPoolMaintainer_whenLongRunningExecuteQueryUsingTransactionManager_retainSessionForTransaction() {
+ FakeClock poolMaintainerClock = new FakeClock();
+ InactiveTransactionRemovalOptions inactiveTransactionRemovalOptions =
+ InactiveTransactionRemovalOptions.newBuilder()
+ .setIdleTimeThreshold(
+ Duration.ofSeconds(
+ 3L)) // any session not used for more than 3s will be long-running
+ .setActionOnInactiveTransaction(ActionOnInactiveTransaction.CLOSE)
+ .setExecutionFrequency(Duration.ofSeconds(1)) // execute thread every 1s
+ .build();
+ SessionPoolOptions sessionPoolOptions =
+ SessionPoolOptions.newBuilder()
+ .setMinSessions(1)
+ .setMaxSessions(1) // to ensure there is 1 session and pool is 100% utilized
+ .setInactiveTransactionRemovalOptions(inactiveTransactionRemovalOptions)
+ .setLoopFrequency(1000L) // main thread runs every 1s
+ .setPoolMaintainerClock(poolMaintainerClock)
+ .build();
+ spanner =
+ SpannerOptions.newBuilder()
+ .setProjectId(TEST_PROJECT)
+ .setDatabaseRole(TEST_DATABASE_ROLE)
+ .setChannelProvider(channelProvider)
+ .setCredentials(NoCredentials.getInstance())
+ .setSessionPoolOption(sessionPoolOptions)
+ .build()
+ .getService();
+ DatabaseClientImpl client =
+ (DatabaseClientImpl)
+ spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE));
+ Instant initialExecutionTime = client.pool.poolMaintainer.lastExecutionTime;
+
+ try (TransactionManager manager = client.transactionManager()) {
+ TransactionContext transaction = manager.begin();
+ while (true) {
+ try {
+ try (ResultSet resultSet = transaction.executeQuery(SELECT1)) {
+ while (resultSet.next()) {}
+ }
+ poolMaintainerClock.currentTimeMillis += Duration.ofMillis(1050).toMillis();
+
+ try (ResultSet resultSet = transaction.executeQuery(SELECT1)) {
+ while (resultSet.next()) {}
+ }
+ poolMaintainerClock.currentTimeMillis += Duration.ofMillis(2050).toMillis();
+
+ // force trigger pool maintainer to check for long-running sessions
+ client.pool.poolMaintainer.maintainPool();
+
+ manager.commit();
+ assertNotNull(manager.getCommitTimestamp());
+ break;
+ } catch (AbortedException e) {
+ transaction = manager.resetForRetry();
+ }
+ }
+ }
+ Instant endExecutionTime = client.pool.poolMaintainer.lastExecutionTime;
+
+ assertNotEquals(
+ endExecutionTime,
+ initialExecutionTime); // if session clean up task runs then these timings won't match
+ assertEquals(0, client.pool.numLeakedSessionsRemoved());
+ assertTrue(client.pool.getNumberOfSessionsInPool() <= client.pool.totalSessions());
+ }
+
+ @Test
+ public void
+ testPoolMaintainer_whenLongRunningExecuteQueryAsyncUsingTransactionManager_retainSessionForTransaction() {
+ FakeClock poolMaintainerClock = new FakeClock();
+ InactiveTransactionRemovalOptions inactiveTransactionRemovalOptions =
+ InactiveTransactionRemovalOptions.newBuilder()
+ .setIdleTimeThreshold(
+ Duration.ofSeconds(
+ 3L)) // any session not used for more than 3s will be long-running
+ .setActionOnInactiveTransaction(ActionOnInactiveTransaction.CLOSE)
+ .setExecutionFrequency(Duration.ofSeconds(1)) // execute thread every 1s
+ .build();
+ SessionPoolOptions sessionPoolOptions =
+ SessionPoolOptions.newBuilder()
+ .setMinSessions(1)
+ .setMaxSessions(1) // to ensure there is 1 session and pool is 100% utilized
+ .setInactiveTransactionRemovalOptions(inactiveTransactionRemovalOptions)
+ .setLoopFrequency(1000L) // main thread runs every 1s
+ .setPoolMaintainerClock(poolMaintainerClock)
+ .build();
+ spanner =
+ SpannerOptions.newBuilder()
+ .setProjectId(TEST_PROJECT)
+ .setDatabaseRole(TEST_DATABASE_ROLE)
+ .setChannelProvider(channelProvider)
+ .setCredentials(NoCredentials.getInstance())
+ .setSessionPoolOption(sessionPoolOptions)
+ .build()
+ .getService();
+ DatabaseClientImpl client =
+ (DatabaseClientImpl)
+ spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE));
+ Instant initialExecutionTime = client.pool.poolMaintainer.lastExecutionTime;
+
+ try (TransactionManager manager = client.transactionManager()) {
+ TransactionContext transaction = manager.begin();
+ while (true) {
+ try {
+ try (ResultSet resultSet = transaction.executeQueryAsync(SELECT1)) {
+ while (resultSet.next()) {}
+ }
+ poolMaintainerClock.currentTimeMillis += Duration.ofMillis(1050).toMillis();
+
+ try (ResultSet resultSet = transaction.executeQueryAsync(SELECT1)) {
+ while (resultSet.next()) {}
+ }
+ poolMaintainerClock.currentTimeMillis += Duration.ofMillis(2050).toMillis();
+
+ // force trigger pool maintainer to check for long-running sessions
+ client.pool.poolMaintainer.maintainPool();
+
+ manager.commit();
+ assertNotNull(manager.getCommitTimestamp());
+ break;
+ } catch (AbortedException e) {
+ transaction = manager.resetForRetry();
+ }
+ }
+ }
+ Instant endExecutionTime = client.pool.poolMaintainer.lastExecutionTime;
+
+ assertNotEquals(
+ endExecutionTime,
+ initialExecutionTime); // if session clean up task runs then these timings won't match
+ assertEquals(0, client.pool.numLeakedSessionsRemoved());
+ assertTrue(client.pool.getNumberOfSessionsInPool() <= client.pool.totalSessions());
+ }
+
+ @Test
+ public void
+ testPoolMaintainer_whenLongRunningAnalyzeQueryUsingTransactionManager_retainSessionForTransaction() {
+ FakeClock poolMaintainerClock = new FakeClock();
+ InactiveTransactionRemovalOptions inactiveTransactionRemovalOptions =
+ InactiveTransactionRemovalOptions.newBuilder()
+ .setIdleTimeThreshold(
+ Duration.ofSeconds(
+ 3L)) // any session not used for more than 3s will be long-running
+ .setActionOnInactiveTransaction(ActionOnInactiveTransaction.CLOSE)
+ .setExecutionFrequency(Duration.ofSeconds(1)) // execute thread every 1s
+ .build();
+ SessionPoolOptions sessionPoolOptions =
+ SessionPoolOptions.newBuilder()
+ .setMinSessions(1)
+ .setMaxSessions(1) // to ensure there is 1 session and pool is 100% utilized
+ .setInactiveTransactionRemovalOptions(inactiveTransactionRemovalOptions)
+ .setLoopFrequency(1000L) // main thread runs every 1s
+ .setPoolMaintainerClock(poolMaintainerClock)
+ .build();
+ spanner =
+ SpannerOptions.newBuilder()
+ .setProjectId(TEST_PROJECT)
+ .setDatabaseRole(TEST_DATABASE_ROLE)
+ .setChannelProvider(channelProvider)
+ .setCredentials(NoCredentials.getInstance())
+ .setSessionPoolOption(sessionPoolOptions)
+ .build()
+ .getService();
+ DatabaseClientImpl client =
+ (DatabaseClientImpl)
+ spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE));
+ Instant initialExecutionTime = client.pool.poolMaintainer.lastExecutionTime;
+
+ try (TransactionManager manager = client.transactionManager()) {
+ TransactionContext transaction = manager.begin();
+ while (true) {
+ try {
+ try (ResultSet resultSet = transaction.analyzeQuery(SELECT1, QueryAnalyzeMode.PROFILE)) {
+ while (resultSet.next()) {}
+ }
+ poolMaintainerClock.currentTimeMillis += Duration.ofMillis(1050).toMillis();
+
+ try (ResultSet resultSet = transaction.analyzeQuery(SELECT1, QueryAnalyzeMode.PROFILE)) {
+ while (resultSet.next()) {}
+ }
+ poolMaintainerClock.currentTimeMillis += Duration.ofMillis(2050).toMillis();
+
+ // force trigger pool maintainer to check for long-running sessions
+ client.pool.poolMaintainer.maintainPool();
+
+ manager.commit();
+ assertNotNull(manager.getCommitTimestamp());
+ break;
+ } catch (AbortedException e) {
+ transaction = manager.resetForRetry();
+ }
+ }
+ }
+ Instant endExecutionTime = client.pool.poolMaintainer.lastExecutionTime;
+
+ assertNotEquals(
+ endExecutionTime,
+ initialExecutionTime); // if session clean up task runs then these timings won't match
+ assertEquals(0, client.pool.numLeakedSessionsRemoved());
+ assertTrue(client.pool.getNumberOfSessionsInPool() <= client.pool.totalSessions());
+ }
+
@Test
public void testWrite() {
DatabaseClient client =
@@ -3552,13 +4303,4 @@ static void assertAsString(ImmutableList expected, ResultSet resultSet,
expected.stream().collect(Collectors.joining(",", "[", "]")),
resultSet.getValue(col).getAsString());
}
-
- static class FakeClock extends Clock {
- volatile long currentTimeMillis;
-
- @Override
- public Instant instant() {
- return Instant.ofEpochMilli(currentTimeMillis);
- }
- }
}
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/FakeClock.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/FakeClock.java
new file mode 100644
index 0000000000..4bee3cc18e
--- /dev/null
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/FakeClock.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2023 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 org.threeten.bp.Instant;
+
+/**
+ * Class which allows to mock {@link Clock} in unit tests and return custom time values within the
+ * tests.
+ */
+class FakeClock extends Clock {
+ volatile long currentTimeMillis;
+
+ @Override
+ public Instant instant() {
+ return Instant.ofEpochMilli(currentTimeMillis);
+ }
+}
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolMaintainerTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolMaintainerTest.java
index 2f7b14fdad..217e214c83 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolMaintainerTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolMaintainerTest.java
@@ -84,7 +84,9 @@ private void setupMockSessionCreation() {
SessionConsumerImpl consumer =
invocation.getArgument(2, SessionConsumerImpl.class);
for (int i = 0; i < sessionCount; i++) {
- consumer.onSessionReady(setupMockSession(mockSession()));
+ ReadContext mockContext = mock(ReadContext.class);
+ consumer.onSessionReady(
+ setupMockSession(buildMockSession(mockContext), mockContext));
}
});
return null;
@@ -94,10 +96,8 @@ private void setupMockSessionCreation() {
Mockito.anyInt(), Mockito.anyBoolean(), any(SessionConsumer.class));
}
- private SessionImpl setupMockSession(final SessionImpl session) {
- ReadContext mockContext = mock(ReadContext.class);
+ private SessionImpl setupMockSession(final SessionImpl session, final ReadContext mockContext) {
final ResultSet mockResult = mock(ResultSet.class);
- when(session.singleUse(any(TimestampBound.class))).thenReturn(mockContext);
when(mockContext.executeQuery(any(Statement.class)))
.thenAnswer(
invocation -> {
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolStressTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolStressTest.java
index c9ba9b360a..8a3a67b2de 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolStressTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolStressTest.java
@@ -22,6 +22,7 @@
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
+import com.google.api.core.ApiFuture;
import com.google.api.core.ApiFutures;
import com.google.cloud.spanner.SessionClient.SessionConsumer;
import com.google.cloud.spanner.SessionPool.PooledSessionFuture;
@@ -29,6 +30,7 @@
import com.google.cloud.spanner.SessionPool.SessionConsumerImpl;
import com.google.cloud.spanner.SessionPoolOptions.ActionOnInactiveTransaction;
import com.google.cloud.spanner.SessionPoolOptions.InactiveTransactionRemovalOptions;
+import com.google.cloud.spanner.spi.v1.SpannerRpc.Option;
import com.google.common.util.concurrent.Uninterruptibles;
import com.google.protobuf.ByteString;
import com.google.protobuf.Empty;
@@ -89,6 +91,7 @@ public static Collection data() {
}
private void setupSpanner(DatabaseId db) {
+ ReadContext context = mock(ReadContext.class);
mockSpanner = mock(SpannerImpl.class);
spannerOptions = mock(SpannerOptions.class);
when(spannerOptions.getNumChannels()).thenReturn(4);
@@ -105,8 +108,8 @@ private void setupSpanner(DatabaseId db) {
for (int s = 0; s < sessionCount; s++) {
SessionImpl session;
synchronized (lock) {
- session = mockSession();
- setupSession(session);
+ session = getMockedSession(context);
+ setupSession(session, context);
sessions.put(session.getName(), false);
if (sessions.size() > maxAliveSessions) {
maxAliveSessions = sessions.size();
@@ -124,10 +127,60 @@ private void setupSpanner(DatabaseId db) {
Mockito.anyInt(), Mockito.anyBoolean(), Mockito.any(SessionConsumer.class));
}
- private void setupSession(final SessionImpl session) {
- ReadContext mockContext = mock(ReadContext.class);
+ SessionImpl getMockedSession(ReadContext context) {
+ SpannerImpl spanner = mock(SpannerImpl.class);
+ Map options = new HashMap<>();
+ options.put(Option.CHANNEL_HINT, channelHint.getAndIncrement());
+ final SessionImpl session =
+ new SessionImpl(
+ spanner,
+ "projects/dummy/instances/dummy/databases/dummy/sessions/session" + sessionIndex,
+ options) {
+ @Override
+ public ReadContext singleUse(TimestampBound bound) {
+ // The below stubs are added so that we can mock keep-alive.
+ return context;
+ }
+
+ @Override
+ public ApiFuture asyncClose() {
+ synchronized (lock) {
+ if (expiredSessions.contains(this.getName())) {
+ return ApiFutures.immediateFailedFuture(
+ SpannerExceptionFactoryTest.newSessionNotFoundException(this.getName()));
+ }
+ if (sessions.remove(this.getName()) == null) {
+ setFailed(closedSessions.get(this.getName()));
+ }
+ closedSessions.put(this.getName(), new Exception("Session closed at:"));
+ if (sessions.size() < minSessionsWhenSessionClosed) {
+ minSessionsWhenSessionClosed = sessions.size();
+ }
+ }
+ return ApiFutures.immediateFuture(Empty.getDefaultInstance());
+ }
+
+ @Override
+ public void prepareReadWriteTransaction() {
+ if (random.nextInt(100) < 10) {
+ expireSession(this);
+ throw SpannerExceptionFactoryTest.newSessionNotFoundException(this.getName());
+ }
+ String name = this.getName();
+ synchronized (lock) {
+ if (sessions.put(name, true)) {
+ setFailed();
+ }
+ this.readyTransactionId = ByteString.copyFromUtf8("foo");
+ }
+ }
+ };
+ sessionIndex++;
+ return session;
+ }
+
+ private void setupSession(final SessionImpl session, final ReadContext mockContext) {
final ResultSet mockResult = mock(ResultSet.class);
- when(session.singleUse(any(TimestampBound.class))).thenReturn(mockContext);
when(mockContext.executeQuery(any(Statement.class)))
.thenAnswer(
invocation -> {
@@ -135,44 +188,6 @@ private void setupSession(final SessionImpl session) {
return mockResult;
});
when(mockResult.next()).thenReturn(true);
- doAnswer(
- invocation -> {
- synchronized (lock) {
- if (expiredSessions.contains(session.getName())) {
- return ApiFutures.immediateFailedFuture(
- SpannerExceptionFactoryTest.newSessionNotFoundException(session.getName()));
- }
- if (sessions.remove(session.getName()) == null) {
- setFailed(closedSessions.get(session.getName()));
- }
- closedSessions.put(session.getName(), new Exception("Session closed at:"));
- if (sessions.size() < minSessionsWhenSessionClosed) {
- minSessionsWhenSessionClosed = sessions.size();
- }
- }
- return ApiFutures.immediateFuture(Empty.getDefaultInstance());
- })
- .when(session)
- .asyncClose();
-
- doAnswer(
- invocation -> {
- if (random.nextInt(100) < 10) {
- expireSession(session);
- throw SpannerExceptionFactoryTest.newSessionNotFoundException(session.getName());
- }
- String name = session.getName();
- synchronized (lock) {
- if (sessions.put(name, true)) {
- setFailed();
- }
- session.readyTransactionId = ByteString.copyFromUtf8("foo");
- }
- return null;
- })
- .when(session)
- .prepareReadWriteTransaction();
- when(session.hasReadyTransaction()).thenCallRealMethod();
}
private void expireSession(Session session) {
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolTest.java
index b8cade68cc..65c7c7c03c 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolTest.java
@@ -51,7 +51,6 @@
import com.google.cloud.spanner.MetricRegistryTestUtils.PointWithFunction;
import com.google.cloud.spanner.ReadContext.QueryAnalyzeMode;
import com.google.cloud.spanner.SessionClient.SessionConsumer;
-import com.google.cloud.spanner.SessionPool.Clock;
import com.google.cloud.spanner.SessionPool.PooledSession;
import com.google.cloud.spanner.SessionPool.PooledSessionFuture;
import com.google.cloud.spanner.SessionPool.Position;
@@ -641,6 +640,7 @@ public void failOnPoolExhaustion() {
@Test
public void idleSessionCleanup() throws Exception {
+ ReadContext context = mock(ReadContext.class);
options =
SessionPoolOptions.newBuilder()
.setMinSessions(1)
@@ -648,9 +648,9 @@ public void idleSessionCleanup() throws Exception {
.setIncStep(1)
.setMaxIdleSessions(0)
.build();
- SessionImpl session1 = mockSession();
- SessionImpl session2 = mockSession();
- SessionImpl session3 = mockSession();
+ SessionImpl session1 = buildMockSession(context);
+ SessionImpl session2 = buildMockSession(context);
+ SessionImpl session3 = buildMockSession(context);
final LinkedList sessions =
new LinkedList<>(Arrays.asList(session1, session2, session3));
doAnswer(
@@ -665,11 +665,12 @@ public void idleSessionCleanup() throws Exception {
})
.when(sessionClient)
.asyncBatchCreateSessions(Mockito.eq(1), Mockito.anyBoolean(), any(SessionConsumer.class));
- for (SessionImpl session : sessions) {
- mockKeepAlive(session);
- }
+
FakeClock clock = new FakeClock();
clock.currentTimeMillis = System.currentTimeMillis();
+
+ mockKeepAlive(context);
+
pool = createPool(clock);
// Make sure pool has been initialized
pool.getSession().close();
@@ -1034,9 +1035,10 @@ public void longRunningTransactionsCleanup_whenException_doNothing() throws Exce
}
private void setupForLongRunningTransactionsCleanup() {
- SessionImpl session1 = mockSession();
- SessionImpl session2 = mockSession();
- SessionImpl session3 = mockSession();
+ ReadContext context = mock(ReadContext.class);
+ SessionImpl session1 = buildMockSession(context);
+ SessionImpl session2 = buildMockSession(context);
+ SessionImpl session3 = buildMockSession(context);
final LinkedList sessions =
new LinkedList<>(Arrays.asList(session1, session2, session3));
@@ -1053,16 +1055,20 @@ private void setupForLongRunningTransactionsCleanup() {
.when(sessionClient)
.asyncBatchCreateSessions(Mockito.eq(1), Mockito.anyBoolean(), any(SessionConsumer.class));
- for (SessionImpl session : sessions) {
- mockKeepAlive(session);
- }
+ mockKeepAlive(context);
}
@Test
public void keepAlive() throws Exception {
+ ReadContext context = mock(ReadContext.class);
options = SessionPoolOptions.newBuilder().setMinSessions(2).setMaxSessions(3).build();
- final SessionImpl session = mockSession();
- mockKeepAlive(session);
+ final SessionImpl mockSession1 = buildMockSession(context);
+ final SessionImpl mockSession2 = buildMockSession(context);
+ final SessionImpl mockSession3 = buildMockSession(context);
+ final LinkedList sessions =
+ new LinkedList<>(Arrays.asList(mockSession1, mockSession2, mockSession3));
+
+ mockKeepAlive(context);
// This is cheating as we are returning the same session each but it makes the verification
// easier.
doAnswer(
@@ -1073,7 +1079,7 @@ public void keepAlive() throws Exception {
SessionConsumerImpl consumer =
invocation.getArgument(2, SessionConsumerImpl.class);
for (int i = 0; i < sessionCount; i++) {
- consumer.onSessionReady(session);
+ consumer.onSessionReady(sessions.pop());
}
});
return null;
@@ -1090,9 +1096,9 @@ public void keepAlive() throws Exception {
session1.close();
session2.close();
runMaintenanceLoop(clock, pool, pool.poolMaintainer.numKeepAliveCycles);
- verify(session, never()).singleUse(any(TimestampBound.class));
+ verify(context, never()).executeQuery(any(Statement.class));
runMaintenanceLoop(clock, pool, pool.poolMaintainer.numKeepAliveCycles);
- verify(session, times(2)).singleUse(any(TimestampBound.class));
+ verify(context, times(2)).executeQuery(Statement.newBuilder("SELECT 1").build());
clock.currentTimeMillis +=
clock.currentTimeMillis + (options.getKeepAliveIntervalMinutes() + 5) * 60 * 1000;
session1 = pool.getSession();
@@ -1100,8 +1106,8 @@ public void keepAlive() throws Exception {
session1.close();
runMaintenanceLoop(clock, pool, pool.poolMaintainer.numKeepAliveCycles);
// The session pool only keeps MinSessions + MaxIdleSessions alive.
- verify(session, times(options.getMinSessions() + options.getMaxIdleSessions()))
- .singleUse(any(TimestampBound.class));
+ verify(context, times(options.getMinSessions() + options.getMaxIdleSessions()))
+ .executeQuery(Statement.newBuilder("SELECT 1").build());
pool.closeAsync(new SpannerImpl.ClosedException()).get(5L, TimeUnit.SECONDS);
}
@@ -1799,6 +1805,12 @@ public void testWaitOnMinSessionsThrowsExceptionWhenTimeoutIsReached() {
pool.maybeWaitOnMinSessions();
}
+ private void mockKeepAlive(ReadContext context) {
+ ResultSet resultSet = mock(ResultSet.class);
+ when(resultSet.next()).thenReturn(true, false);
+ when(context.executeQuery(any(Statement.class))).thenReturn(resultSet);
+ }
+
private void mockKeepAlive(Session session) {
ReadContext context = mock(ReadContext.class);
ResultSet resultSet = mock(ResultSet.class);
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/TransactionRunnerImplTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/TransactionRunnerImplTest.java
index e13b7b7509..efc57fb480 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/TransactionRunnerImplTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/TransactionRunnerImplTest.java
@@ -273,10 +273,15 @@ public void batchDmlFailedPrecondition() {
@Test
public void inlineBegin() {
SpannerImpl spanner = mock(SpannerImpl.class);
+ SpannerOptions options = mock(SpannerOptions.class);
+
when(spanner.getRpc()).thenReturn(rpc);
when(spanner.getDefaultQueryOptions(Mockito.any(DatabaseId.class)))
.thenReturn(QueryOptions.getDefaultInstance());
- when(spanner.getOptions()).thenReturn(mock(SpannerOptions.class));
+ when(spanner.getOptions()).thenReturn(options);
+ SessionPoolOptions sessionPoolOptions = SessionPoolOptions.newBuilder().build();
+ when(options.getSessionPoolOptions()).thenReturn(sessionPoolOptions);
+
SessionImpl session =
new SessionImpl(
spanner, "projects/p/instances/i/databases/d/sessions/s", Collections.EMPTY_MAP) {
From d809481b1c16fd779cfcd25dca4af17fd430413f Mon Sep 17 00:00:00 2001
From: Arpan Mishra
Date: Fri, 3 Nov 2023 13:52:15 +0530
Subject: [PATCH 26/28] test: add kokoro configs to enable integration tests
(prod, staging, devel) against directpath. (#2699)
We want to execute the integration test suite against the new directpath proxy within our pre-submits.
* Created a new job-type with suffix `-directpath-enabled`
* Added new configuration files for continous, nightly and presubmit. One file each for staging, cloud-devel and prod.
* Each new configuration file is a clone of existing file and has an additional env variable defined. The new file uses a new job type with suffix `-directpath-enabled`
```
env_vars: {
key: "GOOGLE_CLOUD_ENABLE_DIRECT_PATH_XDS"
value: "true"
}
```
---
.kokoro/build.sh | 6 +--
...gration-cloud-devel-directpath-enabled.cfg | 32 ++++++++++++++
...ation-cloud-staging-directpath-enabled.cfg | 32 ++++++++++++++
...gration-cloud-devel-directpath-enabled.cfg | 28 +++++++++++++
...ation-cloud-staging-directpath-enabled.cfg | 27 ++++++++++++
.../integration-directpath-enabled.cfg | 42 +++++++++++++++++++
.../integration-directpath-enabled.cfg | 38 +++++++++++++++++
7 files changed, 202 insertions(+), 3 deletions(-)
create mode 100644 .kokoro/continuous/integration-cloud-devel-directpath-enabled.cfg
create mode 100644 .kokoro/continuous/integration-cloud-staging-directpath-enabled.cfg
create mode 100644 .kokoro/nightly/integration-cloud-devel-directpath-enabled.cfg
create mode 100644 .kokoro/nightly/integration-cloud-staging-directpath-enabled.cfg
create mode 100644 .kokoro/nightly/integration-directpath-enabled.cfg
create mode 100644 .kokoro/presubmit/integration-directpath-enabled.cfg
diff --git a/.kokoro/build.sh b/.kokoro/build.sh
index 2a25656e25..74184c655d 100755
--- a/.kokoro/build.sh
+++ b/.kokoro/build.sh
@@ -79,7 +79,7 @@ javadoc)
mvn javadoc:javadoc javadoc:test-javadoc
RETURN_CODE=$?
;;
-integration)
+integration|integration-directpath-enabled)
mvn -B ${INTEGRATION_TEST_ARGS} \
-ntp \
-Penable-integration-tests \
@@ -94,7 +94,7 @@ integration)
verify
RETURN_CODE=$?
;;
-integration-cloud-devel)
+integration-cloud-devel|integration-cloud-devel-directpath-enabled)
mvn -B ${INTEGRATION_TEST_ARGS} \
-ntp \
-Penable-integration-tests \
@@ -110,7 +110,7 @@ integration-cloud-devel)
verify
RETURN_CODE=$?
;;
-integration-cloud-staging)
+integration-cloud-staging|integration-cloud-staging-directpath-enabled)
mvn -B ${INTEGRATION_TEST_ARGS} \
-ntp \
-Penable-integration-tests \
diff --git a/.kokoro/continuous/integration-cloud-devel-directpath-enabled.cfg b/.kokoro/continuous/integration-cloud-devel-directpath-enabled.cfg
new file mode 100644
index 0000000000..f73563d19a
--- /dev/null
+++ b/.kokoro/continuous/integration-cloud-devel-directpath-enabled.cfg
@@ -0,0 +1,32 @@
+# Format: //devtools/kokoro/config/proto/build.proto
+
+# Configure the docker image for kokoro-trampoline.
+env_vars: {
+ key: "TRAMPOLINE_IMAGE"
+ value: "gcr.io/cloud-devrel-kokoro-resources/java8"
+}
+
+env_vars: {
+ key: "JOB_TYPE"
+ value: "integration-cloud-devel-directpath-enabled"
+}
+
+env_vars: {
+ key: "GOOGLE_APPLICATION_CREDENTIALS"
+ value: "secret_manager/java-client-testing"
+}
+
+env_vars: {
+ key: "SECRET_MANAGER_KEYS"
+ value: "java-client-testing"
+}
+
+env_vars: {
+ key: "REPORT_COVERAGE"
+ value: "true"
+}
+
+env_vars: {
+ key: "GOOGLE_CLOUD_ENABLE_DIRECT_PATH_XDS"
+ value: "true"
+}
diff --git a/.kokoro/continuous/integration-cloud-staging-directpath-enabled.cfg b/.kokoro/continuous/integration-cloud-staging-directpath-enabled.cfg
new file mode 100644
index 0000000000..7bc2e7fed2
--- /dev/null
+++ b/.kokoro/continuous/integration-cloud-staging-directpath-enabled.cfg
@@ -0,0 +1,32 @@
+# Format: //devtools/kokoro/config/proto/build.proto
+
+# Configure the docker image for kokoro-trampoline.
+env_vars: {
+ key: "TRAMPOLINE_IMAGE"
+ value: "gcr.io/cloud-devrel-kokoro-resources/java8"
+}
+
+env_vars: {
+ key: "JOB_TYPE"
+ value: "integration-cloud-staging-directpath-enabled"
+}
+
+env_vars: {
+ key: "GOOGLE_APPLICATION_CREDENTIALS"
+ value: "secret_manager/java-client-testing"
+}
+
+env_vars: {
+ key: "SECRET_MANAGER_KEYS"
+ value: "java-client-testing"
+}
+
+env_vars: {
+ key: "REPORT_COVERAGE"
+ value: "true"
+}
+
+env_vars: {
+ key: "GOOGLE_CLOUD_ENABLE_DIRECT_PATH_XDS"
+ value: "true"
+}
diff --git a/.kokoro/nightly/integration-cloud-devel-directpath-enabled.cfg b/.kokoro/nightly/integration-cloud-devel-directpath-enabled.cfg
new file mode 100644
index 0000000000..c1fc3da819
--- /dev/null
+++ b/.kokoro/nightly/integration-cloud-devel-directpath-enabled.cfg
@@ -0,0 +1,28 @@
+# Format: //devtools/kokoro/config/proto/build.proto
+
+# Configure the docker image for kokoro-trampoline.
+env_vars: {
+ key: "TRAMPOLINE_IMAGE"
+ value: "gcr.io/cloud-devrel-kokoro-resources/java8"
+}
+
+env_vars: {
+ key: "JOB_TYPE"
+ value: "integration-cloud-devel-directpath-enabled"
+}
+
+env_vars: {
+ key: "GOOGLE_APPLICATION_CREDENTIALS"
+ value: "secret_manager/java-client-testing"
+}
+
+env_vars: {
+ key: "SECRET_MANAGER_KEYS"
+ value: "java-client-testing"
+}
+
+env_vars: {
+ key: "GOOGLE_CLOUD_ENABLE_DIRECT_PATH_XDS"
+ value: "true"
+}
+
diff --git a/.kokoro/nightly/integration-cloud-staging-directpath-enabled.cfg b/.kokoro/nightly/integration-cloud-staging-directpath-enabled.cfg
new file mode 100644
index 0000000000..29444d79a6
--- /dev/null
+++ b/.kokoro/nightly/integration-cloud-staging-directpath-enabled.cfg
@@ -0,0 +1,27 @@
+# Format: //devtools/kokoro/config/proto/build.proto
+
+# Configure the docker image for kokoro-trampoline.
+env_vars: {
+ key: "TRAMPOLINE_IMAGE"
+ value: "gcr.io/cloud-devrel-kokoro-resources/java8"
+}
+
+env_vars: {
+ key: "JOB_TYPE"
+ value: "integration-cloud-staging-directpath-enabled"
+}
+
+env_vars: {
+ key: "GOOGLE_APPLICATION_CREDENTIALS"
+ value: "secret_manager/java-client-testing"
+}
+
+env_vars: {
+ key: "SECRET_MANAGER_KEYS"
+ value: "java-client-testing"
+}
+
+env_vars: {
+ key: "GOOGLE_CLOUD_ENABLE_DIRECT_PATH_XDS"
+ value: "true"
+}
diff --git a/.kokoro/nightly/integration-directpath-enabled.cfg b/.kokoro/nightly/integration-directpath-enabled.cfg
new file mode 100644
index 0000000000..bdc99c8789
--- /dev/null
+++ b/.kokoro/nightly/integration-directpath-enabled.cfg
@@ -0,0 +1,42 @@
+# Format: //devtools/kokoro/config/proto/build.proto
+
+# Configure the docker image for kokoro-trampoline.
+env_vars: {
+ key: "TRAMPOLINE_IMAGE"
+ value: "gcr.io/cloud-devrel-kokoro-resources/java8"
+}
+
+env_vars: {
+ key: "JOB_TYPE"
+ value: "integration-directpath-enabled"
+}
+# TODO: remove this after we've migrated all tests and scripts
+env_vars: {
+ key: "GCLOUD_PROJECT"
+ value: "java-docs-samples-testing"
+}
+
+env_vars: {
+ key: "GOOGLE_CLOUD_PROJECT"
+ value: "java-docs-samples-testing"
+}
+
+env_vars: {
+ key: "ENABLE_FLAKYBOT"
+ value: "true"
+}
+
+env_vars: {
+ key: "GOOGLE_APPLICATION_CREDENTIALS"
+ value: "secret_manager/java-it-service-account"
+}
+
+env_vars: {
+ key: "SECRET_MANAGER_KEYS"
+ value: "java-it-service-account"
+}
+
+env_vars: {
+ key: "GOOGLE_CLOUD_ENABLE_DIRECT_PATH_XDS"
+ value: "true"
+}
diff --git a/.kokoro/presubmit/integration-directpath-enabled.cfg b/.kokoro/presubmit/integration-directpath-enabled.cfg
new file mode 100644
index 0000000000..ab24b38549
--- /dev/null
+++ b/.kokoro/presubmit/integration-directpath-enabled.cfg
@@ -0,0 +1,38 @@
+# Format: //devtools/kokoro/config/proto/build.proto
+
+# Configure the docker image for kokoro-trampoline.
+env_vars: {
+ key: "TRAMPOLINE_IMAGE"
+ value: "gcr.io/cloud-devrel-kokoro-resources/java8"
+}
+
+env_vars: {
+ key: "JOB_TYPE"
+ value: "integration-directpath-enabled"
+}
+
+# TODO: remove this after we've migrated all tests and scripts
+env_vars: {
+ key: "GCLOUD_PROJECT"
+ value: "gcloud-devel"
+}
+
+env_vars: {
+ key: "GOOGLE_CLOUD_PROJECT"
+ value: "gcloud-devel"
+}
+
+env_vars: {
+ key: "GOOGLE_APPLICATION_CREDENTIALS"
+ value: "secret_manager/java-it-service-account"
+}
+
+env_vars: {
+ key: "SECRET_MANAGER_KEYS"
+ value: "java-it-service-account"
+}
+
+env_vars: {
+ key: "GOOGLE_CLOUD_ENABLE_DIRECT_PATH_XDS"
+ value: "true"
+}
From 9cf6d0eae5d2a86c89de2d252d0f4a4dab0b54a4 Mon Sep 17 00:00:00 2001
From: Mend Renovate
Date: Mon, 6 Nov 2023 16:26:06 +0100
Subject: [PATCH 27/28] deps: update dependency
org.junit.vintage:junit-vintage-engine to v5.10.1 (#2723)
---
samples/native-image/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/native-image/pom.xml b/samples/native-image/pom.xml
index 37e66db65a..a6f02df133 100644
--- a/samples/native-image/pom.xml
+++ b/samples/native-image/pom.xml
@@ -103,7 +103,7 @@
org.junit.vintage
junit-vintage-engine
- 5.10.0
+ 5.10.1
test
From f1b0c5769c8f0da3873f9eb2d4fb48f876f2bb33 Mon Sep 17 00:00:00 2001
From: "release-please[bot]"
<55107282+release-please[bot]@users.noreply.github.com>
Date: Wed, 8 Nov 2023 19:06:14 +0000
Subject: [PATCH 28/28] chore(main): release 6.53.0 (#2706)
:robot: I have created a release *beep* *boop*
---
## [6.53.0](https://togithub.com/googleapis/java-spanner/compare/v6.52.1...v6.53.0) (2023-11-06)
### Features
* Move session lastUseTime parameter from PooledSession to SessionImpl class. Fix updation of the parameter for chained RPCs within one transaction. ([#2704](https://togithub.com/googleapis/java-spanner/issues/2704)) ([e75a281](https://togithub.com/googleapis/java-spanner/commit/e75a2818124621a3ab837151a8e1094fa6c3b8f3))
* Rely on graal-sdk version declaration from property in java-shared-config ([#2696](https://togithub.com/googleapis/java-spanner/issues/2696)) ([cfab83a](https://togithub.com/googleapis/java-spanner/commit/cfab83ad3bd1a026e0b3da5a4cc2154b0f8c3ddf))
### Bug Fixes
* Prevent illegal negative timeout values into thread sleep() method in ITTransactionManagerTest. ([#2715](https://togithub.com/googleapis/java-spanner/issues/2715)) ([1c26cf6](https://togithub.com/googleapis/java-spanner/commit/1c26cf60efa1b98203af9b21a47e37c8fb1e0e97))
### Dependencies
* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.19.0 ([#2719](https://togithub.com/googleapis/java-spanner/issues/2719)) ([e320753](https://togithub.com/googleapis/java-spanner/commit/e320753b2bd125f94775db9c71a4b7803fa49c38))
* Update dependency com.google.cloud:google-cloud-trace to v2.28.0 ([#2670](https://togithub.com/googleapis/java-spanner/issues/2670)) ([078b7ca](https://togithub.com/googleapis/java-spanner/commit/078b7ca95548ac984c79d29197032b3f813abbcf))
* Update dependency com.google.cloud:google-cloud-trace to v2.29.0 ([#2714](https://togithub.com/googleapis/java-spanner/issues/2714)) ([b400eca](https://togithub.com/googleapis/java-spanner/commit/b400ecabb9fa6f262befa903163746fac2c7c15e))
* Update dependency commons-cli:commons-cli to v1.6.0 ([#2710](https://togithub.com/googleapis/java-spanner/issues/2710)) ([e3e8f6a](https://togithub.com/googleapis/java-spanner/commit/e3e8f6ac82d827280299038d3962fe66b110e0c4))
* Update dependency commons-io:commons-io to v2.15.0 ([#2712](https://togithub.com/googleapis/java-spanner/issues/2712)) ([a5f59aa](https://togithub.com/googleapis/java-spanner/commit/a5f59aa3e992d0594519983880a29f17301923e7))
* Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.28 ([#2692](https://togithub.com/googleapis/java-spanner/issues/2692)) ([d8a2b02](https://togithub.com/googleapis/java-spanner/commit/d8a2b02d43a68e04bebb2349af61cc8901ccd667))
* Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.28 ([#2705](https://togithub.com/googleapis/java-spanner/issues/2705)) ([2b17f09](https://togithub.com/googleapis/java-spanner/commit/2b17f095a294defa5ea022c243fa750486b7d496))
* Update dependency org.junit.vintage:junit-vintage-engine to v5.10.1 ([#2723](https://togithub.com/googleapis/java-spanner/issues/2723)) ([9cf6d0e](https://togithub.com/googleapis/java-spanner/commit/9cf6d0eae5d2a86c89de2d252d0f4a4dab0b54a4))
---
This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
---
CHANGELOG.md | 25 +++++++++++++++++++
google-cloud-spanner-bom/pom.xml | 20 +++++++--------
google-cloud-spanner-executor/pom.xml | 4 +--
google-cloud-spanner/pom.xml | 4 +--
.../pom.xml | 4 +--
.../pom.xml | 4 +--
grpc-google-cloud-spanner-v1/pom.xml | 4 +--
pom.xml | 16 ++++++------
.../pom.xml | 4 +--
.../pom.xml | 4 +--
proto-google-cloud-spanner-v1/pom.xml | 4 +--
samples/snapshot/pom.xml | 2 +-
versions.txt | 16 ++++++------
13 files changed, 68 insertions(+), 43 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6091131e76..87ce0729e1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,30 @@
# Changelog
+## [6.53.0](https://github.com/googleapis/java-spanner/compare/v6.52.1...v6.53.0) (2023-11-06)
+
+
+### Features
+
+* Move session lastUseTime parameter from PooledSession to SessionImpl class. Fix updation of the parameter for chained RPCs within one transaction. ([#2704](https://github.com/googleapis/java-spanner/issues/2704)) ([e75a281](https://github.com/googleapis/java-spanner/commit/e75a2818124621a3ab837151a8e1094fa6c3b8f3))
+* Rely on graal-sdk version declaration from property in java-shared-config ([#2696](https://github.com/googleapis/java-spanner/issues/2696)) ([cfab83a](https://github.com/googleapis/java-spanner/commit/cfab83ad3bd1a026e0b3da5a4cc2154b0f8c3ddf))
+
+
+### Bug Fixes
+
+* Prevent illegal negative timeout values into thread sleep() method in ITTransactionManagerTest. ([#2715](https://github.com/googleapis/java-spanner/issues/2715)) ([1c26cf6](https://github.com/googleapis/java-spanner/commit/1c26cf60efa1b98203af9b21a47e37c8fb1e0e97))
+
+
+### Dependencies
+
+* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.19.0 ([#2719](https://github.com/googleapis/java-spanner/issues/2719)) ([e320753](https://github.com/googleapis/java-spanner/commit/e320753b2bd125f94775db9c71a4b7803fa49c38))
+* Update dependency com.google.cloud:google-cloud-trace to v2.28.0 ([#2670](https://github.com/googleapis/java-spanner/issues/2670)) ([078b7ca](https://github.com/googleapis/java-spanner/commit/078b7ca95548ac984c79d29197032b3f813abbcf))
+* Update dependency com.google.cloud:google-cloud-trace to v2.29.0 ([#2714](https://github.com/googleapis/java-spanner/issues/2714)) ([b400eca](https://github.com/googleapis/java-spanner/commit/b400ecabb9fa6f262befa903163746fac2c7c15e))
+* Update dependency commons-cli:commons-cli to v1.6.0 ([#2710](https://github.com/googleapis/java-spanner/issues/2710)) ([e3e8f6a](https://github.com/googleapis/java-spanner/commit/e3e8f6ac82d827280299038d3962fe66b110e0c4))
+* Update dependency commons-io:commons-io to v2.15.0 ([#2712](https://github.com/googleapis/java-spanner/issues/2712)) ([a5f59aa](https://github.com/googleapis/java-spanner/commit/a5f59aa3e992d0594519983880a29f17301923e7))
+* Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.28 ([#2692](https://github.com/googleapis/java-spanner/issues/2692)) ([d8a2b02](https://github.com/googleapis/java-spanner/commit/d8a2b02d43a68e04bebb2349af61cc8901ccd667))
+* Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.28 ([#2705](https://github.com/googleapis/java-spanner/issues/2705)) ([2b17f09](https://github.com/googleapis/java-spanner/commit/2b17f095a294defa5ea022c243fa750486b7d496))
+* Update dependency org.junit.vintage:junit-vintage-engine to v5.10.1 ([#2723](https://github.com/googleapis/java-spanner/issues/2723)) ([9cf6d0e](https://github.com/googleapis/java-spanner/commit/9cf6d0eae5d2a86c89de2d252d0f4a4dab0b54a4))
+
## [6.52.1](https://github.com/googleapis/java-spanner/compare/v6.52.0...v6.52.1) (2023-10-20)
diff --git a/google-cloud-spanner-bom/pom.xml b/google-cloud-spanner-bom/pom.xml
index 3e79fefe4a..027a7b6dd6 100644
--- a/google-cloud-spanner-bom/pom.xml
+++ b/google-cloud-spanner-bom/pom.xml
@@ -3,7 +3,7 @@
4.0.0
com.google.cloud
google-cloud-spanner-bom
- 6.52.2-SNAPSHOT
+ 6.53.0
pom
com.google.cloud
@@ -53,48 +53,48 @@
com.google.cloud
google-cloud-spanner
- 6.52.2-SNAPSHOT
+ 6.53.0
com.google.cloud
google-cloud-spanner-executor
- 6.52.2-SNAPSHOT
+ 6.53.0
com.google.cloud
google-cloud-spanner
test-jar
- 6.52.2-SNAPSHOT
+ 6.53.0
com.google.api.grpc
grpc-google-cloud-spanner-v1
- 6.52.2-SNAPSHOT
+ 6.53.0
com.google.api.grpc
grpc-google-cloud-spanner-admin-instance-v1
- 6.52.2-SNAPSHOT
+ 6.53.0
com.google.api.grpc
grpc-google-cloud-spanner-admin-database-v1
- 6.52.2-SNAPSHOT
+ 6.53.0
com.google.api.grpc
proto-google-cloud-spanner-admin-instance-v1
- 6.52.2-SNAPSHOT
+ 6.53.0
com.google.api.grpc
proto-google-cloud-spanner-v1
- 6.52.2-SNAPSHOT
+ 6.53.0
com.google.api.grpc
proto-google-cloud-spanner-admin-database-v1
- 6.52.2-SNAPSHOT
+ 6.53.0
diff --git a/google-cloud-spanner-executor/pom.xml b/google-cloud-spanner-executor/pom.xml
index 869ec4004d..2faadae10b 100644
--- a/google-cloud-spanner-executor/pom.xml
+++ b/google-cloud-spanner-executor/pom.xml
@@ -5,14 +5,14 @@
4.0.0
com.google.cloud
google-cloud-spanner-executor
- 6.52.2-SNAPSHOT
+ 6.53.0
jar
Google Cloud Spanner Executor
com.google.cloud
google-cloud-spanner-parent
- 6.52.2-SNAPSHOT
+ 6.53.0
diff --git a/google-cloud-spanner/pom.xml b/google-cloud-spanner/pom.xml
index 158f4039e2..a9750b9144 100644
--- a/google-cloud-spanner/pom.xml
+++ b/google-cloud-spanner/pom.xml
@@ -3,7 +3,7 @@
4.0.0
com.google.cloud
google-cloud-spanner
- 6.52.2-SNAPSHOT
+ 6.53.0
jar
Google Cloud Spanner
https://github.com/googleapis/java-spanner
@@ -11,7 +11,7 @@
com.google.cloud
google-cloud-spanner-parent
- 6.52.2-SNAPSHOT
+ 6.53.0
google-cloud-spanner
diff --git a/grpc-google-cloud-spanner-admin-database-v1/pom.xml b/grpc-google-cloud-spanner-admin-database-v1/pom.xml
index ce38573125..89d1e9e473 100644
--- a/grpc-google-cloud-spanner-admin-database-v1/pom.xml
+++ b/grpc-google-cloud-spanner-admin-database-v1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
grpc-google-cloud-spanner-admin-database-v1
- 6.52.2-SNAPSHOT
+ 6.53.0
grpc-google-cloud-spanner-admin-database-v1
GRPC library for grpc-google-cloud-spanner-admin-database-v1
com.google.cloud
google-cloud-spanner-parent
- 6.52.2-SNAPSHOT
+ 6.53.0
diff --git a/grpc-google-cloud-spanner-admin-instance-v1/pom.xml b/grpc-google-cloud-spanner-admin-instance-v1/pom.xml
index 5ff8a18120..80cc9c2343 100644
--- a/grpc-google-cloud-spanner-admin-instance-v1/pom.xml
+++ b/grpc-google-cloud-spanner-admin-instance-v1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
grpc-google-cloud-spanner-admin-instance-v1
- 6.52.2-SNAPSHOT
+ 6.53.0
grpc-google-cloud-spanner-admin-instance-v1
GRPC library for grpc-google-cloud-spanner-admin-instance-v1
com.google.cloud
google-cloud-spanner-parent
- 6.52.2-SNAPSHOT
+ 6.53.0
diff --git a/grpc-google-cloud-spanner-v1/pom.xml b/grpc-google-cloud-spanner-v1/pom.xml
index 1dfc4281de..b35f08fafe 100644
--- a/grpc-google-cloud-spanner-v1/pom.xml
+++ b/grpc-google-cloud-spanner-v1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
grpc-google-cloud-spanner-v1
- 6.52.2-SNAPSHOT
+ 6.53.0
grpc-google-cloud-spanner-v1
GRPC library for grpc-google-cloud-spanner-v1
com.google.cloud
google-cloud-spanner-parent
- 6.52.2-SNAPSHOT
+ 6.53.0
diff --git a/pom.xml b/pom.xml
index dbc961aefe..5fba5ed85b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com.google.cloud
google-cloud-spanner-parent
pom
- 6.52.2-SNAPSHOT
+ 6.53.0
Google Cloud Spanner Parent
https://github.com/googleapis/java-spanner
@@ -62,37 +62,37 @@
com.google.api.grpc
proto-google-cloud-spanner-admin-instance-v1
- 6.52.2-SNAPSHOT
+ 6.53.0
com.google.api.grpc
proto-google-cloud-spanner-v1
- 6.52.2-SNAPSHOT
+ 6.53.0
com.google.api.grpc
proto-google-cloud-spanner-admin-database-v1
- 6.52.2-SNAPSHOT
+ 6.53.0
com.google.api.grpc
grpc-google-cloud-spanner-v1
- 6.52.2-SNAPSHOT
+ 6.53.0
com.google.api.grpc
grpc-google-cloud-spanner-admin-instance-v1
- 6.52.2-SNAPSHOT
+ 6.53.0
com.google.api.grpc
grpc-google-cloud-spanner-admin-database-v1
- 6.52.2-SNAPSHOT
+ 6.53.0
com.google.cloud
google-cloud-spanner
- 6.52.2-SNAPSHOT
+ 6.53.0
diff --git a/proto-google-cloud-spanner-admin-database-v1/pom.xml b/proto-google-cloud-spanner-admin-database-v1/pom.xml
index bf60d00752..eaaee25314 100644
--- a/proto-google-cloud-spanner-admin-database-v1/pom.xml
+++ b/proto-google-cloud-spanner-admin-database-v1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
proto-google-cloud-spanner-admin-database-v1
- 6.52.2-SNAPSHOT
+ 6.53.0
proto-google-cloud-spanner-admin-database-v1
PROTO library for proto-google-cloud-spanner-admin-database-v1
com.google.cloud
google-cloud-spanner-parent
- 6.52.2-SNAPSHOT
+ 6.53.0
diff --git a/proto-google-cloud-spanner-admin-instance-v1/pom.xml b/proto-google-cloud-spanner-admin-instance-v1/pom.xml
index fa283c38d0..eb9ae411b1 100644
--- a/proto-google-cloud-spanner-admin-instance-v1/pom.xml
+++ b/proto-google-cloud-spanner-admin-instance-v1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
proto-google-cloud-spanner-admin-instance-v1
- 6.52.2-SNAPSHOT
+ 6.53.0
proto-google-cloud-spanner-admin-instance-v1
PROTO library for proto-google-cloud-spanner-admin-instance-v1
com.google.cloud
google-cloud-spanner-parent
- 6.52.2-SNAPSHOT
+ 6.53.0
diff --git a/proto-google-cloud-spanner-v1/pom.xml b/proto-google-cloud-spanner-v1/pom.xml
index d3710ea9ae..1d786a3c4b 100644
--- a/proto-google-cloud-spanner-v1/pom.xml
+++ b/proto-google-cloud-spanner-v1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
proto-google-cloud-spanner-v1
- 6.52.2-SNAPSHOT
+ 6.53.0
proto-google-cloud-spanner-v1
PROTO library for proto-google-cloud-spanner-v1
com.google.cloud
google-cloud-spanner-parent
- 6.52.2-SNAPSHOT
+ 6.53.0
diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml
index c8559074ee..0ee881eee5 100644
--- a/samples/snapshot/pom.xml
+++ b/samples/snapshot/pom.xml
@@ -31,7 +31,7 @@
com.google.cloud
google-cloud-spanner
- 6.52.2-SNAPSHOT
+ 6.53.0
diff --git a/versions.txt b/versions.txt
index b9949513d4..d15ff05615 100644
--- a/versions.txt
+++ b/versions.txt
@@ -1,11 +1,11 @@
# Format:
# module:released-version:current-version
-proto-google-cloud-spanner-admin-instance-v1:6.52.1:6.52.2-SNAPSHOT
-proto-google-cloud-spanner-v1:6.52.1:6.52.2-SNAPSHOT
-proto-google-cloud-spanner-admin-database-v1:6.52.1:6.52.2-SNAPSHOT
-grpc-google-cloud-spanner-v1:6.52.1:6.52.2-SNAPSHOT
-grpc-google-cloud-spanner-admin-instance-v1:6.52.1:6.52.2-SNAPSHOT
-grpc-google-cloud-spanner-admin-database-v1:6.52.1:6.52.2-SNAPSHOT
-google-cloud-spanner:6.52.1:6.52.2-SNAPSHOT
-google-cloud-spanner-executor:6.52.1:6.52.2-SNAPSHOT
+proto-google-cloud-spanner-admin-instance-v1:6.53.0:6.53.0
+proto-google-cloud-spanner-v1:6.53.0:6.53.0
+proto-google-cloud-spanner-admin-database-v1:6.53.0:6.53.0
+grpc-google-cloud-spanner-v1:6.53.0:6.53.0
+grpc-google-cloud-spanner-admin-instance-v1:6.53.0:6.53.0
+grpc-google-cloud-spanner-admin-database-v1:6.53.0:6.53.0
+google-cloud-spanner:6.53.0:6.53.0
+google-cloud-spanner-executor:6.53.0:6.53.0