From: Robert Varga Date: Mon, 6 Mar 2017 14:13:22 +0000 (+0100) Subject: BUG-5280: Invoke both close and purge at the same time X-Git-Tag: release/carbon~177 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=11d000a598873780b4d81e8717488ab29ab79f21 BUG-5280: Invoke both close and purge at the same time 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 --- diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/Shard.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/Shard.java index cb072b5c6a..423323187f 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/Shard.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/Shard.java @@ -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")