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 cb072b5..4233231 100644 (file)
@@ -632,7 +632,8 @@ public class Shard extends RaftActor {
 
     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")

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.