Skip to content
This repository has been archived by the owner on Jul 21, 2021. It is now read-only.

expose connection session id #81

Merged
merged 4 commits into from
May 31, 2016
Merged

expose connection session id #81

merged 4 commits into from
May 31, 2016

Conversation

dallasmarlow
Copy link

No description provided.

@ayrb13
Copy link

ayrb13 commented Sep 15, 2015

It is same as what i did.
HAHA

@samuel
Copy link
Owner

samuel commented Oct 1, 2015

Thanks for the patch, unfortunately this introduces a data race. Need to atomically set/get the session ID for it to be safe. There's only a few places it's used though so should be pretty straightforward.

Dallas Marlow added 2 commits October 8, 2015 17:46
* upstream/master:
  Do not discard session on connection drop
  Fix the server reported in the connecting event
  Restore watches on authentication success
  Better logging of connection state transitions
  Derive network timeouts from negotiated session timeout
  Fix typo
@dallasmarlow
Copy link
Author

@samuel thanks for pointing that out, just updated with atomic stores

@talbright
Copy link

This is something I could use in my current project.

In some cases it's important to know your session ID, so that you can determine if you are the owner of a znode (ephemeralOwner). For example, the zookeeper ensemble goes down, and then comes back up before your session times out.

Also, is there a known issue with session timeout detection? I set my session timeout to 1s and its not being honored.

@talbright talbright mentioned this pull request Nov 23, 2015
@dallasmarlow
Copy link
Author

@talbright I'm not sure, but I think the session timeout issue is an encoding problem. it is something i've seen as well (#82)

@talbright
Copy link

It may even be worse than that (session didn't expire after two ticks), but I'm still waiting for some time to investigate it further. I left my go-zookeeper client running, shut down my zk server, and brought it up minutes later. My session still didn't expire. Not sure yet though if that's a client issue, a server setting problem, or some conceptual thing I'm missing.

@nomis52
Copy link
Contributor

nomis52 commented Mar 28, 2016

Can this be merged please.

@sakateka
Copy link

@samuel

@samuel
Copy link
Owner

samuel commented May 31, 2016

Looks good. Thanks!

@samuel samuel merged commit 8b35c1c into samuel:master May 31, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants