Simplify verify assertions Simplify verify assertions in ReplicationAndSnapshotsWithLaggingFollowerIntegrationTest class. JIRA: CONTROLLER-2074 Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech> Change-Id: I9bfd448bfef32d5a47e99e056496da5b60abd79d
Refactor snapshot state verification Use dedicated list of snapshot states for leader and followers in ReplicationAndSnapshotsWithLaggingFollowerIntegrationTest class. JIRA: CONTROLLER-2074 Change-Id: I06b6303585c9002d5d36b043b96fa46f5eca60cf Signed-off-by: Ivan Hrasko <ivan.hrasko@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>
Do not use Optional for leaderAddress Optional is a largely-superfluous indirection. Use a nullable return and adjust users. Change-Id: Ic453039e174a94c55c3821c807202ba2cead0c9e Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
ServerInfo should be a plain record This is a pure DTO, turn it into a record, eliminating quite a bit of verbosity. Also clean up RaftActorContextImpl.updatePeerIds() so we do not juggle two booleans and set/reset our voting status. Change-Id: Ifbb2ae0c8163472b8ef3b59210f12dccb1b8e30d Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Merge ClientRequestTracker The split between interface and implementation is completely unnecessary, this is just a simple DTO. Change-Id: Ie10a68b003b6ef82f59fb298cd433c8b876afcc3 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Do not leak ReplicatedLogEntry in Replicate message While convenient, this is a leak of constructs and contains a debug-only access to data. While we are at it make Replicate a simple record. JIRA: CONTROLLER-2044 Change-Id: I92a364a9590771f0bb9278e2e8ca8176691b8f75 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Access clientActor exactly once Make sure the null check is explicit to everyone. Change-Id: I299728e411712ad73a83e78d66d078b0d79453b4 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Do not use static import for Patterns.ask() Improve call site visibility by explicitly referencing this method as Patterns.ask(). Change-Id: I94f21ba9a5e2d0a2e3de89f6826896ea98a24641 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Refactor RaftActorTest to avoid test failures The "doReturn(value).when(mockObj).coolMethod(same(arg))" way of mocking the return values for "coolMethod()" calls resulted in UnfinishedStubbingException, even though there seems to be no reason for such error. This change introduces "the other" way of such mocking: "when(mockObj.coolMethod(same(arg)).thenReturn()". JIRA: CONTROLLER-2080 Change-Id: I58b9c08780c27b43ad5eff4e21c921b9260fc236 Signed-off-by: Šimon Ukuš <simon.ukus@pantheon.tech> Signed-off-by: Samuel Schneider <samuel.schneider@pantheon.tech>
Make snapshot offset long to prevent overflow The current implementation uses integer which can easily overflow if the Snapshot grows over 2.14GB JIRA: CONTROLLER-2086 Change-Id: Ibbe3d3e1667cf59137e057b31141033a826142e4 Signed-off-by: tibor.kral <tibor.kral@pantheon.tech> Signed-off-by: Samuel Schneider <samuel.schneider@pantheon.tech> Signed-off-by: Robert Varga <robert.varga@pantheon.tech>