From: Tomas Cere Date: Tue, 23 May 2017 12:09:34 +0000 (+0200) Subject: BUG 8402: Close readonly tx X-Git-Tag: release/nitrogen~181 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=ffd9241ce797f81a33345961525ed6be0ab6e75e BUG 8402: Close readonly tx This transaction is only used for an exist check of default prefix shard configuration and needs to be closed once we are done with it. Change-Id: I8d7c06e7e3ce58cb91713dac14744c411ec1bf5f Signed-off-by: Tomas Cere --- diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/PrefixedShardConfigWriter.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/PrefixedShardConfigWriter.java index f6e4d37857..0342a13517 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/PrefixedShardConfigWriter.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/PrefixedShardConfigWriter.java @@ -117,6 +117,8 @@ class PrefixedShardConfigWriter { } catch (final ReadFailedException e) { LOG.error("Presence check of default shard in configuration failed.", e); return false; + } finally { + snapshot.abort(); } }