Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spanner.connection.it.ITTransactionRetryTest: testAbortWithExceptionOnSelect failed #685

Closed
flaky-bot bot opened this issue Dec 5, 2020 · 1 comment · Fixed by #688
Closed

spanner.connection.it.ITTransactionRetryTest: testAbortWithExceptionOnSelect failed #685

flaky-bot bot opened this issue Dec 5, 2020 · 1 comment · Fixed by #688
Assignees
Labels
api: spanner Issues related to the googleapis/java-spanner API. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@flaky-bot
Copy link

flaky-bot bot commented Dec 5, 2020

This test failed!

To configure my behavior, see the Build Cop Bot documentation.

If I'm commenting on this issue too often, add the buildcop: quiet label and
I will stop commenting.


commit: d093089
buildURL: Build Status, Sponge
status: failed

Test output
com.google.cloud.spanner.AbortedDueToConcurrentModificationException: The transaction was aborted and could not be retried due to a database error during the retry
	at com.google.cloud.spanner.SpannerExceptionFactory.newAbortedDueToConcurrentModificationException(SpannerExceptionFactory.java:137)
	at com.google.cloud.spanner.connection.FailedQuery.retry(FailedQuery.java:78)
	at com.google.cloud.spanner.connection.ReadWriteTransaction.handleAborted(ReadWriteTransaction.java:742)
	at com.google.cloud.spanner.connection.ReadWriteTransaction.runWithRetry(ReadWriteTransaction.java:641)
	at com.google.cloud.spanner.connection.ReadWriteTransaction$2.call(ReadWriteTransaction.java:302)
	at com.google.cloud.spanner.connection.ReadWriteTransaction$2.call(ReadWriteTransaction.java:299)
	at io.grpc.Context$2.call(Context.java:596)
	at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
	at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:69)
	at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
	Suppressed: com.google.cloud.spanner.connection.AbstractBaseUnitOfWork$SpannerAsyncExecutionException: Execution failed for statement: SELECT * FROM TEST
		at com.google.cloud.spanner.connection.AbstractBaseUnitOfWork.executeStatementAsync(AbstractBaseUnitOfWork.java:226)
		at com.google.cloud.spanner.connection.ReadWriteTransaction.executeQueryAsync(ReadWriteTransaction.java:297)
		at com.google.cloud.spanner.connection.ConnectionImpl.internalExecuteQuery(ConnectionImpl.java:903)
		at com.google.cloud.spanner.connection.ConnectionImpl.parseAndExecuteQuery(ConnectionImpl.java:763)
		at com.google.cloud.spanner.connection.ConnectionImpl.executeQuery(ConnectionImpl.java:731)
		at com.google.cloud.spanner.connection.it.ITTransactionRetryTest.testAbortWithExceptionOnSelect(ITTransactionRetryTest.java:1083)
		at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
		at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
		at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
		at java.lang.reflect.Method.invoke(Method.java:498)
		at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
		at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
		at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
		at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
		at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
		at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
		at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:61)
		at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
		at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
		at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
		at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
		at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
		at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
		at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
		at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
		at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
		at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
		at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
		at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
		at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:54)
		at org.junit.rules.RunRules.evaluate(RunRules.java:20)
		at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
		at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
		at org.junit.runners.Suite.runChild(Suite.java:128)
		at org.junit.runners.Suite.runChild(Suite.java:27)
		at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
		at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
		at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
		at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
		at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
		at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
		at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
		at org.apache.maven.surefire.junitcore.JUnitCore.run(JUnitCore.java:55)
		at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:137)
		at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeLazy(JUnitCoreWrapper.java:119)
		at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:87)
		at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:75)
		at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:158)
		at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:377)
		at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:138)
		at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:465)
		at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:451)
Caused by: com.google.cloud.spanner.AbortedException: ABORTED: Aborted due to failed initial statement
	at com.google.cloud.spanner.SpannerExceptionFactory.newSpannerExceptionPreformatted(SpannerExceptionFactory.java:235)
	at com.google.cloud.spanner.SpannerExceptionFactory.newSpannerException(SpannerExceptionFactory.java:168)
	at com.google.cloud.spanner.SpannerExceptionFactory.newSpannerException(SpannerExceptionFactory.java:108)
	at com.google.cloud.spanner.TransactionRunnerImpl$TransactionContextImpl.getTransactionSelector(TransactionRunnerImpl.java:445)
	at com.google.cloud.spanner.AbstractReadContext.getExecuteSqlRequestBuilder(AbstractReadContext.java:571)
	at com.google.cloud.spanner.AbstractReadContext$1.startStream(AbstractReadContext.java:623)
	at com.google.cloud.spanner.AbstractResultSet$ResumableStreamIterator.computeNext(AbstractResultSet.java:1020)
	at com.google.cloud.spanner.AbstractResultSet$ResumableStreamIterator.computeNext(AbstractResultSet.java:898)
	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:141)
	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:136)
	at com.google.cloud.spanner.AbstractResultSet$GrpcValueIterator.ensureReady(AbstractResultSet.java:260)
	at com.google.cloud.spanner.AbstractResultSet$GrpcValueIterator.getMetadata(AbstractResultSet.java:236)
	at com.google.cloud.spanner.AbstractResultSet$GrpcResultSet.next(AbstractResultSet.java:118)
	at com.google.cloud.spanner.ForwardingResultSet.next(ForwardingResultSet.java:54)
	at com.google.cloud.spanner.SessionPool$SessionPoolResultSet.next(SessionPool.java:563)
	at com.google.cloud.spanner.connection.DirectExecuteResultSet.(DirectExecuteResultSet.java:62)
	at com.google.cloud.spanner.connection.DirectExecuteResultSet.ofResultSet(DirectExecuteResultSet.java:56)
	at com.google.cloud.spanner.connection.ReadWriteTransaction$2$1.call(ReadWriteTransaction.java:313)
	at com.google.cloud.spanner.connection.ReadWriteTransaction$2$1.call(ReadWriteTransaction.java:303)
	at com.google.cloud.spanner.connection.ReadWriteTransaction.runWithRetry(ReadWriteTransaction.java:639)
	... 9 more
Caused by: com.google.cloud.spanner.AbortedException: ABORTED: Aborted due to failed initial statement
	at com.google.cloud.spanner.SpannerExceptionFactory.newSpannerExceptionPreformatted(SpannerExceptionFactory.java:235)
	at com.google.cloud.spanner.SpannerExceptionFactory.newSpannerException(SpannerExceptionFactory.java:59)
	at com.google.cloud.spanner.TransactionRunnerImpl$TransactionContextImpl.onError(TransactionRunnerImpl.java:476)
	at com.google.cloud.spanner.AbstractResultSet$GrpcResultSet.yieldError(AbstractResultSet.java:154)
	at com.google.cloud.spanner.AbstractResultSet$GrpcResultSet.next(AbstractResultSet.java:130)
	... 16 more
Caused by: com.google.cloud.spanner.SpannerException: INVALID_ARGUMENT: io.grpc.StatusRuntimeException: INVALID_ARGUMENT: Table not found: FOO [at 1:15]
SELECT * FROM FOO
              ^ - Statement: 'SELECT * FROM FOO'
	at com.google.cloud.spanner.SpannerExceptionFactory.newSpannerExceptionPreformatted(SpannerExceptionFactory.java:259)
	at com.google.cloud.spanner.SpannerExceptionFactory.newSpannerException(SpannerExceptionFactory.java:168)
	at com.google.cloud.spanner.SpannerExceptionFactory.newSpannerException(SpannerExceptionFactory.java:108)
	at com.google.cloud.spanner.AbstractResultSet$GrpcStreamIterator.computeNext(AbstractResultSet.java:838)
	at com.google.cloud.spanner.AbstractResultSet$GrpcStreamIterator.computeNext(AbstractResultSet.java:769)
	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:141)
	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:136)
	at com.google.cloud.spanner.AbstractResultSet$ResumableStreamIterator.computeNext(AbstractResultSet.java:1029)
	at com.google.cloud.spanner.AbstractResultSet$ResumableStreamIterator.computeNext(AbstractResultSet.java:898)
	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:141)
	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:136)
	at com.google.cloud.spanner.AbstractResultSet$GrpcValueIterator.ensureReady(AbstractResultSet.java:260)
	at com.google.cloud.spanner.AbstractResultSet$GrpcValueIterator.getMetadata(AbstractResultSet.java:236)
	at com.google.cloud.spanner.AbstractResultSet$GrpcResultSet.next(AbstractResultSet.java:118)
	... 16 more
	Suppressed: com.google.cloud.spanner.connection.AbstractBaseUnitOfWork$SpannerAsyncExecutionException: Execution failed for statement: SELECT * FROM FOO
		at com.google.cloud.spanner.connection.AbstractBaseUnitOfWork.executeStatementAsync(AbstractBaseUnitOfWork.java:226)
		at com.google.cloud.spanner.connection.ReadWriteTransaction.executeQueryAsync(ReadWriteTransaction.java:297)
		at com.google.cloud.spanner.connection.ConnectionImpl.internalExecuteQuery(ConnectionImpl.java:903)
		at com.google.cloud.spanner.connection.ConnectionImpl.parseAndExecuteQuery(ConnectionImpl.java:763)
		at com.google.cloud.spanner.connection.ConnectionImpl.executeQuery(ConnectionImpl.java:731)
		at com.google.cloud.spanner.connection.it.ITTransactionRetryTest.testAbortWithExceptionOnSelect(ITTransactionRetryTest.java:1073)
		at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
		at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
		at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
		at java.lang.reflect.Method.invoke(Method.java:498)
		at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
		at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
		at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
		at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
		at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
		at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
		at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:61)
		at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
		at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
		at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
		at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
		at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
		at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
		at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
		at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
		at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
		at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
		at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
		at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
		at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:54)
		at org.junit.rules.RunRules.evaluate(RunRules.java:20)
		at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
		at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
		at org.junit.runners.Suite.runChild(Suite.java:128)
		at org.junit.runners.Suite.runChild(Suite.java:27)
		at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
		at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
		at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
		at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
		at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
		at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
		at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
		at org.apache.maven.surefire.junitcore.JUnitCore.run(JUnitCore.java:55)
		at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:137)
		at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeLazy(JUnitCoreWrapper.java:119)
		at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:87)
		at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:75)
		at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:158)
		at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:377)
		at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:138)
		at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:465)
		at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:451)
Caused by: com.google.cloud.spanner.SpannerException: INVALID_ARGUMENT: io.grpc.StatusRuntimeException: INVALID_ARGUMENT: Table not found: FOO [at 1:15]
SELECT * FROM FOO
              ^ - Statement: 'SELECT * FROM FOO'
	at com.google.cloud.spanner.SpannerExceptionFactory.newSpannerExceptionPreformatted(SpannerExceptionFactory.java:259)
	at com.google.cloud.spanner.AbstractResultSet$GrpcStreamIterator$ConsumerImpl.onError(AbstractResultSet.java:874)
	at com.google.cloud.spanner.spi.v1.GapicSpannerRpc$SpannerResponseObserver.onError(GapicSpannerRpc.java:1686)
	at com.google.api.gax.tracing.TracedResponseObserver.onError(TracedResponseObserver.java:103)
	at com.google.api.gax.rpc.Watchdog$WatchdogStream.onErrorImpl(Watchdog.java:284)
	at com.google.api.gax.rpc.StateCheckingResponseObserver.onError(StateCheckingResponseObserver.java:86)
	at com.google.api.gax.grpc.ExceptionResponseObserver.onErrorImpl(ExceptionResponseObserver.java:84)
	at com.google.api.gax.rpc.StateCheckingResponseObserver.onError(StateCheckingResponseObserver.java:86)
	at com.google.api.gax.grpc.GrpcDirectStreamController$ResponseObserverAdapter.onClose(GrpcDirectStreamController.java:149)
	at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
	at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
	at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40)
	at com.google.cloud.spanner.spi.v1.SpannerErrorInterceptor$1$1.onClose(SpannerErrorInterceptor.java:100)
	at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:617)
	at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:70)
	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:803)
	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:782)
	at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
	at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	... 3 more
Caused by: com.google.cloud.spanner.SpannerException: INVALID_ARGUMENT: io.grpc.StatusRuntimeException: INVALID_ARGUMENT: Table not found: FOO [at 1:15]
SELECT * FROM FOO
              ^
	at com.google.cloud.spanner.SpannerExceptionFactory.newSpannerExceptionPreformatted(SpannerExceptionFactory.java:259)
	at com.google.cloud.spanner.SpannerExceptionFactory.newSpannerException(SpannerExceptionFactory.java:59)
	at com.google.cloud.spanner.SpannerExceptionFactory.fromApiException(SpannerExceptionFactory.java:274)
	at com.google.cloud.spanner.SpannerExceptionFactory.newSpannerException(SpannerExceptionFactory.java:172)
	at com.google.cloud.spanner.SpannerExceptionFactory.newSpannerException(SpannerExceptionFactory.java:108)
	... 24 more
Caused by: io.grpc.StatusRuntimeException: INVALID_ARGUMENT: Table not found: FOO [at 1:15]
SELECT * FROM FOO
              ^
	at io.grpc.Status.asRuntimeException(Status.java:533)
	... 18 more
@flaky-bot flaky-bot bot added buildcop: issue priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Dec 5, 2020
@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/java-spanner API. label Dec 5, 2020
@flaky-bot
Copy link
Author

flaky-bot bot commented Dec 6, 2020

Looks like this issue is flaky. 😟

I'm going to leave this open and stop commenting.

A human should fix and close this.


When run at the same commit (d093089), this test passed in one build (Build Status, Sponge) and failed in another build (Build Status, Sponge).

olavloite added a commit that referenced this issue Dec 8, 2020
Transaction retries in the Connection API / JDBC driver could fail if the following happened:
1. The initial transaction contains a statement that returns an error that does not invalidate
   the transaction, such as for example a "Table not found" error, and that error is caught and
   handled by the application code.
2. The retry attempt tries to execute the failed statement to verify that the statement still
   returns the same error. If however the transaction that is used by the retry has been aborted
   immediately before the execution of this statement, the statement will now return Aborted
   instead of the original error. That would be seen as a different error than the initial
   error and would fail the retry attempt.

When the above happens, the Aborted error in the retry should be propagated and the retry
attempt should be restarted.

Fixes #685
thiagotnunes pushed a commit that referenced this issue Dec 9, 2020
…688)

Transaction retries in the Connection API / JDBC driver could fail if the following happened:
1. The initial transaction contains a statement that returns an error that does not invalidate
   the transaction, such as for example a "Table not found" error, and that error is caught and
   handled by the application code.
2. The retry attempt tries to execute the failed statement to verify that the statement still
   returns the same error. If however the transaction that is used by the retry has been aborted
   immediately before the execution of this statement, the statement will now return Aborted
   instead of the original error. That would be seen as a different error than the initial
   error and would fail the retry attempt.

When the above happens, the Aborted error in the retry should be propagated and the retry
attempt should be restarted.

Fixes #685
thiagotnunes pushed a commit that referenced this issue May 6, 2021
…688)

Transaction retries in the Connection API / JDBC driver could fail if the following happened:
1. The initial transaction contains a statement that returns an error that does not invalidate
   the transaction, such as for example a "Table not found" error, and that error is caught and
   handled by the application code.
2. The retry attempt tries to execute the failed statement to verify that the statement still
   returns the same error. If however the transaction that is used by the retry has been aborted
   immediately before the execution of this statement, the statement will now return Aborted
   instead of the original error. That would be seen as a different error than the initial
   error and would fail the retry attempt.

When the above happens, the Aborted error in the retry should be propagated and the retry
attempt should be restarted.

Fixes #685
ansh0l pushed a commit to ansh0l/java-spanner that referenced this issue Nov 10, 2022
This is an auto-generated regeneration of the .pb.go files by
cloud.google.com/go/internal/gapicgen. Once this PR is submitted, genbot will
update the corresponding PR to depend on the newer version of go-genproto, and
assign reviewers. Whilst this or any regen PR is open in go-genproto, genbot
will not create any more regeneration PRs. If all regen PRs are closed,
gapicgen will create a new set of regeneration PRs once per night.

If you have been assigned to review this PR, please:

- Ensure that CI is passing. If it's failing, it requires your manual attention.
- Approve and submit this PR if you believe it's ready to ship. That will prompt
genbot to assign reviewers to the google-cloud-go PR.

Corresponding google-cloud-go PR: googleapis/google-cloud-go#5175

Changes:

fix(compute): make parent_id fields required compute move and insert methods (googleapis#686)

  Source-Link: googleapis/googleapis@02df998

chore: Bump disco-to-proto3-convertor version
  PiperOrigin-RevId: 411936154
  Source-Link: googleapis/googleapis@9a04fde

build(networkconnectivity): correct artifact name for npm
  PiperOrigin-RevId: 411807571
  Source-Link: googleapis/googleapis@221556e

build(npm): update artifact name for npm
  PiperOrigin-RevId: 411806878
  Source-Link: googleapis/googleapis@e2f13b0

docs(retail): Keep the API doc up-to-date feat: update grpc service config settings to reflect correct API deadlines
  PiperOrigin-RevId: 411660243
  Source-Link: googleapis/googleapis@72adf13

feat(servicecontrol): add C++ rules for many Cloud services
  PiperOrigin-RevId: 411620635
  Source-Link: googleapis/googleapis@eddd3d8

build(metastore): correct artifact name for npm
  PiperOrigin-RevId: 411598711
  Source-Link: googleapis/googleapis@970cd21

chore(longrunning): generate java files for google/api chore: generate java files for google/cloud/audit chore: generate java files for google/geo/type chore: generate java files for google/logging/type chore: generate java files for google/longrunning chore: generate java files for google/rpc chore: generate java files for google/rpc/context chore: generate java files for google/type chore: generate java files for google/cloud
  PiperOrigin-RevId: 411585075
  Source-Link: googleapis/googleapis@b21a21e

chore: generate java files for google/cloud/location
  PiperOrigin-RevId: 411582675
  Source-Link: googleapis/googleapis@b58725a

build(npm): add artifact name for npm
  PiperOrigin-RevId: 411579858
  Source-Link: googleapis/googleapis@4bd5f4b

feat(contactcenterinsights): remove feature flag disable_issue_modeling
  PiperOrigin-RevId: 411140666
  Source-Link: googleapis/googleapis@9a182e6

chore: regenerate API index

  Source-Link: googleapis/googleapis@2e680c6

feat: Initial release of Live Stream API v1 Public Preview
  PiperOrigin-RevId: 411133022
  Source-Link: googleapis/googleapis@b35c85c

feat(contactcenterinsights): new feature flag disable_issue_modeling docs: fixed formatting issues in the reference documentation
  PiperOrigin-RevId: 411102531
  Source-Link: googleapis/googleapis@68b0c8a

chore: regenerate API index

  Source-Link: googleapis/googleapis@a1af8f0

docs: Bringing the generated clients up-to-date with recent changes
  PiperOrigin-RevId: 411093893
  Source-Link: googleapis/googleapis@d1e416f

chore: regenerate API index

  Source-Link: googleapis/googleapis@96a1b13

feat(securitycenter): Added a new API method UpdateExternalSystem, which enables updating a finding w/ external system metadata. External systems are a child resource under finding, and are housed on the finding itself, and can also be filtered on in Notifications, the ListFindings and GroupFindings API
  PiperOrigin-RevId: 411093163
  Source-Link: googleapis/googleapis@be8f988

feat(compute): Switch to string enums for compute (googleapis#685)
  Also introduce gapic_yaml for java clients to override default LRO configuration (which has too way too long timeouts).

  Also cleanup regenerate other files (grpc_service_config and service yaml)
  Source-Link: googleapis/googleapis@8ce4ea6

docs(cloudtasks): fix docstring formatting
  Committer: @parthea
  PiperOrigin-RevId: 410919520
  Source-Link: googleapis/googleapis@b5274f7

build(spanner/admin/database): add published name under submodules
  PiperOrigin-RevId: 410900101
  Source-Link: googleapis/googleapis@c246c88

chore(vmmigration): Prepare vmmigration  v1 BUILD.bazel for release
  PiperOrigin-RevId: 410873197
  Source-Link: googleapis/googleapis@6e8a083

chore: update disco-to-proto3-converter
  PiperOrigin-RevId: 410851030
  Source-Link: googleapis/googleapis@49c40d2
rajatbhatta pushed a commit to rajatbhatta/java-spanner that referenced this issue Nov 17, 2022
🤖 I have created a release \*beep\* \*boop\*
---
### [2.5.5](https://www.github.com/googleapis/java-spanner-jdbc/compare/v2.5.4...v2.5.5) (2021-12-03)


### Dependencies

* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.1 ([googleapis#684](https://www.github.com/googleapis/java-spanner-jdbc/issues/684)) ([a2582d3](https://www.github.com/googleapis/java-spanner-jdbc/commit/a2582d3fbd3f0ea093477914e3a09af235e76595))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/java-spanner API. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant