Robert Varga [Fri, 25 Oct 2024 12:43:08 +0000 (14:43 +0200)]
Use newBindingDataCodec()
Use the more modern version of codec instantiation.
Change-Id: Ia4e9621365d1c22b849c99c1e9c5fc8dfef7f57c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 25 Oct 2024 11:10:18 +0000 (13:10 +0200)]
Modernize sal-distributed-datastore
Reduce the use of deprecated constructs, so that we have a tad fewer
warnings.
Change-Id: Ifba929b72052de85097e1b8d993cdb1bf3dda32b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 25 Oct 2024 10:47:58 +0000 (12:47 +0200)]
Move {merge,store}ToStore()
These methods are used in only one test, move them there.
Change-Id: I1b40346227990f65aaa6baf06f534f853a7acaa1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 25 Oct 2024 10:37:06 +0000 (12:37 +0200)]
Remove unused prepareBatchedModifications()
We are not using this method, remove it.
Change-Id: If2eca3cd6c740ed155ff889edb4dd1f4f6d581a2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Ivan Hrasko [Mon, 29 Jul 2024 10:40:02 +0000 (12:40 +0200)]
Bump Pekko to 1.0.3
https://github.com/apache/pekko/releases/tag/v1.0.3
https://github.com/apache/pekko/blob/main/docs/src/main/paradox/release-notes/releases-1.0.md
The most important change is the ability to run Akka and Pekko
clusters together:
https://cwiki.apache.org/confluence/display/PEKKO/Pekko+Akka+Compatibility
There is no need to update asn, agrona, aeron, ssl-config and config
versions because they are the same like in 1.0.2:
https://github.com/apache/pekko/blob/main/project/Dependencies.scala
JIRA: CONTROLLER-2120
Change-Id: Id99162dd2795685ffbeeaa1f014d8bf58549d9ff
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
Robert Varga [Wed, 18 Sep 2024 16:01:56 +0000 (18:01 +0200)]
Remove deprecated ReplicatedLogEntry methods
getIndex()/getTerm() have no callers, remove them.
Change-Id: I6a498eda09bb1f26541ff1278e74c99a65328d30
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Ivan Hrasko [Mon, 27 May 2024 07:44:26 +0000 (09:44 +0200)]
Migrate to Apache Pekko
Migrate to Apache Pekko 1.0.2 according to:
https://pekko.apache.org/docs/pekko/current/project/migration-guides.html
To make the transition smooth we have replaced Akka with Pekko
in repackaged-akka package and renamed it to repackaged-pekko.
Pekko is changing configuration files as well, mostly
akka is changed to pekko. Thus we have introduced updated files
under new names - pekko.conf, factory-pekko.conf, etc.
See also: https://github.com/apache/pekko
We have copy-pasted *_reference.conf files from Pekko, they are
changing akka to pekko naming mostly except of:
- some Pekko ports are different that akka's
- 2552 has changed to 7355
- 25520 has changed to 17355
We do not expect this would have impact on end-users.
The only change we have made in reference files is that we have
allow-java-serialization = on enabled by default.
Apache akka licence has been changed to Apache pekko licence.
JIRA: CONTROLLER-2120
Change-Id: I2c71d939dbf7fb277e03a85de4ca04b9333ff211
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: Samuel Schneider <samuel.schneider@pantheon.tech>
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 24 Oct 2024 12:02:10 +0000 (14:02 +0200)]
Bump versions to 11.0.0-SNAPSHOT
This starts the next development iteration.
Change-Id: I2854b1930d251f4aeb66bbc0202ff8cdbc6a0acf
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 22 Oct 2024 04:51:43 +0000 (06:51 +0200)]
Bump versions to 10.0.5-SNAPSHOT
This starts the next development iteration.
Change-Id: I13850fc2989f95acaed71387879fd53fdcc33243
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
jenkins-releng [Mon, 21 Oct 2024 17:03:02 +0000 (17:03 +0000)]
Release controller
Robert Varga [Mon, 21 Oct 2024 09:41:57 +0000 (11:41 +0200)]
Bump mdsal to 14.0.4
Pick up latest fixes from upstream.
Change-Id: I4accbd9d19bf6b3d861a6a90a2f9bfb8c4917249
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 17 Oct 2024 15:35:40 +0000 (17:35 +0200)]
Use FluentFutures.submit()
We do not need to decorate the executor -- just use
FluentFutures.submit(), which does the right thing with a plain
Executor.
Change-Id: Ie335a9febf0b1b5d240ba749d300190f15d2cb5b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 16 Oct 2024 19:15:31 +0000 (21:15 +0200)]
Seal cluster.access.concepts.Message
We have 4 different specializations of a Message, make sure we have that
captured in the class hierarchy.
Change-Id: I599441561083fa7365743860943fca78d8aada15
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 16 Oct 2024 19:10:39 +0000 (21:10 +0200)]
Improve FrontendReadWriteTransaction.doHandleRequest()
Use a switch expression to dispatch on message types, improving code
density and safety.
Change-Id: I1e2a732cd2f64f9ceb2c624b3e0c365ef6f5e241
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 16 Oct 2024 19:00:26 +0000 (21:00 +0200)]
Improve FrontendReadWriteTransaction transitions
We can use a simple trick to force switches to be exhaustive. Use it to
improve our defensiveness.
Change-Id: Ife894796505927b25627c65aefd25f6029e24189
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 16 Oct 2024 18:50:30 +0000 (20:50 +0200)]
Seal TransactionModification
We have a trivial class hierarchy. Seal it to allow for exhaustive
handling.
Change-Id: I99141eebeb2894d49f477927c115263ffd4c19fd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 17 Oct 2024 11:29:50 +0000 (13:29 +0200)]
Improve FrontendReadWriteTransactionTest
Use explicit assertions instead of expected throws.
Change-Id: I20ddafb8fb5ad13f1c310805cb52cf5ce991702c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 16 Oct 2024 18:44:17 +0000 (20:44 +0200)]
Modernize FrontendReadWriteTransaction
Use switch expressions and local variable type inference to improve code
defensiveness.
Change-Id: I7eeb8220061a57862126300a478a4ce16f13bb7a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 16 Oct 2024 17:08:29 +0000 (19:08 +0200)]
Use exhaustive switches in DTC-IO
We can force the switch to be an exhaustive thing, and thus can ditch a
bit of unused exception code.
Change-Id: Ifdcc003be86c71748df862f1e2795b67009aeaf2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 16 Oct 2024 17:03:03 +0000 (19:03 +0200)]
Improve DataTreeCandidateInputOutput
Report an explicit IOException when we encounter a problem.
Change-Id: I9f70b8f23889ae6f8b8294f187d51a44250c6b65
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 16 Oct 2024 12:19:38 +0000 (14:19 +0200)]
Use Empty.immediateFuture()
We have a nice utility method, use that instead of brewing our own
constants.
Change-Id: Ifa504f80342907a95950cbbdaff399a72d599fcc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 12 Oct 2024 09:28:20 +0000 (11:28 +0200)]
Bump versions to 10.0.4-SNAPSHOT
This starts the next development iteration.
Change-Id: I0bfbda04a3c0520c5f9113739844ed70bdf980eb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
jenkins-releng [Sat, 12 Oct 2024 07:21:45 +0000 (07:21 +0000)]
Release controller
Robert Varga [Wed, 9 Oct 2024 05:56:50 +0000 (07:56 +0200)]
Bump upstreams
Adopt:
- odlparent-14.0.4
- yangtools-14.0.5
- mdsal-14.0.3
Change-Id: I57f42b186fc6b510ddf0b33e1b5f6935f3fca29e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 11 Oct 2024 14:53:02 +0000 (16:53 +0200)]
Fix checkstyle violations
Upgraded checkstyle is finding these, fix them up.
Change-Id: I5688232baf2b6ba5c19ef6784cb856522cce9ec6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 8 Oct 2024 15:26:01 +0000 (17:26 +0200)]
Make state/odl.cluster.client a directory
We want to be grouping things and not proliferate properties too much.
Make odl.cluster.client a directory and then use member-name to create
another level.
JIRA: CONTROLLER-2116
Change-Id: I710ff2d8bc75523a41c9b3d05ceff5bc612d08d6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 8 Oct 2024 15:45:59 +0000 (17:45 +0200)]
Modernize BucketStoreActor a bit
Use local variable type inference to clean things up a bit.
Change-Id: Ifb74abd9c6eb76b4fbfafd9c754138ffbab06ee3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 8 Oct 2024 12:15:08 +0000 (14:15 +0200)]
Store persistenceId in AbstractClientActor
We are accessing persistenceId even after shutdown for logging purposes.
This leads to a NPE -- which we can fix by remembering persistenceId in
the actor.
JIRA: CONTROLLER-2123
Change-Id: I9df4eae40d7b93b9a595626524d91e24b5a4e076
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 8 Oct 2024 12:30:21 +0000 (14:30 +0200)]
Separate out snapshot handling in BucketStoreActor
We will have more complicated transitions here, make sure we bracket
them in dedicated methods.
JIRA: CONTROLLER-2125
Change-Id: Id0466e905850fb3237c9d750e6de1e6e157371a8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 19 Sep 2024 10:54:40 +0000 (12:54 +0200)]
Fix sal-remoterpc-connector dependencies
We have a warning here, fix it up.
Change-Id: I6a5a16ab1f0877b1eed9d7ce4ddd807e84c53857
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 19 Sep 2024 10:52:48 +0000 (12:52 +0200)]
Use enhanced switches in BucketStoreActor
Replace if/else cascades with switch matches.
Change-Id: Ib2198749ee4ee89326325b4484dba86fe94ea3f8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 20 Sep 2024 09:44:00 +0000 (11:44 +0200)]
Use switch for type dispatch in ShardDataTree
We have if/else cascades, use an enhanced switch instead to dispatch
based on message type.
Change-Id: Ifaf81c7f579a88454eb8d00fbf6175a4b6a4f79a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 20 Sep 2024 08:34:12 +0000 (10:34 +0200)]
Clean up AbstractRaftActorBehaviorTest
We have unnecessarily-split lines, clean that up.
Change-Id: Ibb24adbe80ed23c745e49add82e4106d6ff2036b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 20 Sep 2024 08:14:54 +0000 (10:14 +0200)]
Improve AbstractRaftActorBehavior.handleMessage()
Use a switch expression to dispatch on message type instead of an
if/else cascade.
Change-Id: If69890a3fff30c6eb28254bc83ce966599340459
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 20 Sep 2024 07:02:21 +0000 (09:02 +0200)]
Access entries in processNewEntries() only once
Rather than accessing AppendEntries.getEntries() in three places,
perform only a single access and retain the value in a local variable.
Also access the last entry only when absolutely needed, using
List.getLast().
Change-Id: Iea55ff298533741c5122d4c1757bbee2061fae03
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 19 Sep 2024 13:28:22 +0000 (15:28 +0200)]
Clean up RaftActorContextImpl formatting
We have a few jagged methods, clean that up.
Change-Id: I9119f66ce8df21ab19e518bdd9f86cd4e3478376
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 19 Sep 2024 13:03:13 +0000 (15:03 +0200)]
Eliminate TermInformationReader
Integrate ReplicatedToAllTermInformationReader into its sole caller,
eliminating the need for TermInformationReader interface.
Change-Id: I63537051b8ae193cdfae342cc0c89352bbc8d2b6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 17 Sep 2024 09:03:17 +0000 (11:03 +0200)]
Store cds-access-client generation in a file
We are storing the equivalent of three strings in Akka persistence,
which makes the state hard to reason about and hard to manipulate for
support purposes.
This patch provides an alternative by switching primary storage to
a property file in state/ directory.
Migration is automatic, in that if we encounter a persisted
ClientIdentifier, we generate the property file and also remember that
fact via a newly-introduced PersistenceTombstone.
Once we have a tombstone, we rely solely on the property file, which is
manipulated using atomic operations, to maintain this critical state.
JIRA: CONTROLLER-2116
Change-Id: I05732d5640959c9a03c42b36e7c679782c91562a
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 18 Sep 2024 16:01:16 +0000 (18:01 +0200)]
Modernize DummyShard
Use a modern switch to dispatch messages and migrate use of
ReplicatedLogEntry.getIndex().
Change-Id: I215ea8033fe6d936c8e9095148fd6c5b2d196000
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 17 Sep 2024 15:00:56 +0000 (17:00 +0200)]
Fix cds-access-client dependencies
We have a simple warning here, adjust dependencies to eliminate it.
Change-Id: Ie1c35a924eb653a41f944f6922e77ffa3a6d2dd1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 17 Sep 2024 08:41:15 +0000 (10:41 +0200)]
Use a switch expression in extractCookie()
We have an if/else check, use a switch expression instead.
Change-Id: I6a07c233a0a1bbe6747a5df02d0e345995f27184
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 17 Sep 2024 08:32:42 +0000 (10:32 +0200)]
Seal AbstractClientConnection
We have only three possible concrete states, make sure this is expressed
in the type system.
Change-Id: I3cf531ce9d2fd123d430cde78e4e1843dc5341a9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 17 Sep 2024 08:27:26 +0000 (10:27 +0200)]
Use an instanceof pattern to check connection
Combine check with assignment, as we only use the returned value
if it is a ConnectedClientConnection.
Change-Id: I31e51f92c2e145127a04172bda3ae03fa82bc463
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 17 Sep 2024 08:22:57 +0000 (10:22 +0200)]
Use an enhanced switch in onReceiveCommand()
We have an if/else cascade, use a modern switch to achieve the same
thing, improving clarity.
Change-Id: I4a01c0f1b521f8013ee4e47b34ffa6e8c810abc5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 17 Sep 2024 08:17:04 +0000 (10:17 +0200)]
Use a switch expression in onReceiveRecover()
We have a simple dispatch here, modernize it with a switch expression.
Change-Id: Icda3018f0b60e158005f6019ccc6c4fc703b7435
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 2 Sep 2024 22:20:27 +0000 (00:20 +0200)]
Bump versions to 10.0.3-SNAPSHOT
This starts the next development iteration.
Change-Id: Id1af6b052c427153ea7f398d2548f59915ea8ae5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
jenkins-releng [Mon, 2 Sep 2024 20:12:27 +0000 (20:12 +0000)]
Release controller
Robert Varga [Mon, 2 Sep 2024 16:33:29 +0000 (18:33 +0200)]
Bump upstreams
Adopt:
- odlparent-14.0.3
- yangtools-14.0.4
- mdsal-14.0.2
Change-Id: Ia8dbee90be539928b4d204939a95e93354345dc9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 26 Aug 2024 15:15:52 +0000 (17:15 +0200)]
Release reader after indexing
When we initially index a file, we fail to close its reader. That is not
a biggie in and of itself, but leads to leak warnings.
JIRA: CONTROLLER-2124
Change-Id: I9a4e115163495367034b841f370fe0b7a08b045d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 8 Aug 2024 23:25:55 +0000 (01:25 +0200)]
Use Empty for ON_TASK_COMPLETION_THREAD_TL
The object carried has no semantic meaning, but it has to be non-null.
Use Empty.value() instead of Boolean.TRUE for that function, which has
better semantic mapping.
Change-Id: Ice6a2e56676af73d12f22696995a4dc1f69f7b46
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 8 Aug 2024 23:15:45 +0000 (01:15 +0200)]
Change ConcurrentDOMDataBroker.toString()
Use class identity without any properties for now.
Change-Id: I3694ba6139ebd7bbb466a6d4da56798b82877b18
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 6 Aug 2024 21:19:42 +0000 (23:19 +0200)]
Improve DelegatingRunnable.toString()
Rather than pointing to an identity, which does not help with
identifying the runnable which is being offloaded, use ToStringHelper to
which exposes the delegate's toString() as a property.
Change-Id: I0752724fed249422e9d2ad66045101921cc7c2eb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 31 Jul 2024 21:24:17 +0000 (23:24 +0200)]
Use DefaultBindingDOMCodecFactory in test
Do not reference BindingCodecContext directly, but rather go through the
official DI endpoint.
Change-Id: I02fe67066a98b8f2c3ba58c4e28ce387e1cb982a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 31 Jul 2024 21:15:02 +0000 (23:15 +0200)]
eos-dom-akka should not use BindingCodecContext
Use DefaultBindingDOMCodecFactory as the intermediate to instantiating
BindingDOMCodecServices, which is what we should be coding against --
and it is not something that can be overridden.
We are also not using BINDING_RUNTIME_GENERATOR, so we remove it,
simplifying dependencies.
Change-Id: If69c45bc9f617c13644e11aad10cd326ec2c8ae9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 29 Jul 2024 10:01:10 +0000 (12:01 +0200)]
Bump versions to 10.0.2-SNAPSHOT
This starts the next development iteration.
Change-Id: I859279e348aee10aaa131718591e81e544548f45
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
jenkins-releng [Mon, 29 Jul 2024 02:01:16 +0000 (02:01 +0000)]
Release controller
Robert Varga [Sun, 28 Jul 2024 21:10:44 +0000 (23:10 +0200)]
Bump upstreams
Adopt:
- yangtools-14.0.2
- mdsal-14.0.1
Change-Id: I44f99607d5aad87b2c9f91dd0d31f3e18fa90050
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 27 Jul 2024 05:16:14 +0000 (07:16 +0200)]
Bump versions to 10.0.1-SNAPSHOT
This starts the next development iteration.
Change-Id: Ibd715336a00ef7e8bff7930dbb1c4d5a9a3313ec
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
jenkins-releng [Fri, 26 Jul 2024 12:06:34 +0000 (12:06 +0000)]
Release controller
Ivan Hrasko [Mon, 27 May 2024 11:03:06 +0000 (13:03 +0200)]
Remove unused dataCenterControls
Remove unused reference DataCenterControl from OSGiClusterAdmin
constructor/OSGI activator.
Change-Id: I74677c8af750f898b0fc15ad8ec726493111eac1
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Robert Varga [Fri, 26 Jul 2024 09:39:00 +0000 (11:39 +0200)]
Pick up mdsal-14.0.0
Use release version of mdsal-14.
Change-Id: I4f22829645fd7046b5bc37f9186f5362badec433
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 25 Jul 2024 20:05:32 +0000 (22:05 +0200)]
Bump upstreams
Adopt:
- odlparent-14.0.2
- yangtools-14.0.1
Change-Id: I389c0c9bc679202226122dd52c9574b43127c059
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 16 Jul 2024 12:23:46 +0000 (14:23 +0200)]
Adopt released yangtools
Adopt:
- odlparent-14.0.1
- yangtools-14.0.0
Also adjusts to slight movements in mdsal, restoring the ability to
build.
Change-Id: I7c5dfa41448c63e009c2bb5aedecbc8c34640bd0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 29 Jun 2024 01:51:57 +0000 (03:51 +0200)]
Bump upstreams
Adopt:
- odlparent-14.0.0
- yangtools-14.0.0-SNAPSHOT
- mdsal-14.0.0-SNAPSHOT
This patch uses yangtools/mdsal SNAPSHOT versions to do initial
interation.
Change-Id: I56bca3b5c105fbf77c90e03965a96b2d13fffdac
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 2 Jul 2024 09:21:12 +0000 (11:21 +0200)]
Remove use of impl.schema.ImmutableNodes
Migrate the handler to eliminate deprecation warning.
Change-Id: I35f5d81b42ffdb7cdca476885158ef8f88ebc230
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 29 Jun 2024 09:57:52 +0000 (11:57 +0200)]
Do not use EventListener/ListenerRegistration
This is a useless marker, drop it and use ObjectRegistration instead of
ListenerRegistration.
Change-Id: Iec4b9591e324e549ec5600c2c9d0075b8d2836fb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 3 May 2024 21:34:40 +0000 (23:34 +0200)]
Separate out RaftEntryMeta
RaftEntryMeta captures entry index and term, without the data portion of
a RAFT journal entry.
While we are modifying things, also make sure to minimize data hunting
by remembering things, like the replicated log.
JIRA: CONTROLLER-2121
Change-Id: I9a107077fb965ef8921f62a58cce4aec69e85185
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 4 Jun 2024 18:26:35 +0000 (20:26 +0200)]
Bump versions to 10.0.0-SNAPSHOT
This starts the next major development iteration.
Change-Id: Ie4a93f0070b979cadd2a9cf76d1671d7b982dc08
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 3 May 2024 22:07:53 +0000 (00:07 +0200)]
Modernize AbstractLeader
Use List.of() and access first element only once.
Change-Id: I718f09a90e7c8c56362e0503c927ed5fdb842e34
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 4 Jun 2024 12:54:29 +0000 (14:54 +0200)]
Bump upstreams
Adopt:
- odlparent-13.1.3
- yangtools-13.0.6
- mdsal-13.0.4
Change-Id: I73c9abdbf1db0e71b3d5ee48cf470cfe272edfb7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 15 May 2024 09:38:17 +0000 (11:38 +0200)]
Bump versions 9.0.4-SNAPSHOT
This starts the next development iteration.
Change-Id: I9f4f637c14bf0da54ff2512095195d98b4d17703
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
jenkins-releng [Tue, 14 May 2024 13:57:28 +0000 (13:57 +0000)]
Release controller
Robert Varga [Tue, 14 May 2024 12:42:24 +0000 (14:42 +0200)]
Separate out raft-journal
Use a dedicated artifact to hold the baseline interfaces, so that we can
evolve it later without the Kryo baggage.
JIRA: CONTROLLER-2115
Change-Id: I7d6b0f8625078c816d9f99f8748e0b1bc3fcd092
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 14 May 2024 12:29:25 +0000 (14:29 +0200)]
Rename ByteBufJournal
Split out the base interfaces into controller.raft.journal, allowing us
to split out the implementation as well.
JIRA: CONTROLLER-2115
Change-Id: I429872d92da6b4044b393e2a0d5e05f5c9823ee4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 14 May 2024 12:13:47 +0000 (14:13 +0200)]
Separate out {From,To}ByteBufMapper
We have overlapping method definitions on the read side. Let's split up
ByteBufMapper into two interfaces so they can be reusable.
JIRA: CONTROLLER-2115
Change-Id: I9c897a83e15818a9ca5269cf2b22d725d5d706b9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 14 May 2024 11:45:08 +0000 (13:45 +0200)]
Move {Journal,ByteBuf}Reader.firstIndex()
Similar to lastIndex(), firstIndex() is a journal-level thing. Move it
out.
JIRA: CONTROLLER-2115
Change-Id: I7257194d65dbd47960bf6be4af12ea56056d3c9f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 10 May 2024 15:18:44 +0000 (17:18 +0200)]
Split up RecoveringClientActorBehavior.onReceiveRecover()
We will be expanding logic here, split the methods up so it is clearer
what is going on.
JIRA: CONTROLLER-2116
Change-Id: I6dbfb6fb6106c2e342e448b714b708c1e4e65d04
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 10 May 2024 15:00:17 +0000 (17:00 +0200)]
Move InitialClientActorContext allocation
The context is inherently tied to RecoveringClientActorBehaviour,
allocate it there.
Change-Id: I37a0c9d8ee2a187256b200035b320bd2f6b86c0b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 12 May 2024 10:14:33 +0000 (12:14 +0200)]
Free disk buffers
We are allocating the buffer via a ByteBufAllocator, which may lead to
leaks is we do not release() the buffer.
JIRA: CONTROLLER-2115
Change-Id: I8a1aff9cd7ef1a3cd5937a5ac481a3c188a6c13f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 10 May 2024 12:55:18 +0000 (14:55 +0200)]
Make Netty-3 dependency optional
Akka is using an long-obsolete version of Netty in for classic remoting.
While this is not a real problem by default, as the user needs to
configure it for the classes to be loaded, it is tripping up static
analysis tools.
This patch makes the org.jboss.netty.* import optional and removes our
packaging of Netty-3. This means that Akka Classic Remoting cannot be
configured unless the user also packages Netty-3 themselves.
JIRA: CONTROLLER-2119
Change-Id: I0a1bf611f140f2d5b6b83700893d0d69a3ba6115
Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 10 May 2024 09:45:08 +0000 (11:45 +0200)]
Bump Scala to 2.13.14
https://github.com/scala/scala/releases/tag/v2.13.14
Change-Id: I4a0c0fafa504d3a164f2e08a4df92f1f538d7e91
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 18 Apr 2024 18:39:13 +0000 (20:39 +0200)]
Add MappedByteBuf
Add MappedByteBuf and switch File{Access,Reader,Writer} to use ByteBufs
as their lingua franca. This reduces friction between the internal APIs
and the user-facing ones.
JIRA: CONTROLLER-2115
Change-Id: Id05744378e883cbfbf386407945a64e34282e213
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 8 May 2024 16:45:20 +0000 (18:45 +0200)]
Enable checkstyle
Fix the few remaining warnings and enable checkstyle.
Change-Id: I6eaeaefe921633d76dfa6283d0685a3c53320b95
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 6 May 2024 03:23:11 +0000 (05:23 +0200)]
Separate out FileAccess
Rather than keeping mapping in MappedFileWriter, use MappedFileAccess
to keep its lifecycle.
The second part is keeping the information about last position, which
we encapsulate in JournalSegment.State and its two specializations.
Also move ByteBuffer allocator to DiskFileAccess, as it really is
specific to StorageLevel.DISK.
JIRA: CONTROLLER-2099
Change-Id: I7fba8da21a021a477c965d96045c1b0d4bf8cc29
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 8 May 2024 21:48:14 +0000 (23:48 +0200)]
Clean up Segmented(ByteBuf)Journal
Remove SegmentedJournal.Builder(), as it really has no point. Also
expose the compact() method and restore maxEntriesPerSegment.
JIRA: CONTROLLER-2115
Change-Id: I7213cdca037d45ad9f15f2e577bd8cb1e6b75156
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 8 May 2024 05:51:31 +0000 (07:51 +0200)]
Improve ByteBufMapper.objectToBytes() contract
We currently treat each IOException as if it were caused by an overflow,
but other causes may exist.
Differentiate between EOFException and plain old IOException, the former
indicating an overflow.
For JournalSerdes/KryoException examine the message as there is no other
indicator.
JIRA: CONTROLLER-2115
Change-Id: I58f0de1fdb5652f0887502f610cce42395d14cae
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 7 May 2024 20:29:31 +0000 (22:29 +0200)]
Move entry serialization back to ByteBufWriter
I8f6bac3192a0f38b627150be4c8ea128f1e233e5 moved serialization to heap,
causing unnecessary copies, while nominally simplifying the interface.
This patch undoes that move, restoring the logic, except working on top
of a ByteBuf. This requires a bit more logic to deal with the fact we
are no longer writing to the diskEntry nor are we flipping it.
JIRA: CONTROLLER-2115
Change-Id: I1d18f99cfdb5b7e6c6548a5833c824af9f31c166
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 8 May 2024 22:00:34 +0000 (00:00 +0200)]
Merge SegmentedByteBufWriter.checkedTruncate()
This method has a single caller, just merge them together.
JIRA: CONTROLLER-2100
Change-Id: Ibf9424e71c9c1dd9e862b00a75d4ed76cd29cc0d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 8 May 2024 22:34:24 +0000 (00:34 +0200)]
Reformat ByteArrayOutput/BufferAwareByteArrayOutputStream
These are simple classes, just reformat them to keep checkstyle happy.
Change-Id: I7e0331a3bd8b4373921bafb29da6362e02e57f19
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 8 May 2024 22:08:32 +0000 (00:08 +0200)]
Fix checkstyle in Kryo{IO,Input,Output}Pool
Reformat and make minor adjustments to keep everyone happy.
Change-Id: I32371650660080adfac970d9530abb04609de7f6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 8 May 2024 22:04:06 +0000 (00:04 +0200)]
Suppress warnings in Kryo505ByteBufferInput
This is legacy third-party code. We will not be fixing its huge amount
of issutes.
Change-Id: I6599301b4124e96fac910a98ac634c94f5c5aa11
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 8 May 2024 16:45:41 +0000 (18:45 +0200)]
Modernize tests and fixup checkstyle
Reformat for checkstyle compliance and modernize with JUnit5, etc.
Change-Id: I6fab572f429578e6be924f6d8bcffcc6d083d333
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 8 May 2024 16:11:14 +0000 (18:11 +0200)]
Use eliminate magic JournalSegmentWriter constructor
Rather than performing internal initialization, move index entries to
acquire current position. This way the writer is always properly
initialized.
JIRA: CONTROLLER-2100
Change-Id: I4c6459d31438379d58dc1c8e769dca368565eaf5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 8 May 2024 03:01:56 +0000 (05:01 +0200)]
Do not copy bytes when deserializing
ByteBufUtil.getBytes() performs a deep copy of the contents of the
buffer. This is completely superfluous, as we can use the underlying
nioBuffer() directly.
JIRA: CONTROLLER-2115
Change-Id: I0a9f0ec7b22682cd41063db93921c159ba66b082
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 7 May 2024 16:10:22 +0000 (18:10 +0200)]
Improve TestEntry
Implement hashCode()/equals() for comparison clarity.
Change-Id: I90fd7113dfa3f900d61a99fac6989e6df9014664
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Ruslan Kashapov [Fri, 19 Apr 2024 08:15:58 +0000 (11:15 +0300)]
Utilize segment index to recover writer state after truncate
index.truncate() returns nearest indexed entry position which
can be used to minimize number of loops required to recover
writer state - current position and last written entry.
JIRA: CONTROLLER-2100
Change-Id: I6875c1697a2ac5f13b82b256850f293a7658f220
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
Robert Varga [Wed, 8 May 2024 13:08:44 +0000 (15:08 +0200)]
Remove JournalWriter.truncate()
The truncate(N) operation is completely equivalent to reset(N + 1).
Remove this duplicity, preventing potential confusion.
JIRA: CONTROLLER-2100
Change-Id: If62e55edfd610c87174a6b83a15c0a1a0ab7836c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 8 May 2024 14:05:25 +0000 (16:05 +0200)]
Clean up SegmentedByteBufWriter.reset(long)
The logic in writer reset needs to be a tad updated:
- it makes absolutely no sense to seek past last written index, unless
we want to magically sync across multiply-open journals. We do not
support that
- we need to realize when we are already at the correct index
JIRA: CONTROLLER-2100
Change-Id: I20b2a084c782069b893059f8d5bf535ecbbf33e3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 6 May 2024 19:51:31 +0000 (21:51 +0200)]
Move JournalWriter.getLastIndex()
Last written index is a property of a particular Journal, not of a
writer -- and now that we maintain this in the index, we can make
shortcuts.
This also removes a source of confusion, as we have two methods taking
a 'long index' and performing some writer adjustments:
- reset(long) is equivalent of setNextIndex()
- truncate(long) is equivalent of setLastIndex()
Change-Id: I1bc4b5d1b3052c2b35808b8ec4ea2d88dcfca593
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 6 May 2024 05:16:46 +0000 (07:16 +0200)]
Maintain last known position in JournalIndex
A JournalIndex is bound to see all entries that get written into a file,
hence it can easily maintain that Position. This simplifies
JournalSegmentWriter state maintenance, as we can consult the index for
JournalSegmentWriter.get{Last,Next}Index().
Also expand test suite to make explicit assertions on returns.
JIRA: CONTROLLER-2100
Change-Id: I57731f53cacfdfd548ab59c06706d41a013e7908
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>