Deprecate ask-based protocol messages Since we have removed the ask-based client, we really have no way of testing ask-based messages' interaction with Shard. We keep Shard compatible, but deprecate all ask-based messages and methods/classes dealing with them on the backend. JIRA: CONTROLLER-2054 Change-Id: I5764713b686ae11f8d750e691576b6d20637ab7d Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Bump upstreams Adopt: - odlparent-13.0.1 - yangtools-11.0.0-SNAPSHOT - mdsal-12-0.0-SNAPSHOT Since the format of NormalizedNode tree is updated to not include AugmentationNode (and AugmentationIdentifier), we must force an incompatible update, as we do not have enough information to produce compatible payload. Change-Id: Ibf444540ed052b49651ba66ca7b93c806a6c8a97 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Migrate users of Optional.get() We have an incoming enforcement patch, prepare to adopt it. Change-Id: If73abd4ceaea71a216a4bc3a3968b400b508ec38 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Remove commons-lang dependencies Use commons-lang3 instead, as it provides better interface anyway. Change-Id: I8574166cf77f8f40c9a2ada4b06cc0d8b14244a9 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Do not reference immutable node builders Use Builders/ImmutableNodes instead of direct implementation reference. Also use fluent nature of builders, which flushes out a number of unused constructs, which we remove here. Change-Id: I8803da6a244f4f4dceaf4da06934b0f8df24b827 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Add new MutableCompositeModification version Add new version of MutableCompositeModification, that will write NNDO header right after number of modifications, forming proper embedded block of modifications. For communicating this, we are renaming DataStoreVersions.MAGNESIUM_VERSION and reusing it for the bump. JIRA: CONTROLLER-1939 Change-Id: Ic5c2a8f91fcc41e78682ec202442308d6dc1191a Signed-off-by: tadei.bilan <tadei.bilan@pantheon.tech> Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Bump odlparent/yangtools/mdsal Adopt latest versions, namely; - odlparent-9.0.1 - yangtools-7.0.1 - mdsal-8.0.0-SNAPSHOT There are a few adjustments needed, which mostly deal with the interface to NormalizedNode. Change-Id: I918fb885a6df62e16e17119a7e04ba1672ef7c39 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Adjust to mdsal DOM read/exists FluentFuture change This patch needs to be coordinated with https://git.opendaylight.org/gerrit/#/c/74127/. Change-Id: Iceeff9f9f75ca40ebc31bd839b5e6a5c8639aa4c Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Switch CDS frontend internals to use MD-SAL APIs This patch wires frontend to use MD-SAL DOM*Transaction and related interfaces instead of the controller-provided ones. Change-Id: I8c9c303ca95a961c8c7f91ba4d438c0739c5cedd Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Fix unit test CS warnings in sal-distributed-datastore Fixed checkstyle warnings in unit tests. 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) - illegal throwing of Throwable (changed to Exception) - variable name too short - indentation, mostly due to nested code inside anonymous JavaTestKit instances - separator wrapping: '.', '+', '&&' should be on a new line - local vars/params hiding a field - putting overloaded methods close to one another - remove unused vars - convert functional interfaces to lambdas (eclipse save action) - adding final for locals declared too far from first usage Also 3 classes are no longer used so I removed them rather than fix warnings. Change-Id: Ie1507e36c67a2b58f7efb62378212976b962f9fe Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Remove ModificationPayload class The ModificationPayload class was introduced early in Lithium but was replaced later in Lithium by DataTreeCandidatePayload. Since ModificationPayload was never contained in a release it can be removed. Change-Id: Ia4da96695fb9c0356d16f048451b4dab7e0bcf70 Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Fix license header violations in sal-distributed-datastore Change-Id: I519e80cb6329f752b6b533de067ea3fd6277bedf Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Bug 2597: Batch modification operations in TransactionProxy Modified TransactionContextImpl to batch write, merge, delete modification operations into a single BatchedModifications message and send the batch when a count threshold is reached. Instead of using the current WriteData, MergeData, DeleteData message classes in BatchedModifications, I reused the Modification classes that are used as the payload for peristence and replication. BatchedModifications derives from MutableCompositeModification. The ShardWriteTransaction now simply transfers the Modification instances in the BatchedModifications instance to its internal MutableCompositeModification and applies the Modifications to its transaction. The Modification classes were refactored a little wrt to versioning. The Write/Merge/DeleteModifications no longer read/write the version from the stream. The version is read/written by MutableCompositeModification so it's redundant to also do so in the data Modification classes. The WriteData, MergeData, DeleteData and associated reply classes were deprecated. I did refactor them a little (along with ReadDataReply) as I was originally going to use them. The VersionedSerializableMessage interface was removed as I realized it makes more sense to pass the version in the WriteData, MergeData, DeleteData constructors instead of passing the version via toSerializable. This made it easier in TransactionContextImpl to transition it to use BatchedModifications. I created a VersionedExternalizableMessage base class that reads/write the version. To handle backwards compatibility with Helium, I derived a LegacyTransactionContextImpl class from TransactionContextImpl that overrides writeData, mergeData and deleteData to send WriteData, MergeData, DeleteData messages. TransactionProxy creates this instance if the remote tx versions is < Lithium version. Change-Id: I28df1f89e97667eaca114b991355a6e9d0160a59 Signed-off-by: tpantelis <tpanteli@brocade.com>
BUG-1173: ensure compatibility with Guava 17+ This migrates the sole user to the Guava-15+ API, as the API is removed in version 17. Change-Id: I3bf52fb89116024e7305a142e6b1f6fec9985488 Signed-off-by: Robert Varga <rovarga@cisco.com>
Bug 2268: Use streaming for Modification payload Changed the *Modification classes to Externalizable and to use the NormalizedNode streaming classes. Added a new Payload implementation, ModificationPayload, that serializes the Modification to a byte[]. Added ThreadLocals to SerializationUtils to reuse stream Reader/Writer instances for efficiency for callers that serialize/deserialize multiple objects. Change-Id: Ib85af035d31027ffe4e2ddd5bcd49c1df1c6a42a Signed-off-by: tpantelis <tpanteli@brocade.com>
Update the XSQL jdbc driver to support pentaho Change-Id: I72f54b36a87c84c9fa493a1d35300b241a53ec34 Signed-off-by: Sharon Aicler <saichler@cisco.com>
BUG 1595 - Clustering : NPE on startup This seemed to be happening because of recovery where the topology manager was trying to add something into the datastore which was already present in the journal. The fix was to add a timestamp to each modification so that they do not appear to be the same even if their content was exactly the same. Change-Id: I2d5c98bd87ded7c8b64b8cebf757bfa073327061 Signed-off-by: Moiz Raja <moraja@cisco.com>
Make CompositeModification serializable using protocol buffers Change-Id: I3e91452b0244c6adec84c000e83d7f993b2a59b7 Signed-off-by: Moiz Raja <moraja@cisco.com>
Ensure that modifications are tracked by ShardTransaction As modifications are made on a ShardTransaction they are applied to the transaction object that ShardTransaction wraps However the modifications also need to be tracked. This tracking would be used ultimately by the Shard when persisting data. Change-Id: I4bb76699d251dbdc786416313479f0e6b31962e1 Signed-off-by: Moiz Raja <moraja@cisco.com>