BUG-5280: fix snapshot accounting 39/55239/1
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 19 Apr 2017 15:13:58 +0000 (17:13 +0200)
committerRobert Varga <nite@hq.sk>
Wed, 19 Apr 2017 15:18:09 +0000 (15:18 +0000)
The following warning is emitted under testing:

2017-04-19 08:49:34,707 | WARN  | ... | AbstractClientHistory            | ... | Could not find aborting transaction member-2-datastore-operational-fe-0-txn-19-0

Which is indicating that we cannot find the open transaction
inside AbstractClientHistory.

The problem is mis-routed invocation when we are taking a snapshot:
instead of going directy to subclass doCreateSnapshot() which only
allocates the transaction, invoke takeSnapshot(), which actually does
the appropriate book-keeping.

Change-Id: I07473f381d3147a7fc7d355afede254a781a3094
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/AbstractDataStoreClientBehavior.java

index ef5590fe84354bda48b7a3a300881825dfc56e3a..bc7eca75b84fb5241c53336e538502b2e209bc92 100644 (file)
@@ -207,7 +207,7 @@ abstract class AbstractDataStoreClientBehavior extends ClientActorBehavior<Shard
 
     @Override
     public final ClientSnapshot createSnapshot() {
-        return singleHistory.doCreateSnapshot();
+        return singleHistory.takeSnapshot();
     }
 
     @Override