Local-ucast-macs not cleared from oper-topo DS. 80/92180/2
authorChetan Arakere Gowdru <chetan.arakere@altencalsoftlabs.com>
Tue, 18 Aug 2020 11:53:55 +0000 (17:23 +0530)
committerChetan Arakere Gowdru <chetan.arakere@altencalsoftlabs.com>
Wed, 19 Aug 2020 03:19:06 +0000 (08:49 +0530)
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 <chetan.arakere@altencalsoftlabs.com>
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepOperationalCommandAggregator.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/TransactionInvokerImpl.java

index 1aa57767ed98f966b0b8ba91df61291ba7cae384..5575424afea6283e0eec1ec454d4fa9a381ead88 100644 (file)
@@ -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();
+        }
+    }
+
 }
index 251e4dc6bc0f7c55d09b9c169cee97d2d45e6e23..eb2f09add00aecb1cae2bbebda084f4a99da4334 100644 (file)
@@ -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());
     }