Closed anson627 closed 5 years ago
also, remember to bump version
This change LGTM.
Just want to get more context, when throw exceptions instead of swallowing them in the previous code, will it introduce any unexpected behaviors in caller functions?
The caller's behaviors stay the same. After retries several times specified by caller, it will still throw error.
However errors are handled by two callers inconsistently, based on original implementation, one would raise, the other would swallow. For that, I hesitate to change it yet, because I don't think I fully understand the intention.
zookeeper get can return nil or throw timeout exception, when network is flaky or zookeeper is overloaded.
adding retry logics (by default 3 times with 5 second interval) can alleviate the problem.
if all retries failed, throw runtime error forcing the process to re-establish zookeeper connections.
@austin-zhu @ken-experiment