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>
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>
Align tested boolean/Boolean expectations This patch removes implicit boxing/unboxing by aligning boolean/Boolean expectations. Future<Boolean>.get() will return a Boolean, hence use assertEquals() for these (and Optional<Boolean>). Doing that instead of assertTrue()/assertFalse() eliminates a single Eclipse info-level message about Boolean being unboxes. This also has better behavior: if the tested method returns null, we'll get an assertion failure instead of a NPE. For isPersent() and other methods which return a boolean, use assertTrue() or assertFalse(). Doing that instead of assertEquals() eliminates two Eclipse info-level messages about boxing the two arguments to Boolean, for some reason there is no assertEquals(boolean, boolean). Change-Id: If86ef9fb1ecf4cdceb45bc079bba1a86cff311ac 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>
BUG-5280: remove support for talking to pre-Boron clients Both transaction chains and transaction identifiers are being changed to structured data. Unfortunately there is no way to reliably map string identifiers from versions prior to Boron in a consistent manner. Pre-Boron messages do not have a concept of a frontend identifier nor its generation. Implementations are assigning them in a non-deterministic order and rely on timestamps to disambiguate between generations. Since Shard-internal state keeping and replication logic will require these concepts, this patch marks a clean break in compatibility. This compatibility is only needed in mixed-version clusters, which have not been validated to work and even if the data store works, it cannot cope with model mismatches expected from differing versions. Change-Id: I168fa0a98be10aebd680ce3323c458aad7f15865 Signed-off-by: Robert Varga <rovarga@cisco.com>
Make private methods static These methods do not touch object state, make them static. Change-Id: I9d29719cee7737ea8c36fa2e8fe39d4e245dd68c Signed-off-by: Robert Varga <rovarga@cisco.com>
Deprecate 3PC protobuff messages Deprecated the associated protobuff messages for CanCommitTransaction[Reply] CommitTransaction[Reply] AbortCommitTransaction[Reply] The message classes now extend VersionedExternalizableMessage. Related code was modified accordingly. The PreCommitTransaction message is no longer used so it was removed. Backwards compatibility with pre-boron will be implemented in the next patch as ThreePhaseCommitCohortProxy needs some refactoring so the appropriate cohort version can be used for the messages. Change-Id: I8164ec82c7ef1623d38b1599af2f1c73fadb5300 Signed-off-by: Tom Pantelis <tpanteli@brocade.com>