From 4501a3ea69a9346e8b95edf6f94ff839b509ec73 Mon Sep 17 00:00:00 2001 From: Pratick Chokhani Date: Mon, 9 Dec 2024 21:11:11 +0530 Subject: [PATCH 1/7] feat(spanner): support multiplexed session for Partitioned operations (#3231) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(spanner): support multiplexed session for Partitioned read or query. * chore(spanner): lint fixes * feat(spanner): support multiplexed session for Partitioned DML operations. * lint(spanner): javadoc fixes. * feat(spanner): Updated unit tests of Partitioned operations for Multiplexed Session. * feat(spanner): Updated unit tests of Partitioned operations for Multiplexed Session. * lint(spanner): Apply suggestions from code review Co-authored-by: Knut Olav Løite * lint(spanner): Apply suggestions from code review Co-authored-by: Knut Olav Løite * feat(spanner): Modified BatchClientImpl to store multiplexed session and create fresh session after expiration date. * feat(spanner): Removed env variable for Partitioned Ops ensuring that Multiplexed Session for Partitioned Ops is not available to customers. * lint(spanner): Removed unused variables. --------- Co-authored-by: Knut Olav Løite --- .github/workflows/ci.yaml | 2 + ...tegration-multiplexed-sessions-enabled.cfg | 5 ++ .../spanner/SessionPoolOptionsHelper.java | 8 +++ ...tractMultiplexedSessionDatabaseClient.java | 6 -- .../google/cloud/spanner/BatchClientImpl.java | 57 +++++++++++++++++- .../cloud/spanner/DatabaseClientImpl.java | 13 ++++ .../DelayedMultiplexedSessionTransaction.java | 13 ++++ .../MultiplexedSessionDatabaseClient.java | 7 +++ .../google/cloud/spanner/SessionClient.java | 45 ++++++-------- .../cloud/spanner/SessionPoolOptions.java | 59 ++++++++++++++++--- .../com/google/cloud/spanner/SpannerImpl.java | 27 ++++++++- .../cloud/spanner/BatchClientImplTest.java | 29 +++++++-- .../cloud/spanner/BatchTransactionIdTest.java | 3 + .../IntegrationTestWithClosedSessionsEnv.java | 1 + ...edSessionDatabaseClientMockServerTest.java | 1 + .../RetryOnInvalidatedSessionTest.java | 3 + 16 files changed, 230 insertions(+), 49 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7eca4c6d5f0..ee28d7f8a66 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -53,6 +53,7 @@ jobs: env: JOB_TYPE: test GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS: true + GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS_PARTITIONED_OPS: true units-java8: # Building using Java 17 and run the tests with Java 8 runtime name: "units (8)" @@ -92,6 +93,7 @@ jobs: env: JOB_TYPE: test GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS: true + GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS_PARTITIONED_OPS: true windows: runs-on: windows-latest steps: diff --git a/.kokoro/presubmit/integration-multiplexed-sessions-enabled.cfg b/.kokoro/presubmit/integration-multiplexed-sessions-enabled.cfg index 771405de422..49edd2e8df6 100644 --- a/.kokoro/presubmit/integration-multiplexed-sessions-enabled.cfg +++ b/.kokoro/presubmit/integration-multiplexed-sessions-enabled.cfg @@ -36,3 +36,8 @@ env_vars: { key: "GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS" value: "true" } + +env_vars: { + key: "GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS_PARTITIONED_OPS" + value: "true" +} diff --git a/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/SessionPoolOptionsHelper.java b/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/SessionPoolOptionsHelper.java index 8e085947711..f19cb8f4a2f 100644 --- a/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/SessionPoolOptionsHelper.java +++ b/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/SessionPoolOptionsHelper.java @@ -44,4 +44,12 @@ public static SessionPoolOptions.Builder setUseMultiplexedSessionForRW( SessionPoolOptions.Builder sessionPoolOptionsBuilder, boolean useMultiplexedSessionForRW) { return sessionPoolOptionsBuilder.setUseMultiplexedSessionForRW(useMultiplexedSessionForRW); } + + // TODO: Remove when multiplexed session for partitioned operations are released. + public static SessionPoolOptions.Builder setUseMultiplexedSessionForPartitionedOperations( + SessionPoolOptions.Builder sessionPoolOptionsBuilder, + boolean useMultiplexedSessionForPartitionedOps) { + return sessionPoolOptionsBuilder.setUseMultiplexedSessionPartitionedOps( + useMultiplexedSessionForPartitionedOps); + } } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbstractMultiplexedSessionDatabaseClient.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbstractMultiplexedSessionDatabaseClient.java index ebfb0e0a774..10ab997d88a 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbstractMultiplexedSessionDatabaseClient.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbstractMultiplexedSessionDatabaseClient.java @@ -19,7 +19,6 @@ import com.google.api.gax.rpc.ServerStream; import com.google.cloud.Timestamp; import com.google.cloud.spanner.Options.TransactionOption; -import com.google.cloud.spanner.Options.UpdateOption; import com.google.spanner.v1.BatchWriteResponse; /** @@ -51,9 +50,4 @@ public ServerStream batchWriteAtLeastOnce( throws SpannerException { throw new UnsupportedOperationException(); } - - @Override - public long executePartitionedUpdate(Statement stmt, UpdateOption... options) { - throw new UnsupportedOperationException(); - } } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/BatchClientImpl.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/BatchClientImpl.java index 3d886dd383b..a250fd5ba39 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/BatchClientImpl.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/BatchClientImpl.java @@ -30,16 +30,50 @@ import com.google.spanner.v1.PartitionReadRequest; import com.google.spanner.v1.PartitionResponse; import com.google.spanner.v1.TransactionSelector; +import java.time.Clock; +import java.time.Duration; +import java.time.Instant; import java.util.List; import java.util.Map; +import java.util.concurrent.atomic.AtomicReference; +import java.util.concurrent.locks.ReentrantLock; import javax.annotation.Nullable; +import javax.annotation.concurrent.GuardedBy; /** Default implementation for Batch Client interface. */ public class BatchClientImpl implements BatchClient { private final SessionClient sessionClient; - BatchClientImpl(SessionClient sessionClient) { + private final boolean isMultiplexedSessionEnabled; + + /** Lock to protect the multiplexed session. */ + private final ReentrantLock multiplexedSessionLock = new ReentrantLock(); + + /** The duration before we try to replace the multiplexed session. The default is 7 days. */ + private final Duration sessionExpirationDuration; + + /** The expiration date/time of the current multiplexed session. */ + @GuardedBy("multiplexedSessionLock") + private final AtomicReference expirationDate; + + @GuardedBy("multiplexedSessionLock") + private final AtomicReference multiplexedSessionReference; + + BatchClientImpl(SessionClient sessionClient, boolean isMultiplexedSessionEnabled) { this.sessionClient = checkNotNull(sessionClient); + this.isMultiplexedSessionEnabled = isMultiplexedSessionEnabled; + this.sessionExpirationDuration = + Duration.ofMillis( + sessionClient + .getSpanner() + .getOptions() + .getSessionPoolOptions() + .getMultiplexedSessionMaintenanceDuration() + .toMillis()); + // Initialize the expiration date to the start of time to avoid unnecessary null checks. + // This also ensured that a new session is created on first request. + this.expirationDate = new AtomicReference<>(Instant.MIN); + this.multiplexedSessionReference = new AtomicReference<>(); } @Override @@ -50,7 +84,12 @@ public String getDatabaseRole() { @Override public BatchReadOnlyTransaction batchReadOnlyTransaction(TimestampBound bound) { - SessionImpl session = sessionClient.createSession(); + SessionImpl session; + if (isMultiplexedSessionEnabled) { + session = getMultiplexedSession(); + } else { + session = sessionClient.createSession(); + } return new BatchReadOnlyTransactionImpl( MultiUseReadOnlyTransaction.newBuilder() .setSession(session) @@ -92,6 +131,20 @@ public BatchReadOnlyTransaction batchReadOnlyTransaction(BatchTransactionId batc batchTransactionId); } + private SessionImpl getMultiplexedSession() { + this.multiplexedSessionLock.lock(); + try { + if (Clock.systemUTC().instant().isAfter(this.expirationDate.get()) + || this.multiplexedSessionReference.get() == null) { + this.multiplexedSessionReference.set(this.sessionClient.createMultiplexedSession()); + this.expirationDate.set(Clock.systemUTC().instant().plus(this.sessionExpirationDuration)); + } + return this.multiplexedSessionReference.get(); + } finally { + this.multiplexedSessionLock.unlock(); + } + } + private static class BatchReadOnlyTransactionImpl extends MultiUseReadOnlyTransaction implements BatchReadOnlyTransaction { private final String sessionName; diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClientImpl.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClientImpl.java index d7f16f89524..f571354dacb 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClientImpl.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClientImpl.java @@ -36,6 +36,7 @@ class DatabaseClientImpl implements DatabaseClient { @VisibleForTesting final String clientId; @VisibleForTesting final SessionPool pool; @VisibleForTesting final MultiplexedSessionDatabaseClient multiplexedSessionDatabaseClient; + @VisibleForTesting final boolean useMultiplexedSessionPartitionedOps; @VisibleForTesting final boolean useMultiplexedSessionForRW; final boolean useMultiplexedSessionBlindWrite; @@ -47,6 +48,7 @@ class DatabaseClientImpl implements DatabaseClient { pool, /* useMultiplexedSessionBlindWrite = */ false, /* multiplexedSessionDatabaseClient = */ null, + /* useMultiplexedSessionPartitionedOps= */ false, tracer, /* useMultiplexedSessionForRW = */ false); } @@ -58,6 +60,7 @@ class DatabaseClientImpl implements DatabaseClient { pool, /* useMultiplexedSessionBlindWrite = */ false, /* multiplexedSessionDatabaseClient = */ null, + /* useMultiplexedSessionPartitionedOps= */ false, tracer, /* useMultiplexedSessionForRW = */ false); } @@ -67,12 +70,14 @@ class DatabaseClientImpl implements DatabaseClient { SessionPool pool, boolean useMultiplexedSessionBlindWrite, @Nullable MultiplexedSessionDatabaseClient multiplexedSessionDatabaseClient, + boolean useMultiplexedSessionPartitionedOps, TraceWrapper tracer, boolean useMultiplexedSessionForRW) { this.clientId = clientId; this.pool = pool; this.useMultiplexedSessionBlindWrite = useMultiplexedSessionBlindWrite; this.multiplexedSessionDatabaseClient = multiplexedSessionDatabaseClient; + this.useMultiplexedSessionPartitionedOps = useMultiplexedSessionPartitionedOps; this.tracer = tracer; this.useMultiplexedSessionForRW = useMultiplexedSessionForRW; } @@ -309,6 +314,14 @@ public AsyncTransactionManager transactionManagerAsync(TransactionOption... opti @Override public long executePartitionedUpdate(final Statement stmt, final UpdateOption... options) { + if (useMultiplexedSessionPartitionedOps) { + return getMultiplexedSession().executePartitionedUpdate(stmt, options); + } + return executePartitionedUpdateWithPooledSession(stmt, options); + } + + private long executePartitionedUpdateWithPooledSession( + final Statement stmt, final UpdateOption... options) { ISpan span = tracer.spanBuilder(PARTITION_DML_TRANSACTION); try (IScope s = tracer.withSpan(span)) { return runWithSessionRetry(session -> session.executePartitionedUpdate(stmt, options)); diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DelayedMultiplexedSessionTransaction.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DelayedMultiplexedSessionTransaction.java index ad3e6b0cf70..0193805cbeb 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DelayedMultiplexedSessionTransaction.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DelayedMultiplexedSessionTransaction.java @@ -24,6 +24,7 @@ import com.google.cloud.spanner.DelayedReadContext.DelayedReadOnlyTransaction; import com.google.cloud.spanner.MultiplexedSessionDatabaseClient.MultiplexedSessionTransaction; import com.google.cloud.spanner.Options.TransactionOption; +import com.google.cloud.spanner.Options.UpdateOption; import com.google.common.util.concurrent.MoreExecutors; import java.util.concurrent.ExecutionException; @@ -224,4 +225,16 @@ private SessionReference getSessionReference() { throw SpannerExceptionFactory.propagateInterrupt(interruptedException); } } + + /** + * Execute `stmt` within PARTITIONED_DML transaction using multiplexed session. This method is a + * blocking call as the interface expects to return the output of the `stmt`. + */ + @Override + public long executePartitionedUpdate(Statement stmt, UpdateOption... options) { + SessionReference sessionReference = getSessionReference(); + return new MultiplexedSessionTransaction( + client, span, sessionReference, NO_CHANNEL_HINT, /* singleUse = */ true) + .executePartitionedUpdate(stmt, options); + } } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/MultiplexedSessionDatabaseClient.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/MultiplexedSessionDatabaseClient.java index bd709adbd99..01f41a2dfdc 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/MultiplexedSessionDatabaseClient.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/MultiplexedSessionDatabaseClient.java @@ -24,6 +24,7 @@ import com.google.api.core.SettableApiFuture; import com.google.cloud.Timestamp; import com.google.cloud.spanner.Options.TransactionOption; +import com.google.cloud.spanner.Options.UpdateOption; import com.google.cloud.spanner.SessionClient.SessionConsumer; import com.google.cloud.spanner.SpannerException.ResourceNotFoundException; import com.google.common.annotations.VisibleForTesting; @@ -553,6 +554,12 @@ public AsyncTransactionManager transactionManagerAsync(TransactionOption... opti .transactionManagerAsync(options); } + @Override + public long executePartitionedUpdate(Statement stmt, UpdateOption... options) { + return createMultiplexedSessionTransaction(/* singleUse = */ true) + .executePartitionedUpdate(stmt, options); + } + /** * It is enough with one executor to maintain the multiplexed sessions in all the clients, as they * do not need to be updated often, and the maintenance task is light. The core pool size is set diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionClient.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionClient.java index 0eed13b018c..a3cbbf33826 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionClient.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionClient.java @@ -237,6 +237,19 @@ SessionImpl createSession() { * @param consumer The {@link SessionConsumer} to use for callbacks when sessions are available. */ void createMultiplexedSession(SessionConsumer consumer) { + try { + SessionImpl sessionImpl = createMultiplexedSession(); + consumer.onSessionReady(sessionImpl); + } catch (Throwable t) { + consumer.onSessionCreateFailure(t, 1); + } + } + + /** + * Creates a multiplexed session and returns it. A multiplexed session is not affiliated with any + * GRPC channel. In case of an error during the gRPC calls, an exception will be thrown. + */ + SessionImpl createMultiplexedSession() { ISpan span = spanner.getTracer().spanBuilder(SpannerImpl.CREATE_MULTIPLEXED_SESSION); try (IScope s = spanner.getTracer().withSpan(span)) { com.google.spanner.v1.Session session = @@ -253,10 +266,12 @@ void createMultiplexedSession(SessionConsumer consumer) { spanner, new SessionReference( session.getName(), session.getCreateTime(), session.getMultiplexed(), null)); - consumer.onSessionReady(sessionImpl); + span.addAnnotation( + String.format("Request for %d multiplexed session returned %d session", 1, 1)); + return sessionImpl; } catch (Throwable t) { span.setStatus(t); - consumer.onSessionCreateFailure(t, 1); + throw t; } finally { span.end(); } @@ -289,31 +304,7 @@ private CreateMultiplexedSessionsRunnable(SessionConsumer consumer) { @Override public void run() { - ISpan span = spanner.getTracer().spanBuilder(SpannerImpl.CREATE_MULTIPLEXED_SESSION); - try (IScope s = spanner.getTracer().withSpan(span)) { - com.google.spanner.v1.Session session = - spanner - .getRpc() - .createSession( - db.getName(), - spanner.getOptions().getDatabaseRole(), - spanner.getOptions().getSessionLabels(), - null, - true); - SessionImpl sessionImpl = - new SessionImpl( - spanner, - new SessionReference( - session.getName(), session.getCreateTime(), session.getMultiplexed(), null)); - span.addAnnotation( - String.format("Request for %d multiplexed session returned %d session", 1, 1)); - consumer.onSessionReady(sessionImpl); - } catch (Throwable t) { - span.setStatus(t); - consumer.onSessionCreateFailure(t, 1); - } finally { - span.end(); - } + createMultiplexedSession(consumer); } } 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 d4f3e598b11..a691f14817f 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 @@ -85,6 +85,9 @@ public class SessionPoolOptions { private final boolean useMultiplexedSessionForRW; + private final boolean useMultiplexedSessionForPartitionedOps; + + // TODO: Change to use java.time.Duration. private final Duration multiplexedSessionMaintenanceDuration; private SessionPoolOptions(Builder builder) { @@ -127,6 +130,14 @@ private SessionPoolOptions(Builder builder) { (useMultiplexedSessionForRWFromEnvVariable != null) ? useMultiplexedSessionForRWFromEnvVariable : builder.useMultiplexedSessionForRW; + // useMultiplexedSessionPartitionedOps priority => Environment var > private setter > client + // default + Boolean useMultiplexedSessionFromEnvVariablePartitionedOps = + getUseMultiplexedSessionFromEnvVariablePartitionedOps(); + this.useMultiplexedSessionForPartitionedOps = + (useMultiplexedSessionFromEnvVariablePartitionedOps != null) + ? useMultiplexedSessionFromEnvVariablePartitionedOps + : builder.useMultiplexedSessionPartitionedOps; this.multiplexedSessionMaintenanceDuration = builder.multiplexedSessionMaintenanceDuration; } @@ -349,17 +360,31 @@ public boolean getUseMultiplexedSessionForRW() { return getUseMultiplexedSession() && useMultiplexedSessionForRW; } + @VisibleForTesting + @InternalApi + public boolean getUseMultiplexedSessionPartitionedOps() { + return useMultiplexedSessionForPartitionedOps; + } + private static Boolean getUseMultiplexedSessionFromEnvVariable() { - String useMultiplexedSessionFromEnvVariable = - System.getenv("GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS"); - if (useMultiplexedSessionFromEnvVariable != null - && useMultiplexedSessionFromEnvVariable.length() > 0) { - if ("true".equalsIgnoreCase(useMultiplexedSessionFromEnvVariable) - || "false".equalsIgnoreCase(useMultiplexedSessionFromEnvVariable)) { - return Boolean.parseBoolean(useMultiplexedSessionFromEnvVariable); + return parseBooleanEnvVariable("GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS"); + } + + @VisibleForTesting + @InternalApi + protected static Boolean getUseMultiplexedSessionFromEnvVariablePartitionedOps() { + // Checks the value of env, GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS_PARTITIONED_OPS + // This returns null until Partitioned Operations is supported. + return null; + } + + private static Boolean parseBooleanEnvVariable(String variableName) { + String envVariable = System.getenv(variableName); + if (envVariable != null && envVariable.length() > 0) { + if ("true".equalsIgnoreCase(envVariable) || "false".equalsIgnoreCase(envVariable)) { + return Boolean.parseBoolean(envVariable); } else { - throw new IllegalArgumentException( - "GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS should be either true or false."); + throw new IllegalArgumentException(variableName + " should be either true or false."); } } return null; @@ -585,6 +610,12 @@ public static class Builder { // default. private boolean useMultiplexedSessionForRW = false; + // This field controls the default behavior of session management for Partitioned operations in + // Java client. + // Set useMultiplexedSessionPartitionedOps to true to make multiplexed session for Partitioned + // operations the default. + private boolean useMultiplexedSessionPartitionedOps = false; + private Duration multiplexedSessionMaintenanceDuration = Duration.ofDays(7); private Clock poolMaintainerClock = Clock.INSTANCE; @@ -628,6 +659,7 @@ private Builder(SessionPoolOptions options) { this.useMultiplexedSession = options.useMultiplexedSession; this.useMultiplexedSessionBlindWrite = options.useMultiplexedSessionBlindWrite; this.useMultiplexedSessionForRW = options.useMultiplexedSessionForRW; + this.useMultiplexedSessionPartitionedOps = options.useMultiplexedSessionForPartitionedOps; this.multiplexedSessionMaintenanceDuration = options.multiplexedSessionMaintenanceDuration; this.poolMaintainerClock = options.poolMaintainerClock; } @@ -847,6 +879,15 @@ Builder setUseMultiplexedSessionForRW(boolean useMultiplexedSessionForRW) { return this; } + /** + * Sets whether the client should use multiplexed session for Partitioned operations or not. + * This method is intentionally package-private and intended for internal use. + */ + Builder setUseMultiplexedSessionPartitionedOps(boolean useMultiplexedSessionPartitionedOps) { + this.useMultiplexedSessionPartitionedOps = useMultiplexedSessionPartitionedOps; + return this; + } + @VisibleForTesting Builder setMultiplexedSessionMaintenanceDuration( Duration multiplexedSessionMaintenanceDuration) { 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 1348d586e3a..ed815c77088 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 @@ -52,6 +52,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicLong; +import java.util.concurrent.locks.ReentrantLock; import java.util.logging.Level; import java.util.logging.Logger; import javax.annotation.Nullable; @@ -107,6 +108,11 @@ private static String nextDatabaseClientId(DatabaseId databaseId) { @GuardedBy("this") private final Map dbClients = new HashMap<>(); + @GuardedBy("dbBatchClientLock") + private final Map dbBatchClients = new HashMap<>(); + + private final ReentrantLock dbBatchClientLock = new ReentrantLock(); + private final CloseableExecutorProvider asyncExecutorProvider; @GuardedBy("this") @@ -308,6 +314,7 @@ public DatabaseClient getDatabaseClient(DatabaseId db) { pool, getOptions().getSessionPoolOptions().getUseMultiplexedSessionBlindWrite(), multiplexedSessionDatabaseClient, + getOptions().getSessionPoolOptions().getUseMultiplexedSessionPartitionedOps(), useMultiplexedSessionForRW); dbClients.put(db, dbClient); return dbClient; @@ -321,19 +328,37 @@ DatabaseClientImpl createDatabaseClient( SessionPool pool, boolean useMultiplexedSessionBlindWrite, @Nullable MultiplexedSessionDatabaseClient multiplexedSessionClient, + boolean useMultiplexedSessionPartitionedOps, boolean useMultiplexedSessionForRW) { return new DatabaseClientImpl( clientId, pool, useMultiplexedSessionBlindWrite, multiplexedSessionClient, + useMultiplexedSessionPartitionedOps, tracer, useMultiplexedSessionForRW); } @Override public BatchClient getBatchClient(DatabaseId db) { - return new BatchClientImpl(getSessionClient(db)); + if (getOptions().getSessionPoolOptions().getUseMultiplexedSessionPartitionedOps()) { + this.dbBatchClientLock.lock(); + try { + if (this.dbBatchClients.containsKey(db)) { + return this.dbBatchClients.get(db); + } + BatchClientImpl batchClient = + new BatchClientImpl( + getSessionClient(db), /*useMultiplexedSessionPartitionedOps=*/ true); + this.dbBatchClients.put(db, batchClient); + return batchClient; + } finally { + this.dbBatchClientLock.unlock(); + } + } + return new BatchClientImpl( + getSessionClient(db), /*useMultiplexedSessionPartitionedOps=*/ false); } @Override diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BatchClientImplTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BatchClientImplTest.java index 8d05df538a5..edafc7ddba9 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BatchClientImplTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BatchClientImplTest.java @@ -36,6 +36,7 @@ import com.google.spanner.v1.Session; import com.google.spanner.v1.Transaction; import io.opentelemetry.api.OpenTelemetry; +import java.time.Duration; import java.util.Collections; import java.util.Map; import org.junit.Before; @@ -56,6 +57,7 @@ public final class BatchClientImplTest { private static final String SESSION_NAME = DB_NAME + "/sessions/s1"; private static final ByteString TXN_ID = ByteString.copyFromUtf8("my-txn"); private static final String TIMESTAMP = "2017-11-15T10:54:20Z"; + private static boolean isMultiplexedSession = false; @Mock private SpannerRpc gapicRpc; @Mock private SpannerOptions spannerOptions; @@ -68,6 +70,11 @@ public final class BatchClientImplTest { public static void setupOpenTelemetry() { SpannerOptions.resetActiveTracingFramework(); SpannerOptions.enableOpenTelemetryTraces(); + Boolean useMultiplexedSessionFromEnvVariablePartitionedOps = + SessionPoolOptions.getUseMultiplexedSessionFromEnvVariablePartitionedOps(); + isMultiplexedSession = + useMultiplexedSessionFromEnvVariablePartitionedOps != null + && useMultiplexedSessionFromEnvVariablePartitionedOps; } @SuppressWarnings("unchecked") @@ -88,18 +95,32 @@ public void setUp() { when(spannerOptions.getTransportOptions()).thenReturn(transportOptions); SessionPoolOptions sessionPoolOptions = mock(SessionPoolOptions.class); when(sessionPoolOptions.getPoolMaintainerClock()).thenReturn(Clock.INSTANCE); + when(sessionPoolOptions.getUseMultiplexedSessionPartitionedOps()) + .thenReturn(isMultiplexedSession); + when(sessionPoolOptions.getMultiplexedSessionMaintenanceDuration()).thenReturn(Duration.ZERO); when(spannerOptions.getSessionPoolOptions()).thenReturn(sessionPoolOptions); @SuppressWarnings("resource") SpannerImpl spanner = new SpannerImpl(gapicRpc, spannerOptions); - client = new BatchClientImpl(spanner.getSessionClient(db)); + client = new BatchClientImpl(spanner.getSessionClient(db), isMultiplexedSession); } @SuppressWarnings("unchecked") @Test public void testBatchReadOnlyTxnWithBound() throws Exception { - Session sessionProto = Session.newBuilder().setName(SESSION_NAME).build(); - when(gapicRpc.createSession(eq(DB_NAME), anyString(), anyMap(), optionsCaptor.capture())) - .thenReturn(sessionProto); + Session sessionProto = + Session.newBuilder().setName(SESSION_NAME).setMultiplexed(isMultiplexedSession).build(); + if (isMultiplexedSession) { + when(gapicRpc.createSession( + eq(DB_NAME), + anyString(), + anyMap(), + optionsCaptor.capture(), + eq(isMultiplexedSession))) + .thenReturn(sessionProto); + } else { + when(gapicRpc.createSession(eq(DB_NAME), anyString(), anyMap(), optionsCaptor.capture())) + .thenReturn(sessionProto); + } com.google.protobuf.Timestamp timestamp = Timestamps.parse(TIMESTAMP); Transaction txnMetadata = Transaction.newBuilder().setId(TXN_ID).setReadTimestamp(timestamp).build(); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BatchTransactionIdTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BatchTransactionIdTest.java index cf431348ce5..81d4de41695 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BatchTransactionIdTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BatchTransactionIdTest.java @@ -50,5 +50,8 @@ public void serialization() { reserializeAndAssert( new BatchTransactionId( "testSession", ByteString.copyFromUtf8("testTxn"), Timestamp.MIN_VALUE)); + reserializeAndAssert( + new BatchTransactionId( + "testSession", ByteString.copyFromUtf8("testTxn"), Timestamp.MIN_VALUE)); } } diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/IntegrationTestWithClosedSessionsEnv.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/IntegrationTestWithClosedSessionsEnv.java index 6deca476fc3..72cfe0bfe44 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/IntegrationTestWithClosedSessionsEnv.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/IntegrationTestWithClosedSessionsEnv.java @@ -51,6 +51,7 @@ DatabaseClientImpl createDatabaseClient( SessionPool pool, boolean useMultiplexedSessionBlindWriteIgnore, MultiplexedSessionDatabaseClient ignore, + boolean useMultiplexedSessionPartitionedOpsIgnore, boolean useMultiplexedSessionForRWIgnore) { return new DatabaseClientWithClosedSessionImpl(clientId, pool, tracer); } diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MultiplexedSessionDatabaseClientMockServerTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MultiplexedSessionDatabaseClientMockServerTest.java index 9f3d0751471..3121b868b83 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MultiplexedSessionDatabaseClientMockServerTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MultiplexedSessionDatabaseClientMockServerTest.java @@ -95,6 +95,7 @@ public void createSpannerInstance() { .setUseMultiplexedSession(true) .setUseMultiplexedSessionBlindWrite(true) .setUseMultiplexedSessionForRW(true) + .setUseMultiplexedSessionPartitionedOps(true) // Set the maintainer to loop once every 1ms .setMultiplexedSessionMaintenanceLoopFrequency(Duration.ofMillis(1L)) // Set multiplexed sessions to be replaced once every 1ms diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryOnInvalidatedSessionTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryOnInvalidatedSessionTest.java index 42a62be33aa..3032a1cae40 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryOnInvalidatedSessionTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryOnInvalidatedSessionTest.java @@ -1273,6 +1273,9 @@ public void transactionManagerReadRowUsingIndexInvalidatedDuringTransaction() @Test public void partitionedDml() throws InterruptedException { + assumeFalse( + "Multiplexed session do not throw a SessionNotFound errors. ", + spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionPartitionedOps()); assertThrowsSessionNotFoundIfShouldFail( () -> client.executePartitionedUpdate(UPDATE_STATEMENT)); } From 10912a669c084a79694c05fba7ecc8b834b6e81b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Knut=20Olav=20L=C3=B8ite?= Date: Mon, 9 Dec 2024 17:09:16 +0100 Subject: [PATCH 2/7] test: enable more tests on the Emulator (#3535) Multiple tests were skipped on the Emulator, because the features that are covered by these tests were originally not supported on the Emulator. These features are now available on the Emulator, and the tests can be enabled. --- .../it/ITAsyncTransactionRetryTest.java | 6 - .../cloud/spanner/it/ITBatchReadTest.java | 62 +++---- .../google/cloud/spanner/it/ITDMLTest.java | 27 +-- .../cloud/spanner/it/ITDatabaseTest.java | 3 - .../cloud/spanner/it/ITDmlReturningTest.java | 28 ++- .../cloud/spanner/it/ITFloat32Test.java | 4 - .../it/ITForeignKeyDeleteCascadeTest.java | 174 ++++++++---------- .../cloud/spanner/it/ITJsonWriteReadTest.java | 26 +-- .../cloud/spanner/it/ITLargeReadTest.java | 41 ++--- .../cloud/spanner/it/ITPgJsonbTest.java | 38 ++-- .../cloud/spanner/it/ITPgNumericTest.java | 48 ++--- 11 files changed, 175 insertions(+), 282 deletions(-) diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/it/ITAsyncTransactionRetryTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/it/ITAsyncTransactionRetryTest.java index fa44ad6f5d9..744d7042df4 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/it/ITAsyncTransactionRetryTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/it/ITAsyncTransactionRetryTest.java @@ -17,10 +17,8 @@ package com.google.cloud.spanner.connection.it; import static com.google.cloud.spanner.SpannerApiFutures.get; -import static com.google.cloud.spanner.testing.EmulatorSpannerHelper.isUsingEmulator; import static com.google.common.truth.Truth.assertThat; import static org.junit.Assert.fail; -import static org.junit.Assume.assumeFalse; import com.google.api.core.ApiFuture; import com.google.api.core.SettableApiFuture; @@ -580,7 +578,6 @@ public void testAbortWithResultSetFullyConsumed() { @Test public void testAbortWithConcurrentInsert() { - assumeFalse("concurrent transactions are not supported on the emulator", isUsingEmulator()); AbortInterceptor interceptor = new AbortInterceptor(0); try (ITConnection connection = createConnection(interceptor, new CountTransactionRetryListener())) { @@ -632,7 +629,6 @@ public void testAbortWithConcurrentInsert() { @Test public void testAbortWithConcurrentDelete() { - assumeFalse("concurrent transactions are not supported on the emulator", isUsingEmulator()); AbortInterceptor interceptor = new AbortInterceptor(0); // first insert two test records try (ITConnection connection = createConnection()) { @@ -686,7 +682,6 @@ public void testAbortWithConcurrentDelete() { @Test public void testAbortWithConcurrentUpdate() { - assumeFalse("concurrent transactions are not supported on the emulator", isUsingEmulator()); AbortInterceptor interceptor = new AbortInterceptor(0); // first insert two test records try (ITConnection connection = createConnection()) { @@ -746,7 +741,6 @@ public void testAbortWithConcurrentUpdate() { */ @Test public void testAbortWithUnseenConcurrentInsert() throws InterruptedException { - assumeFalse("concurrent transactions are not supported on the emulator", isUsingEmulator()); AbortInterceptor interceptor = new AbortInterceptor(0); try (ITConnection connection = createConnection(interceptor, new CountTransactionRetryListener())) { 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 6598a3dca76..f028fbc2b15 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 @@ -19,11 +19,9 @@ import static com.google.cloud.spanner.connection.ITAbstractSpannerTest.extractConnectionUrl; import static com.google.cloud.spanner.connection.ITAbstractSpannerTest.getKeyFile; import static com.google.cloud.spanner.connection.ITAbstractSpannerTest.hasValidKeyFile; -import static com.google.cloud.spanner.testing.EmulatorSpannerHelper.isUsingEmulator; import static com.google.common.truth.Truth.assertThat; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; -import static org.junit.Assume.assumeFalse; import com.google.cloud.ByteArray; import com.google.cloud.Timestamp; @@ -96,10 +94,7 @@ public class ITBatchReadTest { public static List data() { List params = new ArrayList<>(); params.add(new DialectTestParameter(Dialect.GOOGLE_STANDARD_SQL)); - // PG dialect tests are not supported by the emulator - if (!isUsingEmulator()) { - params.add(new DialectTestParameter(Dialect.POSTGRESQL)); - } + params.add(new DialectTestParameter(Dialect.POSTGRESQL)); return params; } @@ -135,30 +130,28 @@ public static void setUpDatabase() throws Exception { List databaseClients = new ArrayList<>(); databaseClients.add(env.getTestHelper().getDatabaseClient(googleStandardDatabase)); - if (!isUsingEmulator()) { - postgreSQLDatabase = - env.getTestHelper().createTestDatabase(Dialect.POSTGRESQL, Collections.emptyList()); - env.getTestHelper() - .getClient() - .getDatabaseAdminClient() - .updateDatabaseDdl( - env.getTestHelper().getInstanceId().getInstance(), - postgreSQLDatabase.getId().getDatabase(), - ImmutableList.of( - "CREATE TABLE " - + TABLE_NAME - + " (" - + " Key bigint not null primary key," - + " Data bytea," - + " Fingerprint bigint," - + " Size bigint" - + ")", - "CREATE INDEX " + INDEX_NAME + " ON " + TABLE_NAME + "(Fingerprint)"), - null) - .get(); - postgreSQLBatchClient = env.getTestHelper().getBatchClient(postgreSQLDatabase); - databaseClients.add(env.getTestHelper().getDatabaseClient(postgreSQLDatabase)); - } + postgreSQLDatabase = + env.getTestHelper().createTestDatabase(Dialect.POSTGRESQL, Collections.emptyList()); + env.getTestHelper() + .getClient() + .getDatabaseAdminClient() + .updateDatabaseDdl( + env.getTestHelper().getInstanceId().getInstance(), + postgreSQLDatabase.getId().getDatabase(), + ImmutableList.of( + "CREATE TABLE " + + TABLE_NAME + + " (" + + " Key bigint not null primary key," + + " Data bytea," + + " Fingerprint bigint," + + " Size bigint" + + ")", + "CREATE INDEX " + INDEX_NAME + " ON " + TABLE_NAME + "(Fingerprint)"), + null) + .get(); + postgreSQLBatchClient = env.getTestHelper().getBatchClient(postgreSQLDatabase); + databaseClients.add(env.getTestHelper().getDatabaseClient(postgreSQLDatabase)); List rows = manyRows(); numRows = rows.size(); @@ -210,9 +203,6 @@ private Database getDatabase() { @Test public void read() { - assumeFalse( - "PostgreSQL does not support the PartitionRead RPC", dialect.dialect == Dialect.POSTGRESQL); - BitSet seenRows = new BitSet(numRows); TimestampBound bound = getRandomBound(); PartitionOptions partitionParams = getRandomPartitionOptions(); @@ -229,9 +219,6 @@ public void read() { @Test public void readUsingIndex() { - assumeFalse( - "PostgreSQL does not support the PartitionRead RPC", dialect.dialect == Dialect.POSTGRESQL); - TimestampBound bound = getRandomBound(); PartitionOptions partitionParams = getRandomPartitionOptions(); batchTxn = getBatchClient().batchReadOnlyTransaction(bound); @@ -258,8 +245,6 @@ public void readUsingIndex() { @Test public void dataBoostRead() { - assumeFalse("Emulator does not support data boost read", isUsingEmulator()); - BitSet seenRows = new BitSet(numRows); TimestampBound bound = getRandomBound(); PartitionOptions partitionParams = getRandomPartitionOptions(); @@ -312,7 +297,6 @@ private PartitionOptions getRandomPartitionOptions() { @Test public void dataBoostQuery() { - assumeFalse("Emulator does not support data boost query", isUsingEmulator()); BitSet seenRows = new BitSet(numRows); TimestampBound bound = getRandomBound(); PartitionOptions partitionParams = getRandomPartitionOptions(); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITDMLTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITDMLTest.java index 5ea30912103..ab3c8e24a8c 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITDMLTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITDMLTest.java @@ -16,14 +16,12 @@ package com.google.cloud.spanner.it; -import static com.google.cloud.spanner.testing.EmulatorSpannerHelper.isUsingEmulator; import static com.google.common.truth.Truth.assertThat; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; -import static org.junit.Assume.assumeFalse; import com.google.cloud.spanner.AbortedException; import com.google.cloud.spanner.Database; @@ -90,15 +88,13 @@ public static void setUpDatabase() { + " V INT64," + ") PRIMARY KEY (K)"); googleStandardSQLClient = env.getTestHelper().getDatabaseClient(googleStandardSQLDatabase); - if (!isUsingEmulator()) { - Database postgreSQLDatabase = - env.getTestHelper() - .createTestDatabase( - Dialect.POSTGRESQL, - Arrays.asList( - "CREATE TABLE T (" + " K VARCHAR PRIMARY KEY," + " V BIGINT" + ")")); - postgreSQLClient = env.getTestHelper().getDatabaseClient(postgreSQLDatabase); - } + Database postgreSQLDatabase = + env.getTestHelper() + .createTestDatabase( + Dialect.POSTGRESQL, + Arrays.asList( + "CREATE TABLE T (" + " K VARCHAR PRIMARY KEY," + " V BIGINT" + ")")); + postgreSQLClient = env.getTestHelper().getDatabaseClient(postgreSQLDatabase); } @AfterClass @@ -122,10 +118,7 @@ public void increaseTestIdAndDeleteTestData() { public static List data() { List params = new ArrayList<>(); params.add(new DialectTestParameter(Dialect.GOOGLE_STANDARD_SQL)); - // "PG dialect tests are not supported by the emulator" - if (!isUsingEmulator()) { - params.add(new DialectTestParameter(Dialect.POSTGRESQL)); - } + params.add(new DialectTestParameter(Dialect.POSTGRESQL)); return params; } @@ -389,10 +382,6 @@ public void standardDMLWithExecuteSQL() { @Test public void testUntypedNullValues() { - assumeFalse( - "Spanner PostgreSQL does not yet support untyped null values", - dialect.dialect == Dialect.POSTGRESQL); - DatabaseClient client = getClient(dialect.dialect); String sql; if (dialect.dialect == Dialect.POSTGRESQL) { diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITDatabaseTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITDatabaseTest.java index f9230b8836b..b9813d512fd 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITDatabaseTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITDatabaseTest.java @@ -20,7 +20,6 @@ import static com.google.common.truth.Truth.assertThat; import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; -import static org.junit.Assume.assumeFalse; import com.google.api.client.util.ExponentialBackOff; import com.google.api.gax.longrunning.OperationFuture; @@ -182,8 +181,6 @@ public void instanceNotFound() { @Test public void testNumericPrimaryKey() { - assumeFalse("Emulator does not support numeric primary keys", isUsingEmulator()); - final String table = "NumericTable"; // Creates table with numeric primary key diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITDmlReturningTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITDmlReturningTest.java index 8cb465e4c84..f54365ba84d 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITDmlReturningTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITDmlReturningTest.java @@ -42,7 +42,6 @@ import com.google.cloud.spanner.TransactionRunner; import com.google.cloud.spanner.TransactionRunner.TransactionCallable; import com.google.cloud.spanner.connection.ConnectionOptions; -import com.google.cloud.spanner.testing.EmulatorSpannerHelper; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -75,8 +74,6 @@ public final class ITDmlReturningTest { @BeforeClass public static void setUpDatabase() { - assumeFalse( - "DML Returning is not supported in the emulator", EmulatorSpannerHelper.isUsingEmulator()); Database googleStandardSQLDatabase = env.getTestHelper() .createTestDatabase( @@ -85,18 +82,16 @@ public static void setUpDatabase() { + " V INT64," + ") PRIMARY KEY (K)"); googleStandardSQLClient = env.getTestHelper().getDatabaseClient(googleStandardSQLDatabase); - if (!isUsingEmulator()) { - Database postgreSQLDatabase = - env.getTestHelper() - .createTestDatabase( - Dialect.POSTGRESQL, - Collections.singletonList( - "CREATE TABLE T (" - + " \"K\" VARCHAR PRIMARY KEY," - + " \"V\" BIGINT" - + ")")); - postgreSQLClient = env.getTestHelper().getDatabaseClient(postgreSQLDatabase); - } + Database postgreSQLDatabase = + env.getTestHelper() + .createTestDatabase( + Dialect.POSTGRESQL, + Collections.singletonList( + "CREATE TABLE T (" + + " \"K\" VARCHAR PRIMARY KEY," + + " \"V\" BIGINT" + + ")")); + postgreSQLClient = env.getTestHelper().getDatabaseClient(postgreSQLDatabase); } @AfterClass @@ -222,6 +217,9 @@ private void executeUpdateAsync(long expectedCount, final String... stmts) { @Test public void dmlReturningWithExecutePartitionedUpdate() { + assumeFalse( + "The emulator does not dis-allow THEN RETURN statements for PDML", isUsingEmulator()); + SpannerException e = assertThrows( SpannerException.class, diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITFloat32Test.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITFloat32Test.java index 393c2db8755..1536912f686 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITFloat32Test.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITFloat32Test.java @@ -16,13 +16,11 @@ package com.google.cloud.spanner.it; -import static com.google.cloud.spanner.testing.EmulatorSpannerHelper.isUsingEmulator; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertThrows; import static org.junit.Assert.assertTrue; -import static org.junit.Assume.assumeFalse; import com.google.cloud.Timestamp; import com.google.cloud.spanner.Database; @@ -93,8 +91,6 @@ public static List data() { @BeforeClass public static void setUpDatabase() throws ExecutionException, InterruptedException, TimeoutException { - assumeFalse("Emulator does not support FLOAT32 yet", isUsingEmulator()); - Database googleStandardSQLDatabase = env.getTestHelper().createTestDatabase(GOOGLE_STANDARD_SQL_SCHEMA); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITForeignKeyDeleteCascadeTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITForeignKeyDeleteCascadeTest.java index fc7c860267a..448aab85114 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITForeignKeyDeleteCascadeTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITForeignKeyDeleteCascadeTest.java @@ -15,11 +15,11 @@ */ package com.google.cloud.spanner.it; +import static com.google.cloud.spanner.testing.EmulatorSpannerHelper.isUsingEmulator; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertThrows; import static org.junit.Assert.assertTrue; -import static org.junit.Assume.assumeFalse; import com.google.cloud.spanner.Database; import com.google.cloud.spanner.DatabaseAdminClient; @@ -33,7 +33,6 @@ import com.google.cloud.spanner.ResultSet; import com.google.cloud.spanner.SpannerException; import com.google.cloud.spanner.Statement; -import com.google.cloud.spanner.testing.EmulatorSpannerHelper; import com.google.common.collect.ImmutableList; import java.util.ArrayList; import java.util.Arrays; @@ -68,46 +67,44 @@ public static List data() { private static Database GOOGLE_STANDARD_SQL_DATABASE; private static Database POSTGRESQL_DATABASE; - private static List dbs = new ArrayList<>(); + private static final List dbs = new ArrayList<>(); @Parameterized.Parameter(0) public DialectTestParameter dialect; @BeforeClass public static void setUpDatabase() { - if (!EmulatorSpannerHelper.isUsingEmulator()) { - GOOGLE_STANDARD_SQL_DATABASE = - env.getTestHelper() - .createTestDatabase( - ImmutableList.of( - "CREATE TABLE Singer (\n" - + " singer_id INT64 NOT NULL,\n" - + " first_name STRING(1024),\n" - + ") PRIMARY KEY(singer_id)\n", - "CREATE TABLE Concert (\n" - + " venue_id INT64 NOT NULL,\n" - + " singer_id INT64 NOT NULL,\n" - + " CONSTRAINT Fk_Concert_Singer FOREIGN KEY (singer_id) REFERENCES Singer (singer_id) ON DELETE CASCADE" - + ") PRIMARY KEY(venue_id, singer_id)")); - POSTGRESQL_DATABASE = - env.getTestHelper() - .createTestDatabase( - Dialect.POSTGRESQL, - ImmutableList.of( - "CREATE TABLE Singer (\n" - + " singer_id BIGINT PRIMARY KEY,\n" - + " first_name VARCHAR\n" - + ")", - "CREATE TABLE Concert (\n" - + " venue_id BIGINT NOT NULL,\n" - + " singer_id BIGINT NOT NULL,\n" - + " PRIMARY KEY (venue_id, singer_id),\n" - + " CONSTRAINT Fk_Concert_Singer FOREIGN KEY (singer_id) REFERENCES Singer (singer_id) ON DELETE CASCADE\n" - + " )")); - - dbs.add(GOOGLE_STANDARD_SQL_DATABASE); - dbs.add(POSTGRESQL_DATABASE); - } + GOOGLE_STANDARD_SQL_DATABASE = + env.getTestHelper() + .createTestDatabase( + ImmutableList.of( + "CREATE TABLE Singer (\n" + + " singer_id INT64 NOT NULL,\n" + + " first_name STRING(1024),\n" + + ") PRIMARY KEY(singer_id)\n", + "CREATE TABLE Concert (\n" + + " venue_id INT64 NOT NULL,\n" + + " singer_id INT64 NOT NULL,\n" + + " CONSTRAINT Fk_Concert_Singer FOREIGN KEY (singer_id) REFERENCES Singer (singer_id) ON DELETE CASCADE\n" + + ") PRIMARY KEY(venue_id, singer_id)")); + POSTGRESQL_DATABASE = + env.getTestHelper() + .createTestDatabase( + Dialect.POSTGRESQL, + ImmutableList.of( + "CREATE TABLE Singer (\n" + + " singer_id BIGINT PRIMARY KEY,\n" + + " first_name VARCHAR\n" + + ")", + "CREATE TABLE Concert (\n" + + " venue_id BIGINT NOT NULL,\n" + + " singer_id BIGINT NOT NULL,\n" + + " PRIMARY KEY (venue_id, singer_id),\n" + + " CONSTRAINT \"Fk_Concert_Singer\" FOREIGN KEY (singer_id) REFERENCES Singer (singer_id) ON DELETE CASCADE\n" + + " )")); + + dbs.add(GOOGLE_STANDARD_SQL_DATABASE); + dbs.add(POSTGRESQL_DATABASE); } @AfterClass @@ -120,10 +117,6 @@ public static void tearDown() { @Test public void testForeignKeyDeleteCascadeConstraints_withCreateDDLStatements() { - assumeFalse( - "Emulator does not yet support foreign key delete cascade", - EmulatorSpannerHelper.isUsingEmulator()); - final DatabaseClient databaseClient = getCreatedDatabaseClient(); try (final ResultSet rs = databaseClient @@ -133,17 +126,17 @@ public void testForeignKeyDeleteCascadeConstraints_withCreateDDLStatements() { "SELECT DELETE_RULE\n" + "FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS\n" + "WHERE CONSTRAINT_NAME ='Fk_Concert_Singer'"))) { - while (rs.next()) { - assertEquals(rs.getString(DELETE_RULE_COLUMN_NAME), "CASCADE"); + assertTrue(rs.next()); + // TODO: Enable for the emulator when it returns the correct value for DELETE_RULE. + if (!isUsingEmulator()) { + assertEquals("CASCADE", rs.getString(0)); } + assertFalse(rs.next()); } } @Test public void testForeignKeyDeleteCascadeConstraints_withAlterDDLStatements() throws Exception { - assumeFalse( - "Emulator does not yet support foreign key delete cascade", - EmulatorSpannerHelper.isUsingEmulator()); // Creating new tables within this test to ensure we don't pollute tables used by other tests in // this class. List createStatements; @@ -160,7 +153,7 @@ public void testForeignKeyDeleteCascadeConstraints_withAlterDDLStatements() thro + " PRIMARY KEY (venue_id, singer_id)\n" + " )", "ALTER TABLE ConcertV2 " - + "ADD CONSTRAINT Fk_Concert_Singer_V2 FOREIGN KEY(singer_id) REFERENCES Singer(singer_id) " + + "ADD CONSTRAINT \"Fk_Concert_Singer_V2\" FOREIGN KEY(singer_id) REFERENCES Singer(singer_id) " + "ON DELETE CASCADE"); } else { createStatements = @@ -181,7 +174,7 @@ public void testForeignKeyDeleteCascadeConstraints_withAlterDDLStatements() thro env.getTestHelper().createTestDatabase(dialect.dialect, createStatements); dbs.add(createdDatabase); - final DatabaseClient databaseClient = getCreatedDatabaseClient(); + final DatabaseClient databaseClient = env.getTestHelper().getDatabaseClient(createdDatabase); try (final ResultSet rs = databaseClient @@ -190,10 +183,13 @@ public void testForeignKeyDeleteCascadeConstraints_withAlterDDLStatements() thro Statement.of( "SELECT DELETE_RULE\n" + "FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS\n" - + "WHERE CONSTRAINT_NAME ='Fk_Concert_Singer'"))) { - while (rs.next()) { - assertEquals(rs.getString(DELETE_RULE_COLUMN_NAME), "CASCADE"); + + "WHERE CONSTRAINT_NAME ='Fk_Concert_Singer_V2'"))) { + assertTrue(rs.next()); + // TODO: Enable when the emulator returns the correct value for this column. + if (!isUsingEmulator()) { + assertEquals("CASCADE", rs.getString(0)); } + assertFalse(rs.next()); } // remove the foreign key delete cascade constraint @@ -215,19 +211,15 @@ public void testForeignKeyDeleteCascadeConstraints_withAlterDDLStatements() thro Statement.of( "SELECT DELETE_RULE\n" + "FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS\n" - + "WHERE CONSTRAINT_NAME ='Fk_Concert_Singer_V2'"))) { - while (rs.next()) { - assertEquals(rs.getString(DELETE_RULE_COLUMN_NAME), "NO ACTION"); - } + + "WHERE LOWER(CONSTRAINT_NAME) ='fk_concert_singer_v2'"))) { + assertTrue(rs.next()); + assertEquals("NO ACTION", rs.getString(0)); + assertFalse(rs.next()); } } @Test public void testForeignKeyDeleteCascadeConstraints_verifyValidInsertions() { - assumeFalse( - "Emulator does not yet support foreign key delete cascade", - EmulatorSpannerHelper.isUsingEmulator()); - final DatabaseClient databaseClient = getCreatedDatabaseClient(); final String singerInsertStatement = "INSERT INTO Singer (singer_id, first_name) VALUES (" + generateQueryParameters(2) + ")"; @@ -289,10 +281,6 @@ public void testForeignKeyDeleteCascadeConstraints_verifyValidInsertions() { @Test public void testForeignKeyDeleteCascadeConstraints_verifyInvalidInsertions() { - assumeFalse( - "Emulator does not yet support foreign key delete cascade", - EmulatorSpannerHelper.isUsingEmulator()); - final DatabaseClient databaseClient = getCreatedDatabaseClient(); // unsuccessful inserts into referencing tables when foreign key is not inserted into referenced @@ -319,16 +307,12 @@ public void testForeignKeyDeleteCascadeConstraints_verifyInvalidInsertions() { transaction.executeUpdate(concertInsertStatementWithInvalidValues); return null; })); - assertEquals(ex.getErrorCode(), ErrorCode.FAILED_PRECONDITION); - assertTrue(ex.getMessage().contains("Cannot find referenced values")); + assertEquals(ErrorCode.FAILED_PRECONDITION, ex.getErrorCode()); + assertTrue(ex.getMessage(), ex.getMessage().contains("Cannot find referenced")); } @Test public void testForeignKeyDeleteCascadeConstraints_forDeletions() { - assumeFalse( - "Emulator does not yet support foreign key delete cascade", - EmulatorSpannerHelper.isUsingEmulator()); - final DatabaseClient databaseClient = getCreatedDatabaseClient(); final String singerInsertStatement = @@ -396,10 +380,6 @@ public void testForeignKeyDeleteCascadeConstraints_forDeletions() { @Test public void testForeignKeyDeleteCascadeConstraints_forMutations_onConflictDueToParentTable() { - assumeFalse( - "Emulator does not yet support foreign key delete cascade", - EmulatorSpannerHelper.isUsingEmulator()); - final DatabaseClient databaseClient = getCreatedDatabaseClient(); // inserting and deleting the referenced key within the same mutation are considered @@ -423,15 +403,11 @@ public void testForeignKeyDeleteCascadeConstraints_forMutations_onConflictDueToP Mutation.delete("Singer", Key.of(4L)))); return null; })); - assertEquals(ex.getErrorCode(), ErrorCode.FAILED_PRECONDITION); + assertEquals(ErrorCode.FAILED_PRECONDITION, ex.getErrorCode()); } @Test public void testForeignKeyDeleteCascadeConstraints_forMutations_onConflictsDueToChildTable() { - assumeFalse( - "Emulator does not yet support foreign key delete cascade", - EmulatorSpannerHelper.isUsingEmulator()); - final DatabaseClient databaseClient = getCreatedDatabaseClient(); // referencing a foreign key in child table and deleting the referenced key in parent table @@ -454,25 +430,24 @@ public void testForeignKeyDeleteCascadeConstraints_forMutations_onConflictsDueTo transaction.executeUpdate(singerInsertStatementWithValues); return null; }); - SpannerException ex = - assertThrows( - SpannerException.class, - () -> - databaseClient - .readWriteTransaction() - .run( - transaction -> { - transaction.buffer( - Arrays.asList( - Mutation.newInsertBuilder("Concert") - .set("first_name") - .to(5L) - .set("singer_id") - .to(5L) - .build(), - Mutation.delete("Singer", Key.of(5L)))); - return null; - })); + assertThrows( + SpannerException.class, + () -> + databaseClient + .readWriteTransaction() + .run( + transaction -> { + transaction.buffer( + Arrays.asList( + Mutation.newInsertBuilder("Concert") + .set("first_name") + .to(5L) + .set("singer_id") + .to(5L) + .build(), + Mutation.delete("Singer", Key.of(5L)))); + return null; + })); } private DatabaseAdminClient getDatabaseAdminClient() { @@ -481,16 +456,13 @@ private DatabaseAdminClient getDatabaseAdminClient() { private DatabaseClient getCreatedDatabaseClient() { if (dialect.dialect == Dialect.POSTGRESQL) { - return env.getTestHelper().getDatabaseClient(this.POSTGRESQL_DATABASE); + return env.getTestHelper().getDatabaseClient(POSTGRESQL_DATABASE); } - return env.getTestHelper().getDatabaseClient(this.GOOGLE_STANDARD_SQL_DATABASE); + return env.getTestHelper().getDatabaseClient(GOOGLE_STANDARD_SQL_DATABASE); } /** * Returns '@p1, @p2, ..., @pNumParams' for GoogleSQL and $1, $2, ..., $NumParams' for PostgreSQL - * - * @param numParams - * @return */ private String generateQueryParameters(final int numParams) { final List params; diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITJsonWriteReadTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITJsonWriteReadTest.java index c6f72349f0b..e355eaa07a3 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITJsonWriteReadTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITJsonWriteReadTest.java @@ -18,7 +18,6 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThrows; -import static org.junit.Assume.assumeFalse; import com.google.cloud.spanner.Database; import com.google.cloud.spanner.DatabaseClient; @@ -30,7 +29,6 @@ import com.google.cloud.spanner.SpannerException; import com.google.cloud.spanner.Statement; import com.google.cloud.spanner.Value; -import com.google.cloud.spanner.testing.EmulatorSpannerHelper; import com.google.cloud.spanner.testing.RemoteSpannerHelper; import com.google.common.io.Resources; import java.io.File; @@ -68,23 +66,19 @@ public class ITJsonWriteReadTest { @BeforeClass public static void beforeClass() { final RemoteSpannerHelper testHelper = env.getTestHelper(); - if (!EmulatorSpannerHelper.isUsingEmulator()) { - final Database database = - testHelper.createTestDatabase( - "CREATE TABLE " - + TABLE_NAME - + "(" - + "Id INT64 NOT NULL," - + "json JSON" - + ") PRIMARY KEY (Id)"); - databaseClient = testHelper.getDatabaseClient(database); - } + final Database database = + testHelper.createTestDatabase( + "CREATE TABLE " + + TABLE_NAME + + "(" + + "Id INT64 NOT NULL," + + "json JSON" + + ") PRIMARY KEY (Id)"); + databaseClient = testHelper.getDatabaseClient(database); } @Test public void testWriteValidJsonValues() throws IOException { - assumeFalse("Emulator does not yet support JSON", EmulatorSpannerHelper.isUsingEmulator()); - List resources = getJsonFilePaths(RESOURCES_DIR + File.separator + VALID_JSON_DIR); long id = 0L; @@ -116,8 +110,6 @@ public void testWriteValidJsonValues() throws IOException { @Test public void testWriteAndReadInvalidJsonValues() throws IOException { - assumeFalse("Emulator does not yet support JSON", EmulatorSpannerHelper.isUsingEmulator()); - List resources = getJsonFilePaths(RESOURCES_DIR + File.separator + INVALID_JSON_DIR); AtomicLong id = new AtomicLong(100); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITLargeReadTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITLargeReadTest.java index b60505c873a..83d505e2124 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITLargeReadTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITLargeReadTest.java @@ -16,7 +16,6 @@ package com.google.cloud.spanner.it; -import static com.google.cloud.spanner.testing.EmulatorSpannerHelper.isUsingEmulator; import static com.google.common.truth.Truth.assertThat; import com.google.cloud.ByteArray; @@ -31,6 +30,7 @@ import com.google.cloud.spanner.ResultSet; import com.google.cloud.spanner.Statement; import com.google.cloud.spanner.connection.ConnectionOptions; +import com.google.common.collect.ImmutableList; import com.google.common.hash.HashFunction; import com.google.common.hash.Hashing; import java.util.ArrayList; @@ -88,20 +88,18 @@ public static void setUpDatabase() { + " Size INT64," + ") PRIMARY KEY (Key)"); googleStandardSQLClient = env.getTestHelper().getDatabaseClient(googleStandardSQLDatabase); - if (!isUsingEmulator()) { - Database postgreSQLDatabase = - env.getTestHelper() - .createTestDatabase( - Dialect.POSTGRESQL, - Arrays.asList( - "CREATE TABLE TestTable (" - + " Key BIGINT PRIMARY KEY," - + " Data BYTEA," - + " Fingerprint BIGINT," - + " Size BIGINT" - + ")")); - postgreSQLClient = env.getTestHelper().getDatabaseClient(postgreSQLDatabase); - } + Database postgreSQLDatabase = + env.getTestHelper() + .createTestDatabase( + Dialect.POSTGRESQL, + ImmutableList.of( + "CREATE TABLE TestTable (" + + " Key BIGINT PRIMARY KEY," + + " Data BYTEA," + + " Fingerprint BIGINT," + + " Size BIGINT" + + ")")); + postgreSQLClient = env.getTestHelper().getDatabaseClient(postgreSQLDatabase); hasher = Hashing.goodFastHash(64); List mutations = new ArrayList<>(); @@ -127,17 +125,13 @@ public static void setUpDatabase() { i++; if (totalSize >= WRITE_BATCH_SIZE) { googleStandardSQLClient.write(mutations); - if (!isUsingEmulator()) { - postgreSQLClient.write(mutations); - } + postgreSQLClient.write(mutations); mutations.clear(); totalSize = 0; } } googleStandardSQLClient.write(mutations); - if (!isUsingEmulator()) { - postgreSQLClient.write(mutations); - } + postgreSQLClient.write(mutations); } @AfterClass @@ -149,10 +143,7 @@ public static void teardown() { public static List data() { List params = new ArrayList<>(); params.add(new DialectTestParameter(Dialect.GOOGLE_STANDARD_SQL)); - // "PG dialect tests are not supported by the emulator" - if (!isUsingEmulator()) { - params.add(new DialectTestParameter(Dialect.POSTGRESQL)); - } + params.add(new DialectTestParameter(Dialect.POSTGRESQL)); return params; } diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITPgJsonbTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITPgJsonbTest.java index 634f7919658..275fbe6545f 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITPgJsonbTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITPgJsonbTest.java @@ -16,11 +16,11 @@ package com.google.cloud.spanner.it; +import static com.google.cloud.spanner.testing.EmulatorSpannerHelper.isUsingEmulator; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertThrows; import static org.junit.Assert.assertTrue; -import static org.junit.Assume.assumeFalse; import com.google.cloud.spanner.Database; import com.google.cloud.spanner.DatabaseAdminClient; @@ -36,7 +36,6 @@ import com.google.cloud.spanner.SpannerExceptionFactory; import com.google.cloud.spanner.Statement; import com.google.cloud.spanner.Value; -import com.google.cloud.spanner.testing.EmulatorSpannerHelper; import com.google.cloud.spanner.testing.RemoteSpannerHelper; import com.google.common.collect.ImmutableList; import com.google.protobuf.ListValue; @@ -53,7 +52,6 @@ import org.junit.Before; import org.junit.BeforeClass; import org.junit.ClassRule; -import org.junit.Ignore; import org.junit.Test; import org.junit.experimental.categories.Category; import org.junit.runner.RunWith; @@ -77,8 +75,6 @@ public class ITPgJsonbTest { @BeforeClass public static void beforeClass() throws Exception { - assumeFalse( - "PgJsonb is not supported in the emulator", EmulatorSpannerHelper.isUsingEmulator()); testHelper = env.getTestHelper(); databaseAdminClient = testHelper.getClient().getDatabaseAdminClient(); databasesToDrop = new ArrayList<>(); @@ -97,7 +93,7 @@ public static void beforeClass() throws Exception { } @AfterClass - public static void afterClass() throws Exception { + public static void afterClass() { if (databasesToDrop != null) { for (DatabaseId id : databasesToDrop) { try { @@ -170,11 +166,19 @@ public void testPgJsonbInSecondaryIndex() { SpannerException spannerException = SpannerExceptionFactory.asSpannerException(executionException.getCause()); assertEquals(ErrorCode.FAILED_PRECONDITION, spannerException.getErrorCode()); - assertTrue( - spannerException.getMessage(), - spannerException - .getMessage() - .contains("Index idx_jsonb is defined on a column of unsupported type PG.JSONB.")); + if (isUsingEmulator()) { + assertTrue( + spannerException.getMessage(), + spannerException + .getMessage() + .contains("Cannot reference PG.JSONB col1 in the creation of index idx_jsonb.")); + } else { + assertTrue( + spannerException.getMessage(), + spannerException + .getMessage() + .contains("Index idx_jsonb is defined on a column of unsupported type PG.JSONB.")); + } } private static final String JSON_VALUE_1 = "{\"color\":\"red\",\"value\":\"#f00\"}"; @@ -189,8 +193,6 @@ public void testPgJsonbInSecondaryIndex() { @Test public void testLiteralPgJsonb() { - assumeFalse( - "PgJsonb is not supported in the emulator", EmulatorSpannerHelper.isUsingEmulator()); databaseClient .readWriteTransaction() .run( @@ -223,8 +225,6 @@ public void testLiteralPgJsonb() { @Test public void testPgJsonbParameter() { - assumeFalse( - "PgJsonb is not supported in the emulator", EmulatorSpannerHelper.isUsingEmulator()); databaseClient .readWriteTransaction() .run( @@ -275,12 +275,8 @@ private ListValue getJsonListValue(List jsonList) { .build(); } - @Ignore("Untyped jsonb parameters are not yet supported") @Test public void testPgJsonbUntypedParameter() { - assumeFalse( - "PgJsonb is not supported in the emulator", EmulatorSpannerHelper.isUsingEmulator()); - // Verify that we can use Jsonb as an untyped parameter. This is especially important for // PGAdapter and the JDBC driver, as these will often use untyped parameters. databaseClient @@ -362,8 +358,6 @@ public void testPgJsonbUntypedParameter() { @Test public void testMutationsWithPgJsonbAsString() { - assumeFalse( - "PgJsonb is not supported in the emulator", EmulatorSpannerHelper.isUsingEmulator()); databaseClient .readWriteTransaction() .run( @@ -418,8 +412,6 @@ public void testMutationsWithPgJsonbAsString() { @Test public void testMutationsWithPgJsonbAsValue() { - assumeFalse( - "PgJsonb is not supported in the emulator", EmulatorSpannerHelper.isUsingEmulator()); databaseClient .readWriteTransaction() .run( diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITPgNumericTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITPgNumericTest.java index bacb4718da0..76025b07175 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITPgNumericTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITPgNumericTest.java @@ -18,7 +18,6 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; -import static org.junit.Assume.assumeFalse; import com.google.cloud.spanner.Database; import com.google.cloud.spanner.DatabaseAdminClient; @@ -31,7 +30,6 @@ import com.google.cloud.spanner.ResultSet; import com.google.cloud.spanner.Statement; import com.google.cloud.spanner.Value; -import com.google.cloud.spanner.testing.EmulatorSpannerHelper; import com.google.cloud.spanner.testing.RemoteSpannerHelper; import com.google.common.collect.ImmutableList; import java.math.BigDecimal; @@ -67,8 +65,6 @@ public class ITPgNumericTest { @BeforeClass public static void beforeClass() throws Exception { - assumeFalse( - "PgNumeric is not supported in the emulator", EmulatorSpannerHelper.isUsingEmulator()); testHelper = env.getTestHelper(); databaseAdminClient = testHelper.getClient().getDatabaseAdminClient(); databasesToDrop = new ArrayList<>(); @@ -116,8 +112,6 @@ public void setUp() throws Exception { @Test public void testLiteralPgNumeric() { - assumeFalse( - "PgNumeric is not supported in the emulator", EmulatorSpannerHelper.isUsingEmulator()); databaseClient .readWriteTransaction() .run( @@ -134,7 +128,9 @@ public void testLiteralPgNumeric() { }); try (ResultSet resultSet = - databaseClient.singleUse().executeQuery(Statement.of("SELECT * FROM " + tableName))) { + databaseClient + .singleUse() + .executeQuery(Statement.of("SELECT * FROM " + tableName + " ORDER BY id"))) { resultSet.next(); assertEquals("1.23", resultSet.getString("col1")); @@ -151,8 +147,6 @@ public void testLiteralPgNumeric() { @Test public void testParameterizedWithPgNumericAsValue() { - assumeFalse( - "PgNumeric is not supported in the emulator", EmulatorSpannerHelper.isUsingEmulator()); databaseClient .readWriteTransaction() .run( @@ -176,7 +170,9 @@ public void testParameterizedWithPgNumericAsValue() { }); try (ResultSet resultSet = - databaseClient.singleUse().executeQuery(Statement.of("SELECT * FROM " + tableName))) { + databaseClient + .singleUse() + .executeQuery(Statement.of("SELECT * FROM " + tableName + " ORDER BY id"))) { resultSet.next(); assertEquals("1.23", resultSet.getString("col1")); @@ -193,8 +189,6 @@ public void testParameterizedWithPgNumericAsValue() { @Test public void testParameterizedWithPgNumericAsDouble() { - assumeFalse( - "PgNumeric is not supported in the emulator", EmulatorSpannerHelper.isUsingEmulator()); databaseClient .readWriteTransaction() .run( @@ -218,7 +212,9 @@ public void testParameterizedWithPgNumericAsDouble() { }); try (ResultSet resultSet = - databaseClient.singleUse().executeQuery(Statement.of("SELECT * FROM " + tableName))) { + databaseClient + .singleUse() + .executeQuery(Statement.of("SELECT * FROM " + tableName + " ORDER BY id"))) { resultSet.next(); assertEquals("1.23", resultSet.getString("col1")); @@ -235,8 +231,6 @@ public void testParameterizedWithPgNumericAsDouble() { @Test public void testParameterizedWithPgNumericAsInt() { - assumeFalse( - "PgNumeric is not supported in the emulator", EmulatorSpannerHelper.isUsingEmulator()); databaseClient .readWriteTransaction() .run( @@ -260,8 +254,6 @@ public void testParameterizedWithPgNumericAsInt() { @Test public void testParameterizedWithPgNumericAsLong() { - assumeFalse( - "PgNumeric is not supported in the emulator", EmulatorSpannerHelper.isUsingEmulator()); databaseClient .readWriteTransaction() .run( @@ -285,8 +277,6 @@ public void testParameterizedWithPgNumericAsLong() { @Test public void testMutationsWithPgNumericAsString() { - assumeFalse( - "PgNumeric is not supported in the emulator", EmulatorSpannerHelper.isUsingEmulator()); databaseClient .readWriteTransaction() .run( @@ -315,7 +305,9 @@ public void testMutationsWithPgNumericAsString() { }); try (ResultSet resultSet = - databaseClient.singleUse().executeQuery(Statement.of("SELECT * FROM " + tableName))) { + databaseClient + .singleUse() + .executeQuery(Statement.of("SELECT * FROM " + tableName + " ORDER BY id"))) { resultSet.next(); assertEquals("1.23", resultSet.getString("col1")); @@ -332,8 +324,6 @@ public void testMutationsWithPgNumericAsString() { @Test public void testMutationsWithPgNumericAsInt() { - assumeFalse( - "PgNumeric is not supported in the emulator", EmulatorSpannerHelper.isUsingEmulator()); databaseClient .readWriteTransaction() .run( @@ -360,8 +350,6 @@ public void testMutationsWithPgNumericAsInt() { @Test public void testMutationsWithPgNumericAsLong() { - assumeFalse( - "PgNumeric is not supported in the emulator", EmulatorSpannerHelper.isUsingEmulator()); databaseClient .readWriteTransaction() .run( @@ -388,8 +376,6 @@ public void testMutationsWithPgNumericAsLong() { @Test public void testMutationsWithPgNumericAsBigDecimal() { - assumeFalse( - "PgNumeric is not supported in the emulator", EmulatorSpannerHelper.isUsingEmulator()); databaseClient .readWriteTransaction() .run( @@ -412,7 +398,9 @@ public void testMutationsWithPgNumericAsBigDecimal() { }); try (ResultSet resultSet = - databaseClient.singleUse().executeQuery(Statement.of("SELECT * FROM " + tableName))) { + databaseClient + .singleUse() + .executeQuery(Statement.of("SELECT * FROM " + tableName + " ORDER BY id"))) { resultSet.next(); assertEquals("1.23", resultSet.getString("col1")); @@ -425,8 +413,6 @@ public void testMutationsWithPgNumericAsBigDecimal() { @Test public void testMutationsWithPgNumericAsValue() { - assumeFalse( - "PgNumeric is not supported in the emulator", EmulatorSpannerHelper.isUsingEmulator()); databaseClient .readWriteTransaction() .run( @@ -455,7 +441,9 @@ public void testMutationsWithPgNumericAsValue() { }); try (ResultSet resultSet = - databaseClient.singleUse().executeQuery(Statement.of("SELECT * FROM " + tableName))) { + databaseClient + .singleUse() + .executeQuery(Statement.of("SELECT * FROM " + tableName + " ORDER BY id"))) { resultSet.next(); assertEquals("1.23", resultSet.getString("col1")); From 3f4873dbf6382df5acad1c6972248647ee5f40a1 Mon Sep 17 00:00:00 2001 From: Sakthivel Subramanian <179120858+sakthivelmanii@users.noreply.github.com> Date: Tue, 10 Dec 2024 08:34:27 +0530 Subject: [PATCH 3/7] ci(spanner): Fix nightly job issues (#3522) * ci(spanner): Fix nightly job permission issue * update scope for surefire-junit4 --- google-cloud-spanner-executor/pom.xml | 9 ++++++++- .../cloud/spanner/it/slow/ITBackupTest.java | 2 +- samples/install-without-bom/pom.xml | 6 +++--- samples/snapshot/pom.xml | 6 +++--- samples/snippets/pom.xml | 6 +++--- .../spanner/AddAndDropDatabaseRole.java | 20 +++++++++++-------- .../com/example/spanner/PgSpannerSample.java | 4 ++-- .../archived/AddAndDropDatabaseRole.java | 1 + .../admin/archived/CreateSequenceSample.java | 2 +- .../admin/archived/PgSpannerSample.java | 5 ++--- ...eateIncrementalBackupScheduleSampleIT.java | 6 +++--- .../CreateInstancePartitionSampleIT.java | 2 ++ .../com/example/spanner/DatabaseRolesIT.java | 3 ++- .../com/example/spanner/SampleTestBaseV2.java | 1 + .../example/spanner/SpannerGraphSampleIT.java | 2 +- .../com/example/spanner/SpannerSampleIT.java | 5 +++++ .../CustomInstanceConfigSampleIT.java | 2 +- .../admin/archived/DatabaseRolesIT.java | 5 ++++- .../admin/archived/PgSpannerSampleIT.java | 2 +- 19 files changed, 56 insertions(+), 33 deletions(-) diff --git a/google-cloud-spanner-executor/pom.xml b/google-cloud-spanner-executor/pom.xml index 1c45d6915fd..ccb631bb1a2 100644 --- a/google-cloud-spanner-executor/pom.xml +++ b/google-cloud-spanner-executor/pom.xml @@ -189,6 +189,13 @@ test + + org.apache.maven.surefire + surefire-junit4 + 3.5.2 + test + + @@ -259,7 +266,7 @@ org.apache.maven.plugins maven-dependency-plugin - com.google.api:gax + com.google.api:gax,org.apache.maven.surefire:surefire-junit4 diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/slow/ITBackupTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/slow/ITBackupTest.java index 9deb3289e07..1359046aee0 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/slow/ITBackupTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/slow/ITBackupTest.java @@ -717,7 +717,7 @@ private void testPagination() { Page page = dbAdminClient.listBackups(instanceId, Options.pageSize(1)); assertEquals(1, Iterables.size(page.getValues())); numBackups++; - assertTrue(page.hasNextPage()); + assertFalse(page.hasNextPage()); Set seenPageTokens = new HashSet<>(); seenPageTokens.add(""); while (page.hasNextPage()) { diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 4de16e06367..cc7900ed246 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -148,12 +148,12 @@ 3.5.2 - java-client-integration-tests + java-sample-integration-tests java-client-mr-integration-tests nam11 us-east1 - java-client-integration-test-cmek-ring - java-client-integration-test-cmek-key + cmek-test-key-ring + cmek-test-key mysample quick-db diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index cca1680ac10..9a6e4d0e30e 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -147,12 +147,12 @@ 3.5.2 - java-client-integration-tests + java-sample-integration-tests java-client-mr-integration-tests nam11 us-east1 - java-client-integration-test-cmek-ring - java-client-integration-test-cmek-key + cmek-test-key-ring + cmek-test-key mysample mysample-instance quick-db diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 06698627ef9..df0488ac116 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -178,12 +178,12 @@ 3.5.2 - java-client-integration-tests + java-sample-integration-tests java-client-mr-integration-tests nam11 us-east1 - java-client-integration-test-cmek-ring - java-client-integration-test-cmek-key + cmek-test-key-ring + cmek-test-key mysample quick-db diff --git a/samples/snippets/src/main/java/com/example/spanner/AddAndDropDatabaseRole.java b/samples/snippets/src/main/java/com/example/spanner/AddAndDropDatabaseRole.java index 75e85f5f85c..d3de612098d 100644 --- a/samples/snippets/src/main/java/com/example/spanner/AddAndDropDatabaseRole.java +++ b/samples/snippets/src/main/java/com/example/spanner/AddAndDropDatabaseRole.java @@ -23,6 +23,8 @@ import com.google.cloud.spanner.admin.database.v1.DatabaseAdminClient; import com.google.common.collect.ImmutableList; import com.google.spanner.admin.database.v1.DatabaseName; +import java.util.ArrayList; +import java.util.List; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; @@ -36,12 +38,12 @@ static void addAndDropDatabaseRole() { String databaseId = "my-database"; String parentRole = "parent_role"; String childRole = "child_role"; - addAndDropDatabaseRole(projectId, instanceId, databaseId, parentRole, childRole); + addAndDropDatabaseRole(projectId, instanceId, databaseId, parentRole, childRole, "Albums"); } static void addAndDropDatabaseRole( String projectId, String instanceId, String databaseId, - String parentRole, String childRole) { + String parentRole, String childRole, String... tables) { try (Spanner spanner = SpannerOptions.newBuilder() .setProjectId(projectId) @@ -49,13 +51,15 @@ static void addAndDropDatabaseRole( .getService(); DatabaseAdminClient databaseAdminClient = spanner.createDatabaseAdminClient()) { System.out.println("Waiting for role create operation to complete..."); + List roleStatements = new ArrayList<>(ImmutableList.of( + String.format("CREATE ROLE %s", parentRole), + String.format("CREATE ROLE %s", childRole), + String.format("GRANT ROLE %s TO ROLE %s", parentRole, childRole))); + for (String table : tables) { + roleStatements.add(String.format("GRANT SELECT ON TABLE %s TO ROLE %s", table, parentRole)); + } databaseAdminClient.updateDatabaseDdlAsync( - DatabaseName.of(projectId, instanceId, databaseId), - ImmutableList.of( - String.format("CREATE ROLE %s", parentRole), - String.format("GRANT SELECT ON TABLE Albums TO ROLE %s", parentRole), - String.format("CREATE ROLE %s", childRole), - String.format("GRANT ROLE %s TO ROLE %s", parentRole, childRole))) + DatabaseName.of(projectId, instanceId, databaseId), roleStatements) .get(5, TimeUnit.MINUTES); System.out.printf( "Created roles %s and %s and granted privileges%n", parentRole, childRole); diff --git a/samples/snippets/src/main/java/com/example/spanner/PgSpannerSample.java b/samples/snippets/src/main/java/com/example/spanner/PgSpannerSample.java index 600206c1481..b3ad5cd08c4 100644 --- a/samples/snippets/src/main/java/com/example/spanner/PgSpannerSample.java +++ b/samples/snippets/src/main/java/com/example/spanner/PgSpannerSample.java @@ -631,7 +631,7 @@ static void writeWithTransactionUsingDml(DatabaseClient dbClient) { Statement updateStatement = Statement.newBuilder( "UPDATE Albums " - + "SET MarketingBudget = $1" + + "SET MarketingBudget = $1 " + "WHERE SingerId = 1 and AlbumId = 1") .bind("p1") .to(album1Budget) @@ -640,7 +640,7 @@ static void writeWithTransactionUsingDml(DatabaseClient dbClient) { Statement updateStatement2 = Statement.newBuilder( "UPDATE Albums " - + "SET MarketingBudget = $1" + + "SET MarketingBudget = $1 " + "WHERE SingerId = 2 and AlbumId = 2") .bind("p1") .to(album2Budget) diff --git a/samples/snippets/src/main/java/com/example/spanner/admin/archived/AddAndDropDatabaseRole.java b/samples/snippets/src/main/java/com/example/spanner/admin/archived/AddAndDropDatabaseRole.java index cce8543492e..8df22402c21 100644 --- a/samples/snippets/src/main/java/com/example/spanner/admin/archived/AddAndDropDatabaseRole.java +++ b/samples/snippets/src/main/java/com/example/spanner/admin/archived/AddAndDropDatabaseRole.java @@ -53,6 +53,7 @@ static void addAndDropDatabaseRole( databaseId, ImmutableList.of( "CREATE ROLE " + parentRole, + "GRANT SELECT ON TABLE Singers TO ROLE " + parentRole, "GRANT SELECT ON TABLE Albums TO ROLE " + parentRole, "CREATE ROLE " + childRole, "GRANT ROLE " + parentRole + " TO ROLE " + childRole), diff --git a/samples/snippets/src/main/java/com/example/spanner/admin/archived/CreateSequenceSample.java b/samples/snippets/src/main/java/com/example/spanner/admin/archived/CreateSequenceSample.java index 637bd39d9a1..d0172eb2d53 100644 --- a/samples/snippets/src/main/java/com/example/spanner/admin/archived/CreateSequenceSample.java +++ b/samples/snippets/src/main/java/com/example/spanner/admin/archived/CreateSequenceSample.java @@ -58,7 +58,7 @@ static void createSequence(String projectId, String instanceId, String databaseI .get(5, TimeUnit.MINUTES); System.out.println( - "Created Seq sequence and Customers table, where the key column CustomerId " + "Created Seq sequence and Customers table, where its key column CustomerId " + "uses the sequence as a default value"); final DatabaseClient dbClient = diff --git a/samples/snippets/src/main/java/com/example/spanner/admin/archived/PgSpannerSample.java b/samples/snippets/src/main/java/com/example/spanner/admin/archived/PgSpannerSample.java index 8a95cebef04..0ab3a75c967 100644 --- a/samples/snippets/src/main/java/com/example/spanner/admin/archived/PgSpannerSample.java +++ b/samples/snippets/src/main/java/com/example/spanner/admin/archived/PgSpannerSample.java @@ -203,7 +203,6 @@ static void createPostgreSqlDatabase(DatabaseAdminClient dbAdminClient, Database // Initiate the request which returns an OperationFuture. Database db = op.get(); System.out.println("Created database [" + db.getId() + "]"); - createTableUsingDdl(dbAdminClient, id); } catch (ExecutionException e) { // If the operation failed during execution, expose the cause. throw (SpannerException) e.getCause(); @@ -633,7 +632,7 @@ static void writeWithTransactionUsingDml(DatabaseClient dbClient) { Statement updateStatement = Statement.newBuilder( "UPDATE Albums " - + "SET MarketingBudget = $1" + + "SET MarketingBudget = $1 " + "WHERE SingerId = 1 and AlbumId = 1") .bind("p1") .to(album1Budget) @@ -642,7 +641,7 @@ static void writeWithTransactionUsingDml(DatabaseClient dbClient) { Statement updateStatement2 = Statement.newBuilder( "UPDATE Albums " - + "SET MarketingBudget = $1" + + "SET MarketingBudget = $1 " + "WHERE SingerId = 2 and AlbumId = 2") .bind("p1") .to(album2Budget) diff --git a/samples/snippets/src/test/java/com/example/spanner/CreateIncrementalBackupScheduleSampleIT.java b/samples/snippets/src/test/java/com/example/spanner/CreateIncrementalBackupScheduleSampleIT.java index 74136562e10..5d590a5b382 100644 --- a/samples/snippets/src/test/java/com/example/spanner/CreateIncrementalBackupScheduleSampleIT.java +++ b/samples/snippets/src/test/java/com/example/spanner/CreateIncrementalBackupScheduleSampleIT.java @@ -33,16 +33,16 @@ public class CreateIncrementalBackupScheduleSampleIT extends SampleTestBaseV2 { public void testCreateIncrementalBackupScheduleSample() throws Exception { String backupScheduleId = String.format("schedule-%s", UUID.randomUUID()); BackupScheduleName backupScheduleName = - BackupScheduleName.of(projectId, instanceId, databaseId, backupScheduleId); + BackupScheduleName.of(projectId, multiRegionalInstanceId, databaseId, backupScheduleId); String out = SampleRunner.runSample( () -> { try { CreateIncrementalBackupScheduleSample.createIncrementalBackupSchedule( - projectId, instanceId, databaseId, backupScheduleId); + projectId, multiRegionalInstanceId, databaseId, backupScheduleId); } finally { DeleteBackupScheduleSample.deleteBackupSchedule( - projectId, instanceId, databaseId, backupScheduleId); + projectId, multiRegionalInstanceId, databaseId, backupScheduleId); } }); assertThat(out) diff --git a/samples/snippets/src/test/java/com/example/spanner/CreateInstancePartitionSampleIT.java b/samples/snippets/src/test/java/com/example/spanner/CreateInstancePartitionSampleIT.java index 3038d29750d..b243a9229d2 100644 --- a/samples/snippets/src/test/java/com/example/spanner/CreateInstancePartitionSampleIT.java +++ b/samples/snippets/src/test/java/com/example/spanner/CreateInstancePartitionSampleIT.java @@ -22,6 +22,7 @@ import com.google.cloud.spanner.InstanceConfigId; import com.google.cloud.spanner.InstanceId; import com.google.cloud.spanner.InstanceInfo; +import com.google.spanner.admin.instance.v1.Instance.Edition; import com.google.spanner.admin.instance.v1.InstancePartitionName; import org.junit.Test; @@ -34,6 +35,7 @@ public void testCreateInstancePartition() throws Exception { instanceAdminClient .createInstance( InstanceInfo.newBuilder(InstanceId.of(projectId, instanceId)) + .setEdition(Edition.ENTERPRISE_PLUS) .setDisplayName("Geo-partitioning test instance") .setInstanceConfigId(InstanceConfigId.of(projectId, "regional-us-central1")) .setNodeCount(1) diff --git a/samples/snippets/src/test/java/com/example/spanner/DatabaseRolesIT.java b/samples/snippets/src/test/java/com/example/spanner/DatabaseRolesIT.java index 6c2b41c3672..4b9013e62f4 100644 --- a/samples/snippets/src/test/java/com/example/spanner/DatabaseRolesIT.java +++ b/samples/snippets/src/test/java/com/example/spanner/DatabaseRolesIT.java @@ -108,7 +108,8 @@ public void testAddAndDropDatabaseRole() throws Exception { SampleRunner.runSample( () -> AddAndDropDatabaseRole.addAndDropDatabaseRole( - projectId, instanceId, databaseId.getDatabase(), "new_parent", "new_child")); + projectId, instanceId, databaseId.getDatabase(), "new_parent", "new_child", + "Singers", "Albums")); assertTrue(out.contains("Created roles new_parent and new_child and granted privileges")); assertTrue(out.contains("Revoked privileges and dropped role new_child")); } diff --git a/samples/snippets/src/test/java/com/example/spanner/SampleTestBaseV2.java b/samples/snippets/src/test/java/com/example/spanner/SampleTestBaseV2.java index 909e79738b8..5a43261269d 100644 --- a/samples/snippets/src/test/java/com/example/spanner/SampleTestBaseV2.java +++ b/samples/snippets/src/test/java/com/example/spanner/SampleTestBaseV2.java @@ -140,6 +140,7 @@ public static void afterClass() throws InterruptedException { } } + spanner.close(); databaseAdminClient.close(); instanceAdminClient.close(); diff --git a/samples/snippets/src/test/java/com/example/spanner/SpannerGraphSampleIT.java b/samples/snippets/src/test/java/com/example/spanner/SpannerGraphSampleIT.java index 6f778de49ab..be6e67282ab 100644 --- a/samples/snippets/src/test/java/com/example/spanner/SpannerGraphSampleIT.java +++ b/samples/snippets/src/test/java/com/example/spanner/SpannerGraphSampleIT.java @@ -34,7 +34,7 @@ public class SpannerGraphSampleIT extends SampleTestBaseV2 { private static final int DBID_LENGTH = 20; // The instance needs to exist for tests to pass. - private static final String instanceId = System.getProperty("spanner.test.instance"); + private static final String instanceId = System.getProperty("spanner.test.instance.mr"); private static final String baseDbId = System.getProperty("spanner.sample.database"); static Spanner spanner; static DatabaseAdminClient databaseAdminClient; diff --git a/samples/snippets/src/test/java/com/example/spanner/SpannerSampleIT.java b/samples/snippets/src/test/java/com/example/spanner/SpannerSampleIT.java index 4e02f714e39..d59152b407c 100644 --- a/samples/snippets/src/test/java/com/example/spanner/SpannerSampleIT.java +++ b/samples/snippets/src/test/java/com/example/spanner/SpannerSampleIT.java @@ -527,6 +527,7 @@ public void testEncryptedDatabaseAndBackupSamples() throws Exception { .setNodeCount(1) .build()) .get(); + System.out.println("Creating database ..."); try { String out = SampleRunner.runSample( @@ -538,6 +539,7 @@ public void testEncryptedDatabaseAndBackupSamples() throws Exception { String.format( "Created database [%s]", DatabaseName.of(projectId, instanceId, databaseId))); + System.out.println("Creating backup with encryption key ..."); out = SampleRunner.runSampleWithRetry( () -> @@ -556,6 +558,7 @@ public void testEncryptedDatabaseAndBackupSamples() throws Exception { + "was created at (.*) using encryption key %s", projectId, instanceId, encryptedBackupId, key)); + System.out.println("Restoring backup with encryption key ..."); out = SampleRunner.runSampleWithRetry( () -> @@ -587,6 +590,7 @@ public void testEncryptedDatabaseAndBackupSamples() throws Exception { } finally { // Delete the backups from the test instance first, as the instance can only be deleted once // all backups have been deleted. + System.out.println("Deleting backups ..."); deleteAllBackups(instanceId); instanceAdminClient.deleteInstance(instanceId); } @@ -633,6 +637,7 @@ private static void deleteAllBackups(String instanceId) throws InterruptedExcept InstanceName instanceName = InstanceName.of(projectId, instanceId); for (Backup backup : databaseAdminClient.listBackups(instanceName.toString()).iterateAll()) { int attempts = 0; + System.out.printf("Deleting backup ... %s%n", backup.getName()); while (attempts < 30) { try { attempts++; diff --git a/samples/snippets/src/test/java/com/example/spanner/admin/archived/CustomInstanceConfigSampleIT.java b/samples/snippets/src/test/java/com/example/spanner/admin/archived/CustomInstanceConfigSampleIT.java index a56b72b75f1..c8271225ccb 100644 --- a/samples/snippets/src/test/java/com/example/spanner/admin/archived/CustomInstanceConfigSampleIT.java +++ b/samples/snippets/src/test/java/com/example/spanner/admin/archived/CustomInstanceConfigSampleIT.java @@ -41,7 +41,7 @@ public void testCustomInstanceConfigOperations() throws Exception { SampleRunner.runSample( () -> ListInstanceConfigOperationsSample.listInstanceConfigOperations(projectId)); - assertTrue(out2.contains("List instance config operation")); + assertTrue(out2.contains("Create instance config operation")); // Update display name to a randomly generated instance config id. final String out3 = diff --git a/samples/snippets/src/test/java/com/example/spanner/admin/archived/DatabaseRolesIT.java b/samples/snippets/src/test/java/com/example/spanner/admin/archived/DatabaseRolesIT.java index 3e40189d946..f1bad568978 100644 --- a/samples/snippets/src/test/java/com/example/spanner/admin/archived/DatabaseRolesIT.java +++ b/samples/snippets/src/test/java/com/example/spanner/admin/archived/DatabaseRolesIT.java @@ -31,12 +31,15 @@ import org.junit.After; import org.junit.Before; import org.junit.BeforeClass; +import org.junit.FixMethodOrder; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; +import org.junit.runners.MethodSorters; /** Integration tests for FGAC samples for GoogleStandardSql dialect. */ @RunWith(JUnit4.class) +@FixMethodOrder(MethodSorters.NAME_ASCENDING) public class DatabaseRolesIT extends SampleTestBase { private static DatabaseId databaseId; @@ -105,7 +108,7 @@ public void testAddAndDropDatabaseRole() throws Exception { SampleRunner.runSample( () -> AddAndDropDatabaseRole.addAndDropDatabaseRole( - projectId, instanceId, databaseId.getDatabase(), "new-parent", "new-child")); + projectId, instanceId, databaseId.getDatabase(), "new_parent", "new_child")); assertTrue(out.contains("Created roles new_parent and new_child and granted privileges")); assertTrue(out.contains("Revoked privileges and dropped role new_child")); } diff --git a/samples/snippets/src/test/java/com/example/spanner/admin/archived/PgSpannerSampleIT.java b/samples/snippets/src/test/java/com/example/spanner/admin/archived/PgSpannerSampleIT.java index 72900b5e417..c4ba80f3f80 100644 --- a/samples/snippets/src/test/java/com/example/spanner/admin/archived/PgSpannerSampleIT.java +++ b/samples/snippets/src/test/java/com/example/spanner/admin/archived/PgSpannerSampleIT.java @@ -130,7 +130,7 @@ public void testSample() throws Exception { assertThat(databaseId).isNotNull(); System.out.println("Create Database ..."); - String out = runSample("createpgdatabase"); + String out = runSample("createdatabase"); assertThat(out).contains("Created database"); assertThat(out).contains(dbId.getName()); From 46464fca396994a7b46f66a0d46a9391dc1c36c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Knut=20Olav=20L=C3=B8ite?= Date: Tue, 10 Dec 2024 10:28:58 +0100 Subject: [PATCH 4/7] chore: add internal option for statement executor type (#3534) The Connection API by default uses either a platform thread or a virtual thread for each connection to execute and control the statements of that connection. This is used to enable asynchronous execution of statements and allows a statement to be cancelled by just interrupting this thread. Both these use cases are however not (or only very rarely) used by the most common users of the Connection API; the JDBC driver and PGAdapter. PGAdapter uses the PostgreSQL wire-protocol, which by design is synchronous, and JDBC is also a synchronous API. The latter has a cancel() method that currently requires this threading model, but this can be modified in the JDBC driver. Using a direct executor instead of a single-threaded executor per connection can save one thread per connection. The option is intentionally made package-private, so the above-mentioned frameworks can set it by default without it becoming part of the public API. --- .../spanner/connection/ConnectionImpl.java | 19 +++++- .../spanner/connection/ConnectionOptions.java | 13 ++++ .../spanner/connection/StatementExecutor.java | 23 +++++-- .../connection/AbstractMockServerTest.java | 6 ++ .../ConnectionAsyncApiAbortedTest.java | 7 ++ .../connection/ConnectionAsyncApiTest.java | 7 ++ .../spanner/connection/ConnectionTest.java | 7 ++ .../connection/StatementTimeoutTest.java | 64 ++++++++++++++++++- 8 files changed, 136 insertions(+), 10 deletions(-) diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionImpl.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionImpl.java index d7a1052d1c1..25ee8b39af4 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionImpl.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionImpl.java @@ -76,6 +76,7 @@ import com.google.cloud.spanner.connection.AbstractStatementParser.StatementType; import com.google.cloud.spanner.connection.ConnectionProperty.Context; import com.google.cloud.spanner.connection.ConnectionState.Type; +import com.google.cloud.spanner.connection.StatementExecutor.StatementExecutorType; import com.google.cloud.spanner.connection.StatementExecutor.StatementTimeout; import com.google.cloud.spanner.connection.StatementResult.ResultType; import com.google.cloud.spanner.connection.UnitOfWork.CallType; @@ -284,9 +285,17 @@ static UnitOfWorkType of(TransactionMode transactionMode) { Preconditions.checkNotNull(options); this.leakedException = options.isTrackConnectionLeaks() ? new LeakedConnectionException() : null; + StatementExecutorType statementExecutorType; + if (options.getStatementExecutorType() != null) { + statementExecutorType = options.getStatementExecutorType(); + } else { + statementExecutorType = + options.isUseVirtualThreads() + ? StatementExecutorType.VIRTUAL_THREAD + : StatementExecutorType.DIRECT_EXECUTOR; + } this.statementExecutor = - new StatementExecutor( - options.isUseVirtualThreads(), options.getStatementExecutionInterceptors()); + new StatementExecutor(statementExecutorType, options.getStatementExecutionInterceptors()); this.spannerPool = SpannerPool.INSTANCE; this.options = options; this.spanner = spannerPool.getSpanner(options, this); @@ -330,7 +339,11 @@ && getDialect() == Dialect.POSTGRESQL this.leakedException = options.isTrackConnectionLeaks() ? new LeakedConnectionException() : null; this.statementExecutor = - new StatementExecutor(options.isUseVirtualThreads(), Collections.emptyList()); + new StatementExecutor( + options.isUseVirtualThreads() + ? StatementExecutorType.VIRTUAL_THREAD + : StatementExecutorType.DIRECT_EXECUTOR, + Collections.emptyList()); this.spannerPool = Preconditions.checkNotNull(spannerPool); this.options = Preconditions.checkNotNull(options); this.spanner = spannerPool.getSpanner(options, this); diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionOptions.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionOptions.java index 66b09c35afd..2be2d7980b2 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionOptions.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionOptions.java @@ -70,6 +70,7 @@ import com.google.cloud.spanner.SpannerException; import com.google.cloud.spanner.SpannerExceptionFactory; import com.google.cloud.spanner.SpannerOptions; +import com.google.cloud.spanner.connection.StatementExecutor.StatementExecutorType; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Preconditions; import com.google.common.base.Strings; @@ -614,6 +615,7 @@ public static class Builder { new HashMap<>(); private String uri; private Credentials credentials; + private StatementExecutorType statementExecutorType; private SessionPoolOptions sessionPoolOptions; private List statementExecutionInterceptors = Collections.emptyList(); @@ -777,6 +779,11 @@ Builder setCredentials(Credentials credentials) { return this; } + Builder setStatementExecutorType(StatementExecutorType statementExecutorType) { + this.statementExecutorType = statementExecutorType; + return this; + } + public Builder setOpenTelemetry(OpenTelemetry openTelemetry) { this.openTelemetry = openTelemetry; return this; @@ -814,6 +821,7 @@ public static Builder newBuilder() { private final String instanceId; private final String databaseName; private final Credentials credentials; + private final StatementExecutorType statementExecutorType; private final SessionPoolOptions sessionPoolOptions; private final OpenTelemetry openTelemetry; @@ -834,6 +842,7 @@ private ConnectionOptions(Builder builder) { ConnectionPropertyValue value = cast(connectionPropertyValues.get(LENIENT.getKey())); this.warnings = checkValidProperties(value != null && value.getValue(), uri); this.fixedCredentials = builder.credentials; + this.statementExecutorType = builder.statementExecutorType; this.openTelemetry = builder.openTelemetry; this.statementExecutionInterceptors = @@ -1105,6 +1114,10 @@ CredentialsProvider getCredentialsProvider() { return getInitialConnectionPropertyValue(CREDENTIALS_PROVIDER); } + StatementExecutorType getStatementExecutorType() { + return this.statementExecutorType; + } + /** The {@link SessionPoolOptions} of this {@link ConnectionOptions}. */ public SessionPoolOptions getSessionPoolOptions() { return sessionPoolOptions; diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/StatementExecutor.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/StatementExecutor.java index b92e575a047..7340834a926 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/StatementExecutor.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/StatementExecutor.java @@ -146,7 +146,10 @@ java.time.Duration asDuration() { ThreadFactoryUtil.createVirtualOrPlatformDaemonThreadFactory("connection-executor", false); /** Creates an {@link ExecutorService} for a {@link StatementExecutor}. */ - private static ListeningExecutorService createExecutorService(boolean useVirtualThreads) { + private static ListeningExecutorService createExecutorService(StatementExecutorType type) { + if (type == StatementExecutorType.DIRECT_EXECUTOR) { + return MoreExecutors.newDirectExecutorService(); + } return MoreExecutors.listeningDecorator( Context.taskWrapping( new ThreadPoolExecutor( @@ -155,7 +158,7 @@ private static ListeningExecutorService createExecutorService(boolean useVirtual 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>(), - useVirtualThreads + type == StatementExecutorType.VIRTUAL_THREAD ? DEFAULT_VIRTUAL_THREAD_FACTORY : DEFAULT_DAEMON_THREAD_FACTORY))); } @@ -168,13 +171,23 @@ private static ListeningExecutorService createExecutorService(boolean useVirtual */ private final List interceptors; + enum StatementExecutorType { + PLATFORM_THREAD, + VIRTUAL_THREAD, + DIRECT_EXECUTOR, + } + @VisibleForTesting StatementExecutor() { - this(DEFAULT_USE_VIRTUAL_THREADS, Collections.emptyList()); + this( + DEFAULT_USE_VIRTUAL_THREADS + ? StatementExecutorType.VIRTUAL_THREAD + : StatementExecutorType.PLATFORM_THREAD, + Collections.emptyList()); } - StatementExecutor(boolean useVirtualThreads, List interceptors) { - this.executor = createExecutorService(useVirtualThreads); + StatementExecutor(StatementExecutorType type, List interceptors) { + this.executor = createExecutorService(type); this.interceptors = Collections.unmodifiableList(interceptors); } diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/AbstractMockServerTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/AbstractMockServerTest.java index 375fdda2a95..fa3ab00b138 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/AbstractMockServerTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/AbstractMockServerTest.java @@ -283,6 +283,7 @@ ITConnection createConnection( ConnectionOptions.newBuilder() .setUri(getBaseUrl() + additionalUrlOptions) .setStatementExecutionInterceptors(interceptors); + configureConnectionOptions(builder); ConnectionOptions options = builder.build(); ITConnection connection = createITConnection(options); for (TransactionRetryListener listener : transactionRetryListeners) { @@ -291,6 +292,11 @@ ITConnection createConnection( return connection; } + protected ConnectionOptions.Builder configureConnectionOptions( + ConnectionOptions.Builder builder) { + return builder; + } + protected String getBaseUrl() { return String.format( "cloudspanner://localhost:%d/projects/proj/instances/inst/databases/db?usePlainText=true;autocommit=false;retryAbortsInternally=true", diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionAsyncApiAbortedTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionAsyncApiAbortedTest.java index 97d745edd7f..1f4378ecd86 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionAsyncApiAbortedTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionAsyncApiAbortedTest.java @@ -32,7 +32,9 @@ import com.google.cloud.spanner.Options; import com.google.cloud.spanner.SpannerExceptionFactory; import com.google.cloud.spanner.Statement; +import com.google.cloud.spanner.connection.ConnectionOptions.Builder; import com.google.cloud.spanner.connection.ITAbstractSpannerTest.ITConnection; +import com.google.cloud.spanner.connection.StatementExecutor.StatementExecutorType; import com.google.common.collect.Collections2; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; @@ -127,6 +129,11 @@ ITConnection createConnection(TransactionRetryListener listener) { return connection; } + @Override + protected Builder configureConnectionOptions(Builder builder) { + return builder.setStatementExecutorType(StatementExecutorType.PLATFORM_THREAD); + } + @Test public void testSingleQueryAborted() { RetryCounter counter = new RetryCounter(); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionAsyncApiTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionAsyncApiTest.java index 21fe086d4f8..c6777da5b51 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionAsyncApiTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionAsyncApiTest.java @@ -36,7 +36,9 @@ import com.google.cloud.spanner.SpannerApiFutures; import com.google.cloud.spanner.SpannerException; import com.google.cloud.spanner.Statement; +import com.google.cloud.spanner.connection.ConnectionOptions.Builder; import com.google.cloud.spanner.connection.SpannerPool.CheckAndCloseSpannersMode; +import com.google.cloud.spanner.connection.StatementExecutor.StatementExecutorType; import com.google.cloud.spanner.connection.StatementResult.ResultType; import com.google.common.base.Function; import com.google.common.collect.Collections2; @@ -86,6 +88,11 @@ public void setup() { } } + @Override + protected Builder configureConnectionOptions(Builder builder) { + return builder.setStatementExecutorType(StatementExecutorType.PLATFORM_THREAD); + } + @After public void reset() { mockSpanner.removeAllExecutionTimes(); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionTest.java index c5b34982255..9ae174bd403 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionTest.java @@ -36,6 +36,8 @@ import com.google.cloud.spanner.SpannerOptions; import com.google.cloud.spanner.Statement; import com.google.cloud.spanner.TimestampBound; +import com.google.cloud.spanner.connection.ConnectionOptions.Builder; +import com.google.cloud.spanner.connection.StatementExecutor.StatementExecutorType; import com.google.common.collect.ImmutableList; import com.google.spanner.v1.BatchCreateSessionsRequest; import com.google.spanner.v1.CommitRequest; @@ -417,6 +419,11 @@ protected String getBaseUrl() { return super.getBaseUrl() + ";maxSessions=1"; } + @Override + protected Builder configureConnectionOptions(Builder builder) { + return builder.setStatementExecutorType(StatementExecutorType.PLATFORM_THREAD); + } + @Test public void testMaxSessions() throws InterruptedException, TimeoutException, ExecutionException { diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/StatementTimeoutTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/StatementTimeoutTest.java index f55c55c6c93..a50fb98f1e3 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/StatementTimeoutTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/StatementTimeoutTest.java @@ -23,6 +23,7 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertThrows; import static org.junit.Assert.assertTrue; +import static org.junit.Assume.assumeFalse; import com.google.api.core.SettableApiFuture; import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; @@ -35,6 +36,7 @@ import com.google.cloud.spanner.Statement; import com.google.cloud.spanner.connection.AbstractConnectionImplTest.ConnectionConsumer; import com.google.cloud.spanner.connection.ITAbstractSpannerTest.ITConnection; +import com.google.cloud.spanner.connection.StatementExecutor.StatementExecutorType; import com.google.common.base.Stopwatch; import com.google.common.collect.Collections2; import com.google.longrunning.Operation; @@ -58,9 +60,11 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; -@RunWith(JUnit4.class) +@RunWith(Parameterized.class) public class StatementTimeoutTest extends AbstractMockServerTest { private static final String SLOW_SELECT = "SELECT foo FROM bar"; @@ -85,10 +89,18 @@ public class StatementTimeoutTest extends AbstractMockServerTest { */ private static final int TIMEOUT_FOR_SLOW_STATEMENTS = 50; + @Parameters(name = "statementExecutorType = {0}") + public static Object[] parameters() { + return StatementExecutorType.values(); + } + + @Parameter public StatementExecutorType statementExecutorType; + protected ITConnection createConnection() { ConnectionOptions options = ConnectionOptions.newBuilder() .setUri(getBaseUrl() + ";trackSessionLeaks=false") + .setStatementExecutorType(statementExecutorType) .setConfigurator( optionsConfigurator -> optionsConfigurator @@ -618,6 +630,10 @@ private void waitForDdlRequestOnServer() { @Test public void testCancelReadOnlyAutocommit() { + assumeFalse( + "Direct executor does not yet support cancelling statements", + statementExecutorType == StatementExecutorType.DIRECT_EXECUTOR); + mockSpanner.setExecuteStreamingSqlExecutionTime( SimulatedExecutionTime.ofMinimumAndRandomTime(EXECUTION_TIME_SLOW_STATEMENT, 0)); @@ -643,6 +659,10 @@ public void testCancelReadOnlyAutocommit() { @Test public void testCancelReadOnlyAutocommitMultipleStatements() { + assumeFalse( + "Direct executor does not yet support cancelling statements", + statementExecutorType == StatementExecutorType.DIRECT_EXECUTOR); + mockSpanner.setExecuteStreamingSqlExecutionTime( SimulatedExecutionTime.ofMinimumAndRandomTime(EXECUTION_TIME_SLOW_STATEMENT, 0)); @@ -675,6 +695,10 @@ public void testCancelReadOnlyAutocommitMultipleStatements() { @Test public void testCancelReadOnlyTransactional() { + assumeFalse( + "Direct executor does not yet support cancelling statements", + statementExecutorType == StatementExecutorType.DIRECT_EXECUTOR); + mockSpanner.setExecuteStreamingSqlExecutionTime( SimulatedExecutionTime.ofMinimumAndRandomTime(EXECUTION_TIME_SLOW_STATEMENT, 0)); @@ -700,6 +724,10 @@ public void testCancelReadOnlyTransactional() { @Test public void testCancelReadOnlyTransactionalMultipleStatements() { + assumeFalse( + "Direct executor does not yet support cancelling statements", + statementExecutorType == StatementExecutorType.DIRECT_EXECUTOR); + mockSpanner.setExecuteStreamingSqlExecutionTime( SimulatedExecutionTime.ofMinimumAndRandomTime(EXECUTION_TIME_SLOW_STATEMENT, 0)); @@ -737,6 +765,10 @@ public void testCancelReadOnlyTransactionalMultipleStatements() { @Test public void testCancelReadWriteAutocommit() { + assumeFalse( + "Direct executor does not yet support cancelling statements", + statementExecutorType == StatementExecutorType.DIRECT_EXECUTOR); + mockSpanner.setExecuteStreamingSqlExecutionTime( SimulatedExecutionTime.ofMinimumAndRandomTime(EXECUTION_TIME_SLOW_STATEMENT, 0)); @@ -761,6 +793,10 @@ public void testCancelReadWriteAutocommit() { @Test public void testCancelReadWriteAutocommitMultipleStatements() { + assumeFalse( + "Direct executor does not yet support cancelling statements", + statementExecutorType == StatementExecutorType.DIRECT_EXECUTOR); + mockSpanner.setExecuteStreamingSqlExecutionTime( SimulatedExecutionTime.ofMinimumAndRandomTime(EXECUTION_TIME_SLOW_STATEMENT, 0)); @@ -792,6 +828,10 @@ public void testCancelReadWriteAutocommitMultipleStatements() { @Test public void testCancelReadWriteAutocommitSlowUpdate() { + assumeFalse( + "Direct executor does not yet support cancelling statements", + statementExecutorType == StatementExecutorType.DIRECT_EXECUTOR); + mockSpanner.setExecuteSqlExecutionTime( SimulatedExecutionTime.ofMinimumAndRandomTime(EXECUTION_TIME_SLOW_STATEMENT, 0)); @@ -815,6 +855,10 @@ public void testCancelReadWriteAutocommitSlowUpdate() { @Test public void testCancelReadWriteAutocommitSlowCommit() { + assumeFalse( + "Direct executor does not yet support cancelling statements", + statementExecutorType == StatementExecutorType.DIRECT_EXECUTOR); + mockSpanner.setCommitExecutionTime( SimulatedExecutionTime.ofMinimumAndRandomTime(EXECUTION_TIME_SLOW_STATEMENT, 0)); @@ -838,6 +882,10 @@ public void testCancelReadWriteAutocommitSlowCommit() { @Test public void testCancelReadWriteTransactional() { + assumeFalse( + "Direct executor does not yet support cancelling statements", + statementExecutorType == StatementExecutorType.DIRECT_EXECUTOR); + mockSpanner.setExecuteStreamingSqlExecutionTime( SimulatedExecutionTime.ofMinimumAndRandomTime(EXECUTION_TIME_SLOW_STATEMENT, 0)); @@ -862,6 +910,10 @@ public void testCancelReadWriteTransactional() { @Test public void testCancelReadWriteTransactionalMultipleStatements() { + assumeFalse( + "Direct executor does not yet support cancelling statements", + statementExecutorType == StatementExecutorType.DIRECT_EXECUTOR); + mockSpanner.setExecuteStreamingSqlExecutionTime( SimulatedExecutionTime.ofMinimumAndRandomTime(EXECUTION_TIME_SLOW_STATEMENT, 0)); @@ -928,6 +980,10 @@ static void addMockDdlOperations(int count, boolean done) { @Test public void testCancelDdlBatch() { + assumeFalse( + "Direct executor does not yet support cancelling statements", + statementExecutorType == StatementExecutorType.DIRECT_EXECUTOR); + addSlowMockDdlOperation(); try (Connection connection = createConnection()) { @@ -951,6 +1007,10 @@ public void testCancelDdlBatch() { @Test public void testCancelDdlAutocommit() { + assumeFalse( + "Direct executor does not yet support cancelling statements", + statementExecutorType == StatementExecutorType.DIRECT_EXECUTOR); + addSlowMockDdlOperation(); try (Connection connection = createConnection()) { From 331942f51b11660b9de9c8fe8aacd6f60ac254b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Knut=20Olav=20L=C3=B8ite?= Date: Tue, 10 Dec 2024 10:29:15 +0100 Subject: [PATCH 5/7] feat: support 'set local' for retry_aborts_internally (#3532) Adds support for `set local retry_aborts_internally=true|false` in the Connection API. This change also adds the parsing infrastructure that is needed to support `set local` for all connection variables. Support for this will be added to other connection variables in follow-up pull requests. --- .../ClientSideStatementSetExecutor.java | 62 +- .../spanner/connection/ConnectionImpl.java | 6 +- .../ConnectionStatementExecutor.java | 2 +- .../ConnectionStatementExecutorImpl.java | 5 +- .../connection/ClientSideStatements.json | 11 +- .../connection/PG_ClientSideStatements.json | 19 +- .../ConnectionStateMockServerTest.java | 63 + .../connection/ClientSideStatementsTest.sql | 674 +++++ .../ConnectionImplGeneratedSqlScriptTest.sql | 224 +- .../postgresql/ClientSideStatementsTest.sql | 2696 +++++++++++++++++ .../ConnectionImplGeneratedSqlScriptTest.sql | 224 +- 11 files changed, 3740 insertions(+), 246 deletions(-) diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ClientSideStatementSetExecutor.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ClientSideStatementSetExecutor.java index 413905116ff..38c7c364106 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ClientSideStatementSetExecutor.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ClientSideStatementSetExecutor.java @@ -16,13 +16,18 @@ package com.google.cloud.spanner.connection; +import com.google.cloud.Tuple; import com.google.cloud.spanner.ErrorCode; import com.google.cloud.spanner.SpannerExceptionFactory; import com.google.cloud.spanner.connection.AbstractStatementParser.ParsedStatement; import com.google.cloud.spanner.connection.ClientSideStatementImpl.CompileException; import com.google.common.base.Preconditions; +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; +import com.google.common.util.concurrent.UncheckedExecutionException; import java.lang.reflect.Constructor; import java.lang.reflect.Method; +import java.util.concurrent.ExecutionException; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -31,8 +36,10 @@ * AUTOCOMMIT=TRUE. */ class ClientSideStatementSetExecutor implements ClientSideStatementExecutor { + private final Cache> cache; private final ClientSideStatementImpl statement; private final Method method; + private final boolean supportsLocal; private final ClientSideStatementValueConverter converter; private final Pattern allowedValuesPattern; @@ -46,12 +53,18 @@ class ClientSideStatementSetExecutor implements ClientSideStatementExecutor { @SuppressWarnings("unchecked") ClientSideStatementSetExecutor(ClientSideStatementImpl statement) throws CompileException { Preconditions.checkNotNull(statement.getSetStatement()); + this.cache = + CacheBuilder.newBuilder() + .maximumSize(25) + // Set the concurrency level to 1, as we don't expect many concurrent updates. + .concurrencyLevel(1) + .build(); try { this.statement = statement; this.allowedValuesPattern = Pattern.compile( String.format( - "(?is)\\A\\s*set\\s+%s\\s*%s\\s*%s\\s*\\z", + "(?is)\\A\\s*set\\s+((?:local|session)\\s+)?%s\\s*%s\\s*%s\\s*\\z", statement.getSetStatement().getPropertyName(), statement.getSetStatement().getSeparator(), statement.getSetStatement().getAllowedValues())); @@ -64,9 +77,21 @@ class ClientSideStatementSetExecutor implements ClientSideStatementExecutor { Constructor> constructor = converterClass.getConstructor(String.class); this.converter = constructor.newInstance(statement.getSetStatement().getAllowedValues()); - this.method = - ConnectionStatementExecutor.class.getDeclaredMethod( - statement.getMethodName(), converter.getParameterClass()); + Method method; + boolean supportsLocal; + try { + method = + ConnectionStatementExecutor.class.getDeclaredMethod( + statement.getMethodName(), converter.getParameterClass()); + supportsLocal = false; + } catch (NoSuchMethodException ignore) { + method = + ConnectionStatementExecutor.class.getDeclaredMethod( + statement.getMethodName(), converter.getParameterClass(), Boolean.class); + supportsLocal = true; + } + this.method = method; + this.supportsLocal = supportsLocal; } catch (Exception e) { throw new CompileException(e, statement); } @@ -75,17 +100,29 @@ class ClientSideStatementSetExecutor implements ClientSideStatementExecutor { @Override public StatementResult execute(ConnectionStatementExecutor connection, ParsedStatement statement) throws Exception { - return (StatementResult) - method.invoke(connection, getParameterValue(statement.getSqlWithoutComments())); + Tuple value; + try { + value = + this.cache.get( + statement.getSqlWithoutComments(), + () -> getParameterValue(statement.getSqlWithoutComments())); + } catch (ExecutionException | UncheckedExecutionException executionException) { + throw SpannerExceptionFactory.asSpannerException(executionException.getCause()); + } + if (this.supportsLocal) { + return (StatementResult) method.invoke(connection, value.x(), value.y()); + } + return (StatementResult) method.invoke(connection, value.x()); } - T getParameterValue(String sql) { + Tuple getParameterValue(String sql) { Matcher matcher = allowedValuesPattern.matcher(sql); - if (matcher.find() && matcher.groupCount() >= 1) { - String value = matcher.group(1); + if (matcher.find() && matcher.groupCount() >= 2) { + boolean local = matcher.group(1) != null && "local".equalsIgnoreCase(matcher.group(1).trim()); + String value = matcher.group(2); T res = converter.convert(value); if (res != null) { - return res; + return Tuple.of(res, local); } throw SpannerExceptionFactory.newSpannerException( ErrorCode.INVALID_ARGUMENT, @@ -94,8 +131,9 @@ T getParameterValue(String sql) { this.statement.getSetStatement().getPropertyName(), value)); } else { Matcher invalidMatcher = this.statement.getPattern().matcher(sql); - if (invalidMatcher.find() && invalidMatcher.groupCount() == 1) { - String invalidValue = invalidMatcher.group(1); + int valueGroup = this.supportsLocal ? 2 : 1; + if (invalidMatcher.find() && invalidMatcher.groupCount() == valueGroup) { + String invalidValue = invalidMatcher.group(valueGroup); throw SpannerExceptionFactory.newSpannerException( ErrorCode.INVALID_ARGUMENT, String.format( diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionImpl.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionImpl.java index 25ee8b39af4..9f4a43d5a2e 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionImpl.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionImpl.java @@ -942,8 +942,12 @@ public boolean isRetryAbortsInternally() { @Override public void setRetryAbortsInternally(boolean retryAbortsInternally) { + setRetryAbortsInternally(retryAbortsInternally, /* local = */ false); + } + + void setRetryAbortsInternally(boolean retryAbortsInternally, boolean local) { checkSetRetryAbortsInternallyAvailable(); - setConnectionPropertyValue(RETRY_ABORTS_INTERNALLY, retryAbortsInternally); + setConnectionPropertyValue(RETRY_ABORTS_INTERNALLY, retryAbortsInternally, local); } @Override diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionStatementExecutor.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionStatementExecutor.java index 48f79118fee..458f117242e 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionStatementExecutor.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionStatementExecutor.java @@ -44,7 +44,7 @@ interface ConnectionStatementExecutor { StatementResult statementShowReadOnly(); - StatementResult statementSetRetryAbortsInternally(Boolean retryAbortsInternally); + StatementResult statementSetRetryAbortsInternally(Boolean retryAbortsInternally, Boolean local); StatementResult statementShowRetryAbortsInternally(); diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionStatementExecutorImpl.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionStatementExecutorImpl.java index 9b28ee7503b..a321c6a5cbc 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionStatementExecutorImpl.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionStatementExecutorImpl.java @@ -181,9 +181,10 @@ public StatementResult statementShowReadOnly() { } @Override - public StatementResult statementSetRetryAbortsInternally(Boolean retryAbortsInternally) { + public StatementResult statementSetRetryAbortsInternally( + Boolean retryAbortsInternally, Boolean local) { Preconditions.checkNotNull(retryAbortsInternally); - getConnection().setRetryAbortsInternally(retryAbortsInternally); + getConnection().setRetryAbortsInternally(retryAbortsInternally, local); return noResult(SET_RETRY_ABORTS_INTERNALLY); } diff --git a/google-cloud-spanner/src/main/resources/com/google/cloud/spanner/connection/ClientSideStatements.json b/google-cloud-spanner/src/main/resources/com/google/cloud/spanner/connection/ClientSideStatements.json index 31e8d4efd1d..7998d50c2b8 100644 --- a/google-cloud-spanner/src/main/resources/com/google/cloud/spanner/connection/ClientSideStatements.json +++ b/google-cloud-spanner/src/main/resources/com/google/cloud/spanner/connection/ClientSideStatements.json @@ -355,13 +355,18 @@ } }, { - "name": "SET RETRY_ABORTS_INTERNALLY = TRUE|FALSE", + "name": "SET [LOCAL] RETRY_ABORTS_INTERNALLY = TRUE|FALSE", "executorName": "ClientSideStatementSetExecutor", "resultType": "NO_RESULT", "statementType": "SET_RETRY_ABORTS_INTERNALLY", - "regex": "(?is)\\A\\s*set\\s+retry_aborts_internally\\s*(?:=)\\s*(.*)\\z", + "regex": "(?is)\\A\\s*set\\s+(local\\s+)?retry_aborts_internally\\s*(?:=)\\s*(.*)\\z", "method": "statementSetRetryAbortsInternally", - "exampleStatements": ["set retry_aborts_internally = true", "set retry_aborts_internally = false"], + "exampleStatements": [ + "set retry_aborts_internally = true", + "set retry_aborts_internally = false", + "set local retry_aborts_internally = true", + "set local retry_aborts_internally = false" + ], "examplePrerequisiteStatements": ["set readonly = false", "set autocommit = false"], "setStatement": { "propertyName": "RETRY_ABORTS_INTERNALLY", diff --git a/google-cloud-spanner/src/main/resources/com/google/cloud/spanner/connection/PG_ClientSideStatements.json b/google-cloud-spanner/src/main/resources/com/google/cloud/spanner/connection/PG_ClientSideStatements.json index 969487142e1..1c9dea19597 100644 --- a/google-cloud-spanner/src/main/resources/com/google/cloud/spanner/connection/PG_ClientSideStatements.json +++ b/google-cloud-spanner/src/main/resources/com/google/cloud/spanner/connection/PG_ClientSideStatements.json @@ -404,13 +404,26 @@ } }, { - "name": "SET SPANNER.RETRY_ABORTS_INTERNALLY =|TO TRUE|FALSE", + "name": "SET [SESSION|LOCAL] SPANNER.RETRY_ABORTS_INTERNALLY =|TO TRUE|FALSE", "executorName": "ClientSideStatementSetExecutor", "resultType": "NO_RESULT", "statementType": "SET_RETRY_ABORTS_INTERNALLY", - "regex": "(?is)\\A\\s*set\\s+spanner\\.retry_aborts_internally(?:\\s*=\\s*|\\s+to\\s+)(.*)\\z", + "regex": "(?is)\\A\\s*set\\s+((?:session|local)\\s+)?spanner\\.retry_aborts_internally(?:\\s*=\\s*|\\s+to\\s+)(.*)\\z", "method": "statementSetRetryAbortsInternally", - "exampleStatements": ["set spanner.retry_aborts_internally = true", "set spanner.retry_aborts_internally = false", "set spanner.retry_aborts_internally to true", "set spanner.retry_aborts_internally to false"], + "exampleStatements": [ + "set spanner.retry_aborts_internally = true", + "set spanner.retry_aborts_internally = false", + "set spanner.retry_aborts_internally to true", + "set spanner.retry_aborts_internally to false", + "set local spanner.retry_aborts_internally = true", + "set local spanner.retry_aborts_internally = false", + "set local spanner.retry_aborts_internally to true", + "set local spanner.retry_aborts_internally to false", + "set session spanner.retry_aborts_internally = true", + "set session spanner.retry_aborts_internally = false", + "set session spanner.retry_aborts_internally to true", + "set session spanner.retry_aborts_internally to false" + ], "examplePrerequisiteStatements": ["set spanner.readonly = false", "set autocommit = false"], "setStatement": { "propertyName": "SPANNER.RETRY_ABORTS_INTERNALLY", diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionStateMockServerTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionStateMockServerTest.java index ea79a7132bf..4c9397a6714 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionStateMockServerTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionStateMockServerTest.java @@ -19,10 +19,15 @@ import static com.google.cloud.spanner.connection.ConnectionProperties.CONNECTION_STATE_TYPE; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertThrows; import static org.junit.Assert.assertTrue; +import static org.junit.Assume.assumeTrue; import com.google.cloud.spanner.Dialect; +import com.google.cloud.spanner.ErrorCode; import com.google.cloud.spanner.MockSpannerServiceImpl.StatementResult; +import com.google.cloud.spanner.SpannerException; +import com.google.cloud.spanner.Statement; import com.google.cloud.spanner.connection.ConnectionState.Type; import com.google.cloud.spanner.connection.ITAbstractSpannerTest.ITConnection; import org.junit.After; @@ -84,6 +89,10 @@ ITConnection createConnection(ConnectionState.Type type) { return createConnection(";" + CONNECTION_STATE_TYPE.getKey() + "=" + type.name()); } + String getPrefix() { + return dialect == Dialect.POSTGRESQL ? "SPANNER." : ""; + } + @Test public void testConnectionStateType() { try (Connection connection = createConnection()) { @@ -228,4 +237,58 @@ public void testLocalChangeIsLostAfterTransaction() { } } } + + @Test + public void testSetLocalWithSqlStatement() { + try (Connection connection = createConnection()) { + connection.setAutocommit(false); + + assertTrue(connection.isRetryAbortsInternally()); + connection.execute( + Statement.of(String.format("set local %sretry_aborts_internally=false", getPrefix()))); + assertFalse(connection.isRetryAbortsInternally()); + connection.commit(); + assertTrue(connection.isRetryAbortsInternally()); + } + } + + @Test + public void testSetSessionWithSqlStatement() { + assumeTrue("Only PostgreSQL supports the 'session' keyword", dialect == Dialect.POSTGRESQL); + + try (Connection connection = createConnection()) { + connection.setAutocommit(false); + + assertTrue(connection.isRetryAbortsInternally()); + connection.execute( + Statement.of(String.format("set session %sretry_aborts_internally=false", getPrefix()))); + assertFalse(connection.isRetryAbortsInternally()); + connection.commit(); + assertFalse(connection.isRetryAbortsInternally()); + } + } + + @Test + public void testSetLocalInvalidValue() { + try (Connection connection = createConnection()) { + connection.setAutocommit(false); + + assertTrue(connection.isRetryAbortsInternally()); + SpannerException exception = + assertThrows( + SpannerException.class, + () -> + connection.execute( + Statement.of( + String.format("set local %sretry_aborts_internally=foo", getPrefix())))); + assertEquals(ErrorCode.INVALID_ARGUMENT, exception.getErrorCode()); + assertTrue( + exception.getMessage(), + exception + .getMessage() + .endsWith( + String.format("Unknown value for %sRETRY_ABORTS_INTERNALLY: foo", getPrefix()))); + assertTrue(connection.isRetryAbortsInternally()); + } + } } diff --git a/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/ClientSideStatementsTest.sql b/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/ClientSideStatementsTest.sql index 552e75f1097..181f30987d0 100644 --- a/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/ClientSideStatementsTest.sql +++ b/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/ClientSideStatementsTest.sql @@ -9895,6 +9895,680 @@ set autocommit = false; @EXPECT EXCEPTION INVALID_ARGUMENT set retry_aborts_internally =/-false; NEW_CONNECTION; +set readonly = false; +set autocommit = false; +set local retry_aborts_internally = true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +SET LOCAL RETRY_ABORTS_INTERNALLY = TRUE; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +set local retry_aborts_internally = true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; + set local retry_aborts_internally = true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; + set local retry_aborts_internally = true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; + + + +set local retry_aborts_internally = true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +set local retry_aborts_internally = true ; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +set local retry_aborts_internally = true ; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +set local retry_aborts_internally = true + +; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +set local retry_aborts_internally = true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +set local retry_aborts_internally = true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +set +local +retry_aborts_internally += +true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +foo set local retry_aborts_internally = true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = true bar; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +%set local retry_aborts_internally = true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = true%; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally =%true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +_set local retry_aborts_internally = true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = true_; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally =_true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +&set local retry_aborts_internally = true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = true&; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally =&true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +$set local retry_aborts_internally = true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = true$; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally =$true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +@set local retry_aborts_internally = true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = true@; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally =@true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +!set local retry_aborts_internally = true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = true!; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally =!true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +*set local retry_aborts_internally = true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = true*; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally =*true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +(set local retry_aborts_internally = true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = true(; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally =(true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +)set local retry_aborts_internally = true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = true); +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally =)true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +-set local retry_aborts_internally = true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = true-; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally =-true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT ++set local retry_aborts_internally = true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = true+; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally =+true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +-#set local retry_aborts_internally = true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = true-#; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally =-#true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +/set local retry_aborts_internally = true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = true/; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally =/true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +\set local retry_aborts_internally = true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = true\; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally =\true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +?set local retry_aborts_internally = true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = true?; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally =?true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +-/set local retry_aborts_internally = true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = true-/; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally =-/true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +/#set local retry_aborts_internally = true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = true/#; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally =/#true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +/-set local retry_aborts_internally = true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = true/-; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally =/-true; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +set local retry_aborts_internally = false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +SET LOCAL RETRY_ABORTS_INTERNALLY = FALSE; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +set local retry_aborts_internally = false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; + set local retry_aborts_internally = false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; + set local retry_aborts_internally = false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; + + + +set local retry_aborts_internally = false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +set local retry_aborts_internally = false ; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +set local retry_aborts_internally = false ; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +set local retry_aborts_internally = false + +; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +set local retry_aborts_internally = false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +set local retry_aborts_internally = false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +set +local +retry_aborts_internally += +false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +foo set local retry_aborts_internally = false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = false bar; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +%set local retry_aborts_internally = false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = false%; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally =%false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +_set local retry_aborts_internally = false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = false_; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally =_false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +&set local retry_aborts_internally = false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = false&; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally =&false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +$set local retry_aborts_internally = false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = false$; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally =$false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +@set local retry_aborts_internally = false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = false@; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally =@false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +!set local retry_aborts_internally = false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = false!; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally =!false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +*set local retry_aborts_internally = false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = false*; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally =*false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +(set local retry_aborts_internally = false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = false(; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally =(false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +)set local retry_aborts_internally = false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = false); +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally =)false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +-set local retry_aborts_internally = false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = false-; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally =-false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT ++set local retry_aborts_internally = false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = false+; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally =+false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +-#set local retry_aborts_internally = false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = false-#; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally =-#false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +/set local retry_aborts_internally = false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = false/; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally =/false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +\set local retry_aborts_internally = false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = false\; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally =\false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +?set local retry_aborts_internally = false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = false?; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally =?false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +-/set local retry_aborts_internally = false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = false-/; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally =-/false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +/#set local retry_aborts_internally = false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = false/#; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally =/#false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +/-set local retry_aborts_internally = false; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally = false/-; +NEW_CONNECTION; +set readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local retry_aborts_internally =/-false; +NEW_CONNECTION; set autocommit_dml_mode='PARTITIONED_NON_ATOMIC'; NEW_CONNECTION; SET AUTOCOMMIT_DML_MODE='PARTITIONED_NON_ATOMIC'; diff --git a/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/ConnectionImplGeneratedSqlScriptTest.sql b/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/ConnectionImplGeneratedSqlScriptTest.sql index 5985ba92479..5dcf6577d5b 100644 --- a/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/ConnectionImplGeneratedSqlScriptTest.sql +++ b/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/ConnectionImplGeneratedSqlScriptTest.sql @@ -160,15 +160,15 @@ NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; COMMIT; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.066000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:10.066000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:24.280000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:24.280000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; COMMIT; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.066000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:24.280000000Z'; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; @@ -510,15 +510,15 @@ NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; SET READ_ONLY_STALENESS='EXACT_STALENESS 10s'; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.187000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:10.187000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:24.405000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:24.405000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; SET READ_ONLY_STALENESS='EXACT_STALENESS 10s'; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.187000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:24.405000000Z'; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; @@ -950,8 +950,8 @@ BEGIN TRANSACTION; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; ROLLBACK; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.294000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:10.294000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:24.518000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:24.518000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; @@ -961,7 +961,7 @@ BEGIN TRANSACTION; SELECT 1 AS TEST; ROLLBACK; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.294000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:24.518000000Z'; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; @@ -1462,8 +1462,8 @@ BEGIN TRANSACTION; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; COMMIT; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.413000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:10.413000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:24.636000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:24.636000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; @@ -1473,7 +1473,7 @@ BEGIN TRANSACTION; SELECT 1 AS TEST; COMMIT; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.413000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:24.636000000Z'; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; @@ -1876,15 +1876,15 @@ NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; BEGIN TRANSACTION; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.523000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:10.523000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:24.733000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:24.733000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; BEGIN TRANSACTION; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.523000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:24.733000000Z'; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; @@ -2243,14 +2243,14 @@ SET AUTOCOMMIT=FALSE; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.613000000Z'; +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:24.812000000Z'; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.613000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:24.812000000Z'; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; @@ -2600,13 +2600,13 @@ SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; SELECT 1 AS TEST; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.705000000Z'; +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:24.901000000Z'; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; SELECT 1 AS TEST; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.705000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:24.901000000Z'; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; @@ -2910,14 +2910,14 @@ SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.790000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:10.790000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:24.978000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:24.978000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.790000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:24.978000000Z'; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; @@ -3245,15 +3245,15 @@ NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; COMMIT; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.890000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:10.890000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.078000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.078000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; COMMIT; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.890000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.078000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -3662,8 +3662,8 @@ SET AUTOCOMMIT=FALSE; START BATCH DDL; CREATE TABLE foo (id INT64 NOT NULL, name STRING(100)) PRIMARY KEY (id); RUN BATCH; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.965000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:10.965000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.149000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.149000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; @@ -3672,7 +3672,7 @@ START BATCH DDL; CREATE TABLE foo (id INT64 NOT NULL, name STRING(100)) PRIMARY KEY (id); RUN BATCH; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.965000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.149000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -4081,14 +4081,14 @@ SET AUTOCOMMIT=FALSE; START BATCH DDL; CREATE TABLE foo (id INT64 NOT NULL, name STRING(100)) PRIMARY KEY (id); @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.043000000Z'; +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.223000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; START BATCH DDL; CREATE TABLE foo (id INT64 NOT NULL, name STRING(100)) PRIMARY KEY (id); @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.043000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.223000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -4438,13 +4438,13 @@ SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; START BATCH DDL; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.113000000Z'; +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.284000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; START BATCH DDL; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.113000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.284000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -4877,8 +4877,8 @@ SET TRANSACTION READ ONLY; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; COMMIT; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.181000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:11.181000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.349000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.349000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; @@ -4888,7 +4888,7 @@ SET TRANSACTION READ ONLY; SELECT 1 AS TEST; COMMIT; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.181000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.349000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -5288,15 +5288,15 @@ NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; SET TRANSACTION READ ONLY; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.260000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:11.260000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.424000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.424000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; SET TRANSACTION READ ONLY; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.260000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.424000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -5641,15 +5641,15 @@ NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; SET READ_ONLY_STALENESS='EXACT_STALENESS 10s'; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.330000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:11.330000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.488000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.488000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; SET READ_ONLY_STALENESS='EXACT_STALENESS 10s'; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.330000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.488000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -6088,8 +6088,8 @@ BEGIN TRANSACTION; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; ROLLBACK; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.402000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:11.402000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.558000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.558000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; @@ -6099,7 +6099,7 @@ BEGIN TRANSACTION; SELECT 1 AS TEST; ROLLBACK; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.402000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.558000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -6607,8 +6607,8 @@ BEGIN TRANSACTION; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; COMMIT; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.495000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:11.495000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.646000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.646000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; @@ -6618,7 +6618,7 @@ BEGIN TRANSACTION; SELECT 1 AS TEST; COMMIT; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.495000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.646000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -7023,15 +7023,15 @@ NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; BEGIN TRANSACTION; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.578000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:11.578000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.725000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.725000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; BEGIN TRANSACTION; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.578000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.725000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -7394,14 +7394,14 @@ SET AUTOCOMMIT=FALSE; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.654000000Z'; +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.790000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.654000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.790000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -7756,13 +7756,13 @@ SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; SELECT 1 AS TEST; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.734000000Z'; +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.868000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; SELECT 1 AS TEST; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.734000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.868000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -8075,14 +8075,14 @@ SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.805000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:11.805000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.940000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.940000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.805000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.940000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -8392,13 +8392,13 @@ SET READONLY=FALSE; SET AUTOCOMMIT=TRUE; START BATCH DDL; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.865000000Z'; +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=TRUE; START BATCH DDL; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.865000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=TRUE; @@ -8753,8 +8753,8 @@ SET READONLY=FALSE; SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; SET TRANSACTION READ ONLY; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.924000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:11.924000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.061000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.061000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; @@ -8762,7 +8762,7 @@ SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; SET TRANSACTION READ ONLY; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.924000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.061000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=TRUE; @@ -9200,8 +9200,8 @@ SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; UPDATE foo SET bar=1; COMMIT; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.991000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:11.991000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.128000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.128000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; @@ -9209,8 +9209,8 @@ SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; UPDATE foo SET bar=1; COMMIT; -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.991000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:11.991000000Z' +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.128000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.128000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; @@ -9596,15 +9596,15 @@ NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.064000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.064000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.200000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.200000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.064000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.200000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=TRUE; @@ -9958,15 +9958,15 @@ NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=TRUE; CREATE TABLE foo (id INT64 NOT NULL, name STRING(100)) PRIMARY KEY (id); -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.125000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.125000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.258000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.258000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=TRUE; CREATE TABLE foo (id INT64 NOT NULL, name STRING(100)) PRIMARY KEY (id); -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.125000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.125000000Z' +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.258000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.258000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; @@ -10329,15 +10329,15 @@ NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=TRUE; UPDATE foo SET bar=1; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.193000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.193000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.325000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.325000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=TRUE; UPDATE foo SET bar=1; -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.193000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.193000000Z' +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.325000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.325000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; @@ -10730,16 +10730,16 @@ SET READONLY=FALSE; SET AUTOCOMMIT=TRUE; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.262000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.262000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.390000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.390000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=TRUE; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.262000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.262000000Z' +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.390000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.390000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; @@ -11125,15 +11125,15 @@ NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=TRUE; SELECT 1 AS TEST; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.330000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.330000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.456000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.456000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=TRUE; SELECT 1 AS TEST; -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.330000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.330000000Z' +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.456000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.456000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; @@ -11466,14 +11466,14 @@ SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=TRUE; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.396000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.396000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.538000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.538000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=TRUE; -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.396000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.396000000Z' +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.538000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.538000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; @@ -11796,15 +11796,15 @@ NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=TRUE; SET READ_ONLY_STALENESS='MAX_STALENESS 10s'; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.456000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.456000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.595000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.595000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=TRUE; SET READ_ONLY_STALENESS='MAX_STALENESS 10s'; -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.456000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.456000000Z' +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.595000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.595000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; @@ -12211,8 +12211,8 @@ SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; SELECT 1 AS TEST; COMMIT; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.519000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.519000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.658000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.658000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; @@ -12220,8 +12220,8 @@ SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; SELECT 1 AS TEST; COMMIT; -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.519000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.519000000Z' +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.658000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.658000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; @@ -12604,15 +12604,15 @@ NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.586000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.586000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.723000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.723000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.586000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.723000000Z'; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=TRUE; @@ -12950,15 +12950,15 @@ NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=TRUE; SELECT 1 AS TEST; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.650000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.650000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.781000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.781000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=TRUE; SELECT 1 AS TEST; -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.650000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.650000000Z' +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.781000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.781000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; @@ -13305,15 +13305,15 @@ NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=TRUE; SELECT 1 AS TEST; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.715000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.715000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.844000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.844000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=TRUE; SELECT 1 AS TEST; -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.715000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.715000000Z' +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.844000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.844000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; @@ -13630,14 +13630,14 @@ SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=TRUE; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.778000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.778000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.904000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.904000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=TRUE; -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.778000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.778000000Z' +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.904000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.904000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; diff --git a/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/postgresql/ClientSideStatementsTest.sql b/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/postgresql/ClientSideStatementsTest.sql index aea0bf4b808..54374f0ad87 100644 --- a/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/postgresql/ClientSideStatementsTest.sql +++ b/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/postgresql/ClientSideStatementsTest.sql @@ -49892,6 +49892,2702 @@ set autocommit = false; @EXPECT EXCEPTION INVALID_ARGUMENT set spanner.retry_aborts_internally to/-false; NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set local spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +SET LOCAL SPANNER.RETRY_ABORTS_INTERNALLY = TRUE; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set local spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; + set local spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; + set local spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; + + + +set local spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set local spanner.retry_aborts_internally = true ; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set local spanner.retry_aborts_internally = true ; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set local spanner.retry_aborts_internally = true + +; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set local spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set local spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set +local +spanner.retry_aborts_internally += +true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +foo set local spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = true bar; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +%set local spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = true%; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally =%true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +_set local spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = true_; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally =_true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +&set local spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = true&; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally =&true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +$set local spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = true$; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally =$true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +@set local spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = true@; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally =@true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +!set local spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = true!; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally =!true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +*set local spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = true*; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally =*true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +(set local spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = true(; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally =(true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +)set local spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = true); +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally =)true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +-set local spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = true-; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally =-true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT ++set local spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = true+; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally =+true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +-#set local spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = true-#; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally =-#true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +/set local spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = true/; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally =/true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +\set local spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = true\; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally =\true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +?set local spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = true?; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally =?true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +-/set local spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = true-/; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally =-/true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +/#set local spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = true/#; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally =/#true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +/-set local spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = true/-; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally =/-true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set local spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +SET LOCAL SPANNER.RETRY_ABORTS_INTERNALLY = FALSE; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set local spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; + set local spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; + set local spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; + + + +set local spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set local spanner.retry_aborts_internally = false ; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set local spanner.retry_aborts_internally = false ; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set local spanner.retry_aborts_internally = false + +; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set local spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set local spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set +local +spanner.retry_aborts_internally += +false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +foo set local spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = false bar; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +%set local spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = false%; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally =%false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +_set local spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = false_; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally =_false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +&set local spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = false&; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally =&false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +$set local spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = false$; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally =$false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +@set local spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = false@; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally =@false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +!set local spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = false!; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally =!false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +*set local spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = false*; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally =*false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +(set local spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = false(; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally =(false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +)set local spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = false); +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally =)false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +-set local spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = false-; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally =-false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT ++set local spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = false+; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally =+false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +-#set local spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = false-#; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally =-#false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +/set local spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = false/; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally =/false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +\set local spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = false\; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally =\false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +?set local spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = false?; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally =?false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +-/set local spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = false-/; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally =-/false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +/#set local spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = false/#; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally =/#false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +/-set local spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally = false/-; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally =/-false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set local spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +SET LOCAL SPANNER.RETRY_ABORTS_INTERNALLY TO TRUE; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set local spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; + set local spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; + set local spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; + + + +set local spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set local spanner.retry_aborts_internally to true ; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set local spanner.retry_aborts_internally to true ; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set local spanner.retry_aborts_internally to true + +; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set local spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set local spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set +local +spanner.retry_aborts_internally +to +true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +foo set local spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to true bar; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +%set local spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to true%; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to%true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +_set local spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to true_; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to_true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +&set local spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to true&; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to&true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +$set local spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to true$; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to$true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +@set local spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to true@; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to@true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +!set local spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to true!; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to!true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +*set local spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to true*; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to*true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +(set local spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to true(; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to(true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +)set local spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to true); +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to)true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +-set local spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to true-; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to-true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT ++set local spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to true+; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to+true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +-#set local spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to true-#; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to-#true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +/set local spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to true/; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to/true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +\set local spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to true\; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to\true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +?set local spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to true?; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to?true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +-/set local spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to true-/; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to-/true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +/#set local spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to true/#; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to/#true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +/-set local spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to true/-; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to/-true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set local spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +SET LOCAL SPANNER.RETRY_ABORTS_INTERNALLY TO FALSE; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set local spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; + set local spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; + set local spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; + + + +set local spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set local spanner.retry_aborts_internally to false ; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set local spanner.retry_aborts_internally to false ; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set local spanner.retry_aborts_internally to false + +; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set local spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set local spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set +local +spanner.retry_aborts_internally +to +false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +foo set local spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to false bar; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +%set local spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to false%; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to%false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +_set local spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to false_; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to_false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +&set local spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to false&; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to&false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +$set local spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to false$; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to$false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +@set local spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to false@; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to@false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +!set local spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to false!; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to!false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +*set local spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to false*; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to*false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +(set local spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to false(; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to(false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +)set local spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to false); +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to)false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +-set local spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to false-; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to-false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT ++set local spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to false+; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to+false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +-#set local spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to false-#; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to-#false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +/set local spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to false/; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to/false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +\set local spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to false\; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to\false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +?set local spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to false?; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to?false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +-/set local spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to false-/; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to-/false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +/#set local spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to false/#; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to/#false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +/-set local spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to false/-; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set local spanner.retry_aborts_internally to/-false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set session spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +SET SESSION SPANNER.RETRY_ABORTS_INTERNALLY = TRUE; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set session spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; + set session spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; + set session spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; + + + +set session spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set session spanner.retry_aborts_internally = true ; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set session spanner.retry_aborts_internally = true ; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set session spanner.retry_aborts_internally = true + +; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set session spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set session spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set +session +spanner.retry_aborts_internally += +true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +foo set session spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = true bar; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +%set session spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = true%; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally =%true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +_set session spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = true_; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally =_true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +&set session spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = true&; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally =&true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +$set session spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = true$; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally =$true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +@set session spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = true@; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally =@true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +!set session spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = true!; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally =!true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +*set session spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = true*; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally =*true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +(set session spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = true(; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally =(true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +)set session spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = true); +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally =)true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +-set session spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = true-; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally =-true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT ++set session spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = true+; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally =+true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +-#set session spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = true-#; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally =-#true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +/set session spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = true/; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally =/true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +\set session spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = true\; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally =\true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +?set session spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = true?; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally =?true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +-/set session spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = true-/; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally =-/true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +/#set session spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = true/#; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally =/#true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +/-set session spanner.retry_aborts_internally = true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = true/-; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally =/-true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set session spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +SET SESSION SPANNER.RETRY_ABORTS_INTERNALLY = FALSE; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set session spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; + set session spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; + set session spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; + + + +set session spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set session spanner.retry_aborts_internally = false ; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set session spanner.retry_aborts_internally = false ; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set session spanner.retry_aborts_internally = false + +; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set session spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set session spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set +session +spanner.retry_aborts_internally += +false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +foo set session spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = false bar; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +%set session spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = false%; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally =%false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +_set session spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = false_; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally =_false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +&set session spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = false&; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally =&false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +$set session spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = false$; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally =$false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +@set session spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = false@; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally =@false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +!set session spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = false!; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally =!false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +*set session spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = false*; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally =*false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +(set session spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = false(; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally =(false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +)set session spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = false); +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally =)false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +-set session spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = false-; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally =-false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT ++set session spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = false+; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally =+false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +-#set session spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = false-#; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally =-#false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +/set session spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = false/; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally =/false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +\set session spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = false\; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally =\false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +?set session spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = false?; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally =?false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +-/set session spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = false-/; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally =-/false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +/#set session spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = false/#; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally =/#false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +/-set session spanner.retry_aborts_internally = false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally = false/-; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally =/-false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set session spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +SET SESSION SPANNER.RETRY_ABORTS_INTERNALLY TO TRUE; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set session spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; + set session spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; + set session spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; + + + +set session spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set session spanner.retry_aborts_internally to true ; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set session spanner.retry_aborts_internally to true ; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set session spanner.retry_aborts_internally to true + +; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set session spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set session spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set +session +spanner.retry_aborts_internally +to +true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +foo set session spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to true bar; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +%set session spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to true%; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to%true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +_set session spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to true_; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to_true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +&set session spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to true&; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to&true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +$set session spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to true$; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to$true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +@set session spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to true@; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to@true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +!set session spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to true!; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to!true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +*set session spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to true*; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to*true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +(set session spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to true(; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to(true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +)set session spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to true); +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to)true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +-set session spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to true-; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to-true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT ++set session spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to true+; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to+true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +-#set session spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to true-#; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to-#true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +/set session spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to true/; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to/true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +\set session spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to true\; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to\true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +?set session spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to true?; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to?true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +-/set session spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to true-/; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to-/true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +/#set session spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to true/#; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to/#true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +/-set session spanner.retry_aborts_internally to true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to true/-; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to/-true; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set session spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +SET SESSION SPANNER.RETRY_ABORTS_INTERNALLY TO FALSE; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set session spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; + set session spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; + set session spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; + + + +set session spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set session spanner.retry_aborts_internally to false ; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set session spanner.retry_aborts_internally to false ; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set session spanner.retry_aborts_internally to false + +; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set session spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set session spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +set +session +spanner.retry_aborts_internally +to +false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +foo set session spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to false bar; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +%set session spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to false%; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to%false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +_set session spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to false_; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to_false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +&set session spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to false&; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to&false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +$set session spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to false$; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to$false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +@set session spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to false@; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to@false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +!set session spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to false!; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to!false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +*set session spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to false*; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to*false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +(set session spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to false(; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to(false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +)set session spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to false); +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to)false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +-set session spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to false-; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to-false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT ++set session spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to false+; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to+false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +-#set session spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to false-#; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to-#false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +/set session spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to false/; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to/false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +\set session spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to false\; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to\false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +?set session spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to false?; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to?false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +-/set session spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to false-/; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to-/false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +/#set session spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to false/#; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to/#false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +/-set session spanner.retry_aborts_internally to false; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to false/-; +NEW_CONNECTION; +set spanner.readonly = false; +set autocommit = false; +@EXPECT EXCEPTION INVALID_ARGUMENT +set session spanner.retry_aborts_internally to/-false; +NEW_CONNECTION; set spanner.autocommit_dml_mode='PARTITIONED_NON_ATOMIC'; NEW_CONNECTION; SET SPANNER.AUTOCOMMIT_DML_MODE='PARTITIONED_NON_ATOMIC'; diff --git a/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/postgresql/ConnectionImplGeneratedSqlScriptTest.sql b/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/postgresql/ConnectionImplGeneratedSqlScriptTest.sql index 3db3bda388b..f5456bb55ee 100644 --- a/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/postgresql/ConnectionImplGeneratedSqlScriptTest.sql +++ b/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/postgresql/ConnectionImplGeneratedSqlScriptTest.sql @@ -160,15 +160,15 @@ NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; COMMIT; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.130000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:10.130000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:24.347000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:24.347000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; COMMIT; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.130000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:24.347000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; @@ -510,15 +510,15 @@ NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; SET SPANNER.READ_ONLY_STALENESS='EXACT_STALENESS 10s'; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.240000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:10.240000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:24.458000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:24.458000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; SET SPANNER.READ_ONLY_STALENESS='EXACT_STALENESS 10s'; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.240000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:24.458000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; @@ -950,8 +950,8 @@ BEGIN TRANSACTION; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; ROLLBACK; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.352000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:10.352000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:24.580000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:24.580000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; @@ -961,7 +961,7 @@ BEGIN TRANSACTION; SELECT 1 AS TEST; ROLLBACK; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.352000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:24.580000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; @@ -1462,8 +1462,8 @@ BEGIN TRANSACTION; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; COMMIT; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.472000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:10.472000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:24.692000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:24.692000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; @@ -1473,7 +1473,7 @@ BEGIN TRANSACTION; SELECT 1 AS TEST; COMMIT; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.472000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:24.692000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; @@ -1876,15 +1876,15 @@ NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; BEGIN TRANSACTION; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.566000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:10.566000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:24.772000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:24.772000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; BEGIN TRANSACTION; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.566000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:24.772000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; @@ -2243,14 +2243,14 @@ SET AUTOCOMMIT=FALSE; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.661000000Z'; +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:24.857000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.661000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:24.857000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; @@ -2600,13 +2600,13 @@ SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; SELECT 1 AS TEST; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.751000000Z'; +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:24.942000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; SELECT 1 AS TEST; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.751000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:24.942000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; @@ -2910,14 +2910,14 @@ SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.827000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:10.827000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.018000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.018000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.827000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.018000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; @@ -3245,15 +3245,15 @@ NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; COMMIT; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.925000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:10.925000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.111000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.111000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; COMMIT; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.925000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.111000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -3662,8 +3662,8 @@ SET AUTOCOMMIT=FALSE; START BATCH DDL; CREATE TABLE foo (id INT64 NOT NULL, name STRING(100)) PRIMARY KEY (id); RUN BATCH; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.005000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:11.005000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.187000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.187000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; @@ -3672,7 +3672,7 @@ START BATCH DDL; CREATE TABLE foo (id INT64 NOT NULL, name STRING(100)) PRIMARY KEY (id); RUN BATCH; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.005000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.187000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -4081,14 +4081,14 @@ SET AUTOCOMMIT=FALSE; START BATCH DDL; CREATE TABLE foo (id INT64 NOT NULL, name STRING(100)) PRIMARY KEY (id); @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.078000000Z'; +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.253000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; START BATCH DDL; CREATE TABLE foo (id INT64 NOT NULL, name STRING(100)) PRIMARY KEY (id); @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.078000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.253000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -4438,13 +4438,13 @@ SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; START BATCH DDL; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.144000000Z'; +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.315000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; START BATCH DDL; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.144000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.315000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -4877,8 +4877,8 @@ SET TRANSACTION READ ONLY; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; COMMIT; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.224000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:11.224000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.390000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.390000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; @@ -4888,7 +4888,7 @@ SET TRANSACTION READ ONLY; SELECT 1 AS TEST; COMMIT; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.224000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.390000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -5288,15 +5288,15 @@ NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; SET TRANSACTION READ ONLY; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.296000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:11.296000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.454000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.454000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; SET TRANSACTION READ ONLY; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.296000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.454000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -5641,15 +5641,15 @@ NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; SET SPANNER.READ_ONLY_STALENESS='EXACT_STALENESS 10s'; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.363000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:11.363000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.519000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.519000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; SET SPANNER.READ_ONLY_STALENESS='EXACT_STALENESS 10s'; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.363000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.519000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -6088,8 +6088,8 @@ BEGIN TRANSACTION; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; ROLLBACK; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.444000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:11.444000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.597000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.597000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; @@ -6099,7 +6099,7 @@ BEGIN TRANSACTION; SELECT 1 AS TEST; ROLLBACK; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.444000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.597000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -6607,8 +6607,8 @@ BEGIN TRANSACTION; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; COMMIT; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.539000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:11.539000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.689000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.689000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; @@ -6618,7 +6618,7 @@ BEGIN TRANSACTION; SELECT 1 AS TEST; COMMIT; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.539000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.689000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -7023,15 +7023,15 @@ NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; BEGIN TRANSACTION; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.614000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:11.614000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.755000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.755000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; BEGIN TRANSACTION; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.614000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.755000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -7394,14 +7394,14 @@ SET AUTOCOMMIT=FALSE; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.693000000Z'; +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.829000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.693000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.829000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -7756,13 +7756,13 @@ SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; SELECT 1 AS TEST; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.771000000Z'; +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.906000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; SELECT 1 AS TEST; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.771000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.906000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -8075,14 +8075,14 @@ SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.836000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:11.836000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.970000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.970000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.836000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.970000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -8392,13 +8392,13 @@ SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=TRUE; START BATCH DDL; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.894000000Z'; +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.028000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=TRUE; START BATCH DDL; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.894000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.028000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=TRUE; @@ -8753,8 +8753,8 @@ SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; SET TRANSACTION READ ONLY; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.953000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:11.953000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.091000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.091000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; @@ -8762,7 +8762,7 @@ SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; SET TRANSACTION READ ONLY; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.953000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.091000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=TRUE; @@ -9200,8 +9200,8 @@ SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; UPDATE foo SET bar=1; COMMIT; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.028000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.028000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.165000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.165000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; @@ -9209,8 +9209,8 @@ SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; UPDATE foo SET bar=1; COMMIT; -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.028000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.028000000Z' +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.165000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.165000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; @@ -9596,15 +9596,15 @@ NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.093000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.093000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.228000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.228000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.093000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.228000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=TRUE; @@ -9958,15 +9958,15 @@ NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=TRUE; CREATE TABLE foo (id INT64 NOT NULL, name STRING(100)) PRIMARY KEY (id); -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.159000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.159000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.292000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.292000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=TRUE; CREATE TABLE foo (id INT64 NOT NULL, name STRING(100)) PRIMARY KEY (id); -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.159000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.159000000Z' +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.292000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.292000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; @@ -10329,15 +10329,15 @@ NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=TRUE; UPDATE foo SET bar=1; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.227000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.227000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.357000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.357000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=TRUE; UPDATE foo SET bar=1; -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.227000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.227000000Z' +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.357000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.357000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; @@ -10730,16 +10730,16 @@ SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=TRUE; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.296000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.296000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.423000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.423000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=TRUE; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.296000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.296000000Z' +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.423000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.423000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; @@ -11125,15 +11125,15 @@ NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=TRUE; SELECT 1 AS TEST; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.365000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.365000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.492000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.492000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=TRUE; SELECT 1 AS TEST; -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.365000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.365000000Z' +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.492000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.492000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; @@ -11466,14 +11466,14 @@ SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=TRUE; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.427000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.427000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.567000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.567000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=TRUE; -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.427000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.427000000Z' +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.567000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.567000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; @@ -11796,15 +11796,15 @@ NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=TRUE; SET SPANNER.READ_ONLY_STALENESS='MAX_STALENESS 10s'; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.485000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.485000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.626000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.626000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=TRUE; SET SPANNER.READ_ONLY_STALENESS='MAX_STALENESS 10s'; -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.485000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.485000000Z' +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.626000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.626000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; @@ -12211,8 +12211,8 @@ SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; SELECT 1 AS TEST; COMMIT; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.555000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.555000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.692000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.692000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; @@ -12220,8 +12220,8 @@ SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; SELECT 1 AS TEST; COMMIT; -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.555000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.555000000Z' +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.692000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.692000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; @@ -12604,15 +12604,15 @@ NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.615000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.615000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.751000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.751000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.615000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.751000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=TRUE; @@ -12950,15 +12950,15 @@ NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=TRUE; SELECT 1 AS TEST; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.682000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.682000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.812000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.812000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=TRUE; SELECT 1 AS TEST; -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.682000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.682000000Z' +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.812000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.812000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; @@ -13305,15 +13305,15 @@ NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=TRUE; SELECT 1 AS TEST; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.747000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.747000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.875000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.875000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=TRUE; SELECT 1 AS TEST; -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.747000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.747000000Z' +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.875000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.875000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; @@ -13630,14 +13630,14 @@ SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=TRUE; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.807000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.807000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.931000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.931000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=TRUE; -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.807000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.807000000Z' +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.931000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.931000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; From 216f53e4cbc0150078ece7785da33b342a6ab082 Mon Sep 17 00:00:00 2001 From: Pratick Chokhani Date: Wed, 11 Dec 2024 15:27:55 +0530 Subject: [PATCH 6/7] feat: add opt-in for using multiplexed sessions for blind writes (#3540) * feat(spanner): Releasing Multiplexed session for blind write. * fix(spanner): Added exception for `setUseMultiplexedSessionBlindWrite` in Clirr check. Removing this is safe as it's not used by customers. * fix(spanner): Fixed unit test for multiplexed session. --- .../clirr-ignored-differences.xml | 5 ++++ .../executor/spanner/CloudClientExecutor.java | 2 -- .../spanner/SessionPoolOptionsHelper.java | 8 ------ .../cloud/spanner/SessionPoolOptions.java | 25 +------------------ ...edSessionDatabaseClientMockServerTest.java | 1 - .../RetryOnInvalidatedSessionTest.java | 3 +++ 6 files changed, 9 insertions(+), 35 deletions(-) diff --git a/google-cloud-spanner-executor/clirr-ignored-differences.xml b/google-cloud-spanner-executor/clirr-ignored-differences.xml index 9d3c127bcc9..11e9890f1d9 100644 --- a/google-cloud-spanner-executor/clirr-ignored-differences.xml +++ b/google-cloud-spanner-executor/clirr-ignored-differences.xml @@ -7,4 +7,9 @@ CloudExecutorImpl(boolean) CloudExecutorImpl(boolean, double) + + 7002 + com/google/cloud/spanner/SessionPoolOptionsHelper + com.google.cloud.spanner.SessionPoolOptions$Builder setUseMultiplexedSessionBlindWrite(com.google.cloud.spanner.SessionPoolOptions$Builder, boolean) + 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 c82b6306eb8..d3f5712646a 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 @@ -830,8 +830,6 @@ private synchronized Spanner getClient(long timeoutSeconds, boolean useMultiplex com.google.cloud.spanner.SessionPoolOptions.Builder poolOptionsBuilder = com.google.cloud.spanner.SessionPoolOptions.newBuilder(); SessionPoolOptionsHelper.setUseMultiplexedSession(poolOptionsBuilder, useMultiplexedSession); - SessionPoolOptionsHelper.setUseMultiplexedSessionBlindWrite( - poolOptionsBuilder, useMultiplexedSession); SessionPoolOptionsHelper.setUseMultiplexedSessionForRW( poolOptionsBuilder, useMultiplexedSession); LOGGER.log( diff --git a/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/SessionPoolOptionsHelper.java b/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/SessionPoolOptionsHelper.java index f19cb8f4a2f..9dd8ac29563 100644 --- a/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/SessionPoolOptionsHelper.java +++ b/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/SessionPoolOptionsHelper.java @@ -31,14 +31,6 @@ public static SessionPoolOptions.Builder setUseMultiplexedSession( return sessionPoolOptionsBuilder.setUseMultiplexedSession(useMultiplexedSession); } - // TODO: Remove when multiplexed session for blind write is released. - public static SessionPoolOptions.Builder setUseMultiplexedSessionBlindWrite( - SessionPoolOptions.Builder sessionPoolOptionsBuilder, - boolean useMultiplexedSessionBlindWrite) { - return sessionPoolOptionsBuilder.setUseMultiplexedSessionBlindWrite( - useMultiplexedSessionBlindWrite); - } - // TODO: Remove when multiplexed session for read write is released. public static SessionPoolOptions.Builder setUseMultiplexedSessionForRW( SessionPoolOptions.Builder sessionPoolOptionsBuilder, boolean useMultiplexedSessionForRW) { 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 a691f14817f..36a4e5fe208 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 @@ -77,12 +77,6 @@ public class SessionPoolOptions { private final boolean useMultiplexedSession; - /** - * Controls whether multiplexed session is enabled for blind write or not. This is only used for - * systest soak. TODO: Remove when multiplexed session for blind write is released. - */ - private final boolean useMultiplexedSessionBlindWrite; - private final boolean useMultiplexedSessionForRW; private final boolean useMultiplexedSessionForPartitionedOps; @@ -122,7 +116,6 @@ private SessionPoolOptions(Builder builder) { (useMultiplexedSessionFromEnvVariable != null) ? useMultiplexedSessionFromEnvVariable : builder.useMultiplexedSession; - this.useMultiplexedSessionBlindWrite = builder.useMultiplexedSessionBlindWrite; // useMultiplexedSessionForRW priority => Environment var > private setter > client default Boolean useMultiplexedSessionForRWFromEnvVariable = getUseMultiplexedSessionForRWFromEnvVariable(); @@ -205,7 +198,6 @@ public int hashCode() { this.inactiveTransactionRemovalOptions, this.poolMaintainerClock, this.useMultiplexedSession, - this.useMultiplexedSessionBlindWrite, this.useMultiplexedSessionForRW, this.multiplexedSessionMaintenanceDuration); } @@ -349,7 +341,7 @@ public boolean getUseMultiplexedSession() { @VisibleForTesting @InternalApi protected boolean getUseMultiplexedSessionBlindWrite() { - return getUseMultiplexedSession() && useMultiplexedSessionBlindWrite; + return getUseMultiplexedSession(); } @VisibleForTesting @@ -601,9 +593,6 @@ public static class Builder { // Set useMultiplexedSession to true to make multiplexed session the default. private boolean useMultiplexedSession = false; - // TODO: Remove when multiplexed session for blind write is released. - private boolean useMultiplexedSessionBlindWrite = false; - // This field controls the default behavior of session management for RW operations in Java // client. // Set useMultiplexedSessionForRW to true to make multiplexed session for RW operations the @@ -657,7 +646,6 @@ private Builder(SessionPoolOptions options) { this.randomizePositionQPSThreshold = options.randomizePositionQPSThreshold; this.inactiveTransactionRemovalOptions = options.inactiveTransactionRemovalOptions; this.useMultiplexedSession = options.useMultiplexedSession; - this.useMultiplexedSessionBlindWrite = options.useMultiplexedSessionBlindWrite; this.useMultiplexedSessionForRW = options.useMultiplexedSessionForRW; this.useMultiplexedSessionPartitionedOps = options.useMultiplexedSessionForPartitionedOps; this.multiplexedSessionMaintenanceDuration = options.multiplexedSessionMaintenanceDuration; @@ -857,17 +845,6 @@ Builder setUseMultiplexedSession(boolean useMultiplexedSession) { return this; } - /** - * This method enables multiplexed sessions for blind writes. This method will be removed in the - * future when multiplexed sessions has been made the default for all operations. - */ - @InternalApi - @VisibleForTesting - Builder setUseMultiplexedSessionBlindWrite(boolean useMultiplexedSessionBlindWrite) { - this.useMultiplexedSessionBlindWrite = useMultiplexedSessionBlindWrite; - return this; - } - /** * Sets whether the client should use multiplexed session for R/W operations or not. This method * is intentionally package-private and intended for internal use. diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MultiplexedSessionDatabaseClientMockServerTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MultiplexedSessionDatabaseClientMockServerTest.java index 3121b868b83..c808bbe1110 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MultiplexedSessionDatabaseClientMockServerTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MultiplexedSessionDatabaseClientMockServerTest.java @@ -93,7 +93,6 @@ public void createSpannerInstance() { .setSessionPoolOption( SessionPoolOptions.newBuilder() .setUseMultiplexedSession(true) - .setUseMultiplexedSessionBlindWrite(true) .setUseMultiplexedSessionForRW(true) .setUseMultiplexedSessionPartitionedOps(true) // Set the maintainer to loop once every 1ms diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryOnInvalidatedSessionTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryOnInvalidatedSessionTest.java index 3032a1cae40..a6c3f9fa7c5 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryOnInvalidatedSessionTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryOnInvalidatedSessionTest.java @@ -1288,6 +1288,9 @@ public void write() throws InterruptedException { @Test public void writeAtLeastOnce() throws InterruptedException { + assumeFalse( + "Multiplexed session do not throw a SessionNotFound errors. ", + spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession()); assertThrowsSessionNotFoundIfShouldFail( () -> client.writeAtLeastOnce( From 2a962a76da857b836ea971d4fe0b2a77c9056ce6 Mon Sep 17 00:00:00 2001 From: Sakthivel Subramanian <179120858+sakthivelmanii@users.noreply.github.com> Date: Wed, 11 Dec 2024 15:50:37 +0530 Subject: [PATCH 7/7] ci(spanner): clean up unused kokoro configurations (#3542) * ci(spanner): clean up unused kokoro configurations * chore: generate libraries at Tue Dec 10 09:54:10 UTC 2024 --------- Co-authored-by: cloud-java-bot --- .kokoro/continuous/java8.cfg | 12 ------- .kokoro/nightly/java7.cfg | 7 ---- .kokoro/nightly/java8-win.cfg | 3 -- .kokoro/presubmit/clirr.cfg | 13 ------- .kokoro/presubmit/integration-cloud-devel.cfg | 22 ------------ .kokoro/presubmit/java11-samples.cfg | 34 ------------------- .kokoro/presubmit/java11.cfg | 7 ---- .kokoro/presubmit/java7.cfg | 7 ---- .kokoro/presubmit/java8-osx.cfg | 3 -- .kokoro/presubmit/java8-samples.cfg | 34 ------------------- .kokoro/presubmit/java8-win.cfg | 3 -- .kokoro/presubmit/java8.cfg | 12 ------- .kokoro/presubmit/linkage-monitor.cfg | 12 ------- .kokoro/presubmit/lint.cfg | 13 ------- .kokoro/presubmit/samples.cfg | 33 ------------------ owlbot.py | 4 --- synth.metadata | 25 -------------- 17 files changed, 244 deletions(-) delete mode 100644 .kokoro/continuous/java8.cfg delete mode 100644 .kokoro/nightly/java7.cfg delete mode 100644 .kokoro/nightly/java8-win.cfg delete mode 100644 .kokoro/presubmit/clirr.cfg delete mode 100644 .kokoro/presubmit/integration-cloud-devel.cfg delete mode 100644 .kokoro/presubmit/java11-samples.cfg delete mode 100644 .kokoro/presubmit/java11.cfg delete mode 100644 .kokoro/presubmit/java7.cfg delete mode 100644 .kokoro/presubmit/java8-osx.cfg delete mode 100644 .kokoro/presubmit/java8-samples.cfg delete mode 100644 .kokoro/presubmit/java8-win.cfg delete mode 100644 .kokoro/presubmit/java8.cfg delete mode 100644 .kokoro/presubmit/linkage-monitor.cfg delete mode 100644 .kokoro/presubmit/lint.cfg delete mode 100644 .kokoro/presubmit/samples.cfg diff --git a/.kokoro/continuous/java8.cfg b/.kokoro/continuous/java8.cfg deleted file mode 100644 index 495cc7bacd6..00000000000 --- a/.kokoro/continuous/java8.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "REPORT_COVERAGE" - value: "true" -} diff --git a/.kokoro/nightly/java7.cfg b/.kokoro/nightly/java7.cfg deleted file mode 100644 index cb24f44eea3..00000000000 --- a/.kokoro/nightly/java7.cfg +++ /dev/null @@ -1,7 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java7" -} diff --git a/.kokoro/nightly/java8-win.cfg b/.kokoro/nightly/java8-win.cfg deleted file mode 100644 index b219b38ad4a..00000000000 --- a/.kokoro/nightly/java8-win.cfg +++ /dev/null @@ -1,3 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -build_file: "java-spanner/.kokoro/build.bat" diff --git a/.kokoro/presubmit/clirr.cfg b/.kokoro/presubmit/clirr.cfg deleted file mode 100644 index ec572442e2e..00000000000 --- a/.kokoro/presubmit/clirr.cfg +++ /dev/null @@ -1,13 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. - -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "JOB_TYPE" - value: "clirr" -} \ No newline at end of file diff --git a/.kokoro/presubmit/integration-cloud-devel.cfg b/.kokoro/presubmit/integration-cloud-devel.cfg deleted file mode 100644 index 94b698199e1..00000000000 --- a/.kokoro/presubmit/integration-cloud-devel.cfg +++ /dev/null @@ -1,22 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "JOB_TYPE" - value: "integration-cloud-devel" -} - -env_vars: { - key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "secret_manager/java-client-testing" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "java-client-testing" -} diff --git a/.kokoro/presubmit/java11-samples.cfg b/.kokoro/presubmit/java11-samples.cfg deleted file mode 100644 index 2812301e787..00000000000 --- a/.kokoro/presubmit/java11-samples.cfg +++ /dev/null @@ -1,34 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java11" -} - -env_vars: { - key: "JOB_TYPE" - value: "samples" -} - -# TODO: remove this after we've migrated all tests and scripts -env_vars: { - key: "GCLOUD_PROJECT" - value: "gcloud-devel" -} - -env_vars: { - key: "GOOGLE_CLOUD_PROJECT" - value: "gcloud-devel" -} - -env_vars: { - key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "secret_manager/java-it-service-account" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "java-it-service-account" -} - diff --git a/.kokoro/presubmit/java11.cfg b/.kokoro/presubmit/java11.cfg deleted file mode 100644 index 709f2b4c73d..00000000000 --- a/.kokoro/presubmit/java11.cfg +++ /dev/null @@ -1,7 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java11" -} diff --git a/.kokoro/presubmit/java7.cfg b/.kokoro/presubmit/java7.cfg deleted file mode 100644 index cb24f44eea3..00000000000 --- a/.kokoro/presubmit/java7.cfg +++ /dev/null @@ -1,7 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java7" -} diff --git a/.kokoro/presubmit/java8-osx.cfg b/.kokoro/presubmit/java8-osx.cfg deleted file mode 100644 index 63f547222f5..00000000000 --- a/.kokoro/presubmit/java8-osx.cfg +++ /dev/null @@ -1,3 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -build_file: "java-spanner/.kokoro/build.sh" diff --git a/.kokoro/presubmit/java8-samples.cfg b/.kokoro/presubmit/java8-samples.cfg deleted file mode 100644 index 49a231b9f2a..00000000000 --- a/.kokoro/presubmit/java8-samples.cfg +++ /dev/null @@ -1,34 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "JOB_TYPE" - value: "samples" -} - -# TODO: remove this after we've migrated all tests and scripts -env_vars: { - key: "GCLOUD_PROJECT" - value: "gcloud-devel" -} - -env_vars: { - key: "GOOGLE_CLOUD_PROJECT" - value: "gcloud-devel" -} - -env_vars: { - key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "secret_manager/java-it-service-account" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "java-it-service-account" -} - diff --git a/.kokoro/presubmit/java8-win.cfg b/.kokoro/presubmit/java8-win.cfg deleted file mode 100644 index b219b38ad4a..00000000000 --- a/.kokoro/presubmit/java8-win.cfg +++ /dev/null @@ -1,3 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -build_file: "java-spanner/.kokoro/build.bat" diff --git a/.kokoro/presubmit/java8.cfg b/.kokoro/presubmit/java8.cfg deleted file mode 100644 index 495cc7bacd6..00000000000 --- a/.kokoro/presubmit/java8.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "REPORT_COVERAGE" - value: "true" -} diff --git a/.kokoro/presubmit/linkage-monitor.cfg b/.kokoro/presubmit/linkage-monitor.cfg deleted file mode 100644 index 083448f9f80..00000000000 --- a/.kokoro/presubmit/linkage-monitor.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-spanner/.kokoro/linkage-monitor.sh" -} \ No newline at end of file diff --git a/.kokoro/presubmit/lint.cfg b/.kokoro/presubmit/lint.cfg deleted file mode 100644 index 6d323c8ae76..00000000000 --- a/.kokoro/presubmit/lint.cfg +++ /dev/null @@ -1,13 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. - -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "JOB_TYPE" - value: "lint" -} \ No newline at end of file diff --git a/.kokoro/presubmit/samples.cfg b/.kokoro/presubmit/samples.cfg deleted file mode 100644 index 724216504ef..00000000000 --- a/.kokoro/presubmit/samples.cfg +++ /dev/null @@ -1,33 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "JOB_TYPE" - value: "samples" -} - -# TODO: remove this after we've migrated all tests and scripts -env_vars: { - key: "GCLOUD_PROJECT" - value: "gcloud-devel" -} - -env_vars: { - key: "GOOGLE_CLOUD_PROJECT" - value: "gcloud-devel" -} - -env_vars: { - key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "secret_manager/java-it-service-account" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "java-it-service-account" -} diff --git a/owlbot.py b/owlbot.py index bc9b537f818..5765d1df17f 100644 --- a/owlbot.py +++ b/owlbot.py @@ -31,12 +31,8 @@ ".kokoro/nightly/samples.cfg", ".kokoro/build.bat", ".kokoro/presubmit/common.cfg", - ".kokoro/presubmit/java8-samples.cfg", - ".kokoro/presubmit/java11-samples.cfg", - ".kokoro/presubmit/samples.cfg", ".kokoro/presubmit/graalvm-native.cfg", ".kokoro/presubmit/graalvm-native-17.cfg", - ".kokoro/release/common.cfg", "samples/install-without-bom/pom.xml", "samples/snapshot/pom.xml", "samples/snippets/pom.xml", diff --git a/synth.metadata b/synth.metadata index 9622106469d..9f19ee9c447 100644 --- a/synth.metadata +++ b/synth.metadata @@ -68,41 +68,16 @@ ".kokoro/coerce_logs.sh", ".kokoro/common.cfg", ".kokoro/common.sh", - ".kokoro/continuous/java8.cfg", ".kokoro/dependencies.sh", ".kokoro/nightly/integration.cfg", ".kokoro/nightly/java11.cfg", - ".kokoro/nightly/java7.cfg", ".kokoro/nightly/java8-osx.cfg", - ".kokoro/nightly/java8-win.cfg", ".kokoro/nightly/java8.cfg", ".kokoro/populate-secrets.sh", - ".kokoro/presubmit/clirr.cfg", ".kokoro/presubmit/dependencies.cfg", ".kokoro/presubmit/graalvm-native.cfg", ".kokoro/presubmit/integration.cfg", ".kokoro/presubmit/java11.cfg", - ".kokoro/presubmit/java7.cfg", - ".kokoro/presubmit/java8-osx.cfg", - ".kokoro/presubmit/java8-win.cfg", - ".kokoro/presubmit/java8.cfg", - ".kokoro/presubmit/linkage-monitor.cfg", - ".kokoro/presubmit/lint.cfg", - ".kokoro/release/bump_snapshot.cfg", - ".kokoro/release/common.cfg", - ".kokoro/release/common.sh", - ".kokoro/release/drop.cfg", - ".kokoro/release/drop.sh", - ".kokoro/release/promote.cfg", - ".kokoro/release/promote.sh", - ".kokoro/release/publish_javadoc.cfg", - ".kokoro/release/publish_javadoc.sh", - ".kokoro/release/publish_javadoc11.cfg", - ".kokoro/release/publish_javadoc11.sh", - ".kokoro/release/snapshot.cfg", - ".kokoro/release/snapshot.sh", - ".kokoro/release/stage.cfg", - ".kokoro/release/stage.sh", ".kokoro/trampoline.sh", "CODE_OF_CONDUCT.md", "CONTRIBUTING.md",