From: Robert Varga Date: Sat, 23 Aug 2014 21:01:47 +0000 (+0200) Subject: Make InMemoryDOMDataStore.ready() unsynchronized X-Git-Tag: release/helium~219^2 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=34d0ab32d82e48549b67ef1b0410bef603982738 Make InMemoryDOMDataStore.ready() unsynchronized 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 --- diff --git a/opendaylight/md-sal/sal-inmemory-datastore/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/InMemoryDOMDataStore.java b/opendaylight/md-sal/sal-inmemory-datastore/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/InMemoryDOMDataStore.java index 129013378e..7ad3b8201e 100644 --- a/opendaylight/md-sal/sal-inmemory-datastore/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/InMemoryDOMDataStore.java +++ b/opendaylight/md-sal/sal-inmemory-datastore/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/InMemoryDOMDataStore.java @@ -191,7 +191,7 @@ public class InMemoryDOMDataStore implements DOMStore, Identifiable, 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); }