Lock down AbstractDataStore We have really only one specialization -- ClientBackedDataStore. We therefore can further lock down the methods we expose. Change-Id: I321c920fff6027e21c5ff78f489b192eb6675bbc Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Migrate some tests to new ImmutableNodes While the amount of users of deprecated methods is huge here, we byte off a chunk of them. Change-Id: I6722230638b12cd7eede81e532578148b133220e Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Eliminate OSGiDOMDataBroker Fold instantiation wiring into ConcurrentDOMDataBroker, which ends up being really simple integration. Change-Id: I70fa7a6422de11f7cbdc8c8c71e95d2410b9d1ce Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Factor out DataBrokerCommitExecutor DataBrokerCommitExecutor holds the executor service and manages its statistics and lifecycle. This leaves OSGiDOMDataBroker absolutely bare forwarder. Change-Id: I55751c49c40aba9cfad289e0a1b913241df4f66f Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Convert OSGiDOMDataBroker to ForwardingDOMDataBroker mdsal.dom.spi provides us with the base substrate we need to forward things efficiently. Use that and constructor injection to simplify things a lot. Change-Id: I77625c5f217f2b92a3bb460b60e3bbb549616da7 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Bump upstreams Adopt: - yangtools-13.0.1 - mdsal-13.0.0 Also adopts AbstractDOMDataBroker from mdsal-dom-spi, so that we have less code duplication and maintenance. UTs mocking NormalizedNode are updated to ContainerNode, as mocking sealed classes does not work with Mockito (out of the box). Change-Id: I6d3d3c8ced297b6850aea951040d16437df9e3f0 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Remove shard-snapshot-chunk-size Remove shard-snapshot-chunk-size and replace its occurrences with maximum-message-slice-size. JIRA: CONTROLLER-1980 Change-Id: Iab862d0789b75a89b6476b4ec048d7344362adf2 Signed-off-by: Robert Varga <robert.varga@pantheon.tech> Signed-off-by: Matej Sramcik <matej.sramcik@pantheon.tech>
De-prioritize ask-based messages Reorganize message checking order so that ask-based messages are checked just before we would be proclaiming an unknown message. JIRA: CONTROLLER-2054 Change-Id: I2e8a1c5cc295547a994f6cf45bc73cbea607bc08 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
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 TransactionReadyReplyMapper Pre-Lithium verions are long desupported, remove this now unused class. Change-Id: Ic0a0a03c93735444371c99fdcb4e3f5b34dc68a1 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Refactor ActorInitialized This message is only ever sent from Shard to ShardManager, which its parent. Change it to a record holding the actor reference, so that users do not need to muck with getSender(). Change-Id: Ib26c328e60c8bfd86075e12c39c271978f157d15 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Do not use optional in ShardLeaderStateChanged Use a simple nullable, as all users know what's going on. Change-Id: I931e71763d137c5a50432604214a75e0bfdcdd37 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Introduce CommitTransactionPayload.CandidateTransaction Do not use an Entry but rather a dedicated type, which allows us to unbox things a bit. Change-Id: I16e97cbe8aa6e3f4f9543a9f71a95a09191689c0 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
FrontendClientMetadata(Builder) should not be Identifiable Expose a clientId() to internal package users instead. Change-Id: I7f14170a50e04a5d8752c24a7137c218b9960082 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Seal FrontendClientMetadataBuilder This is a simple specialization, seal it. Change-Id: I5516da14e423b83369e5da1c64e45da3c2ed24d7 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Seal AbstractProxyTransaction Class hierarchy here is firmly defined, express that through seal/permits. Change-Id: I3fc8f04133a788b0c89e156d0e8deb5a5abead7a Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Turn ShardContainer into a record We have Java 17 now, use a record instead of a final class. Change-Id: I340bf3f288ef8264dafc7d77403c5482f307a671 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Use instanceof patterns in ShardManager Reduce the amount of casts we perform by using instanceof patterns. Change-Id: I918a15cf52f67ee072a1e7e88d5624bf161cdb3e Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Use a switch expression in getServerChangeException() Improve clarity and defenses by using a switch expression, which ensures we cover all cases. Change-Id: Ibe39c25a780b1776985ffdb1d968c58fa922f51d Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
ShardDataTreeCohort should not be identifiable Having a public getIdentifier() member does not make carry domain information. Define a package-local transactionId() method serving the same purpose. Change-Id: If60b02ea6a07b094cd655e3c50dc6ba428c263c3 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>