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

RetryOnInvalidatedSessionTest.asyncRunnerReadRow is flaky #3484

Closed
olavloite opened this issue Nov 19, 2024 · 0 comments · Fixed by #3550
Closed

RetryOnInvalidatedSessionTest.asyncRunnerReadRow is flaky #3484

olavloite opened this issue Nov 19, 2024 · 0 comments · Fixed by #3550
Assignees
Labels
api: spanner Issues related to the googleapis/java-spanner API. type: process A process-related concern. May include testing, release, or the like.

Comments

@olavloite
Copy link
Collaborator

Error:  Tests run: 152, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.255 s <<< FAILURE! -- in com.google.cloud.spanner.RetryOnInvalidatedSessionTest
Error:  com.google.cloud.spanner.RetryOnInvalidatedSessionTest.asyncRunnerReadRow[fail on invalidated session = false] -- Time elapsed: 0.010 s <<< ERROR!
com.google.cloud.spanner.SpannerException: 
FAILED_PRECONDITION: io.grpc.StatusRuntimeException: FAILED_PRECONDITION: This transaction has been invalidated by a later transaction in the same session.
Transaction id: 1
Expected: 2
	at com.google.cloud.spanner.SpannerExceptionFactory.newSpannerExceptionPreformatted(SpannerExceptionFactory.java:339)
	at com.google.cloud.spanner.SpannerExceptionFactory.newSpannerExceptionPreformatted(SpannerExceptionFactory.java:345)
	at com.google.cloud.spanner.SpannerExceptionFactory.newSpannerException(SpannerExceptionFactory.java:181)
	at com.google.cloud.spanner.SpannerExceptionFactory.newSpannerException(SpannerExceptionFactory.java:114)
	at com.google.cloud.spanner.TransactionRunnerImpl$TransactionContextImpl.commit(TransactionRunnerImpl.java:359)
	at com.google.cloud.spanner.TransactionRunnerImpl.lambda$runInternal$0(TransactionRunnerImpl.java:1294)
	at com.google.api.gax.retrying.DirectRetryingExecutor.submit(DirectRetryingExecutor.java:102)
	at com.google.cloud.RetryHelper.run(RetryHelper.java:76)
	at com.google.cloud.RetryHelper.runWithRetries(RetryHelper.java:50)
	at com.google.cloud.spanner.SpannerRetryHelper.runTxWithRetriesOnAborted(SpannerRetryHelper.java:94)
	at com.google.cloud.spanner.SpannerRetryHelper.runTxWithRetriesOnAborted(SpannerRetryHelper.java:73)
	at com.google.cloud.spanner.TransactionRunnerImpl.runInternal(TransactionRunnerImpl.java:1310)
	at com.google.cloud.spanner.TransactionRunnerImpl.run(TransactionRunnerImpl.java:1210)
	at com.google.cloud.spanner.AsyncRunnerImpl.runTransaction(AsyncRunnerImpl.java:57)
	at com.google.cloud.spanner.AsyncRunnerImpl.lambda$runAsync$0(AsyncRunnerImpl.java:46)
	at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:31)
	at com.google.cloud.spanner.AsyncRunnerImpl.runAsync(AsyncRunnerImpl.java:43)
	at com.google.cloud.spanner.SessionPool$SessionPoolAsyncRunner.lambda$runAsync$0(SessionPool.java:1110)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: com.google.cloud.spanner.SpannerException: FAILED_PRECONDITION: io.grpc.StatusRuntimeException: FAILED_PRECONDITION: This transaction has been invalidated by a later transaction in the same session.
Transaction id: 1
Expected: 2
	at com.google.cloud.spanner.SpannerExceptionFactory.newSpannerExceptionPreformatted(SpannerExceptionFactory.java:339)
	at com.google.cloud.spanner.SpannerExceptionFactory.fromApiException(SpannerExceptionFactory.java:359)
	at com.google.cloud.spanner.SpannerExceptionFactory.newSpannerException(SpannerExceptionFactory.java:185)
	at com.google.cloud.spanner.SpannerExceptionFactory.newSpannerException(SpannerExceptionFactory.java:114)
	at com.google.cloud.spanner.SpannerExceptionFactory.asSpannerException(SpannerExceptionFactory.java:104)
	at com.google.cloud.spanner.TransactionRunnerImpl$TransactionContextImpl$CommitRunnable.lambda$run$0(TransactionRunnerImpl.java:529)
	at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:31)
	at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:1300)
	at com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:1061)
	at com.google.common.util.concurrent.AbstractFuture.setException(AbstractFuture.java:811)
	at com.google.api.gax.retrying.BasicRetryingFuture.handleAttempt(BasicRetryingFuture.java:202)
	at com.google.api.gax.retrying.CallbackChainRetryingFuture$AttemptCompletionListener.handle(CallbackChainRetryingFuture.java:135)
	at com.google.api.gax.retrying.CallbackChainRetryingFuture$AttemptCompletionListener.run(CallbackChainRetryingFuture.java:117)
	at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:31)
	at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:1300)
	at com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:1061)
	at com.google.common.util.concurrent.AbstractFuture.setException(AbstractFuture.java:811)
	at com.google.api.core.AbstractApiFuture$InternalSettableFuture.setException(AbstractApiFuture.java:92)
	at com.google.api.core.AbstractApiFuture.setException(AbstractApiFuture.java:74)
	at com.google.api.gax.grpc.GrpcExceptionCallable$ExceptionTransformingFuture.onFailure(GrpcExceptionCallable.java:97)
	at com.google.api.core.ApiFutures$1.onFailure(ApiFutures.java:84)
	at com.google.common.util.concurrent.Futures$CallbackListener.run(Futures.java:1130)
	at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:31)
	at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:1300)
	at com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:1061)
	at com.google.common.util.concurrent.AbstractFuture.setException(AbstractFuture.java:811)
	at io.grpc.stub.ClientCalls$GrpcFuture.setException(ClientCalls.java:568)
	at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:538)
	at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:564)
	at io.grpc.internal.ClientCallImpl.access$100(ClientCallImpl.java:72)
	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:729)
	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:710)
	at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
	at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133)
	... 3 more
Caused by: io.grpc.StatusRuntimeException: FAILED_PRECONDITION: This transaction has been invalidated by a later transaction in the same session.
Transaction id: 1
Expected: 2
	at io.grpc.Status.asRuntimeException(Status.java:532)
	... 10 more

@olavloite olavloite added the type: process A process-related concern. May include testing, release, or the like. label Nov 19, 2024
@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/java-spanner API. label Nov 19, 2024
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. type: process A process-related concern. May include testing, release, or the like.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants