You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm porting the Consul Go API to C# so that we can use it internally, and I noticed that monitorLock returns if there's an error doing kv.Get(sessionID). This feels like if there was a connection loss during a long poll, we could return from monitorLock but no longer be watching the k/v store to determine if we've lost leadership.
Am I just reading the code wrong, or is this actually a possibility?
Also, what should the right answer be here if that's the case? Closing leaderCh in case of an error seems like it would force a re-acquire, which does seem correct, especially if they're using their same session.
The text was updated successfully, but these errors were encountered:
I'm porting the Consul Go API to C# so that we can use it internally, and I noticed that
monitorLock
returns if there's an error doingkv.Get(sessionID)
. This feels like if there was a connection loss during a long poll, we could return frommonitorLock
but no longer be watching the k/v store to determine if we've lost leadership.https://github.com/hashicorp/consul/blob/master/api/lock.go#L319-L321
Am I just reading the code wrong, or is this actually a possibility?
Also, what should the right answer be here if that's the case? Closing leaderCh in case of an error seems like it would force a re-acquire, which does seem correct, especially if they're using their same session.
The text was updated successfully, but these errors were encountered: