Skip to content

Don't close while holding lock#13

Merged
zklapow merged 1 commit intohubspot-client-betafrom
close-outside-lock
Mar 19, 2019
Merged

Don't close while holding lock#13
zklapow merged 1 commit intohubspot-client-betafrom
close-outside-lock

Conversation

@zklapow
Copy link
Copy Markdown
Member

@zklapow zklapow commented Mar 19, 2019

This can cause this lock to be held for a very long time, causing contention and possibly connection acquisition timeouts.

@jschlather

@jschlather
Copy link
Copy Markdown

LGTM, we only needed the lock for mutating the vtGateConnHashMap and closing should be threadsafe?

@zklapow
Copy link
Copy Markdown
Member Author

zklapow commented Mar 19, 2019

yup (we do the close from a separate thread in some cases anyhow)

@zklapow zklapow merged commit 53b52cb into hubspot-client-beta Mar 19, 2019
@zklapow zklapow deleted the close-outside-lock branch March 19, 2019 19:24
zklapow added a commit that referenced this pull request Apr 2, 2019
jschlather added a commit that referenced this pull request Apr 9, 2019
* Add .build-jdk8

* don't close while holding lock (#13)

* Add temporary info logging statement for slow queries.
olyazavr pushed a commit that referenced this pull request May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants