return new RemoteMcastMacsBuilder(remoteMcastMacs).setLocatorSet(new ArrayList<>(locators)).build();
} catch (ReadFailedException e) {
LOG.error("Failed to read the macs {}", iid);
+ } finally {
+ transaction.close();
}
return null;
}
sn = tx.read(LogicalDatastoreType.CONFIGURATION, id).get();
} catch (InterruptedException | ExecutionException e) {
throw new RuntimeException(e);
+ } finally {
+ tx.close();
}
if (sn.isPresent()) {
LOG.warn("failed to get counter request data from DB");
return RpcResultBuilder.<GetElementCountersByHandlerOutput>failed()
.withError(ErrorType.APPLICATION, "failed to get counter request data from DB").buildFuture();
+ } finally {
+ tx.close();
}
GetElementCountersByHandlerOutputBuilder gecbhob = new GetElementCountersByHandlerOutputBuilder();
LOG.warn("failed to get counter request data from DB");
return RpcResultBuilder.<CleanAllElementCounterRequestsOutput>failed()
.withError(ErrorType.APPLICATION, "failed to get counter request data from DB").buildFuture();
-
+ } finally {
+ tx.close();
}
return RpcResultBuilder.<CleanAllElementCounterRequestsOutput>success().buildFuture();
}
}
} catch (InterruptedException | ExecutionException e) {
return false;
+ } finally {
+ roTransaction.close();
}
return false;
}
LOG.trace("Received VpnInterface update event: original={}, update={}", original, update);
LOG.info("update: VPN Interface update event - intfName {} on dpn {} oldVpn {} newVpn {}", update.getName(),
update.getDpnId(), original.getVpnInstanceNames(), update.getVpnInstanceNames());
+ if (original.equals(update)) {
+ LOG.info("update: original {} update {} are same. No update required.", original, update);
+ return;
+ }
final String vpnInterfaceName = update.getName();
final BigInteger dpnId = InterfaceUtils.getDpnForInterface(ifaceMgrRpcService, vpnInterfaceName);
LOG.info("VPN Interface update event - intfName {}", vpnInterfaceName);