Having InMemoryDOMDatastore in its own bundle.To make it configurable using the config subystem. patch 5 changes: md-sal/pom.xml correction patch 4 changes: Moved data tree api and impl to yang-tools based on earlier comment Patch 3 changes: 1. Included sal-inmemory-datastore dependency in TestHelper.java for PaxExam integration test cases [Weird that it was working earlier and my local controller full build were passing] Patch 2 changes: 1. Keeping schema service as part of opendaylight-dom-broker-impl for backward comptability scenario 2. Initializing InMemoryDOMDataStore by default if config-dom-datastore and operation-dom-datastore are not found 3. Updated 01-md-sal.xml based on 1. 4. Regarding the comment of moving data tree in yangtools. It shall be done in separate patch. This is done to replace InMemoryDOMDatastore with distributed-datastore The changes done are: 1. Created a new sal-inmemory-datastore bundle and moved the store/impl source files from sal-dom-broker and the corresponding InMemoryDOMDatastore test cases. 2. Created two yang config models in sal-dom-spi that represent the configurable config-dom-datastore and operational-dom-datastore, that are of service type DOMStore 3. In opendaylight-dom-broker-impl.yang of sal-dom-broker, in the augment of dom-inmemory-data-broker added two container config-data-store and operational-data-store that refer the service implementations of service defined in sal-dom-spi 4.In sal-inmemory-datastore bundle, created a yang model opendaylight-inmemory-datastore that provide the implementation of the sal-dom-spi service definitions mentioned in 2 -- The implementaions are augmented to have schema-service container required by InMemoryDOMDatastore for registering itself for scheam changes 5. Updated the 01-md-sal.xml with the above changes 6. Update the distribution pom.xml to include sal-inmemory-datastore. Change-Id: Ib2f0f0556869981e7e60b3eeae9b1e5e6cc96a0f Signed-off-by: Basheeruddin Ahmed <syedbahm@cisco.com>
Bug 1106: Introduced OptimisticLockFailedException Introduced two new Exceptions to InMemoryDOMDataStore: - IncorrectDataStructureException - ConflictingModificationAppliedException. Introduced OptimisticLockFailedException to DataBroker API which is thrown when transaction fails because of ConflictingModificationAppliedException, which is raised when other modification already applied to data tree prevents commit on submitted modification. OptimisticLockFailedException is propagated to the clients also via returned Future and may be present as causeof ExecutionException when get() is invoked on Future. Change-Id: Ia119c9ae4c4ffa9774b45b1d6d54cade7a5b8c32 Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
BUG-509: remove unnecessary Version objects Testing has revealed the datastore instantiates effectively a version per tree node. This turns out to be not needed, as we really just need a single version per commit -- which can be shared between nodes, as the (node,version) tuple remains unique. So let's just instantiate a single version when we start the transaction, which we need to do anyway, and use it for all nodes/subtrees added or modified. This places an upper bound on Version objects retained to the number of transactions committed (not counting no-ops). Change-Id: I40d095ec230eee8b5af2409c1e8ee61a1860a9d3 Signed-off-by: Robert Varga <rovarga@cisco.com>
BUG-509: introduce Version concept This patch introduces the concept of a Version, which is disconnected from any ordinal number. This is useful for saving memory, as the versioning of TreeNodes needs to only detect version mismatches and not which version is historically newer. Change-Id: I625d9d945ff3fd416dd82bb3f1ff4268f2001e5a Signed-off-by: Robert Varga <rovarga@cisco.com>
BUG-509: migrate to TreeNodes This patch performs the switchover to SPI-provided TreeNodes. It also extracts the information needed for checking applicability of a modification into a separate interface. Also adds some documentation in the non-trivial write+merge path. Change-Id: I83f5ca30bff21774759f9b675b19b6e9622076a2 Signed-off-by: Robert Varga <rovarga@cisco.com>
BUG-509: Move ModificationApplyOperation This patch moves ModificationApplyOperation at al. to the data tree package, improving its isolation. Change-Id: I37081222e30c149a87baf6f4a5d3ce2e84f13acb Signed-off-by: Robert Varga <rovarga@cisco.com>