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
Track caller on proxy checkin #190
Conversation
@@ -36,7 +36,7 @@ defmodule DBConnection.Ownership.Proxy do | |||
|
|||
state = %{client: nil, timer: nil, holder: nil, | |||
timeout: timeout, interval: interval, poll: nil, | |||
owner_ref: owner_ref, pool: pool, pool_ref: nil, | |||
owner: {caller, owner_ref}, pool: pool, pool_ref: nil, |
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.
This could be another entry in the map because this data never changes. client
has a tuple to ensure "atomicity" so that we always set the whole client status and should be less likely to make a mistake. For owner/owner ref we never check both at same time so code would be clearer without the tuple.
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.
Yeah, but I also thought that if we were ever to change it, keeping them as a tuple guarantee we won't make stuff inconsistent.
But I am indifferent. If you have a strong preference for one or another please let me know and I will change it.
I think we should also include which code the caller is running. It will make debugging much easier. |
Just pushed caller stacktrace as well. |
❤️ 💚 💙 💛 💜 |
No description provided.