if (System.currentTimeMillis() - start > maxWaitTime) {
throw new IOException("No valid last txid znode found");
}
try {
long sessionId = zk.getPrimarySsId(address, false);
ZookeeperTxId zkTxId = zk.getPrimaryLastTxId(address, false);
if (sessionId != zkTxId.getSessionId()) {
LOG.warn("Session Id in the ssid node : " + sessionId
+ " does not match the session Id in the txid node : "
+ zkTxId.getSessionId() + " retrying...");
Thread.sleep(retrySleep);
continue;
}
} catch (Throwable e) {
LOG.warn("Caught exception : " + e + " retrying ...");