Apache9 commented on PR #5837: URL: https://github.com/apache/hbase/pull/5837#issuecomment-2111814481
> > > Both approaches have their own drawbacks. I still wonder what we can do here for ConnectionRegistry timeouts, given that Zookeeper response might never come back for timer to be applicable. > > > > > > The timer is used to complete the CompletableFuture when the zookeeper does not respond in time... > > Oh wait, we need TimeTask for `zk.get(path)` and `zk.list(znodePaths.baseZNode)` only right? We should not have TimerTask for outer CompletableFuture. In ZKConnetionRegistry, you have a CompletableFuture object returned to upper layer, and you will issue a zk async operation, in the callback, you will complete the CompletableFuture object so the upper layer will know. Now the problem is you can not control the timeout of zk async operations, so when issue a zk async operation, you need to set up a timer task at the same time, and once the timer task is executed, you try to complete the CompletableFuture with a TimeoutException if it has not been completed yet, so the upper layer will know the operation failed. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
