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