Remove deprecated MD-SAL APIs The APIs in controller have been deprecated for removal and cannot sustain an upgrade to Guava-28+. Remove them along with all supporting implementations. JIRA: CONTROLLER-1903 Change-Id: I213797b7045cfd7bef744e249614e2b1f6169c1c Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Fix IMDS test synchronization Before we close the DTCL we must make sure we flush all changes, otherwise we could end up losing changes simply because we are no longer interested in them. JIRA: MDSAL-429 Change-Id: I6df384c375ea1692a10c9f460d3dceb626468061 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Do not use NodeIdentifierWithPredicates constructors This class will transition into a value-based object for memory efficiency reasons. Switch to using its static factory methods. Change-Id: I7e21a6ccf1ad999d2d0427769b26dffeac166274 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Bump yangtools to 3.0.0 This is bumps yangtools to 3.0.0, adjusting for changed APIs. The changes specifically include: - use ListenerRegistry.getRegistrations() instead of it implementing Iterable - adjust for NormalizedNodeStreamWriter interface change - remove use of *AttrBuilder, as NormalizedNodes no longer hold attributes - DataTreeCandidateNodes.empty() instead of home-grown implementation - adjust for DataTreeCandidateNode.getModifiedChild() returning Optional - use QueuedNotificationManager.BatchedInvoker Change-Id: Ia30d73ccf6380e3759414b3026b822df0950a481 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Remove unused exceptions This drops exception declarations which are never used. Change-Id: Icc8938b9c3b437a0d5961ec1b481fd06c52d47f2 Signed-off-by: Stephen Kitt <skitt@redhat.com>
Use moved BindingReflections BindingReflections are being evacuated from yang-binding, use them from their new location. Change-Id: Ib14971102980688227f1f761c17a22362d4e7e3c Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Convert DCL tests to use DTCL Change-Id: I05bd3a9b42e1ab3d9a1e682aaacb585aee313e7a Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Fix checkstyle violations in sal-inmemory-datastore Change-Id: I4e8dec800b8e5a2871e51ec4cd150f06c8af1bd1 Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Delay snapshot backed transaction ready error Delay snapshot backed transaction ready error to 3PC canCommit. Change-Id: Ief659423b401936a286f04c2f6c3732722c5aabf JIRA: CONTROLLER-1812 Signed-off-by: Jaime Caamaño Ruiz <jcaamano@suse.com>
Adjust to yangtools-2.0.0 changes Change-Id: Ib86747e5ed19c0c00bb46b8d7e4936f4d90c4364 Signed-off-by: Robert Varga <robert.varga@pantheon.tech> Signed-off-by: Stephen Kitt <skitt@redhat.com>
sal-inmemory-datastore: use lambdas This series of patches uses lambdas instead of anonymous classes for functional interfaces when possible. Lambdas are replaced with method references when appropriate. Change-Id: I3ed4fecf12d64254a3f3ec701ea22037e52149cc Signed-off-by: Stephen Kitt <skitt@redhat.com>
Bug 6859 - Binding generator v1 refactoring Based on transfer of Binding generator v1 from Yangtools project to MDSAL in past, we need to finalize this process by refactoring package naming: org.opendaylight.yangtools -> org.mdsal.binding org.opendaylight.yangtools.sal -> org.mdsal.binding Refactoring changes in MDSAL, see: https://git.opendaylight.org/gerrit/#/c/52107 By using of Binding generator v1, this change needs to be addressed in Controller project. - refactoring itself - add META-INF to gitignore Change-Id: Ib7ec1b39466c0c814459bcbc2adce437b2a0ca64 Signed-off-by: Jakub Toth <jatoth@cisco.com> Signed-off-by: Robert Varga <rovarga@cisco.com>
BUG-7159: eliminate use of CrossStatementSourceReactor yang-test-util provides a convenient way to parse YANG files into a SchemaContext, without relying on the internal layout of the yang parser. Convert tests to use these utilities, which simplifies test setup and allows the yang parser layout to evolve without breaking the world. Change-Id: Icbd0556b990ea9d5ff93c34330049a9683e04970 Signed-off-by: Robert Varga <rovarga@cisco.com>
Mechanical code cleanup (sal-inmemory-datastore) * Remove unnecessary type specifiers (use Java 7 <>) * Remove unnecessary "extends Object" declarations * Remove unnecessary semi-colons * Merge identical catch blocks * Remove redundant modifiers: - enum constructors are private by default - interface properties are public static final by default - interface methods are public abstract by default - interfaces are abstract by default - inner interfaces are static by default - inner classes in interfaces are public static by default Change-Id: I994a877a310241da4079a242f9196536c13747dd Signed-off-by: Stephen Kitt <skitt@redhat.com>
Get rid of old Yang Parser in Controller - Config part DONE - MD-SAL part DONE - bit of clean-up Change-Id: I6bf4f8b81826d5ab61dd883fff3244f42d148375 Signed-off-by: Martin Ciglan <mciglan@cisco.com>
Publish SnapshotBacked transactions IMDS-internal transaction implementations can be used by the CDS frontend. Fix them up for publishing and make them available in SPI as a Beta API. Change-Id: Iaa4cd6792db0f262ce41281280f2ccfde6146532 Signed-off-by: Robert Varga <rovarga@cisco.com>
Migrate deprecated guava methods sameThreadExecutor() has been deprecated, use its replacement instead. Change-Id: Icf1fed34977bd64393f48fe9e9829bee7f7db846 Signed-off-by: Robert Varga <rovarga@cisco.com>
BUG-650: remove executor abstraction This patch removes sameThreadExecutor from the commit path, eliminating associated overhead. Relevant benchmarks show improvement pretty much across the board: BEFORE millis error write100KSingleNodeWithOneInnerItemInCommitPerWriteBenchmark 2213.735 77.597 write100KSingleNodeWithOneInnerItemInOneCommitBenchmark 171.524 2.289 write10KSingleNodeWithTenInnerItemsInCommitPerWriteBenchmark 164.282 1.391 write10KSingleNodeWithTenInnerItemsInOneCommitBenchmark 14.161 0.196 write50KSingleNodeWithTwoInnerItemsInCommitPerWriteBenchmark 982.697 29.397 write50KSingleNodeWithTwoInnerItemsInOneCommitBenchmark 93.233 2.174 AFTER millis error delta write100KSingleNodeWithOneInnerItemInCommitPerWriteBenchmark 2138.900 75.844 -3.4% write100KSingleNodeWithOneInnerItemInOneCommitBenchmark 177.839 3.997 +3.5% write10KSingleNodeWithTenInnerItemsInCommitPerWriteBenchmark 158.666 1.090 -3.5% write10KSingleNodeWithTenInnerItemsInOneCommitBenchmark 13.022 0.105 -8.0% write50KSingleNodeWithTwoInnerItemsInCommitPerWriteBenchmark 935.490 30.395 -4.8% write50KSingleNodeWithTwoInnerItemsInOneCommitBenchmark 89.907 1.204 -3.6% Furthermore it cleans up and marks FIXMEs for defunct statistics. These will need to be replaced with implementation which does not assume underlying implementation. Change-Id: I01c51462a8529a2f874ecd2f9af05faba503bc58 Signed-off-by: Robert Varga <rovarga@cisco.com>
BUG-1679: optinally log allocation context Transactions can now print their allocation context. Change-Id: I801a44d1270f8becd2835cc31b514e2e0fdaee33 Signed-off-by: Robert Varga <rovarga@cisco.com>
BUG-1493: split off recursion tracking and rework it This patch reworks tracking of recursion state into a separate class. This allows us to unify the four call sites and provide a simple heuristic. A state object is allocated each time we enter a new child and its buidlers are collected when we emerge from it -- resulting in more accurate event reporting, eliminating false positives. Further optimization allows us to stop recursing as soon as we know no listeners are affected by the outcome at a particular level. Change-Id: I2be29cebb79892c85a22e79b18c2e62f77bfb7d4 Signed-off-by: Robert Varga <rovarga@cisco.com>