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

Statement.cancel() does not work #527

Closed
kassak opened this issue Jan 12, 2024 · 3 comments
Closed

Statement.cancel() does not work #527

kassak opened this issue Jan 12, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@kassak
Copy link

kassak commented Jan 12, 2024

Describe the bug

Statement.cancel() does not work as it is invoked through software.aws.rds.jdbc.mysql.shading.com.mysql.cj.jdbc.ha.ConnectionProxy.JdbcInterfaceProxy#invoke which synchronises on statement instance.
As the result if I have the long running execute() (eg select sleep(314159265)) and trying to cancel it from another thread, cancel operation would wait until execute completes. That is definitely not the way cancel should work :)

Expected Behavior

Statement immediately canceled in the database, execute is immediately aborted with exception.

Current Behavior

Cancel is hung until execute completes

Reproduction Steps

execute select sleep(314159265) on one thread and try to cancel statement from another thread

Possible Solution

No response

Additional Information/Context

No response

The AWS JDBC Driver for MySQL version used

1.1.9

JDK version used

21

Operating System and version

Linux 6.6.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Tue, 02 Jan 2024 02:28:28 +0000 x86_64 GNU/Linux

@kassak kassak added the bug Something isn't working label Jan 12, 2024
@crystall-bitquill
Copy link
Contributor

Hi @kassak,

Thanks for reaching out and raising this issue.

We'll take a look at this and keep you updated as we investigate.

And to let you know, while the AWS JDBC Driver for MySQL is still being maintained at the moment, new features will no longer be added to the driver and all future developments will take place in the AWS JDBC Driver project. More details can be found on the maintenance policy. We encourage users of the AWS JDBC Driver for MySQL to try out the AWS JDBC Driver, as it provides similar and additional features. There is a migration guide available here.

Thank you for you patience!

@crystall-bitquill
Copy link
Contributor

Hi @kassak,

We've recently merged in a fix (#531). Could you kindly check out our latest snapshot build and let us know if the issue persists?

Thank you!

@karenc-bq karenc-bq added the pending release Resolution implemented, pending official release label Feb 14, 2024
@crystall-bitquill crystall-bitquill removed the pending release Resolution implemented, pending official release label Mar 5, 2024
@crystall-bitquill
Copy link
Contributor

Hi @kassak,

The fix for this issue is now available on the latest version of the AWS JDBC Driver for MySQL. If there are no further updates on this ticket in the next few days, it will be closed. Please feel free to reopen this issue or to create a new one if the issue persists or if you have additional questions or concerns.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants