Bump upstreams Adopt: - yangtools-13.0.1 - mdsal-13.0.0 Also adopts AbstractDOMDataBroker from mdsal-dom-spi, so that we have less code duplication and maintenance. UTs mocking NormalizedNode are updated to ContainerNode, as mocking sealed classes does not work with Mockito (out of the box). Change-Id: I6d3d3c8ced297b6850aea951040d16437df9e3f0 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Bump upstreams Adopt: - odlparent-13.0.10 - yangtools-11.0.5 - mdsal-12.0.4 Change-Id: Ia6f7420c5751436ec97d0a45187d79dadf9c3d94 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Do not allow multi-datastore transactions The ability to access multiple datastores from the same transaction has been long-deprecated. This patch disables that ability, binding each transaction to the datastore it first accesses. JIRA: CONTROLLER-2055 Change-Id: I57fed3daf2ae9cd0cc6f4899fe1975c05def5c46 Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech> Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Integrate MRI projects for Neon This patch bumps: - odlparent to 4.0.2 - yangtools to 2.1.2 - mdsal to 3.0.1 It also deals with: - DOMRpcError.getErrors() changing - java.util.Optional being used in MD-SAL - xmlunit upgrade via xmlunit-legacy - any(Class) not matching nulls - lists disappearing and hence requiring at least one item - remove explicit <null/> in blueprints, as that breaks blueprint-core - adjust sal-binding-it to include byte-buddy, which is a mockito dependency - adjust dependencies to account for ietf-{inet,yang}-types movement - moving to tech.pantheon.triemap - mdsal.common.api removals JIRA: CONTROLLER-1860 Change-Id: I31b2d011015846537a99f963ded1d38e7b29d71e Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Convert CDS implementation to use msdal APIs The LegacyDOMDataBrokerAdapter is the proxy for the controller API. Change-Id: I697e2979bef4dcffe544717af1380aa7d7b89d50 Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Add AbstractDOMBrokerTransaction.toString() It is quite common for applications to mis-synchronize transaction chain closure, which may lead to stale transactions. Unfortunately the message produced in such situations: 2017-12-21 14:21:56,008 | ERROR | CommitFutures-48 | ExecutionList | 38 - com.google.guava - 18.0.0 | RuntimeException while executing runnable com.google.common.util.concurrent.Futures$6@6d954ae with executor INSTANCE java.lang.IllegalStateException: Attempted to close chain with outstanding transaction PingPongTransaction{delegate=org.opendaylight.controller.cluster.databroker.DOMBrokerReadWriteTransaction@7523c916} does not give us enough information to correlate the impact of such failures. Add AbstractDOMBrokerTransaction.toString(), which results in the message having actual transaction identifier, so that these failures can be correlated. Change-Id: Id4620df4285ec6d3ba24bbcd8f5ab8c1a29e0687 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
sal-distributed-datastore Checkstyle fixes (for next version) Even though sal-distributed-datastore currentla already has CS enforcement, these violations don't show up in the build, but I see them as red in Eclipse; I think this must be becaues the CS version used in the Eclipse plugin-in is more recent than the CS used in odlparent, and one of the existing activated checks got a little more stringent. Cleaning this up thus helps both to (a) not have read in Eclipse; (b) pave the way to upgrade Checkstyle in odlparent some day. Change-Id: Ib5649a95a1b26b5791f2c3f3f83924b569f965a2 Signed-off-by: Michael Vorburger <vorburger@redhat.com>
Fix warnings/javadocs in sal-distributed-datastore First off, I apologize for the size of this patch. There's a ton of classes in this project and I didn't even get to all of them (will follow-up). While a lot of files were touched, the changes were mostly small. Fixed a lot of checkstyle warnings and cleaned up javadocs. Most of the warnings/changes were for: - white space before if/for/while/catch - white space before beginning brace - line too long - illegal catching of Exception (suppressed) - variable name too short - indentation - missing period after first sentence in javadoc - missing first sentence in javadoc - missing <p/> in javadoc Change-Id: Id56d874a8fbcbbc9285279a71c0a5aba393653a9 Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Refactor to fix unchecked cast warnings. Change-Id: I0fb6ce59707000f225ffa8d654685fbc89f8f2eb Signed-off-by: Gary Wu <Gary.Wu1@huawei.com>
Create transaction on the backend datastore only when neccessary I've borrowed a bunch of code from the data broker because I needed to modify the code for lazy transaction creation which needed me to pass around the factories for creating the transaction on the appropriate store. Basic tests are in place for now which ensure that we do not create transactions on all the stores when not needed and that on submit we only have cohorts for the transactions that we created. The data broker still goes through the three phase commit but since now this has been optimized with the direct commit enhancement on the datastore itself it should not matter if we call one method or 4 as far as message passing goes. Calling the 4 methods may result in extra object creation and such which could be avoided. I would put that in a follow up commit. Change-Id: Id77bb1642748e7df15e084a3f0b5e580783f2f8d Signed-off-by: Moiz Raja <moraja@cisco.com>