From: Chetan Arakere Gowdru Date: Tue, 18 Aug 2020 11:53:55 +0000 (+0530) Subject: Local-ucast-macs not cleared from oper-topo DS. X-Git-Tag: release/silicon~44 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=9b4d5c2f55bcc93d8e61727b33279951cb50418a;p=ovsdb.git Local-ucast-macs not cleared from oper-topo DS. Description: Due to deviceInfo cache not populated during add, during local-ucast-mac removal, this mac entry is missing causing not to delete from optopo on mac removal from switch. The onSuccess() which populate the cache is not called properly during add resulting in this issue. Change-Id: I9db66caee024daf254cba5b696ef697e6309f1bb Signed-off-by: Chetan Arakere Gowdru --- diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepOperationalCommandAggregator.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepOperationalCommandAggregator.java index 1aa57767e..5575424af 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepOperationalCommandAggregator.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepOperationalCommandAggregator.java @@ -63,4 +63,20 @@ public class HwvtepOperationalCommandAggregator implements TransactionCommand { } connectionInstance.getDeviceInfo().onOperDataAvailable(); } + + @Override + public void onSuccess() { + + for (TransactionCommand command : commands) { + command.onSuccess(); + } + } + + @Override + public void onFailure() { + for (TransactionCommand command : commands) { + command.onFailure(); + } + } + } diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/TransactionInvokerImpl.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/TransactionInvokerImpl.java index 251e4dc6b..eb2f09add 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/TransactionInvokerImpl.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/TransactionInvokerImpl.java @@ -125,11 +125,13 @@ public class TransactionInvokerImpl implements TransactionInvoker,TransactionCha @Override public void onSuccess(final Object result) { forgetSuccessfulTransaction(transaction); + command.onSuccess(); } @Override public void onFailure(final Throwable throwable) { // NOOP - handled by failure of transaction chain + command.onFailure(); } }, MoreExecutors.directExecutor()); }