BUG-5280: Invoke both close and purge at the same time 85/52885/7
authorRobert Varga <rovarga@cisco.com>
Mon, 6 Mar 2017 14:13:22 +0000 (15:13 +0100)
committerTom Pantelis <tpanteli@brocade.com>
Thu, 9 Mar 2017 14:31:38 +0000 (14:31 +0000)
There is no need to gate purge step on the close step
with the current frontend code. Enqueue both steps at the same
time, improving efficiency.

Change-Id: Ia47fa598f7d3798889d03d1f70896c75eff313ea
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/Shard.java

index cb072b5c6a031a9ee5e5c3ba1753939cb66509ab..423323187fff7346cd9b13172b17949f08ec7922 100644 (file)
@@ -632,7 +632,8 @@ public class Shard extends RaftActor {
 
     private void closeTransactionChain(final CloseTransactionChain closeTransactionChain) {
         final LocalHistoryIdentifier id = closeTransactionChain.getIdentifier();
 
     private void closeTransactionChain(final CloseTransactionChain closeTransactionChain) {
         final LocalHistoryIdentifier id = closeTransactionChain.getIdentifier();
-        store.closeTransactionChain(id, () -> store.purgeTransactionChain(id, null));
+        store.closeTransactionChain(id, null);
+        store.purgeTransactionChain(id, null);
     }
 
     @SuppressWarnings("checkstyle:IllegalCatch")
     }
 
     @SuppressWarnings("checkstyle:IllegalCatch")