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>
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>
Make LocalSnapshotStore final We have a SpotBugs suppression which ends up being unnecessary if the class is final. Change-Id: If58497303871ae136875c80b8b094276ccda9d64 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Make MemoryOutputStream final This is a checkstyle violation with upgraded checkstyle. Fix that. Change-Id: I370b50baa146a710632e501f1ce7acad913166c2 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>
Clean up sal-clustering-commons Clean up argument finality and whitespace in for(:) constructs. Change-Id: If22f693e6c499aafc8fe0a606b2abb40a9f67cfc Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Modernize sal-clustering-commons Use instanceof patterns to reduce the number of casts. Change-Id: I40eb35b3b1afdae30d461a608aeabda2d7e09ce8 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Fix more Sonar warnings Ignored exceptions, mergeable if statements and similar. Change-Id: Iea262b7c410cfde16fd4f101d3c7c8195ff1ea1f Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Move {Identifiable,Persistent,}Payload Payloads are really part of raft message specification, not some vague sal-clustering-commons detail. They have a strong relationship with AppendEntries and therefore really need to be co-located. As a first step in dealing with AppendEntries sizing, move Payloads so we can properly evolve them. JIRA: CONTROLLER-2037 Change-Id: I069f311b1c1b211b8429a721e6b239e5e08ed813 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Do not use RevisionSourceIdentifier We only have a plain SourceIdentifier, adjust codebase to that. Change-Id: Ib981bb8955c4e29f14e29a8f461daf02616b694a Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Route {Journal,Snapshot}Protocol messages to DataPersistenceProvider The way we wire our messages ends up being not exactly nice, as the baseline RaftActor is not cognizant of all persistence operations. This means it cannot correctly ignore responses to deletion of journal and snapshot entries -- and hence we get dead letters logged. Route JournalProtocol and SnapshotProtocol messages to DataPersistenceProvider, which can then handle them and correctly tell us whether to log them or not. JIRA: CONTROLLER-2042 Change-Id: I47b8c3ae67d0a0ea0aad9f0a64e1bb8dc11400fc Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Bump upstream SNAPSHOTS Adopt: - odlparent-10.0.0 - yangtools-8.0.0-SNAPSHOT - mdsal-9.0.0-SNAPSHOT Change-Id: I60991718a6d1ef6f108c2b1f7b2c09b0c5f973c4 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Restart downed nodes. Nodes can be downed by sbr(for example when Isolated, sbr makes the decision to down the minority), so we need to make sure they can come up automatically unless we have another mechanism in place for bringing up downed nodes. JIRA: CONTROLLER-2025 Change-Id: I23d3ca2cee471c51d0eadc6c426461aa6eef193d Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
Use URLEncoder.encode(String, Charset) We are running with Java 11 and as Modernizer correctly points out, we can use direct charset variant which was introduced with Java 10. This cuts down a tiny bit of dead code. Change-Id: I7c42984bc1e05e94f5266f26e13aaab650ae4f70 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>
Switch to Akka Artery The migration away from legacy akka remoting to artery tcp. JIRA: CONTROLLER-1968 Change-Id: Iac1a0186292eb5a303cf075e540f3f6c8c09a932 Signed-off-by: Kostiantyn Nosach <kostiantyn.nosach@pantheon.tech> Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Use java.lang.ref.Cleaner in controller.cluster.io Improve temporary file clean up by using a Cleaner to dispatch cleaning tasks. Since it gives us a Cleanable, we can dispense with a tracking map and removal from it -- Cleanable makes sure it is called exactly once. JIRA: CONTROLLER-1911 Change-Id: I5fb715102912359cf002129d25a7433199826982 Signed-off-by: tadei.bilan <tadei.bilan@pantheon.tech> Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Rehost Chunked{ByteArray,InputStream,OutputStream} These utility classes are immensely useful for any fragmentation workload. Rehost them so we can reuse them. This means we will end up with non-constant maximum chunk size, but that's fine. JIRA: CONTROLLER-1954 Change-Id: I046ddb16d1e5c7210a781d63f302c3ee3e75742d Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Correct javadoc reference We should not be referencing UntypedActor, but rather AbstractActor. Change-Id: I6f17d818e2c03c9c4a9e0df26317212f28425734 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>