BUG 8402: Close readonly tx 82/57682/3
authorTomas Cere <tcere@cisco.com>
Tue, 23 May 2017 12:09:34 +0000 (14:09 +0200)
committerRobert Varga <nite@hq.sk>
Sat, 27 May 2017 07:29:31 +0000 (07:29 +0000)
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 <tcere@cisco.com>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/PrefixedShardConfigWriter.java

index f6e4d37857b859bd1c92a94117dec32f294b1589..0342a1351748aa77f2020bb179198ddf5bace2a9 100644 (file)
@@ -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();
         }
     }