for (RemoteDpns remoteDpns : dpnsTeps.getRemoteDpns()) {
//Process the unprocessed NodeConnector for the Tunnel, if present in the UnprocessedNodeConnectorCache
// This may run in all node as its ClusteredDTCN but cache will be populated in only the Entity owner
+ String tunnelName = remoteDpns.getTunnelName();
try {
- directTunnelUtils.getTunnelLocks().lock(remoteDpns.getTunnelName());
- NodeConnectorInfo nodeConnectorInfo = unprocessedNCCache.remove(remoteDpns.getTunnelName());
+ directTunnelUtils.getTunnelLocks().lock(tunnelName);
+ NodeConnectorInfo nodeConnectorInfo = unprocessedNCCache.remove(tunnelName);
if (nodeConnectorInfo != null) {
- LOG.debug("Processing the Unprocessed NodeConnector for Tunnel {}", remoteDpns.getTunnelName());
+ LOG.debug("Processing the Unprocessed NodeConnector for Tunnel {}", tunnelName);
// Queue the IntefaceAddWorkerForUnprocessNC in DJC
String portName = nodeConnectorInfo.getNodeConnector().getName();
InterfaceStateAddWorkerForUnprocessedNC ifStateAddWorker =
coordinator.enqueueJob(portName, ifStateAddWorker, ITMConstants.JOB_MAX_RETRIES);
}
} finally {
- directTunnelUtils.getTunnelLocks().unlock(remoteDpns.getTunnelName());
+ directTunnelUtils.getTunnelLocks().unlock(tunnelName);
}
}
}
if (interfaceManager.isItmDirectTunnelsEnabled()) {
//Process the unprocessed NodeConnector for the Tunnel, if present in the UnprocessedNodeConnectorEndPtCache
// This may run in all node as its ClusteredDTCN but cache will be populated in only the Entity owner
+ String dpnId = dpnTepsInfo.getDPNID().toString();
try {
- directTunnelUtils.getTunnelLocks().lock(dpnTepsInfo.getDPNID().toString());
- Collection<NodeConnectorInfo> nodeConnectorInfoList = unprocessedNodeConnectorEndPointCache.get(
- dpnTepsInfo.getDPNID().toString());
+ directTunnelUtils.getTunnelLocks().lock(dpnId);
+ Collection<NodeConnectorInfo> nodeConnectorInfoList = unprocessedNodeConnectorEndPointCache.get(dpnId);
if (nodeConnectorInfoList != null) {
for (NodeConnectorInfo ncInfo : nodeConnectorInfoList) {
LOG.debug("Processing the Unprocessed NodeConnector for Tunnel {}", ncInfo
ncInfo.getNodeConnector(), portName);
coordinator.enqueueJob(portName, ifStateAddWorker, ITMConstants.JOB_MAX_RETRIES);
// Remove the NodeConnector Entry from UnprocessedNodeConnectorEndPt Map
- unprocessedNodeConnectorEndPointCache.remove(dpnTepsInfo.getDPNID().toString(), ncInfo);
+ unprocessedNodeConnectorEndPointCache.remove(dpnId, ncInfo);
}
}
} finally {
- directTunnelUtils.getTunnelLocks().unlock(dpnTepsInfo.getDPNID().toString());
+ directTunnelUtils.getTunnelLocks().unlock(dpnId);
}
}
}