Open ChenJhua opened 5 years ago
Hi,
Sounds related to https://github.com/python-zk/kazoo/issues/457
I trying #457 ,but not use; If I have three hosts A,B,C, and kazoo client connecting to A, then if I kill A, kazoo client will connect to two other useful hosts B,C, such as B. But if I start A now and kill B, kazoo client will not select A, because A has been removed from the list of valid hosts?
A is not removed from the list. If you set hosts
to A, B and C, you will first connect to A, If you get disconnected from A, you will connect to B. Again, if you get disconnected from B, you will move to C. And so on.
Yeah,I know it,but during this period, A is back to normal, can we connect to A? Do you use the list to mark invalid hosts or valid hosts and remove them from the list if they cannot be connected?
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/kazoo/client.py", line 1033, in exists
return self.exists_async(path, watch=watch).get()
File "/usr/lib/python2.7/site-packages/kazoo/handlers/utils.py", line 69, in get
raise self._exception
kazoo.exceptions.SessionExpiredError
when I capture SessionExpiredError exception,I use kazoo client _reset(),B server down will reconnect to A。
I don't know why has exception and reconnect effective zk server need do something?