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

Query cancellation can sometimes fail #7191

Closed
findepi opened this issue Mar 6, 2021 · 1 comment
Closed

Query cancellation can sometimes fail #7191

findepi opened this issue Mar 6, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@findepi
Copy link
Member

findepi commented Mar 6, 2021

Apparently invoking query cancellation can fail with "Unknown transaction ID: 8423de1d-af0b-4bc0-8131-a89bedb6e613. Possibly expired? Commands ignored until end of transaction block"

io.trino.NotInTransactionException: Unknown transaction ID: 8423de1d-af0b-4bc0-8131-a89bedb6e613. Possibly expired? Commands ignored until end of transaction block
	at io.trino.transaction.InMemoryTransactionManager.getTransactionMetadata(InMemoryTransactionManager.java:257)
	at io.trino.transaction.InMemoryTransactionManager.getTransactionInfo(InMemoryTransactionManager.java:155)
	at io.trino.transaction.TransactionManager.isAutoCommit(TransactionManager.java:37)
	at io.trino.execution.QueryStateMachine.lambda$transitionToCanceled$15(QueryStateMachine.java:925)
	at java.base/java.util.Optional.ifPresent(Optional.java:183)
	at io.trino.execution.QueryStateMachine.transitionToCanceled(QueryStateMachine.java:924)
	at io.trino.execution.SqlQueryExecution.cancelQuery(SqlQueryExecution.java:540)
	at java.base/java.util.Optional.ifPresent(Optional.java:183)
	at io.trino.execution.SqlQueryManager.cancelQuery(SqlQueryManager.java:255)
	at io.trino.testing.DistributedQueryRunner.cancelAllQueries(DistributedQueryRunner.java:553)
	at io.trino.testing.DistributedQueryRunner.close(DistributedQueryRunner.java:539)
	at io.trino.util.AutoCloseableCloser.close(AutoCloseableCloser.java:52)
	at io.trino.testing.AbstractTestQueryFramework.close(AbstractTestQueryFramework.java:105)
	at jdk.internal.reflect.GeneratedMethodAccessor1339.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:104)
	at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:515)
	at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:217)
	at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:144)
	at org.testng.internal.TestMethodWorker.invokeAfterClassMethods(TestMethodWorker.java:217)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:115)
	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:834)

Observed in tests (#6723), but looking at the code the problem seems general.

@findepi findepi added the bug Something isn't working label Mar 6, 2021
@findepi
Copy link
Member Author

findepi commented Mar 6, 2021

I will retrofit #6723 instead.

@findepi findepi closed this as completed Mar 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant