controller.git
3 days agoClean up ClientTransaction 25/114225/5
Robert Varga [Mon, 28 Oct 2024 02:55:44 +0000 (03:55 +0100)]
Clean up ClientTransaction

Use a switch expression and local variable type inference. While we are
here, also convert the sole checkState() user into an explicit exception
throw.

Change-Id: I6001fab0546c1ad952b40cdd62076ce8a18a68b1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 days agoModernize AbstractProxyTransaction 28/114228/3
Robert Varga [Mon, 28 Oct 2024 04:41:01 +0000 (05:41 +0100)]
Modernize AbstractProxyTransaction

Use local variable type inference, instanceof patterns and enhanced
switches.

Change-Id: I00a697ea652fb1f2428d20c339ddeb4cbd6f4869
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 days agoInline LocalProxyTransaction.handleReadRequest() 32/114232/1
Robert Varga [Mon, 28 Oct 2024 13:24:24 +0000 (14:24 +0100)]
Inline LocalProxyTransaction.handleReadRequest()

The two callers are calling this method from a switch expression: split
the two handled messages into separate methods and inline dispatch.

Change-Id: I2c3551db1404960930f369278aed29e038d83d61
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 days agoModernize LocalReadWriteProxyTransaction 27/114227/1
Robert Varga [Mon, 28 Oct 2024 04:21:19 +0000 (05:21 +0100)]
Modernize LocalReadWriteProxyTransaction

Use local variable type inference as well as enhanced switch statement.

Change-Id: I0de3e839e72ac189708a2337cbc3e9a6c09e9bf8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 days agoModernize LocalProxyTransaction 26/114226/2
Robert Varga [Mon, 28 Oct 2024 04:02:18 +0000 (05:02 +0100)]
Modernize LocalProxyTransaction

Use enhanced switches and instanceof patterns. Also improve
{enqueue.send}Abort() methods.

Change-Id: I372bc39b02a4ad804f068d4cc3511fb7fe277619
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 days agoSeal FrontendTransaction 19/114219/3
Robert Varga [Sun, 27 Oct 2024 16:59:05 +0000 (17:59 +0100)]
Seal FrontendTransaction

We only have ReadOnly and ReadWrite subclasses, make sure that is
enforced.

Change-Id: I05a3685d749986db866dc79118a28e887b4c983e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 days agoUse a switch expression FrontendReadOnlyTransaction 18/114218/4
Robert Varga [Sun, 27 Oct 2024 16:50:01 +0000 (17:50 +0100)]
Use a switch expression FrontendReadOnlyTransaction

We have an if/else instanceof dispatch: use a switch expression instead.

Change-Id: I9ea5dca347ce807034b02d0e2c9f40e47ef82405
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 days agoSeal cluster.access.concepts.Envelope 14/114214/1
Robert Varga [Sat, 26 Oct 2024 09:42:50 +0000 (11:42 +0200)]
Seal cluster.access.concepts.Envelope

This interface can be one of three things:
- RequestEnvelope, or
- ResponseEnvelope, being one of
  - FailureEnvelope
  - SuccessEnvelope

Change-Id: I45c2e35867f1deb9a057700c7a4a93d2f2258c15
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 days agoClean up testBatchedModificationsReadyWithIncorrectTotalMessageCount() 11/114211/2
Robert Varga [Fri, 25 Oct 2024 23:25:17 +0000 (01:25 +0200)]
Clean up testBatchedModificationsReadyWithIncorrectTotalMessageCount()

Use assertInstanceOf() instead of @Test(expected).

Change-Id: If9c0fb3b9117a9100536ccda50ae82b12ee60aa6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 days agoClean up sal-distributed-datastore dependencies 99/114199/4
Robert Varga [Fri, 25 Oct 2024 16:10:38 +0000 (18:10 +0200)]
Clean up sal-distributed-datastore dependencies

This is a minor clean up of declared dependencies, reducing the number
of warnings we get.

Change-Id: I19de3665022c43adbc0277452f29ef91af8a1337
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 days agoCleanup AbstractFrontendHistory 09/114209/4
Robert Varga [Fri, 25 Oct 2024 22:09:43 +0000 (00:09 +0200)]
Cleanup AbstractFrontendHistory

Two things:
- use a switch expression to dispatch createTransaction()
- use persistenceId directly

Change-Id: I7e64997b87b06cc749d54cb5d0b73ef00191e4e6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 days agoCleanup ShardTest 06/114206/3
Robert Varga [Fri, 25 Oct 2024 19:44:39 +0000 (21:44 +0200)]
Cleanup ShardTest

We have a warning suppression and an unnecessarily-long reference to
ActorRef.noSender(). Clean that up.

Change-Id: I626635b60ef66473138d9a6d56502f07d1dd4c40
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 days agoClarify ShardTest.testAbortWithCommitPending() 08/114208/5
Robert Varga [Fri, 25 Oct 2024 20:59:01 +0000 (22:59 +0200)]
Clarify ShardTest.testAbortWithCommitPending()

Use an explicit equals() assertion, to make it clear what content we
expect.

Change-Id: I2b848c4ddec1f29e648abf8109e004848605fad9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 days agoUse a switch expression in Shard.handleRequest() 13/114213/2
Robert Varga [Sat, 26 Oct 2024 07:10:59 +0000 (09:10 +0200)]
Use a switch expression in Shard.handleRequest()

We have an instanceof cascade, turn it into a switch expression.

Change-Id: I21964a15ea985b9fbbeb9152e04df1791bb099c5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 days agoDeprecate legacy AbstractShardTest methods 05/114205/2
Robert Varga [Fri, 25 Oct 2024 19:26:39 +0000 (21:26 +0200)]
Deprecate legacy AbstractShardTest methods

We have four utilities producing BatchedModifications. Deprecate them to
guide test removal.

Change-Id: I9b9be88d859b07e97bcc77e2c8b9791a1db0c355
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 days agoModernize TestModel 04/114204/3
Robert Varga [Fri, 25 Oct 2024 19:08:26 +0000 (21:08 +0200)]
Modernize TestModel

Expose better interface for building common NormalizedNodes, which has a
neat impact on test verbosity. Reduction in deprecation warnings is a
nice by-product.

Change-Id: I370dd9a2e5f1a61a7a6e72f991f9bf1922801231
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 days agoRename getStatRetrievaelTime() 00/114200/2
Robert Varga [Fri, 25 Oct 2024 16:28:20 +0000 (18:28 +0200)]
Rename getStatRetrievaelTime()

This contains a typo, rename it to stateRetrievalTime().

Change-Id: Ia2d49a3cf445ceeb1234c740844c1608ad3ee51d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 days agoUse switch patterns in RemoteProxyTransaction 97/114197/1
Robert Varga [Fri, 25 Oct 2024 15:20:03 +0000 (17:20 +0200)]
Use switch patterns in RemoteProxyTransaction

We have two if/else instanceof cascades, replace them with a switch to
make things clearer.

Change-Id: I7f49215ab9037d6d145a2e83d97893e8457f76dd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 days agoImprove Status.Failure references 96/114196/1
Robert Varga [Fri, 25 Oct 2024 15:05:06 +0000 (17:05 +0200)]
Improve Status.Failure references

Just import the class rather than referencing it via FQCN.

Change-Id: I056de82d6d2146cacfe688b4ffbcc9b4bdc29ecf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 days agoMake ModifyTransactionRequestBuilder fluent 95/114195/1
Robert Varga [Fri, 25 Oct 2024 14:45:05 +0000 (16:45 +0200)]
Make ModifyTransactionRequestBuilder fluent

We really want to have builders fluent, so they are easy to use anywhere
we need their product.

This patch makes ModifyTransactionRequestBuilder fluent, adding a
ModifyTransactionRequest.builder() static factory method as well.

Change-Id: Ib3c76afe04d10da55ff4301490e6d9c1a22374ab
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 days agoAdd TestModel.EMPTY_TEST 93/114193/1
Robert Varga [Fri, 25 Oct 2024 14:12:50 +0000 (16:12 +0200)]
Add TestModel.EMPTY_TEST

This is a useful empty container, which is used all over tests. Add a
constant and refer to it wherever appropriate.

Change-Id: I3f7feff3d854ddbacde9bc9358a580b5577ac6de
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 days agoSimplify test data preparation 92/114192/1
Robert Varga [Fri, 25 Oct 2024 13:01:33 +0000 (15:01 +0200)]
Simplify test data preparation

Do not instantiate Modification just to invoke things on
DataTreeModification -- do that directly instead.

Change-Id: Ibb93402c7c7fc9a5990878adad8fce97a04abef4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 days agoRefactor Status.Failure references 91/114191/1
Robert Varga [Fri, 25 Oct 2024 12:53:28 +0000 (14:53 +0200)]
Refactor Status.Failure references

Import Status.Failure and use an instanceof pattern to eliminate
explicit casts.

Change-Id: Ic25fe369761fe738932591812ed3c1cbd907fb65
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 days agoEliminate another prepareBatchedModifications() method 90/114190/1
Robert Varga [Fri, 25 Oct 2024 12:46:43 +0000 (14:46 +0200)]
Eliminate another prepareBatchedModifications() method

We are using this method only indirectly, merge it into its sole caller.

Change-Id: Ic414449778eead545cfbf7b713a307b8f0e429f4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 days agoUse newBindingDataCodec() 89/114189/1
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>
6 days agoModernize sal-distributed-datastore 88/114188/2
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>
6 days agoMove {merge,store}ToStore() 86/114186/2
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>
6 days agoRemove unused prepareBatchedModifications() 85/114185/2
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>
7 days agoBump Pekko to 1.0.3 78/112878/15
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>
7 days agoRemove deprecated ReplicatedLogEntry methods 63/113563/2
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>
7 days agoMigrate to Apache Pekko 58/111858/33
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>
7 days agoBump versions to 11.0.0-SNAPSHOT 05/113805/2
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>
10 days agoBump versions to 10.0.5-SNAPSHOT 18/114118/1 10.0.x
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>
10 days agoRelease controller v10.0.4
jenkins-releng [Mon, 21 Oct 2024 17:03:02 +0000 (17:03 +0000)]
Release controller

10 days agoBump mdsal to 14.0.4 12/114112/1
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>
10 days agoUse FluentFutures.submit() 66/114066/2
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>
2 weeks agoSeal cluster.access.concepts.Message 41/114041/4
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>
2 weeks agoImprove FrontendReadWriteTransaction.doHandleRequest() 40/114040/3
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>
2 weeks agoImprove FrontendReadWriteTransaction transitions 39/114039/3
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>
2 weeks agoSeal TransactionModification 38/114038/4
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>
2 weeks agoImprove FrontendReadWriteTransactionTest 55/114055/1
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>
2 weeks agoModernize FrontendReadWriteTransaction 37/114037/2
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>
2 weeks agoUse exhaustive switches in DTC-IO 34/114034/2
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>
2 weeks agoImprove DataTreeCandidateInputOutput 33/114033/2
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>
2 weeks agoUse Empty.immediateFuture() 28/114028/1
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>
2 weeks agoBump versions to 10.0.4-SNAPSHOT 61/113961/1
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>
2 weeks agoRelease controller v10.0.3
jenkins-releng [Sat, 12 Oct 2024 07:21:45 +0000 (07:21 +0000)]
Release controller

2 weeks agoBump upstreams 16/113916/3
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>
2 weeks agoFix checkstyle violations 53/113953/1
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>
3 weeks agoMake state/odl.cluster.client a directory 03/113903/2
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>
3 weeks agoModernize BucketStoreActor a bit 04/113904/1
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>
3 weeks agoStore persistenceId in AbstractClientActor 93/113893/3
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>
3 weeks agoSeparate out snapshot handling in BucketStoreActor 94/113894/1
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>
5 weeks agoFix sal-remoterpc-connector dependencies 69/113569/2
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>
5 weeks agoUse enhanced switches in BucketStoreActor 68/113568/2
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>
5 weeks agoUse switch for type dispatch in ShardDataTree 97/113597/1
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>
5 weeks agoClean up AbstractRaftActorBehaviorTest 96/113596/1
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>
5 weeks agoImprove AbstractRaftActorBehavior.handleMessage() 95/113595/1
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>
6 weeks agoAccess entries in processNewEntries() only once 94/113594/2
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>
6 weeks agoClean up RaftActorContextImpl formatting 79/113579/1
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>
6 weeks agoEliminate TermInformationReader 78/113578/2
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>
6 weeks agoStore cds-access-client generation in a file 54/109854/26
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>
6 weeks agoModernize DummyShard 62/113562/1
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>
6 weeks agoFix cds-access-client dependencies 56/113556/1
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>
6 weeks agoUse a switch expression in extractCookie() 53/113553/1
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>
6 weeks agoSeal AbstractClientConnection 52/113552/1
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>
6 weeks agoUse an instanceof pattern to check connection 51/113551/1
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>
6 weeks agoUse an enhanced switch in onReceiveCommand() 50/113550/1
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>
6 weeks agoUse a switch expression in onReceiveRecover() 49/113549/1
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>
8 weeks agoBump versions to 10.0.3-SNAPSHOT 76/113376/1
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>
8 weeks agoRelease controller v10.0.2
jenkins-releng [Mon, 2 Sep 2024 20:12:27 +0000 (20:12 +0000)]
Release controller

8 weeks agoBump upstreams 68/113368/2
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>
2 months agoRelease reader after indexing 51/113251/2
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>
2 months agoUse Empty for ON_TASK_COMPLETION_THREAD_TL 52/113052/1
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>
2 months agoChange ConcurrentDOMDataBroker.toString() 51/113051/1
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>
2 months agoImprove DelegatingRunnable.toString() 03/113003/1
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>
3 months agoUse DefaultBindingDOMCodecFactory in test 28/112928/1
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>
3 months agoeos-dom-akka should not use BindingCodecContext 27/112927/2
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>
3 months agoBump versions to 10.0.2-SNAPSHOT 76/112876/1
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>
3 months agoRelease controller v10.0.1
jenkins-releng [Mon, 29 Jul 2024 02:01:16 +0000 (02:01 +0000)]
Release controller

3 months agoBump upstreams 60/112860/1
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>
3 months agoBump versions to 10.0.1-SNAPSHOT 02/112802/1
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>
3 months agoRelease controller v10.0.0
jenkins-releng [Fri, 26 Jul 2024 12:06:34 +0000 (12:06 +0000)]
Release controller

3 months agoRemove unused dataCenterControls 59/111859/2
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>
3 months agoPick up mdsal-14.0.0 96/112796/1
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>
3 months agoBump upstreams 85/112785/1
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>
3 months agoAdopt released yangtools 80/112580/3
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>
3 months agoBump upstreams 78/112378/11
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>
4 months agoRemove use of impl.schema.ImmutableNodes 16/112416/1
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>
4 months agoDo not use EventListener/ListenerRegistration 77/112377/2
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>
4 months agoSeparate out RaftEntryMeta 00/111600/12
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>
4 months agoBump versions to 10.0.0-SNAPSHOT 86/111986/1
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>
4 months agoModernize AbstractLeader 01/111601/6
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>
4 months agoBump upstreams 82/111982/1
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>
5 months agoBump versions 9.0.4-SNAPSHOT 97/111697/1
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>
5 months agoRelease controller v9.0.3
jenkins-releng [Tue, 14 May 2024 13:57:28 +0000 (13:57 +0000)]
Release controller

5 months agoSeparate out raft-journal 90/111690/1
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>
5 months agoRename ByteBufJournal 89/111689/1
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>
5 months agoSeparate out {From,To}ByteBufMapper 88/111688/1
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>
5 months agoMove {Journal,ByteBuf}Reader.firstIndex() 87/111687/1
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>