Make InMemoryDOMDataStore.ready() unsynchronized 09/10209/1
authorRobert Varga <rovarga@cisco.com>
Sat, 23 Aug 2014 21:01:47 +0000 (23:01 +0200)
committerRobert Varga <rovarga@cisco.com>
Sat, 23 Aug 2014 21:01:47 +0000 (23:01 +0200)
Tracing datastore operations has revealed some contention on the
datastore, specifically when users call WriteTransaction.ready(). It
seems this method does not need synchronization at all, as it is not
directly changing any state.

Change-Id: I635f6a925694e4b68e629978fbd535fedb3a6cd6
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/md-sal/sal-inmemory-datastore/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/InMemoryDOMDataStore.java

index 129013378ea57c713304793248e1cdc2f2c0a6ce..7ad3b8201e182cff9b3820a9e029f697e4cdb950 100644 (file)
@@ -191,7 +191,7 @@ public class InMemoryDOMDataStore implements DOMStore, Identifiable<String>, Sch
     }
 
     @Override
-    public synchronized DOMStoreThreePhaseCommitCohort ready(final SnapshotBackedWriteTransaction writeTx) {
+    public DOMStoreThreePhaseCommitCohort ready(final SnapshotBackedWriteTransaction writeTx) {
         LOG.debug("Tx: {} is submitted. Modifications: {}", writeTx.getIdentifier(), writeTx.getMutatedView());
         return new ThreePhaseCommitImpl(writeTx);
     }