Fix StandaloneFrontendHistory accounting
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / StandaloneFrontendHistory.java
index d26b23e9dc228edce2f6c755bec308116d7f6039..df13cd1368243ac8c128bc2eccf9c5ba14617bca 100644 (file)
@@ -60,12 +60,14 @@ final class StandaloneFrontendHistory extends AbstractFrontendHistory {
 
     @Override
     FrontendTransaction createOpenSnapshot(final TransactionIdentifier id) {
-        return FrontendReadOnlyTransaction.create(this, tree.newReadOnlyTransaction(id));
+        return FrontendReadOnlyTransaction.create(this,
+            new ReadOnlyShardDataTreeTransaction(tree, id, tree.takeSnapshot()));
     }
 
     @Override
     FrontendTransaction createOpenTransaction(final TransactionIdentifier id) {
-        return FrontendReadWriteTransaction.createOpen(this, tree.newReadWriteTransaction(id));
+        return FrontendReadWriteTransaction.createOpen(this,
+            new ReadWriteShardDataTreeTransaction(tree, id, tree.takeSnapshot().newModification()));
     }
 
     @Override