- Notifications
You must be signed in to change notification settings - Fork904
fix: avoid IllegalStateException: Timer already cancelled when StatementCancelTimerTask.run throws a runtime error#3778
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
lfgcampos commentedAug 20, 2025
Hi@vlsi, those are amazing news! Is there any explanation though why it works on |
LGTM, this will be difficult to test. |
I'm leaning towards adding a test with mock that triggers an exception from
bac3d0a landed at 42.7.6, and it changed At the same time, backend should always supply It does not explain the reason 42.7.5 fails though. Just to double-check: does 42.7.5 fail for you as well? |
lfgcampos commentedAug 22, 2025
We bumped from Some info that may or may not help:
Regarding capturing the log for |
vlsi commentedAug 22, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Sorry to hear that. I wonder if An alternative option would be trying to execute |
b2fa0a3
toe696d2f
Compare…entCancelTimerTask.run throws a runtime errorPreviously, StatementCancelTimerTask might propagate runtime errorsto java.util.Timer which causes the Timer to cancel itself.We don't want that behavior, so we should avoid throwing errors from TimerTaskimplementations.Note statement.cancelIfStillNeeded has already been ignoring SQLExceptions fromstatement.cancel() for quite a while, however, it did not ignore runtime errors.Fixespgjdbc#3530
3d97bb8
intopgjdbc:masterUh oh!
There was an error while loading.Please reload this page.
Previously, StatementCancelTimerTask might propagate runtime errors to java.util.Timer which causes the Timer to cancel itself. We don't want that behavior, so we should avoid throwing errors from TimerTask implementations.
Note statement.cancelIfStillNeeded has already been ignoring SQLExceptions from statement.cancel() for quite a while, however, it did not ignore runtime errors.
Fixes#3530