I guess we need this for checking the meta location from zk right?
Do we need that to be interruptible as well?
If the API is synchronous, it needs to be interruptible...
I guess we might need it if we ever want to go meta replicas.
Actually, we need it already, for example because a split task can be interrupted. Some HBase code relies on being interruptible already. With replicas, or without replica, you may want to rely on this to free the handlers (for example, if we get stuck on a region, we may use all the handlers of the region server today: if the client cancels the query interrupting the call does help).
We are not setting the interrupted flag for the thread in ReplicationPeersZKImpl, ZKLeaderManager
If we throw an exception, it means that we took care of the interruption, so we don't need to reset the interrupt flag (and should not). If we abort the server, we can consider that we took care of the interruption. Keeping the thread interrupted could mean interrupting the abort, which may not be what was expected.
Can we get away with some of the changes, if we keep the original ZKUtil.getData() and have ZKUtil.getDataInterruptible() ?
Not really, imho: we need the code to be clean when there are interruptions. ZooKeeper API is clean. Our wrapping is not clean today.