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>
Deprecate old MD-SAL APIs for removal These APIs are slated for removal in Aluminium, make sure our warning is more stern. JIRA: CONTROLLER-1917 Change-Id: Ib4f7dcfd5183b87dd10b9ce2b773a59a548892c9 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Fix modernization issues This fixes issues pointed out by Modernizer, which mostly boil down to using Objects.requireNonNull() and direct java.util collections. Change-Id: Id32530a6722cd101f96c23f6a745f91b2f09e2f9 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Deprecate all MD-SAL APIs These APIs have either been completely deprecated or have their replacements in the mdsal project. Mark all of them as deprecated, including their implementations. JIRA: CONTROLLER-1902 Change-Id: I903afcef57c70c1013ab479cfcf31a42f475dc0f Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Allow SnapshotBackedReadTransaction customization In some specific cases we need to customize abort-like handling, which is already implemented for write-like transactions, but is not present for read-only transaction. This patch adds the capability to attach a close() handler and makes sure AbstractSnapshotBackedTransactionChain takes advantage of it. JIRA: CONTROLLER-1879 Change-Id: Ic7027956556b5dd25120ee81613a6151e5dbc501 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Fix checkstyle violations in sal-dom-spi Change-Id: Ifc0955a9dcd162879681cb30ef925b05f37a1fd6 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>
Fix Verify/Preconditions string format These methods take a String.format() string, not a logging one, hence we are not getting the information we want. Change-Id: I46de0d64c85594e3d7b8be97951f1cf5249bca8f Signed-off-by: Robert Varga <robert.varga@pantheon.tech> (cherry picked from commit 3e9ac68fea1aef0c7fedec346e50882efdde8acc)
Mechanical code cleanup (sal-dom-spi) * 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: I68a6f9ee118c8ff47bc2511efa234b93b09de32a Signed-off-by: Stephen Kitt <skitt@redhat.com>
Bug 4774: Add Tx ID to logging on Tx chain failures To help with debugging, it's useful to see the tx ID when a create fails due to previous tx not ready. Change-Id: I0547048ea62340a0297affed3512271908eba65a Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
CDS: Implement front-end support for local transactions Implemented support on the TransactionProxy front-end for optimizations where the Shard is local to the controller instance. In this mode, the Shard's DataTree obtained from the FindPrimaryShard message is used to prepare the modifications completely on the front-end. On ready, the DataTreeModification instance is passed to the Shard via the ReadyLocalTransaction message. The Shard then does a direct commit, eliding the 3PC from the front-end (it's a no-op as it is for remote write-only txns). TransactionContext instances are now obtained via an AbstractTransactionContextFactory passed to TransactionProxy of which there are 2 kinds: one for single, unchained txns and one for chained tnxs. Each creates a different DOM transaction instance to handle preperation of modifications. The DOM transacton is wrapped in a LocalTransactionContext which the TransactionProxy interfaces with. Change-Id: I0322b586f394e4b6c7793b8287ac804b41964378 Signed-off-by: Robert Varga <rovarga@cisco.com> Signed-off-by: Tom Pantelis <tpanteli@brocade.com> (cherry picked from commit 2f7c93174d7834a4c4aedacc9b88aa53a5a0422c)
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>