-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add a lock around jdbc connection #11877
Conversation
405b51f
to
4d444bf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I don't think we are able to write tests for multiple instances, correct?
A concurrency test would be hard to make reliable (the problem only appears when multiple instances are running simultaneously) |
Support case AGENT-7456.
A user is using five instances of this check and they were failing with this error:
The problem seems to be a limitation of jpype itself about running it on multiple threads so this change introduces a lock around creating a connection.
A more severe approach has been explored in #11882 but the user has tested the changes here and found the issue resolved.