LOG.error("Session Manager has already been closed.");
return;
}
- this.nodes.remove(createNodeId(session.getRemoteAddress()));
+ final NodeId nodeId = createNodeId(session.getRemoteAddress());
+ this.nodes.remove(nodeId);
+ this.state.remove(nodeId);
if (nodeState != null) {
LOG.debug("Node {} unbound", nodeState.getNodeId());
nodeState.released(persistNode);
}, MoreExecutors.directExecutor());
}
+ close();
this.lastReleased = System.nanoTime();
}
// FIXME: flip internal state, so that the next attempt to update fails, triggering node reconnect
LOG.error("Unexpected transaction failure in node {} transaction {}",
this.nodeId, transaction.getIdentifier(), cause);
+ close();
}
@Override
@Override
public void onFailure(final Throwable throwable) {
- LOG.trace("Put topology Node failed {}, value {}", TopologyNodeState.this.nodeId, node, throwable);
+ LOG.error("Put topology Node failed {}, value {}", TopologyNodeState.this.nodeId, node, throwable);
}
}, MoreExecutors.directExecutor());
}
}
}, MoreExecutors.directExecutor());
}
-}
\ No newline at end of file
+}