Remove old unversioned proxies We have a number of unversioned classes which are using two externalizable proxies. Remove legacy proxies, inlining SerialForm interfaces. JIRA: CONTROLLER-2063 Change-Id: If3f96563d1331dc1449bdb87baf55124e78d473a Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Switch identifiers to new proxies We have more efficient serialization proxies defined, use them for writeout and deprecate the old ones. JIRA: CONTROLLER-2051 Change-Id: I1daa83e8fcdd3776951fc1c284c9e6d0d7f64078 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Add new cds-access-api proxies Externalizable serialization format record class hierarchy, which leads to significant overheads. This patch introduces proxies which are are flat, i.e. have java.Object as their superclass, eliminating this overhead. The way we do this is we defined SerialForm interfaces which extend Externalizable and define the serialization protocol in terms of default methods. We then define a bunch of classes which are pure data holders implementing individual SerialForms. Also ensure messages properly implement cloneAsVersion() to propagate the target version, now that it matters for them. Finally audit use of java.io.Serial so that we do not import it -- it is just pure overhead vs. using @java.io.Serial directly. JIRA: CONTROLLER-2051 Change-Id: I01132665027687edc1c6d44dda8a6ab0cab6ad6a Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
More cds-access-api cleanup Fixup previous patch and sprinkle more @Serial annotations. Change-Id: I74414861197bb417dadc445ebc3fc2703a97ea4d Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Promote cds-access-api This API is no longer @Beta. Change-Id: If81e77c8b2c9dc2fcfa6bcd94f58426c75f6cd0a Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Sprinkle @NonNull annotations We have a few return methods which could use @NonNull annotations, sprinkle them around. Change-Id: I48c0f8879127673eb122321dd6c92d4572098f68 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Reduce JSR305 proliferation retention=runtime annotations are mixing really badly with Java EE injection and Java 11. Make sure we do not use javax.annotation package in APIs and reduce overall proliferation inside implementations. Change-Id: I569815f0336efdc0de662c3b80f0fa6e5dd47d8a Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
BUG-5280: fix problems identified by integration tests Switching the integration test suite has flushed out couple of problems in the implementation, notably: - wrong formatting placeholder - unhandled requests during replay - uninitialized path in AbstractReadTransactionRequestProxyV1 - missing sequence number bump in local commit case - wrong writeObject() in ReadTransactionSuccessProxyV1 - IllegalStateException thrown instead of TransactionChainClosedException - attempt to create history=0 on the backend - mismatched sequences during preCommit message replay - ConcurrentModificationException during localAbort() - missing upcalls to LocalHistory concretizations when transactions abort and complete - incorrect order on enqueue/send, leading to unpaired responses Change-Id: I252a795dadb917452b9eb6d591a5c12ca5b69a45 Signed-off-by: Robert Varga <rovarga@cisco.com>
Fix FindBugs warnings in cds-access-api and enable enforcement Several warnings are suppressed with justification provided. Change-Id: I39b860013677d045bb8e8dbd722c9b41406285ac Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Fix CS warnings in cds-access-api and enable enforcement Fixed checkstyle warnings and enabled enforcement. Most of the warnings/changes were for: - variable name too short - correct ordering of @Nonnull annotations - line too long - suppressing CS RedundantModifier warning for ctors where public is needed for packaged-scoped classes that implement Externalizable - adding protected to ctors for packaged-scoped abstract classes that implement Externalizable to avoid CS RedundantModifier warning - local vars/params hiding a field - putting overloaded methods close to one another Change-Id: Ib85e15f21118f3484ccb8e945e8257ae3e3278bc Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Return shortened string from TransactionIdentifier.toString For debug logging we need a shortened string for better readability and grepping. The standard toString is way too long. I changed toString to a similar compact form that we had before. adding in the frontend generation id and type, eg member-1-datastore-config-fe-1-txn-3 member-1-datastore-operational-fe-1-chn-2-txn-3 Change-Id: I942eaaa0e8ceedf42eed964f2a2e3a76d8c09806 Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
BUG-5280: remove WritableObjects The concept has been merged into yangtools, consume it from there. Also shorten the use of Identifier & WritableObject to WritableIdentifier which is also a yangtools concept. Change-Id: Iaaffd59b2c5b193447540487df6aabdd29f491d1 Signed-off-by: Robert Varga <rovarga@cisco.com>
BUG-5280: optimize identifier serialization format Using ObjectOutput.writeObject() results in large overhead, resulting in transaction identifiers weighing in at 549 bytes when used in an object. Introduce WritableObject concept, which has a WriteTo(ObjectOutput) method and a static factory method readForm(ObjectInput). This effectively means we do not get Java Serialization headers. Also make FrontendType a final class, adopting the WritableObject serialization, which brings down the overhead to below 100 bytes. Change-Id: I20294d4fdf309f250d507dfc675d8405c1fcf505 Signed-off-by: Robert Varga <rovarga@cisco.com>
BUG-5280: add cds-access-api identifiers This patch adds a new component, which will hold the API exposed by the CDS backend and used by the CDS frontend. Change-Id: If0a2a6372b6cbbe898d2413bcd35259f7900a90a Signed-off-by: Robert Varga <rovarga@cisco.com>