From 30a32e9f8c133fc0efa24f33807905407f1dd208 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Sat, 4 Mar 2023 04:46:11 +0000 Subject: [PATCH 01/17] chore(main): release 6.37.1-SNAPSHOT (#2317) :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 ab1e443f48a..8541baf60b9 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.37.0 + 6.37.1-SNAPSHOT pom com.google.cloud @@ -53,48 +53,48 @@ com.google.cloud google-cloud-spanner - 6.37.0 + 6.37.1-SNAPSHOT com.google.cloud google-cloud-spanner-executor - 6.37.0 + 6.37.1-SNAPSHOT com.google.cloud google-cloud-spanner test-jar - 6.37.0 + 6.37.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-spanner-v1 - 6.37.0 + 6.37.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-spanner-admin-instance-v1 - 6.37.0 + 6.37.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-spanner-admin-database-v1 - 6.37.0 + 6.37.1-SNAPSHOT com.google.api.grpc proto-google-cloud-spanner-admin-instance-v1 - 6.37.0 + 6.37.1-SNAPSHOT com.google.api.grpc proto-google-cloud-spanner-v1 - 6.37.0 + 6.37.1-SNAPSHOT com.google.api.grpc proto-google-cloud-spanner-admin-database-v1 - 6.37.0 + 6.37.1-SNAPSHOT diff --git a/google-cloud-spanner-executor/pom.xml b/google-cloud-spanner-executor/pom.xml index 593a5af3bfe..7ce2c25ffc3 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.37.0 + 6.37.1-SNAPSHOT jar Google Cloud Spanner Executor com.google.cloud google-cloud-spanner-parent - 6.37.0 + 6.37.1-SNAPSHOT diff --git a/google-cloud-spanner/pom.xml b/google-cloud-spanner/pom.xml index 7c0686427b6..e1494bb0ad2 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.37.0 + 6.37.1-SNAPSHOT jar Google Cloud Spanner https://github.com/googleapis/java-spanner @@ -11,7 +11,7 @@ com.google.cloud google-cloud-spanner-parent - 6.37.0 + 6.37.1-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 b0015f17b46..54ca640d49f 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.37.0 + 6.37.1-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.37.0 + 6.37.1-SNAPSHOT diff --git a/grpc-google-cloud-spanner-admin-instance-v1/pom.xml b/grpc-google-cloud-spanner-admin-instance-v1/pom.xml index 8a78215602f..7e8ce135d4e 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.37.0 + 6.37.1-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.37.0 + 6.37.1-SNAPSHOT diff --git a/grpc-google-cloud-spanner-v1/pom.xml b/grpc-google-cloud-spanner-v1/pom.xml index ed214f8b50f..aac8da6c536 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.37.0 + 6.37.1-SNAPSHOT grpc-google-cloud-spanner-v1 GRPC library for grpc-google-cloud-spanner-v1 com.google.cloud google-cloud-spanner-parent - 6.37.0 + 6.37.1-SNAPSHOT diff --git a/pom.xml b/pom.xml index fdb2b86d5a7..740a6036004 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-spanner-parent pom - 6.37.0 + 6.37.1-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.37.0 + 6.37.1-SNAPSHOT com.google.api.grpc proto-google-cloud-spanner-v1 - 6.37.0 + 6.37.1-SNAPSHOT com.google.api.grpc proto-google-cloud-spanner-admin-database-v1 - 6.37.0 + 6.37.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-spanner-v1 - 6.37.0 + 6.37.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-spanner-admin-instance-v1 - 6.37.0 + 6.37.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-spanner-admin-database-v1 - 6.37.0 + 6.37.1-SNAPSHOT com.google.cloud google-cloud-spanner - 6.37.0 + 6.37.1-SNAPSHOT diff --git a/proto-google-cloud-spanner-admin-database-v1/pom.xml b/proto-google-cloud-spanner-admin-database-v1/pom.xml index 57ffadbb17b..148ccd4e02d 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.37.0 + 6.37.1-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.37.0 + 6.37.1-SNAPSHOT diff --git a/proto-google-cloud-spanner-admin-instance-v1/pom.xml b/proto-google-cloud-spanner-admin-instance-v1/pom.xml index ec7120c0aab..e5002ae558f 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.37.0 + 6.37.1-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.37.0 + 6.37.1-SNAPSHOT diff --git a/proto-google-cloud-spanner-v1/pom.xml b/proto-google-cloud-spanner-v1/pom.xml index b8f86b46824..80881ec6dc7 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.37.0 + 6.37.1-SNAPSHOT proto-google-cloud-spanner-v1 PROTO library for proto-google-cloud-spanner-v1 com.google.cloud google-cloud-spanner-parent - 6.37.0 + 6.37.1-SNAPSHOT diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 6698db99864..876e25b8bf3 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -31,7 +31,7 @@ com.google.cloud google-cloud-spanner - 6.37.0 + 6.37.1-SNAPSHOT diff --git a/versions.txt b/versions.txt index 6bc95bbeb41..b384b1b39f8 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.37.0:6.37.0 -proto-google-cloud-spanner-v1:6.37.0:6.37.0 -proto-google-cloud-spanner-admin-database-v1:6.37.0:6.37.0 -grpc-google-cloud-spanner-v1:6.37.0:6.37.0 -grpc-google-cloud-spanner-admin-instance-v1:6.37.0:6.37.0 -grpc-google-cloud-spanner-admin-database-v1:6.37.0:6.37.0 -google-cloud-spanner:6.37.0:6.37.0 -google-cloud-spanner-executor:6.37.0:6.37.0 +proto-google-cloud-spanner-admin-instance-v1:6.37.0:6.37.1-SNAPSHOT +proto-google-cloud-spanner-v1:6.37.0:6.37.1-SNAPSHOT +proto-google-cloud-spanner-admin-database-v1:6.37.0:6.37.1-SNAPSHOT +grpc-google-cloud-spanner-v1:6.37.0:6.37.1-SNAPSHOT +grpc-google-cloud-spanner-admin-instance-v1:6.37.0:6.37.1-SNAPSHOT +grpc-google-cloud-spanner-admin-database-v1:6.37.0:6.37.1-SNAPSHOT +google-cloud-spanner:6.37.0:6.37.1-SNAPSHOT +google-cloud-spanner-executor:6.37.0:6.37.1-SNAPSHOT From 0e65daf751bcebdd55dc89d1ff3e052a32227112 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Mon, 6 Mar 2023 17:19:19 +0000 Subject: [PATCH 02/17] chore(deps): update dependency com.google.cloud:google-cloud-spanner to v6.37.0 (#2318) 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.37.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 | 6 +++--- samples/install-without-bom/pom.xml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e3d8e401561..6a25961b318 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ If you are using Maven without BOM, add this to your dependencies: com.google.cloud google-cloud-spanner - 6.36.1 + 6.37.0 ``` @@ -56,13 +56,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.36.1' +implementation 'com.google.cloud:google-cloud-spanner:6.37.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-spanner" % "6.36.1" +libraryDependencies += "com.google.cloud" % "google-cloud-spanner" % "6.37.0" ``` ## Authentication diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index b1c3b158e5f..4d2a6743029 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.36.1 + 6.37.0 From 0f749dc6d00568ac6a2d71ddd1a08ee6aea417db Mon Sep 17 00:00:00 2001 From: Rajat Bhatta <93644539+rajatbhatta@users.noreply.github.com> Date: Mon, 6 Mar 2023 19:11:01 +0000 Subject: [PATCH 03/17] chore: fix kokoro windows java 8 ci by setting correct JAVA11_HOME (#2319) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: fix kokoro windows java 8 ci by setting correct JAVA11_HOME * Update build.bat * Update build.bat * πŸ¦‰ 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 --- .kokoro/build.bat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.kokoro/build.bat b/.kokoro/build.bat index d21342e3296..c896610a27d 100644 --- a/.kokoro/build.bat +++ b/.kokoro/build.bat @@ -17,6 +17,6 @@ set JAVA8_HOME=%JAVA_HOME:"=% choco install -y openjdk11 -set JAVA11_HOME=C:\Program Files\Eclipse Adoptium\jdk-11.0.17.8-hotspot\ +set JAVA11_HOME=C:\Program Files\Eclipse Adoptium\jdk-11.0.18.10-hotspot\ -"C:\Program Files\Git\bin\bash.exe" %~dp0build.sh \ No newline at end of file +"C:\Program Files\Git\bin\bash.exe" %~dp0build.sh From 27ef53c8447bd51a56fdfe6b2b206afe234fad80 Mon Sep 17 00:00:00 2001 From: gyang-google <48337601+gyang-google@users.noreply.github.com> Date: Wed, 8 Mar 2023 19:04:48 -0800 Subject: [PATCH 04/17] fix: update executeCloudBatchDmlUpdates. (#2326) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: update executeCloudBatchDmlUpdates. Fix a typo in executeCloudBatchDmlUpdates. * πŸ¦‰ 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 +- .../google/cloud/executor/spanner/CloudClientExecutor.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6a25961b318..83b6054f5d1 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ If you are using Maven without 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.9.0') +implementation platform('com.google.cloud:libraries-bom:26.10.0') implementation 'com.google.cloud:google-cloud-spanner' ``` diff --git a/google-cloud-spanner-executor/src/main/java/com/google/cloud/executor/spanner/CloudClientExecutor.java b/google-cloud-spanner-executor/src/main/java/com/google/cloud/executor/spanner/CloudClientExecutor.java index 91ce0a23e2e..bf3da19cff8 100644 --- a/google-cloud-spanner-executor/src/main/java/com/google/cloud/executor/spanner/CloudClientExecutor.java +++ b/google-cloud-spanner-executor/src/main/java/com/google/cloud/executor/spanner/CloudClientExecutor.java @@ -2451,10 +2451,10 @@ private Status executeCloudBatchDmlUpdates( QueryAction update = action.getUpdates(i); Statement.Builder stmt = Statement.newBuilder(update.getSql()); for (int j = 0; j < update.getParamsCount(); ++j) { - stmt.bind(update.getParams(i).getName()) + stmt.bind(update.getParams(j).getName()) .to( valueProtoToCloudValue( - update.getParams(i).getType(), update.getParams(i).getValue())); + update.getParams(j).getType(), update.getParams(j).getValue())); } queries.add(stmt.build()); } From ff17244ee918fa17c96488a0f7081728cda7b342 Mon Sep 17 00:00:00 2001 From: Thiago Nunes Date: Mon, 13 Mar 2023 11:19:56 +1100 Subject: [PATCH 05/17] feat: add option to wait on session pool creation (#2329) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add option to wait on session pool creation Adds option to wait for min sessions to be populated in the session pool before returning the database client back to the user. This only done during the database client creation and it is useful for benchmarking. * refactor: fix imports * fix: fix comments * fix: propagate interrupt Co-authored-by: Knut Olav LΓΈite --------- Co-authored-by: Knut Olav LΓΈite --- .../com/google/cloud/spanner/SessionPool.java | 32 ++++++++++++++ .../cloud/spanner/SessionPoolOptions.java | 30 ++++++++++++- .../com/google/cloud/spanner/SpannerImpl.java | 1 + .../google/cloud/spanner/SessionPoolTest.java | 42 +++++++++++++++++++ 4 files changed, 103 insertions(+), 2 deletions(-) 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 ff11df91169..189c8e1d819 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 @@ -128,6 +128,30 @@ class SessionPool { ErrorCode.UNIMPLEMENTED, ErrorCode.INTERNAL); + /** + * If the {@link SessionPoolOptions#getWaitForMinSessions()} duration is greater than zero, waits + * for the creation of at least {@link SessionPoolOptions#getMinSessions()} in the pool using the + * given duration. If the waiting times out, a {@link SpannerException} with the {@link + * ErrorCode#DEADLINE_EXCEEDED} is thrown. + */ + void maybeWaitOnMinSessions() { + final long timeoutNanos = options.getWaitForMinSessions().toNanos(); + if (timeoutNanos <= 0) { + return; + } + + try { + if (!waitOnMinSessionsLatch.await(timeoutNanos, TimeUnit.NANOSECONDS)) { + final long timeoutMillis = options.getWaitForMinSessions().toMillis(); + throw SpannerExceptionFactory.newSpannerException( + ErrorCode.DEADLINE_EXCEEDED, + "Timed out after waiting " + timeoutMillis + "ms for session pool creation"); + } + } catch (InterruptedException e) { + throw SpannerExceptionFactory.propagateInterrupt(e); + } + } + /** * Wrapper around current time so that we can fake it in tests. TODO(user): Replace with Java 8 * Clock. @@ -1855,6 +1879,8 @@ private enum Position { @VisibleForTesting Function idleSessionRemovedListener; + private final CountDownLatch waitOnMinSessionsLatch; + /** * Create a session pool with the given options and for the given database. It will also start * eagerly creating sessions if {@link SessionPoolOptions#getMinSessions()} is greater than 0. @@ -1934,6 +1960,8 @@ private SessionPool( this.clock = clock; this.poolMaintainer = new PoolMaintainer(); this.initMetricsCollection(metricRegistry, labelValues); + this.waitOnMinSessionsLatch = + options.getMinSessions() > 0 ? new CountDownLatch(1) : new CountDownLatch(0); } /** @@ -2399,6 +2427,7 @@ public void onSessionReady(SessionImpl session) { PooledSession pooledSession = null; boolean closeSession = false; synchronized (lock) { + int minSessions = options.getMinSessions(); pooledSession = new PooledSession(session); numSessionsBeingCreated--; if (closureFuture != null) { @@ -2406,6 +2435,9 @@ public void onSessionReady(SessionImpl session) { } else { Preconditions.checkState(totalSessions() <= options.getMaxSessions() - 1); allSessions.add(pooledSession); + if (allSessions.size() >= minSessions) { + waitOnMinSessionsLatch.countDown(); + } if (options.isAutoDetectDialect() && !detectDialectStarted) { // Get the dialect of the underlying database if that has not yet been done. Note that // this method will release the session into the pool once it is done. 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 408b3d73965..ad6ad2e73d7 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 @@ -51,6 +51,7 @@ public class SessionPoolOptions { private final ActionOnSessionLeak actionOnSessionLeak; private final long initialWaitForSessionTimeoutMillis; private final boolean autoDetectDialect; + private final Duration waitForMinSessions; private SessionPoolOptions(Builder builder) { // minSessions > maxSessions is only possible if the user has only set a value for maxSessions. @@ -69,6 +70,7 @@ private SessionPoolOptions(Builder builder) { this.keepAliveIntervalMinutes = builder.keepAliveIntervalMinutes; this.removeInactiveSessionAfter = builder.removeInactiveSessionAfter; this.autoDetectDialect = builder.autoDetectDialect; + this.waitForMinSessions = builder.waitForMinSessions; } @Override @@ -90,7 +92,8 @@ public boolean equals(Object o) { && Objects.equals(this.loopFrequency, other.loopFrequency) && Objects.equals(this.keepAliveIntervalMinutes, other.keepAliveIntervalMinutes) && Objects.equals(this.removeInactiveSessionAfter, other.removeInactiveSessionAfter) - && Objects.equals(this.autoDetectDialect, other.autoDetectDialect); + && Objects.equals(this.autoDetectDialect, other.autoDetectDialect) + && Objects.equals(this.waitForMinSessions, other.waitForMinSessions); } @Override @@ -108,7 +111,8 @@ public int hashCode() { this.loopFrequency, this.keepAliveIntervalMinutes, this.removeInactiveSessionAfter, - this.autoDetectDialect); + this.autoDetectDialect, + this.waitForMinSessions); } public Builder toBuilder() { @@ -186,6 +190,11 @@ boolean isFailOnSessionLeak() { return actionOnSessionLeak == ActionOnSessionLeak.FAIL; } + @VisibleForTesting + Duration getWaitForMinSessions() { + return waitForMinSessions; + } + public static Builder newBuilder() { return new Builder(); } @@ -229,6 +238,7 @@ public static class Builder { private int keepAliveIntervalMinutes = 30; private Duration removeInactiveSessionAfter = Duration.ofMinutes(55L); private boolean autoDetectDialect = false; + private Duration waitForMinSessions = Duration.ZERO; public Builder() {} @@ -247,6 +257,7 @@ private Builder(SessionPoolOptions options) { this.keepAliveIntervalMinutes = options.keepAliveIntervalMinutes; this.removeInactiveSessionAfter = options.removeInactiveSessionAfter; this.autoDetectDialect = options.autoDetectDialect; + this.waitForMinSessions = options.waitForMinSessions; } /** @@ -394,6 +405,21 @@ public Builder setWriteSessionsFraction(float writeSessionsFraction) { return this; } + /** + * If greater than zero, waits for the session pool to have at least {@link + * SessionPoolOptions#minSessions} before returning the database client to the caller. Note that + * this check is only done during the session pool creation. This is usually done asynchronously + * in order to provide the client back to the caller as soon as possible. We don't recommend + * using this option unless you are executing benchmarks and want to guarantee the session pool + * has min sessions in the pool before continuing. + * + *

Defaults to zero (initialization is done asynchronously). + */ + public Builder setWaitForMinSessions(Duration waitForMinSessions) { + this.waitForMinSessions = waitForMinSessions; + return this; + } + /** Build a SessionPoolOption object */ public SessionPoolOptions build() { validate(); diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerImpl.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerImpl.java index b8255f1d65e..721be9cd762 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerImpl.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerImpl.java @@ -221,6 +221,7 @@ public DatabaseClient getDatabaseClient(DatabaseId db) { SessionPool pool = SessionPool.createPool( getOptions(), SpannerImpl.this.getSessionClient(db), labelValues); + pool.maybeWaitOnMinSessions(); DatabaseClientImpl dbClient = createDatabaseClient(clientId, pool); dbClients.put(db, dbClient); return dbClient; 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 147f66220b3..4e5b1e0395c 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 @@ -94,6 +94,7 @@ import org.junit.runners.Parameterized.Parameters; import org.mockito.Mock; import org.mockito.Mockito; +import org.threeten.bp.Duration; /** Tests for SessionPool that mock out the underlying stub. */ @RunWith(Parameterized.class) @@ -1188,6 +1189,47 @@ public void testGetDatabaseRole() throws Exception { assertEquals(TEST_DATABASE_ROLE, pool.getDatabaseRole()); } + @Test + public void testWaitOnMinSessionsWhenSessionsAreCreatedBeforeTimeout() { + doAnswer( + invocation -> + executor.submit( + () -> { + SessionConsumerImpl consumer = + invocation.getArgument(2, SessionConsumerImpl.class); + consumer.onSessionReady(mockSession()); + })) + .when(sessionClient) + .asyncBatchCreateSessions(Mockito.eq(1), Mockito.anyBoolean(), any(SessionConsumer.class)); + + options = + SessionPoolOptions.newBuilder() + .setMinSessions(minSessions) + .setMaxSessions(minSessions + 1) + .setWaitForMinSessions(Duration.ofSeconds(5)) + .build(); + pool = createPool(new FakeClock(), new FakeMetricRegistry(), SPANNER_DEFAULT_LABEL_VALUES); + pool.maybeWaitOnMinSessions(); + assertTrue(pool.getNumberOfSessionsInPool() >= minSessions); + } + + @Test(expected = SpannerException.class) + public void testWaitOnMinSessionsThrowsExceptionWhenTimeoutIsReached() { + // Does not call onSessionReady, so session pool is never populated + doAnswer(invocation -> null) + .when(sessionClient) + .asyncBatchCreateSessions(Mockito.eq(1), Mockito.anyBoolean(), any(SessionConsumer.class)); + + options = + SessionPoolOptions.newBuilder() + .setMinSessions(minSessions + 1) + .setMaxSessions(minSessions + 1) + .setWaitForMinSessions(Duration.ofMillis(100)) + .build(); + pool = createPool(new FakeClock(), new FakeMetricRegistry(), SPANNER_DEFAULT_LABEL_VALUES); + pool.maybeWaitOnMinSessions(); + } + private void mockKeepAlive(Session session) { ReadContext context = mock(ReadContext.class); ResultSet resultSet = mock(ResultSet.class); From 2c8ecf6fee591df95ee4abfa230c3fcf0c34c589 Mon Sep 17 00:00:00 2001 From: Rajat Bhatta <93644539+rajatbhatta@users.noreply.github.com> Date: Wed, 15 Mar 2023 04:54:16 +0000 Subject: [PATCH 06/17] feat: add PartitionedUpdate support to executor (#2228) This PR adds support for PartitionedUpdate to Cloud Client Executor Framework. --- .../executor/spanner/CloudClientExecutor.java | 37 +++++++++++++++++++ .../com/google/cloud/spanner/Options.java | 10 ++++- .../com/google/cloud/spanner/OptionsTest.java | 9 +++++ 3 files changed, 55 insertions(+), 1 deletion(-) diff --git a/google-cloud-spanner-executor/src/main/java/com/google/cloud/executor/spanner/CloudClientExecutor.java b/google-cloud-spanner-executor/src/main/java/com/google/cloud/executor/spanner/CloudClientExecutor.java index bf3da19cff8..55acf44abb2 100644 --- a/google-cloud-spanner-executor/src/main/java/com/google/cloud/executor/spanner/CloudClientExecutor.java +++ b/google-cloud-spanner-executor/src/main/java/com/google/cloud/executor/spanner/CloudClientExecutor.java @@ -52,6 +52,7 @@ import com.google.cloud.spanner.Mutation; import com.google.cloud.spanner.Mutation.WriteBuilder; import com.google.cloud.spanner.Options; +import com.google.cloud.spanner.Options.RpcPriority; import com.google.cloud.spanner.Partition; import com.google.cloud.spanner.PartitionOptions; import com.google.cloud.spanner.ReadContext; @@ -128,6 +129,8 @@ import com.google.spanner.executor.v1.MutationAction.Mod; import com.google.spanner.executor.v1.MutationAction.UpdateArgs; import com.google.spanner.executor.v1.OperationResponse; +import com.google.spanner.executor.v1.PartitionedUpdateAction; +import com.google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions; import com.google.spanner.executor.v1.QueryAction; import com.google.spanner.executor.v1.ReadAction; import com.google.spanner.executor.v1.RestoreCloudDatabaseAction; @@ -886,6 +889,13 @@ private Status executeAction( } else if (action.hasExecutePartition()) { return executeExecutePartition( action.getExecutePartition(), outcomeSender, executionContext); + } else if (action.hasPartitionedUpdate()) { + if (dbPath == null) { + throw SpannerExceptionFactory.newSpannerException( + ErrorCode.INVALID_ARGUMENT, "Database path must be set for this action"); + } + DatabaseClient dbClient = getClient().getDatabaseClient(DatabaseId.of(dbPath)); + return executePartitionedUpdate(action.getPartitionedUpdate(), dbClient, outcomeSender); } else if (action.hasCloseBatchTxn()) { return executeCloseBatchTxn(action.getCloseBatchTxn(), outcomeSender, executionContext); } else if (action.hasExecuteChangeStreamQuery()) { @@ -1974,6 +1984,33 @@ private Status executeExecutePartition( } } + /** Execute a partitioned update which runs different partitions in parallel. */ + private Status executePartitionedUpdate( + PartitionedUpdateAction action, DatabaseClient dbClient, OutcomeSender sender) { + try { + ExecutePartitionedUpdateOptions options = action.getOptions(); + Long count = + dbClient.executePartitionedUpdate( + Statement.of(action.getUpdate().getSql()), + Options.tag(options.getTag()), + Options.priority(RpcPriority.fromProto(options.getRpcPriority()))); + SpannerActionOutcome outcome = + SpannerActionOutcome.newBuilder() + .setStatus(toProto(Status.OK)) + .addDmlRowsModified(count) + .build(); + sender.sendOutcome(outcome); + return sender.finishWithOK(); + } catch (SpannerException e) { + return sender.finishWithError(toStatus(e)); + } catch (Exception e) { + return sender.finishWithError( + toStatus( + SpannerExceptionFactory.newSpannerException( + ErrorCode.INVALID_ARGUMENT, "Unexpected error: " + e.getMessage()))); + } + } + /** Build a child partition record proto out of childPartitionRecord returned by client. */ private ChildPartitionsRecord buildChildPartitionRecord(Struct childPartitionRecord) throws Exception { diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Options.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Options.java index 9e41885bcf0..88d0be44919 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Options.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Options.java @@ -32,13 +32,21 @@ public final class Options implements Serializable { public enum RpcPriority { LOW(Priority.PRIORITY_LOW), MEDIUM(Priority.PRIORITY_MEDIUM), - HIGH(Priority.PRIORITY_HIGH); + HIGH(Priority.PRIORITY_HIGH), + UNSPECIFIED(Priority.PRIORITY_UNSPECIFIED); private final Priority proto; RpcPriority(Priority proto) { this.proto = Preconditions.checkNotNull(proto); } + + public static RpcPriority fromProto(Priority proto) { + for (RpcPriority e : RpcPriority.values()) { + if (e.proto.equals(proto)) return e; + } + return RpcPriority.UNSPECIFIED; + } } /** Marker interface to mark options applicable to both Read and Query operations */ diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OptionsTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OptionsTest.java index 73fb772f0d3..ce41ee9a57e 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OptionsTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OptionsTest.java @@ -300,6 +300,15 @@ public void testUpdateOptionsPriority() { assertEquals("priority: " + priority + " ", options.toString()); } + @Test + public void testRpcPriorityEnumFromProto() { + assertEquals(RpcPriority.fromProto(Priority.PRIORITY_LOW), RpcPriority.LOW); + assertEquals(RpcPriority.fromProto(Priority.PRIORITY_MEDIUM), RpcPriority.MEDIUM); + assertEquals(RpcPriority.fromProto(Priority.PRIORITY_HIGH), RpcPriority.HIGH); + assertEquals(RpcPriority.fromProto(Priority.PRIORITY_UNSPECIFIED), RpcPriority.UNSPECIFIED); + assertEquals(RpcPriority.fromProto(null), RpcPriority.UNSPECIFIED); + } + @Test public void testTransactionOptionsHashCode() { Options option1 = Options.fromTransactionOptions(); From c4a00b2797418bf7459d295b9d9c7e91c5cd27a0 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 16 Mar 2023 15:10:33 +0530 Subject: [PATCH 07/17] chore: fix broken links in `README.md` (#1776) (#2332) * chore: fix cloud cli link in `README.md` * Revert "chore: fix cloud cli link in `README.md`" This reverts commit c8bcf7cf3e2acb12183d0d5da9dfe186be5279fc. * chore: fix cloud cli link in README.md * cap letters * fix maven version link Source-Link: https://github.com/googleapis/synthtool/commit/f0dc278accd789c07cc890bf8d9e11a249c544bc Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:381a48baae37646d72557adaa2c2035a84462cfd830269dfb3847b7d7ca9e96d Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 2 +- README.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index a5361a30a36..902cb9b80d3 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:e62f3ea524b11c1cd6ff7f80362736d86c0056631346b5b106a421686fce2726 + digest: sha256:381a48baae37646d72557adaa2c2035a84462cfd830269dfb3847b7d7ca9e96d diff --git a/README.md b/README.md index 83b6054f5d1..3388088e61f 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ The client application making API calls must be granted [authorization scopes][a You will need a [Google Cloud Platform Console][developer-console] project with the Cloud Spanner [API enabled][enable-api]. You will need to [enable billing][enable-billing] to use Google Cloud Spanner. [Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by -[installing the Google Cloud SDK][cloud-sdk] and running the following commands in command line: +[installing the Google Cloud Command Line Interface][cloud-cli] and running the following commands in command line: `gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`. ### Installation and setup @@ -409,14 +409,14 @@ 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://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-spanner&core=gav +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-spanner/6.37.0 [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 [iam-policy]: https://cloud.google.com/iam/docs/overview#cloud-iam-policy [developer-console]: https://console.developers.google.com/ [create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects -[cloud-sdk]: https://cloud.google.com/sdk/ +[cloud-cli]: https://cloud.google.com/cli [troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/main/troubleshooting/readme.md#troubleshooting [contributing]: https://github.com/googleapis/java-spanner/blob/main/CONTRIBUTING.md [code-of-conduct]: https://github.com/googleapis/java-spanner/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct From a7965076ea9f17b6ecb56c6f160a892b26fd3494 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 16 Mar 2023 09:40:53 +0000 Subject: [PATCH 08/17] build(deps): update dependency org.apache.maven.plugins:maven-surefire-plugin to v3 (#2331) --- 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 17ebe09b6e5..8545aba7983 100644 --- a/samples/native-image/pom.xml +++ b/samples/native-image/pom.xml @@ -120,7 +120,7 @@ org.apache.maven.plugins maven-surefire-plugin - 2.22.2 + 3.0.0 **/*IT From 80423f2ad363ec376aa2b8595e4de405e4bd6a5a Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 16 Mar 2023 09:41:13 +0000 Subject: [PATCH 09/17] build(deps): update dependency org.apache.maven.plugins:maven-failsafe-plugin to v3.0.0 (#2330) --- google-cloud-spanner-executor/pom.xml | 2 +- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/google-cloud-spanner-executor/pom.xml b/google-cloud-spanner-executor/pom.xml index 7ce2c25ffc3..188f2b8b4a1 100644 --- a/google-cloud-spanner-executor/pom.xml +++ b/google-cloud-spanner-executor/pom.xml @@ -158,7 +158,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0-M9 + 3.0.0 diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 4d2a6743029..94b6422d51a 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -139,7 +139,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0-M9 + 3.0.0 spanner-testing-east1 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 876e25b8bf3..7a3c306b1f3 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -138,7 +138,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0-M9 + 3.0.0 spanner-testing-east1 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index cf1515e0d10..21cb75d3513 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -174,7 +174,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0-M9 + 3.0.0 spanner-testing-east1 From c243241a2ea5e6b1d2f7d5394d25feaf12d480f2 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 16 Mar 2023 09:41:34 +0000 Subject: [PATCH 10/17] chore(deps): update dependency com.google.cloud:libraries-bom to v26.10.0 (#2325) 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.10.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 3388088e61f..dc1c2463bef 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.9.0 + 26.10.0 pom import diff --git a/samples/native-image/pom.xml b/samples/native-image/pom.xml index 8545aba7983..2038abf73cd 100644 --- a/samples/native-image/pom.xml +++ b/samples/native-image/pom.xml @@ -28,7 +28,7 @@ com.google.cloud libraries-bom - 26.9.0 + 26.10.0 pom import diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 21cb75d3513..4a8fa1bbfe9 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -33,7 +33,7 @@ com.google.cloud libraries-bom - 26.9.0 + 26.10.0 pom import From b98c5945b0e14872492fcf2ff6f8dffd04c13df9 Mon Sep 17 00:00:00 2001 From: Ori Schwartz Date: Fri, 17 Mar 2023 05:43:48 -0400 Subject: [PATCH 11/17] refactor: remove local variables, use static constants (#2322) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: remove local variables, use constants These are already defined in the base class AbstractStatementParser * πŸ¦‰ 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 --- .../cloud/spanner/connection/SpannerStatementParser.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/SpannerStatementParser.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/SpannerStatementParser.java index a9ca5fb9726..251c5a2e6ec 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/SpannerStatementParser.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/SpannerStatementParser.java @@ -213,9 +213,6 @@ String removeStatementHint(String sql) { @InternalApi @Override ParametersInfo convertPositionalParametersToNamedParametersInternal(char paramChar, String sql) { - final char SINGLE_QUOTE = '\''; - final char DOUBLE_QUOTE = '"'; - final char BACKTICK_QUOTE = '`'; boolean isInQuoted = false; char startQuote = 0; boolean lastCharWasEscapeChar = false; From 9c81109e452d6bae2598cf6cf541a09423a8ed6e Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Fri, 17 Mar 2023 21:34:42 +0000 Subject: [PATCH 12/17] deps: update dependency com.google.cloud:google-cloud-monitoring to v3.14.0 (#2333) --- 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 94b6422d51a..06d4c4bb088 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -23,7 +23,7 @@ UTF-8 0.31.1 2.12.0 - 3.13.0 + 3.14.0 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 7a3c306b1f3..9e495defd3d 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -23,7 +23,7 @@ UTF-8 0.31.1 2.12.0 - 3.13.0 + 3.14.0 From c461ba0b1a145cc3e9bee805ec6ad827376e5168 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Fri, 17 Mar 2023 22:18:12 +0000 Subject: [PATCH 13/17] deps: update dependency com.google.cloud:google-cloud-trace to v2.13.0 (#2334) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](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.12.0` -> `2.13.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-trace/2.13.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-trace/2.13.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-trace/2.13.0/compatibility-slim/2.12.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-trace/2.13.0/confidence-slim/2.12.0)](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://app.renovatebot.com/dashboard#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 06d4c4bb088..31dbf17dbaa 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.12.0 + 2.13.0 3.14.0 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 9e495defd3d..ed13e5ac78e 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -22,7 +22,7 @@ 1.8 UTF-8 0.31.1 - 2.12.0 + 2.13.0 3.14.0 From 5eac2beb2ce5eebb61e70428e2ac2e11593fc986 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Sun, 19 Mar 2023 03:16:30 +0000 Subject: [PATCH 14/17] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v3.5.0 (#2335) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 740a6036004..64517019803 100644 --- a/pom.xml +++ b/pom.xml @@ -54,7 +54,7 @@ UTF-8 github google-cloud-spanner-parent - 3.4.0 + 3.5.0 From 6159d7ec49b17f6bc40e1b8c93d1e64198c59dcf Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Sun, 19 Mar 2023 09:36:42 +0530 Subject: [PATCH 15/17] fix: Correcting the proto field Id for field data_boost_enabled (#2328) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: Add service_yaml_parameters to `java_gapic_library` targets PiperOrigin-RevId: 515423972 Source-Link: https://github.com/googleapis/googleapis/commit/b5b457107dc6a34527f9304e44363611313674d0 Source-Link: https://github.com/googleapis/googleapis-gen/commit/806347af5bd3f5d1e9c6d85ccf489d5dbc5ef667 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiODA2MzQ3YWY1YmQzZjVkMWU5YzZkODVjY2Y0ODlkNWRiYzVlZjY2NyJ9 * πŸ¦‰ Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore(deps): Update gapic-generator-java to 2.15.3 PiperOrigin-RevId: 516900470 Source-Link: https://github.com/googleapis/googleapis/commit/42ba7e6302f5e0f10ac2b9b17f5b6d568ecae02d Source-Link: https://github.com/googleapis/googleapis-gen/commit/21abfad42a1f2edae64130bbf897283221cd66d7 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjFhYmZhZDQyYTFmMmVkYWU2NDEzMGJiZjg5NzI4MzIyMWNkNjZkNyJ9 * πŸ¦‰ Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix!: Correcting the proto field Id for field data_boost_enabled PiperOrigin-RevId: 517156905 Source-Link: https://github.com/googleapis/googleapis/commit/f30cd5ec52d3ed03cb56e8233079ddd44e5571f7 Source-Link: https://github.com/googleapis/googleapis-gen/commit/6a3b040daef7db3fc3b879ad08f5480aa037818a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmEzYjA0MGRhZWY3ZGIzZmMzYjg3OWFkMDhmNTQ4MGFhMDM3ODE4YSJ9 * πŸ¦‰ 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 Co-authored-by: gauravpurohit --- .../v1/stub/HttpJsonDatabaseAdminStub.java | 81 ++++++++++++++++++- .../admin/instance/v1/package-info.java | 4 +- .../v1/stub/HttpJsonInstanceAdminStub.java | 46 ++++++++++- .../google/cloud/spanner/v1/package-info.java | 4 +- .../google/spanner/v1/ExecuteSqlRequest.java | 26 +++--- .../v1/ExecuteSqlRequestOrBuilder.java | 4 +- .../com/google/spanner/v1/ReadRequest.java | 26 +++--- .../spanner/v1/ReadRequestOrBuilder.java | 4 +- .../com/google/spanner/v1/SpannerProto.java | 4 +- .../proto/google/spanner/v1/spanner.proto | 8 +- 10 files changed, 167 insertions(+), 40 deletions(-) diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/HttpJsonDatabaseAdminStub.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/HttpJsonDatabaseAdminStub.java index 84727be3245..af9509761df 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/HttpJsonDatabaseAdminStub.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/HttpJsonDatabaseAdminStub.java @@ -22,6 +22,7 @@ import static com.google.cloud.spanner.admin.database.v1.DatabaseAdminClient.ListDatabaseRolesPagedResponse; import static com.google.cloud.spanner.admin.database.v1.DatabaseAdminClient.ListDatabasesPagedResponse; +import com.google.api.HttpRule; import com.google.api.core.BetaApi; import com.google.api.core.InternalApi; import com.google.api.gax.core.BackgroundResource; @@ -37,6 +38,7 @@ import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableMap; import com.google.iam.v1.GetIamPolicyRequest; import com.google.iam.v1.Policy; import com.google.iam.v1.SetIamPolicyRequest; @@ -909,7 +911,84 @@ protected HttpJsonDatabaseAdminStub( throws IOException { this.callableFactory = callableFactory; this.httpJsonOperationsStub = - HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry); + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost( + "/v1/{name=projects/*/instances/*/databases/*/operations/*}:cancel") + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost("/v1/{name=projects/*/instances/*/operations/*}:cancel") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost( + "/v1/{name=projects/*/instances/*/backups/*/operations/*}:cancel") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost( + "/v1/{name=projects/*/instanceConfigs/*/operations/*}:cancel") + .build()) + .build()) + .put( + "google.longrunning.Operations.DeleteOperation", + HttpRule.newBuilder() + .setDelete("/v1/{name=projects/*/instances/*/databases/*/operations/*}") + .addAdditionalBindings( + HttpRule.newBuilder() + .setDelete("/v1/{name=projects/*/instances/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setDelete( + "/v1/{name=projects/*/instances/*/backups/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setDelete("/v1/{name=projects/*/instanceConfigs/*/operations/*}") + .build()) + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/instances/*/databases/*/operations/*}") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/instances/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/instances/*/backups/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/instanceConfigs/*/operations/*}") + .build()) + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/instances/*/databases/*/operations}") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/instances/*/operations}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/instances/*/backups/*/operations}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/instanceConfigs/*/operations}") + .build()) + .build()) + .build()); HttpJsonCallSettings listDatabasesTransportSettings = diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/package-info.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/package-info.java index 98f6e781e94..1bbb310baca 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/package-info.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/package-info.java @@ -15,7 +15,9 @@ */ /** - * The interfaces provided are listed below, along with usage samples. + * A client to Cloud Spanner Instance Admin API + * + *

The interfaces provided are listed below, along with usage samples. * *

======================= InstanceAdminClient ======================= * diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/HttpJsonInstanceAdminStub.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/HttpJsonInstanceAdminStub.java index 3d3ba0e34d4..7266e61881f 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/HttpJsonInstanceAdminStub.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/HttpJsonInstanceAdminStub.java @@ -20,6 +20,7 @@ import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstanceConfigsPagedResponse; import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstancesPagedResponse; +import com.google.api.HttpRule; import com.google.api.core.BetaApi; import com.google.api.core.InternalApi; import com.google.api.gax.core.BackgroundResource; @@ -35,6 +36,7 @@ import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableMap; import com.google.iam.v1.GetIamPolicyRequest; import com.google.iam.v1.Policy; import com.google.iam.v1.SetIamPolicyRequest; @@ -703,7 +705,49 @@ protected HttpJsonInstanceAdminStub( throws IOException { this.callableFactory = callableFactory; this.httpJsonOperationsStub = - HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry); + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost( + "/v1/{name=projects/*/instances/*/databases/*/operations/*}:cancel") + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost("/v1/{name=projects/*/instances/*/operations/*}:cancel") + .build()) + .build()) + .put( + "google.longrunning.Operations.DeleteOperation", + HttpRule.newBuilder() + .setDelete("/v1/{name=projects/*/instances/*/databases/*/operations/*}") + .addAdditionalBindings( + HttpRule.newBuilder() + .setDelete("/v1/{name=projects/*/instances/*/operations/*}") + .build()) + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/instances/*/databases/*/operations/*}") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/instances/*/operations/*}") + .build()) + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/instances/*/databases/*/operations}") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/instances/*/operations}") + .build()) + .build()) + .build()); HttpJsonCallSettings listInstanceConfigsTransportSettings = diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/package-info.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/package-info.java index 2f88725f216..a3bd04b9f3f 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/package-info.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/package-info.java @@ -15,7 +15,9 @@ */ /** - * The interfaces provided are listed below, along with usage samples. + * A client to Cloud Spanner API + * + *

The interfaces provided are listed below, along with usage samples. * *

======================= SpannerClient ======================= * diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequest.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequest.java index b84ac1216e6..70f4c8219c2 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequest.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequest.java @@ -1972,19 +1972,19 @@ public com.google.spanner.v1.RequestOptionsOrBuilder getRequestOptionsOrBuilder( : requestOptions_; } - public static final int DATA_BOOST_ENABLED_FIELD_NUMBER = 15; + public static final int DATA_BOOST_ENABLED_FIELD_NUMBER = 16; private boolean dataBoostEnabled_ = false; /** * * *

-   * If this is for a partitioned read and this field is set to `true`, the
+   * If this is for a partitioned query and this field is set to `true`, the
    * request will be executed via Spanner independent compute resources.
    * If the field is set to `true` but the request does not set
    * `partition_token`, the API will return an `INVALID_ARGUMENT` error.
    * 
* - * bool data_boost_enabled = 15; + * bool data_boost_enabled = 16; * * @return The dataBoostEnabled. */ @@ -2040,7 +2040,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage(11, getRequestOptions()); } if (dataBoostEnabled_ != false) { - output.writeBool(15, dataBoostEnabled_); + output.writeBool(16, dataBoostEnabled_); } getUnknownFields().writeTo(output); } @@ -2092,7 +2092,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getRequestOptions()); } if (dataBoostEnabled_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(15, dataBoostEnabled_); + size += com.google.protobuf.CodedOutputStream.computeBoolSize(16, dataBoostEnabled_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -2627,12 +2627,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000400; break; } // case 90 - case 120: + case 128: { dataBoostEnabled_ = input.readBool(); bitField0_ |= 0x00000800; break; - } // case 120 + } // case 128 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -4258,13 +4258,13 @@ public com.google.spanner.v1.RequestOptionsOrBuilder getRequestOptionsOrBuilder( * * *
-     * If this is for a partitioned read and this field is set to `true`, the
+     * If this is for a partitioned query and this field is set to `true`, the
      * request will be executed via Spanner independent compute resources.
      * If the field is set to `true` but the request does not set
      * `partition_token`, the API will return an `INVALID_ARGUMENT` error.
      * 
* - * bool data_boost_enabled = 15; + * bool data_boost_enabled = 16; * * @return The dataBoostEnabled. */ @@ -4276,13 +4276,13 @@ public boolean getDataBoostEnabled() { * * *
-     * If this is for a partitioned read and this field is set to `true`, the
+     * If this is for a partitioned query and this field is set to `true`, the
      * request will be executed via Spanner independent compute resources.
      * If the field is set to `true` but the request does not set
      * `partition_token`, the API will return an `INVALID_ARGUMENT` error.
      * 
* - * bool data_boost_enabled = 15; + * bool data_boost_enabled = 16; * * @param value The dataBoostEnabled to set. * @return This builder for chaining. @@ -4298,13 +4298,13 @@ public Builder setDataBoostEnabled(boolean value) { * * *
-     * If this is for a partitioned read and this field is set to `true`, the
+     * If this is for a partitioned query and this field is set to `true`, the
      * request will be executed via Spanner independent compute resources.
      * If the field is set to `true` but the request does not set
      * `partition_token`, the API will return an `INVALID_ARGUMENT` error.
      * 
* - * bool data_boost_enabled = 15; + * bool data_boost_enabled = 16; * * @return This builder for chaining. */ diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequestOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequestOrBuilder.java index 49efc65ed98..832c2f3c503 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequestOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequestOrBuilder.java @@ -434,13 +434,13 @@ com.google.spanner.v1.Type getParamTypesOrDefault( * * *
-   * If this is for a partitioned read and this field is set to `true`, the
+   * If this is for a partitioned query and this field is set to `true`, the
    * request will be executed via Spanner independent compute resources.
    * If the field is set to `true` but the request does not set
    * `partition_token`, the API will return an `INVALID_ARGUMENT` error.
    * 
* - * bool data_boost_enabled = 15; + * bool data_boost_enabled = 16; * * @return The dataBoostEnabled. */ diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ReadRequest.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ReadRequest.java index 036227a4aed..5b75750eabf 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ReadRequest.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ReadRequest.java @@ -541,19 +541,19 @@ public com.google.spanner.v1.RequestOptionsOrBuilder getRequestOptionsOrBuilder( : requestOptions_; } - public static final int DATA_BOOST_ENABLED_FIELD_NUMBER = 16; + public static final int DATA_BOOST_ENABLED_FIELD_NUMBER = 15; private boolean dataBoostEnabled_ = false; /** * * *
-   * If this is for a partitioned query and this field is set to `true`, the
+   * If this is for a partitioned read and this field is set to `true`, the
    * request will be executed via Spanner independent compute resources.
    * If the field is set to `true` but the request does not set
    * `partition_token`, the API will return an `INVALID_ARGUMENT` error.
    * 
* - * bool data_boost_enabled = 16; + * bool data_boost_enabled = 15; * * @return The dataBoostEnabled. */ @@ -607,7 +607,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage(11, getRequestOptions()); } if (dataBoostEnabled_ != false) { - output.writeBool(16, dataBoostEnabled_); + output.writeBool(15, dataBoostEnabled_); } getUnknownFields().writeTo(output); } @@ -654,7 +654,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getRequestOptions()); } if (dataBoostEnabled_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(16, dataBoostEnabled_); + size += com.google.protobuf.CodedOutputStream.computeBoolSize(15, dataBoostEnabled_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -1151,12 +1151,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000200; break; } // case 90 - case 128: + case 120: { dataBoostEnabled_ = input.readBool(); bitField0_ |= 0x00000400; break; - } // case 128 + } // case 120 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2525,13 +2525,13 @@ public com.google.spanner.v1.RequestOptionsOrBuilder getRequestOptionsOrBuilder( * * *
-     * If this is for a partitioned query and this field is set to `true`, the
+     * If this is for a partitioned read and this field is set to `true`, the
      * request will be executed via Spanner independent compute resources.
      * If the field is set to `true` but the request does not set
      * `partition_token`, the API will return an `INVALID_ARGUMENT` error.
      * 
* - * bool data_boost_enabled = 16; + * bool data_boost_enabled = 15; * * @return The dataBoostEnabled. */ @@ -2543,13 +2543,13 @@ public boolean getDataBoostEnabled() { * * *
-     * If this is for a partitioned query and this field is set to `true`, the
+     * If this is for a partitioned read and this field is set to `true`, the
      * request will be executed via Spanner independent compute resources.
      * If the field is set to `true` but the request does not set
      * `partition_token`, the API will return an `INVALID_ARGUMENT` error.
      * 
* - * bool data_boost_enabled = 16; + * bool data_boost_enabled = 15; * * @param value The dataBoostEnabled to set. * @return This builder for chaining. @@ -2565,13 +2565,13 @@ public Builder setDataBoostEnabled(boolean value) { * * *
-     * If this is for a partitioned query and this field is set to `true`, the
+     * If this is for a partitioned read and this field is set to `true`, the
      * request will be executed via Spanner independent compute resources.
      * If the field is set to `true` but the request does not set
      * `partition_token`, the API will return an `INVALID_ARGUMENT` error.
      * 
* - * bool data_boost_enabled = 16; + * bool data_boost_enabled = 15; * * @return This builder for chaining. */ diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ReadRequestOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ReadRequestOrBuilder.java index dee8fd7fa85..fc986d632d4 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ReadRequestOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ReadRequestOrBuilder.java @@ -349,13 +349,13 @@ public interface ReadRequestOrBuilder * * *
-   * If this is for a partitioned query and this field is set to `true`, the
+   * If this is for a partitioned read and this field is set to `true`, the
    * request will be executed via Spanner independent compute resources.
    * If the field is set to `true` but the request does not set
    * `partition_token`, the API will return an `INVALID_ARGUMENT` error.
    * 
* - * bool data_boost_enabled = 16; + * bool data_boost_enabled = 15; * * @return The dataBoostEnabled. */ diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerProto.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerProto.java index 25403bb2d2f..61afeeebb63 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerProto.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerProto.java @@ -205,7 +205,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ner.v1.ExecuteSqlRequest.QueryOptions\022:\n" + "\017request_options\030\013 \001(\0132!.google.spanner." + "v1.RequestOptions\022\032\n\022data_boost_enabled\030" - + "\017 \001(\010\032O\n\014QueryOptions\022\031\n\021optimizer_versi" + + "\020 \001(\010\032O\n\014QueryOptions\022\031\n\021optimizer_versi" + "on\030\001 \001(\t\022$\n\034optimizer_statistics_package" + "\030\002 \001(\t\032J\n\017ParamTypesEntry\022\013\n\003key\030\001 \001(\t\022&" + "\n\005value\030\002 \001(\0132\027.google.spanner.v1.Type:\002" @@ -260,7 +260,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\005limit\030\010 \001(\003\022\024\n\014resume_token\030\t \001(\014\022\027\n\017pa" + "rtition_token\030\n \001(\014\022:\n\017request_options\030\013" + " \001(\0132!.google.spanner.v1.RequestOptions\022" - + "\032\n\022data_boost_enabled\030\020 \001(\010\"\313\001\n\027BeginTra" + + "\032\n\022data_boost_enabled\030\017 \001(\010\"\313\001\n\027BeginTra" + "nsactionRequest\0227\n\007session\030\001 \001(\tB&\340A\002\372A " + "\n\036spanner.googleapis.com/Session\022;\n\007opti" + "ons\030\002 \001(\0132%.google.spanner.v1.Transactio" diff --git a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/spanner.proto b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/spanner.proto index 77a1f0e473e..d25e87aa2b6 100644 --- a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/spanner.proto +++ b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/spanner.proto @@ -644,12 +644,12 @@ message ExecuteSqlRequest { // Common options for this request. RequestOptions request_options = 11; - // If this is for a partitioned read and this field is set to `true`, the + // If this is for a partitioned query and this field is set to `true`, the // request will be executed via Spanner independent compute resources. // // If the field is set to `true` but the request does not set // `partition_token`, the API will return an `INVALID_ARGUMENT` error. - bool data_boost_enabled = 15; + bool data_boost_enabled = 16; } // The request for [ExecuteBatchDml][google.spanner.v1.Spanner.ExecuteBatchDml]. @@ -957,12 +957,12 @@ message ReadRequest { // Common options for this request. RequestOptions request_options = 11; - // If this is for a partitioned query and this field is set to `true`, the + // If this is for a partitioned read and this field is set to `true`, the // request will be executed via Spanner independent compute resources. // // If the field is set to `true` but the request does not set // `partition_token`, the API will return an `INVALID_ARGUMENT` error. - bool data_boost_enabled = 16; + bool data_boost_enabled = 15; } // The request for [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction]. From f39e4a383cbe720b9814077317940fa3452e2f96 Mon Sep 17 00:00:00 2001 From: Gaurav Purohit Date: Mon, 20 Mar 2023 11:03:22 +0530 Subject: [PATCH 16/17] feat: Adding support for databoost enabled in PartitionedRead and PartitionedQuery (#2316) * feat: Adding support for spanner serverless analytics * feat: Adding BetaAPI annotation to flag out changes are under development * test: Adding Integration test * style: formatting * feat: Using databoost field instead of serverless analytics * feat: Integration test and sample. * refactor: method name change * refactor: minor refactoring * refactor: Adding more junit and java docs --- .../cloud/spanner/AbstractReadContext.java | 6 +++ .../com/google/cloud/spanner/Options.java | 43 ++++++++++++++- .../spanner/AbstractReadContextTest.java | 12 +++++ .../com/google/cloud/spanner/OptionsTest.java | 54 ++++++++++++++++--- .../cloud/spanner/it/ITBatchReadTest.java | 36 +++++++++++++ 5 files changed, 143 insertions(+), 8 deletions(-) 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 60324f8e83e..7facd19c826 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 @@ -595,6 +595,9 @@ ExecuteSqlRequest.Builder getExecuteSqlRequestBuilder( builder.setTransaction(selector); } } + if (options.hasDataBoostEnabled()) { + builder.setDataBoostEnabled(options.dataBoostEnabled()); + } builder.setSeqno(getSeqNo()); builder.setQueryOptions(buildQueryOptions(statement.getQueryOptions())); builder.setRequestOptions(buildRequestOptions(options)); @@ -773,6 +776,9 @@ ResultSet readInternalWithOptions( if (partitionToken != null) { builder.setPartitionToken(partitionToken); } + if (readOptions.hasDataBoostEnabled()) { + builder.setDataBoostEnabled(readOptions.dataBoostEnabled()); + } final int prefetchChunks = readOptions.hasPrefetchChunks() ? readOptions.prefetchChunks() : defaultPrefetchChunks; ResumableStreamIterator stream = diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Options.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Options.java index 88d0be44919..9712b508d5f 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Options.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Options.java @@ -16,6 +16,7 @@ package com.google.cloud.spanner; +import com.google.api.core.BetaApi; import com.google.common.base.Preconditions; import com.google.spanner.v1.RequestOptions.Priority; import java.io.Serializable; @@ -154,6 +155,16 @@ public static ListOption pageSize(int pageSize) { return new PageSizeOption(pageSize); } + /** + * If this is for a partitioned read & query and this field is set to `true`, the request will be + * executed via Spanner independent compute resources. The method is available in Beta mode (and + * is not generally available now). + */ + @BetaApi + public static DataBoostQueryOption dataBoostEnabled(Boolean dataBoostEnabled) { + return new DataBoostQueryOption(dataBoostEnabled); + } + /** * Specifying this will cause the list operation to start fetching the record from this onwards. */ @@ -329,6 +340,7 @@ void appendToOptions(Options options) { private String etag; private Boolean validateOnly; private Boolean withOptimisticLock; + private Boolean dataBoostEnabled; // Construction is via factory methods below. private Options() {} @@ -421,6 +433,14 @@ Boolean withOptimisticLock() { return withOptimisticLock; } + boolean hasDataBoostEnabled() { + return dataBoostEnabled != null; + } + + Boolean dataBoostEnabled() { + return dataBoostEnabled; + } + @Override public String toString() { StringBuilder b = new StringBuilder(); @@ -457,6 +477,9 @@ public String toString() { if (withOptimisticLock != null) { b.append("withOptimisticLock: ").append(withOptimisticLock).append(' '); } + if (dataBoostEnabled != null) { + b.append("dataBoostEnabled: ").append(dataBoostEnabled).append(' '); + } return b.toString(); } @@ -491,7 +514,8 @@ public boolean equals(Object o) { && Objects.equals(tag(), that.tag()) && Objects.equals(etag(), that.etag()) && Objects.equals(validateOnly(), that.validateOnly()) - && Objects.equals(withOptimisticLock(), that.withOptimisticLock()); + && Objects.equals(withOptimisticLock(), that.withOptimisticLock()) + && Objects.equals(dataBoostEnabled(), that.dataBoostEnabled()); } @Override @@ -533,6 +557,9 @@ public int hashCode() { if (withOptimisticLock != null) { result = 31 * result + withOptimisticLock.hashCode(); } + if (dataBoostEnabled != null) { + result = 31 * result + dataBoostEnabled.hashCode(); + } return result; } @@ -613,6 +640,20 @@ void appendToOptions(Options options) { } } + static final class DataBoostQueryOption extends InternalOption implements ReadAndQueryOption { + + private final Boolean dataBoostEnabled; + + DataBoostQueryOption(Boolean dataBoostEnabled) { + this.dataBoostEnabled = dataBoostEnabled; + } + + @Override + void appendToOptions(Options options) { + options.dataBoostEnabled = dataBoostEnabled; + } + } + static class PageSizeOption extends InternalOption implements ListOption { private final int pageSize; diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/AbstractReadContextTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/AbstractReadContextTest.java index 66c3609d6f9..31b73581f6b 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/AbstractReadContextTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/AbstractReadContextTest.java @@ -18,6 +18,7 @@ import static com.google.common.truth.Truth.assertThat; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -188,6 +189,17 @@ public void testGetExecuteSqlRequestBuilderWithPriority() { assertEquals(Priority.PRIORITY_MEDIUM, request.getRequestOptions().getPriority()); } + @Test + public void testGetExecuteSqlRequestBuilderWithDataBoost() { + ExecuteSqlRequest.Builder request = + context.getExecuteSqlRequestBuilder( + Statement.of("SELECT * FROM FOO"), + QueryMode.NORMAL, + Options.fromQueryOptions(Options.dataBoostEnabled(true)), + false); + assertTrue(request.getDataBoostEnabled()); + } + @Test public void testGetExecuteBatchDmlRequestBuilderWithPriority() { ExecuteBatchDmlRequest.Builder request = diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OptionsTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OptionsTest.java index ce41ee9a57e..d40f9b39ea1 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OptionsTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OptionsTest.java @@ -63,11 +63,15 @@ public void zeroPrefetchChunksNotAllowed() { @Test public void allOptionsPresent() { - Options options = Options.fromReadOptions(Options.limit(10), Options.prefetchChunks(1)); + Options options = + Options.fromReadOptions( + Options.limit(10), Options.prefetchChunks(1), Options.dataBoostEnabled(true)); assertThat(options.hasLimit()).isTrue(); assertThat(options.limit()).isEqualTo(10); assertThat(options.hasPrefetchChunks()).isTrue(); assertThat(options.prefetchChunks()).isEqualTo(1); + assertThat(options.hasDataBoostEnabled()).isTrue(); + assertTrue(options.dataBoostEnabled()); } @Test @@ -79,6 +83,7 @@ public void allOptionsAbsent() { assertThat(options.hasPageToken()).isFalse(); assertThat(options.hasPriority()).isFalse(); assertThat(options.hasTag()).isFalse(); + assertThat(options.hasDataBoostEnabled()).isFalse(); assertThat(options.toString()).isEqualTo(""); assertThat(options.equals(options)).isTrue(); assertThat(options.equals(null)).isFalse(); @@ -153,11 +158,17 @@ public void listEquality() { public void readOptionsTest() { int limit = 3; String tag = "app=spanner,env=test,action=read"; - Options options = Options.fromReadOptions(Options.limit(limit), Options.tag(tag)); + boolean dataBoost = true; + Options options = + Options.fromReadOptions( + Options.limit(limit), Options.tag(tag), Options.dataBoostEnabled(true)); - assertThat(options.toString()).isEqualTo("limit: " + limit + " " + "tag: " + tag + " "); + assertThat(options.toString()) + .isEqualTo( + "limit: " + limit + " " + "tag: " + tag + " " + "dataBoostEnabled: " + dataBoost + " "); assertThat(options.tag()).isEqualTo(tag); - assertThat(options.hashCode()).isEqualTo(-1111478426); + assertEquals(dataBoost, options.dataBoostEnabled()); + assertThat(options.hashCode()).isEqualTo(-96091607); } @Test @@ -185,12 +196,41 @@ public void readEquality() { public void queryOptionsTest() { int chunks = 3; String tag = "app=spanner,env=test,action=query"; - Options options = Options.fromQueryOptions(Options.prefetchChunks(chunks), Options.tag(tag)); + boolean dataBoost = true; + Options options = + Options.fromQueryOptions( + Options.prefetchChunks(chunks), Options.tag(tag), Options.dataBoostEnabled(true)); assertThat(options.toString()) - .isEqualTo("prefetchChunks: " + chunks + " " + "tag: " + tag + " "); + .isEqualTo( + "prefetchChunks: " + + chunks + + " " + + "tag: " + + tag + + " " + + "dataBoostEnabled: " + + dataBoost + + " "); assertThat(options.prefetchChunks()).isEqualTo(chunks); assertThat(options.tag()).isEqualTo(tag); - assertThat(options.hashCode()).isEqualTo(-97431824); + assertEquals(dataBoost, options.dataBoostEnabled()); + assertThat(options.hashCode()).isEqualTo(1274581983); + } + + @Test + public void testReadOptionsDataBoost() { + boolean dataBoost = true; + Options options = Options.fromReadOptions(Options.dataBoostEnabled(true)); + assertTrue(options.hasDataBoostEnabled()); + assertEquals("dataBoostEnabled: " + dataBoost + " ", options.toString()); + } + + @Test + public void testQueryOptionsDataBoost() { + boolean dataBoost = true; + Options options = Options.fromQueryOptions(Options.dataBoostEnabled(true)); + assertTrue(options.hasDataBoostEnabled()); + assertEquals("dataBoostEnabled: " + dataBoost + " ", options.toString()); } @Test diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITBatchReadTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITBatchReadTest.java index ed9484c5632..89a4a76e862 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITBatchReadTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITBatchReadTest.java @@ -31,6 +31,7 @@ import com.google.cloud.spanner.IntegrationTestEnv; import com.google.cloud.spanner.KeySet; import com.google.cloud.spanner.Mutation; +import com.google.cloud.spanner.Options; import com.google.cloud.spanner.ParallelIntegrationTest; import com.google.cloud.spanner.Partition; import com.google.cloud.spanner.PartitionOptions; @@ -238,6 +239,25 @@ public void readUsingIndex() { assertThat(numRowsRead).isEqualTo(numRows); } + @Test + public void dataBoostRead() { + assumeFalse("Emulator does not support data boost read", isUsingEmulator()); + + BitSet seenRows = new BitSet(numRows); + TimestampBound bound = getRandomBound(); + PartitionOptions partitionParams = getRandomPartitionOptions(); + batchTxn = getBatchClient().batchReadOnlyTransaction(bound); + List partitions = + batchTxn.partitionRead( + partitionParams, + TABLE_NAME, + KeySet.all(), + Arrays.asList("Key", "Data", "Fingerprint", "Size"), + Options.dataBoostEnabled(true)); + BatchTransactionId txnID = batchTxn.getBatchTransactionId(); + fetchAndValidateRows(partitions, txnID, seenRows); + } + @After public void tearDown() { if (batchTxn != null) { @@ -273,6 +293,22 @@ private PartitionOptions getRandomPartitionOptions() { return parameters; } + @Test + public void dataBoostQuery() { + assumeFalse("Emulator does not support data boost query", isUsingEmulator()); + BitSet seenRows = new BitSet(numRows); + TimestampBound bound = getRandomBound(); + PartitionOptions partitionParams = getRandomPartitionOptions(); + batchTxn = getBatchClient().batchReadOnlyTransaction(bound); + List partitions = + batchTxn.partitionQuery( + partitionParams, + Statement.of("SELECT Key, Data, Fingerprint, Size FROM " + TABLE_NAME), + Options.dataBoostEnabled(true)); + BatchTransactionId txnID = batchTxn.getBatchTransactionId(); + fetchAndValidateRows(partitions, txnID, seenRows); + } + private TimestampBound getRandomBound() { Date date = new Date(); switch (RANDOM.nextInt(3)) { From 346d8594eb904582e9882af52e0809a67f961aba Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 20 Mar 2023 06:54:15 +0000 Subject: [PATCH 17/17] chore(main): release 6.38.0 (#2327) :robot: I have created a release *beep* *boop* --- ## [6.38.0](https://togithub.com/googleapis/java-spanner/compare/v6.37.0...v6.38.0) (2023-03-20) ### Features * Add option to wait on session pool creation ([#2329](https://togithub.com/googleapis/java-spanner/issues/2329)) ([ff17244](https://togithub.com/googleapis/java-spanner/commit/ff17244ee918fa17c96488a0f7081728cda7b342)) * Add PartitionedUpdate support to executor ([#2228](https://togithub.com/googleapis/java-spanner/issues/2228)) ([2c8ecf6](https://togithub.com/googleapis/java-spanner/commit/2c8ecf6fee591df95ee4abfa230c3fcf0c34c589)) ### Bug Fixes * Correcting the proto field Id for field data_boost_enabled ([#2328](https://togithub.com/googleapis/java-spanner/issues/2328)) ([6159d7e](https://togithub.com/googleapis/java-spanner/commit/6159d7ec49b17f6bc40e1b8c93d1e64198c59dcf)) * Update executeCloudBatchDmlUpdates. ([#2326](https://togithub.com/googleapis/java-spanner/issues/2326)) ([27ef53c](https://togithub.com/googleapis/java-spanner/commit/27ef53c8447bd51a56fdfe6b2b206afe234fad80)) ### Dependencies * Update dependency com.google.cloud:google-cloud-monitoring to v3.14.0 ([#2333](https://togithub.com/googleapis/java-spanner/issues/2333)) ([9c81109](https://togithub.com/googleapis/java-spanner/commit/9c81109e452d6bae2598cf6cf541a09423a8ed6e)) * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.5.0 ([#2335](https://togithub.com/googleapis/java-spanner/issues/2335)) ([5eac2be](https://togithub.com/googleapis/java-spanner/commit/5eac2beb2ce5eebb61e70428e2ac2e11593fc986)) * Update dependency com.google.cloud:google-cloud-trace to v2.13.0 ([#2334](https://togithub.com/googleapis/java-spanner/issues/2334)) ([c461ba0](https://togithub.com/googleapis/java-spanner/commit/c461ba0b1a145cc3e9bee805ec6ad827376e5168)) --- 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 | 22 +++++++++++++++++++ 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, 65 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 73a81521629..4a4fec26845 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,27 @@ # Changelog +## [6.38.0](https://github.com/googleapis/java-spanner/compare/v6.37.0...v6.38.0) (2023-03-20) + + +### Features + +* Add option to wait on session pool creation ([#2329](https://github.com/googleapis/java-spanner/issues/2329)) ([ff17244](https://github.com/googleapis/java-spanner/commit/ff17244ee918fa17c96488a0f7081728cda7b342)) +* Add PartitionedUpdate support to executor ([#2228](https://github.com/googleapis/java-spanner/issues/2228)) ([2c8ecf6](https://github.com/googleapis/java-spanner/commit/2c8ecf6fee591df95ee4abfa230c3fcf0c34c589)) +* Adding support for databoost enabled in PartitionedRead and PartitionedQuery ([#2316](https://github.com/googleapis/java-spanner/issues/2316)) ([f39e4a3](https://github.com/googleapis/java-spanner/commit/f39e4a383cbe720b9814077317940fa3452e2f96)) + + +### Bug Fixes + +* Correcting the proto field Id for field data_boost_enabled ([#2328](https://github.com/googleapis/java-spanner/issues/2328)) ([6159d7e](https://github.com/googleapis/java-spanner/commit/6159d7ec49b17f6bc40e1b8c93d1e64198c59dcf)) +* Update executeCloudBatchDmlUpdates. ([#2326](https://github.com/googleapis/java-spanner/issues/2326)) ([27ef53c](https://github.com/googleapis/java-spanner/commit/27ef53c8447bd51a56fdfe6b2b206afe234fad80)) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-monitoring to v3.14.0 ([#2333](https://github.com/googleapis/java-spanner/issues/2333)) ([9c81109](https://github.com/googleapis/java-spanner/commit/9c81109e452d6bae2598cf6cf541a09423a8ed6e)) +* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.5.0 ([#2335](https://github.com/googleapis/java-spanner/issues/2335)) ([5eac2be](https://github.com/googleapis/java-spanner/commit/5eac2beb2ce5eebb61e70428e2ac2e11593fc986)) +* Update dependency com.google.cloud:google-cloud-trace to v2.13.0 ([#2334](https://github.com/googleapis/java-spanner/issues/2334)) ([c461ba0](https://github.com/googleapis/java-spanner/commit/c461ba0b1a145cc3e9bee805ec6ad827376e5168)) + ## [6.37.0](https://github.com/googleapis/java-spanner/compare/v6.36.1...v6.37.0) (2023-03-03) diff --git a/google-cloud-spanner-bom/pom.xml b/google-cloud-spanner-bom/pom.xml index 8541baf60b9..fa8ee6300dc 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.37.1-SNAPSHOT + 6.38.0 pom com.google.cloud @@ -53,48 +53,48 @@ com.google.cloud google-cloud-spanner - 6.37.1-SNAPSHOT + 6.38.0 com.google.cloud google-cloud-spanner-executor - 6.37.1-SNAPSHOT + 6.38.0 com.google.cloud google-cloud-spanner test-jar - 6.37.1-SNAPSHOT + 6.38.0 com.google.api.grpc grpc-google-cloud-spanner-v1 - 6.37.1-SNAPSHOT + 6.38.0 com.google.api.grpc grpc-google-cloud-spanner-admin-instance-v1 - 6.37.1-SNAPSHOT + 6.38.0 com.google.api.grpc grpc-google-cloud-spanner-admin-database-v1 - 6.37.1-SNAPSHOT + 6.38.0 com.google.api.grpc proto-google-cloud-spanner-admin-instance-v1 - 6.37.1-SNAPSHOT + 6.38.0 com.google.api.grpc proto-google-cloud-spanner-v1 - 6.37.1-SNAPSHOT + 6.38.0 com.google.api.grpc proto-google-cloud-spanner-admin-database-v1 - 6.37.1-SNAPSHOT + 6.38.0
diff --git a/google-cloud-spanner-executor/pom.xml b/google-cloud-spanner-executor/pom.xml index 188f2b8b4a1..1ab2a9c2d79 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.37.1-SNAPSHOT + 6.38.0 jar Google Cloud Spanner Executor com.google.cloud google-cloud-spanner-parent - 6.37.1-SNAPSHOT + 6.38.0 diff --git a/google-cloud-spanner/pom.xml b/google-cloud-spanner/pom.xml index e1494bb0ad2..c56ac36ad74 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.37.1-SNAPSHOT + 6.38.0 jar Google Cloud Spanner https://github.com/googleapis/java-spanner @@ -11,7 +11,7 @@ com.google.cloud google-cloud-spanner-parent - 6.37.1-SNAPSHOT + 6.38.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 54ca640d49f..a0385df22c8 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.37.1-SNAPSHOT + 6.38.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.37.1-SNAPSHOT + 6.38.0 diff --git a/grpc-google-cloud-spanner-admin-instance-v1/pom.xml b/grpc-google-cloud-spanner-admin-instance-v1/pom.xml index 7e8ce135d4e..507451fdbe0 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.37.1-SNAPSHOT + 6.38.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.37.1-SNAPSHOT + 6.38.0 diff --git a/grpc-google-cloud-spanner-v1/pom.xml b/grpc-google-cloud-spanner-v1/pom.xml index aac8da6c536..0bcd48802fa 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.37.1-SNAPSHOT + 6.38.0 grpc-google-cloud-spanner-v1 GRPC library for grpc-google-cloud-spanner-v1 com.google.cloud google-cloud-spanner-parent - 6.37.1-SNAPSHOT + 6.38.0 diff --git a/pom.xml b/pom.xml index 64517019803..0c67a9c9969 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-spanner-parent pom - 6.37.1-SNAPSHOT + 6.38.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.37.1-SNAPSHOT + 6.38.0 com.google.api.grpc proto-google-cloud-spanner-v1 - 6.37.1-SNAPSHOT + 6.38.0 com.google.api.grpc proto-google-cloud-spanner-admin-database-v1 - 6.37.1-SNAPSHOT + 6.38.0 com.google.api.grpc grpc-google-cloud-spanner-v1 - 6.37.1-SNAPSHOT + 6.38.0 com.google.api.grpc grpc-google-cloud-spanner-admin-instance-v1 - 6.37.1-SNAPSHOT + 6.38.0 com.google.api.grpc grpc-google-cloud-spanner-admin-database-v1 - 6.37.1-SNAPSHOT + 6.38.0 com.google.cloud google-cloud-spanner - 6.37.1-SNAPSHOT + 6.38.0 diff --git a/proto-google-cloud-spanner-admin-database-v1/pom.xml b/proto-google-cloud-spanner-admin-database-v1/pom.xml index 148ccd4e02d..bc79a56686a 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.37.1-SNAPSHOT + 6.38.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.37.1-SNAPSHOT + 6.38.0 diff --git a/proto-google-cloud-spanner-admin-instance-v1/pom.xml b/proto-google-cloud-spanner-admin-instance-v1/pom.xml index e5002ae558f..159383dc3b0 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.37.1-SNAPSHOT + 6.38.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.37.1-SNAPSHOT + 6.38.0 diff --git a/proto-google-cloud-spanner-v1/pom.xml b/proto-google-cloud-spanner-v1/pom.xml index 80881ec6dc7..a8dd529868b 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.37.1-SNAPSHOT + 6.38.0 proto-google-cloud-spanner-v1 PROTO library for proto-google-cloud-spanner-v1 com.google.cloud google-cloud-spanner-parent - 6.37.1-SNAPSHOT + 6.38.0 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index ed13e5ac78e..317db433916 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -31,7 +31,7 @@ com.google.cloud google-cloud-spanner - 6.37.1-SNAPSHOT + 6.38.0 diff --git a/versions.txt b/versions.txt index b384b1b39f8..abef9a4fd51 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.37.0:6.37.1-SNAPSHOT -proto-google-cloud-spanner-v1:6.37.0:6.37.1-SNAPSHOT -proto-google-cloud-spanner-admin-database-v1:6.37.0:6.37.1-SNAPSHOT -grpc-google-cloud-spanner-v1:6.37.0:6.37.1-SNAPSHOT -grpc-google-cloud-spanner-admin-instance-v1:6.37.0:6.37.1-SNAPSHOT -grpc-google-cloud-spanner-admin-database-v1:6.37.0:6.37.1-SNAPSHOT -google-cloud-spanner:6.37.0:6.37.1-SNAPSHOT -google-cloud-spanner-executor:6.37.0:6.37.1-SNAPSHOT +proto-google-cloud-spanner-admin-instance-v1:6.38.0:6.38.0 +proto-google-cloud-spanner-v1:6.38.0:6.38.0 +proto-google-cloud-spanner-admin-database-v1:6.38.0:6.38.0 +grpc-google-cloud-spanner-v1:6.38.0:6.38.0 +grpc-google-cloud-spanner-admin-instance-v1:6.38.0:6.38.0 +grpc-google-cloud-spanner-admin-database-v1:6.38.0:6.38.0 +google-cloud-spanner:6.38.0:6.38.0 +google-cloud-spanner-executor:6.38.0:6.38.0