controller.git
6 weeks agoRemove unused {FileChannel,Mapped}JournalSegmentWriter methods 64/110564/3
Robert Varga [Sat, 9 Mar 2024 12:38:05 +0000 (13:38 +0100)]
Remove unused {FileChannel,Mapped}JournalSegmentWriter methods

We have a few methods which are not used anywhere, remove them to
simplify things.

JIRA: CONTROLLER-2095
Change-Id: I508d92cc2c761a6432e24e70db400636764753c8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoOptimize FileChannelJournalSegmentReader channel use 62/110562/2
Robert Varga [Sat, 9 Mar 2024 09:47:49 +0000 (10:47 +0100)]
Optimize FileChannelJournalSegmentReader channel use

We use FileChannel to maintain our position for a particular reader,
which is a naive implementation.

Since FileChannel's position is tied to the underlying file descriptor,
each such manipulation involves locking and system calls.

Switch to maintaining the position ourselves and using
FileChannel.read(buffer, position), improving performance.

JIRA: CONTROLLER-2094
Change-Id: I7f462f3fd8aa9bc47c16201dd32faeb2a7c18a32
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoAdd a segmented-journal performance test case 57/110557/10
Robert Varga [Fri, 8 Mar 2024 14:44:49 +0000 (15:44 +0100)]
Add a segmented-journal performance test case

This introduces a PerformanceTest, which tests journal entry writeout
for various sizes and metrics of how well it did.

JIRA: CONTROLLER-2043
Change-Id: Idad7575326f632366417f60a850b6d63393bdc1e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoMigrate SegmentedFileJournalTest to JUnit5 55/110555/2
Robert Varga [Fri, 8 Mar 2024 10:29:05 +0000 (11:29 +0100)]
Migrate SegmentedFileJournalTest to JUnit5

This is a simple test, migrate it.

Change-Id: I2a02266f6029e6424945e2b23d8060cefff9bf75
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoMigrate some tests to new ImmutableNodes 35/110035/8
Robert Varga [Sat, 27 Jan 2024 15:15:53 +0000 (16:15 +0100)]
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>
6 weeks agoAdd RTD configuration 32/110532/1
Robert Varga [Thu, 7 Mar 2024 13:31:29 +0000 (14:31 +0100)]
Add RTD configuration

RTD requires configuration, add it.

Change-Id: I620a33a647f667c7b534f6b1ac19c50fe7dc6866
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoBump Scala to 2.13.13 64/110364/2
Robert Varga [Tue, 27 Feb 2024 09:39:19 +0000 (10:39 +0100)]
Bump Scala to 2.13.13

https://github.com/scala/scala/releases/tag/v2.13.13

Change-Id: I365019424a8969ee87837c81c4022d9853e67539
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoMigrate cds-access-client 33/110033/6
Robert Varga [Sat, 27 Jan 2024 14:53:00 +0000 (15:53 +0100)]
Migrate cds-access-client

We have a single test using deprecated methods, migrate it.

Change-Id: Ibfbd89c45667e88f9a147ffc791485d87e9147be
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoSimplify verify assertions 69/110269/2
Ivan Hrasko [Tue, 20 Feb 2024 08:21:35 +0000 (09:21 +0100)]
Simplify verify assertions

Simplify verify assertions in
ReplicationAndSnapshotsWithLaggingFollowerIntegrationTest class.

JIRA: CONTROLLER-2074
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Change-Id: I9bfd448bfef32d5a47e99e056496da5b60abd79d

8 weeks agoRefactor snapshot state verification 65/110265/4
Ivan Hrasko [Mon, 19 Feb 2024 11:47:12 +0000 (12:47 +0100)]
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>
2 months agoPartially migrate WriteTransactionsHandler 36/110036/3
Robert Varga [Sat, 27 Jan 2024 15:22:15 +0000 (16:22 +0100)]
Partially migrate WriteTransactionsHandler

We can easily migrate some of the use of deprecated methods. Make dent
in the related warnings.

Change-Id: I8e368a4899ee2719c9f40b5f4d59a8c1f9cdc0ab
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoClean up sal-remoterpc-connector 34/110034/3
Robert Varga [Sat, 27 Jan 2024 14:53:25 +0000 (15:53 +0100)]
Clean up sal-remoterpc-connector

We are using a number of deprecated methods here, clean that up.

Change-Id: I19b37967cd7cac472efff3ae6018ea008111c49b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoMigrate sal-clusering-commons tests 32/110032/1
Robert Varga [Sat, 27 Jan 2024 14:42:41 +0000 (15:42 +0100)]
Migrate sal-clusering-commons tests

Migrate most users of deprecated Builders/ImmutableNodes.

Change-Id: I676f248cc524ebc51120352951e93e8539b1dd88
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoEnable requiremens in sal-distributed-datastore 46/109946/1
Robert Varga [Wed, 24 Jan 2024 09:39:23 +0000 (10:39 +0100)]
Enable requiremens in sal-distributed-datastore

The upstream issue has been fixed a few moons back, remove the
workaround we carry.

Change-Id: I5ed8030f98638f6202d4e9d67c309c704401840b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoModernize clustering-test-app 86/109886/2
Robert Varga [Mon, 22 Jan 2024 06:40:31 +0000 (07:40 +0100)]
Modernize clustering-test-app

Do not use deprecated constructs, for the most part at least.

Change-Id: I4ca96966407129d6cb60abf2d64d718065c298ed
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoBump versions to 9.0.1-SNAPSHOT 92/109892/1
Robert Varga [Mon, 22 Jan 2024 09:31:47 +0000 (10:31 +0100)]
Bump versions to 9.0.1-SNAPSHOT

This starts the next development iteration.

Change-Id: I27cfca0f285d9a4c6eb1d99401947c62a4fcfc8b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRelease controller v9.0.0
jenkins-releng [Mon, 22 Jan 2024 08:19:14 +0000 (08:19 +0000)]
Release controller

3 months agoMigrate cds-access-api to ImmutableNodes 85/109885/1
Robert Varga [Mon, 22 Jan 2024 06:34:01 +0000 (07:34 +0100)]
Migrate cds-access-api to ImmutableNodes

Use yang-data-spi version of immutable nodes.

Change-Id: Ic4052e3877caf828586f2756e6b5e555fe9ac255
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoMigrate ShardDataTreeSnapshotTest 88/109788/11
Robert Varga [Tue, 16 Jan 2024 01:07:57 +0000 (02:07 +0100)]
Migrate ShardDataTreeSnapshotTest

This is a straightforward replace of Builders-only call sites.

Change-Id: Id38446025310579478ecd03203bd632f6c522af8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoMigrate users of deprecated methods 64/109864/3
Robert Varga [Fri, 19 Jan 2024 13:49:28 +0000 (14:49 +0100)]
Migrate users of deprecated methods

Change-Id: I8eac554e9e74d427e4f3dc3ef9ea62b1f8b4add3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoEliminate OSGiDOMDataBroker 11/109811/9
Robert Varga [Tue, 16 Jan 2024 19:16:42 +0000 (20:16 +0100)]
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>
3 months agoFactor out DataBrokerCommitExecutor 10/109810/9
Robert Varga [Tue, 16 Jan 2024 19:09:19 +0000 (20:09 +0100)]
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>
3 months agoConvert OSGiDOMDataBroker to ForwardingDOMDataBroker 09/109809/9
Robert Varga [Tue, 16 Jan 2024 18:50:09 +0000 (19:50 +0100)]
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>
3 months agoBump upstreams 76/109676/33
Robert Varga [Mon, 8 Jan 2024 10:36:29 +0000 (11:36 +0100)]
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>
3 months agoRemove odl-controller-exp-netty-config 81/109881/1
Robert Varga [Sat, 20 Jan 2024 13:14:52 +0000 (14:14 +0100)]
Remove odl-controller-exp-netty-config

Remove all of configuration remnants, as there is just a single
downstream user.

JIRA: CONTROLLER-2092
Change-Id: I2d0bb01cfd061c2f0086fcc80b27e6b0a336e5dc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRemove support for actions/rpc/notifications, take two 19/109819/2
Robert Varga [Wed, 17 Jan 2024 10:16:08 +0000 (11:16 +0100)]
Remove support for actions/rpc/notifications, take two

The concepts underlying what we are doing here are gone from MD-SAL.
Update the version of the XML namespace and remove support for
- action-implementation
- action-instance
- notification-listener
- rpc-implementation
- rpc-service
- specific-reference-list
- static-reference

JIRA: CONTROLLER-2090
Change-Id: Ic9777d1d6295da3f31da7b22d816c0fc9ba9565e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoWarn on deprecated blueprint elements 18/109818/1
Robert Varga [Wed, 17 Jan 2024 10:02:20 +0000 (11:02 +0100)]
Warn on deprecated blueprint elements

A number of elements are going away, issue a warning when each is
encountered.

JIRA: CONTROLLER-2090
Change-Id: I91cd29f4824e617572e3f17a593df431d0c72efe
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRevert "Remove support for actions/rpc/notifications" 16/109816/1
Robert Varga [Wed, 17 Jan 2024 07:59:32 +0000 (08:59 +0100)]
Revert "Remove support for actions/rpc/notifications"

This reverts commit beaac808943b25f5627c70ddb5029408101204a7.

JIRA: CONTROLLER-2090
Change-Id: I3a624a4c5ef8159d2667794f734609f0a2be3e5b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRevert "Fix namespace handling" 15/109815/1
Robert Varga [Wed, 17 Jan 2024 07:59:11 +0000 (08:59 +0100)]
Revert "Fix namespace handling"

This reverts commit 82284ce97ea00c26af1cad479211ce1fed68a533.

JIRA: CONTROLLER-2090
Change-Id: Idea6406166193fdebeedfc828aaef7173d1cd681
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoFix namespace handling 04/109804/2
Robert Varga [Tue, 16 Jan 2024 15:46:41 +0000 (16:46 +0100)]
Fix namespace handling

The previous patch missed an update to namespace versions, fix that up.

JIRA: CONTROLLER-2090
Change-Id: Id780a60ed629cdb862a56c616b78679a7d6f3d25
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoUse simple RPC registrations 95/109795/4
Robert Varga [Tue, 16 Jan 2024 03:53:19 +0000 (04:53 +0100)]
Use simple RPC registrations

We are registering a single implementation, use simpler API alternative
to achieve the same thing.

Change-Id: I8ada5656eebf355357e6b2ca651e967343645697
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRemove shard-snapshot-chunk-size 70/101570/11
Robert Varga [Fri, 10 Jun 2022 11:35:31 +0000 (13:35 +0200)]
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>
3 months agoMigrate NotificationIT 91/109791/1
Robert Varga [Tue, 16 Jan 2024 01:40:54 +0000 (02:40 +0100)]
Migrate NotificationIT

We are just collecting notifications, which is easily catered to by a
simple API -- to the point of not needing a class and getting by with
method handles.

Change-Id: I140c734a1fe882196f174d00eb825ff635481385
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoConvert notification listeners 90/109790/1
Robert Varga [Tue, 16 Jan 2024 00:34:42 +0000 (01:34 +0100)]
Convert notification listeners

PeopleCarListener and YnlListener are listening to a single
notification. Trivially convert them, renaming PeopleCarLister to
CarBoughtListener (which is what it is).

Change-Id: Iaf04257d3b3682cd801e4dabeb5f9e7cb81f0d6b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoDo not use RpcService in provider 19/108019/15
Oleksandr Zharov [Thu, 28 Sep 2023 17:18:35 +0000 (19:18 +0200)]
Do not use RpcService in provider

Migrated usage of RpcService to Rpc<?,?> for provider.

JIRA: CONTROLLER-2085
Change-Id: I38d66761df26506c383402e32b5fe605d05dcda8
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
3 months agoRemove support for actions/rpc/notifications 77/109777/1
Robert Varga [Mon, 15 Jan 2024 12:55:23 +0000 (13:55 +0100)]
Remove support for actions/rpc/notifications

The concepts underlying what we are doing here are gone from MD-SAL.
Update the version of the XML namespace and remove support for
- action-implementation
- action-instance
- notification-listener
- rpc-implementation
- rpc-service
- specific-reference-list
- static-reference

JIRA: CONTROLLER-2090
Change-Id: I7d9c992108378283a83ce80d6612794ccac1730e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoSwitch KitchenServiceImpl to CompositeListener 75/109775/1
Robert Varga [Mon, 15 Jan 2024 11:59:02 +0000 (12:59 +0100)]
Switch KitchenServiceImpl to CompositeListener

Do not use generated ToasterListener, just internalize the dispatch
methods.

Change-Id: I3ab8948a07003d9d563dd9b8282c550406f6d1b7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoMigrate ntfbenchmark 67/109767/1
Robert Varga [Mon, 15 Jan 2024 07:13:08 +0000 (08:13 +0100)]
Migrate ntfbenchmark

The model is using only a single notification, do not use generated
Listener.

Change-Id: I3f9f4074994fd0ad133f21de1b44cdfd277f4858
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoDo not use RpcService in sal-binding-it 23/108023/15
Oleksandr Zharov [Thu, 28 Sep 2023 17:35:03 +0000 (19:35 +0200)]
Do not use RpcService in sal-binding-it

Migrated usage of RpcService to Rpc<?,?> for sal-binding-it.

JIRA: CONTROLLER-2085
Change-Id: Ibe0b76a344e935a55ed5e975a212a43526c20af1
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
3 months agoDo not use RpcService in toaster-consumer 20/108020/12
Oleksandr Zharov [Thu, 28 Sep 2023 17:21:55 +0000 (19:21 +0200)]
Do not use RpcService in toaster-consumer

Migrated usage of RpcService to Rpc<?,?> for toaster-consumer.

JIRA: CONTROLLER-2085
Change-Id: I85db90c9a2fe104bded1835ae9d4263e893311bb
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoDo not use RpcService in sal-cluster-admin-impl 11/108011/11
Oleksandr Zharov [Thu, 28 Sep 2023 15:51:09 +0000 (17:51 +0200)]
Do not use RpcService in sal-cluster-admin-impl

Migrated usage of RpcService to Rpc<?,?> for sal-cluster-admin-impl.

Also ditch dependency on mdsal-binding-dom-codec-api, as it is not used
anywhere.

JIRA: CONTROLLER-2085
Change-Id: I5bfcc0646b73b18a540504406b8457fc83eb598f
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoDo not use RpcService in toaster-provider 22/108022/13
Oleksandr Zharov [Thu, 28 Sep 2023 17:31:01 +0000 (19:31 +0200)]
Do not use RpcService in toaster-provider

Migrated usage of RpcService to Rpc<?,?> for toaster-provider.

JIRA: CONTROLLER-2085
Change-Id: I30c112ba11eb14cc645e4dd7d76758bead3a7de2
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoDe-prioritize ask-based messages 81/109681/1
Robert Varga [Mon, 8 Jan 2024 19:21:28 +0000 (20:21 +0100)]
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>
3 months agoDeprecate ask-based protocol messages 76/109476/9
Robert Varga [Fri, 29 Dec 2023 09:10:25 +0000 (10:10 +0100)]
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>
3 months agoRemove TransactionReadyReplyMapper 80/109680/2
Robert Varga [Mon, 8 Jan 2024 16:38:06 +0000 (17:38 +0100)]
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>
3 months agoDo not use RpcService in karaf-cli 17/108017/7
Oleksandr Zharov [Thu, 28 Sep 2023 16:57:49 +0000 (18:57 +0200)]
Do not use RpcService in karaf-cli

Migrated usage of RpcService to Rpc<?,?> for karaf-cli.

JIRA: CONTROLLER-2085
Change-Id: Ia27b7afda63b9a9208d187a826a14556c30813f9
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
3 months agoDo not use RpcService in sal-cluster-admin-karaf-cli 15/108015/8
Oleksandr Zharov [Thu, 28 Sep 2023 16:29:11 +0000 (18:29 +0200)]
Do not use RpcService in sal-cluster-admin-karaf-cli

Migrated usage of RpcService to Rpc<?,?> for sal-cluster-admin-karaf-cli.

JIRA: CONTROLLER-2085
Change-Id: I6cf42319c180df1ec89293abb6165041d3b99f88
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
3 months agoDo not use RpcService in eos-dom-akka 07/108007/7
Oleksandr Zharov [Thu, 28 Sep 2023 13:05:11 +0000 (15:05 +0200)]
Do not use RpcService in eos-dom-akka

Migrated usage of RpcService to Rpc<?,?> for eos-dom-akka.

JIRA: CONTROLLER-2085
Change-Id: I73e1df47915caacb021c97d60f0837ad27987d8e
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoDo not use RpcService in rpcbenchmark 06/108006/5
Oleksandr Zharov [Thu, 28 Sep 2023 12:23:34 +0000 (14:23 +0200)]
Do not use RpcService in rpcbenchmark

Migrated usage of RpcService to Rpc<?,?> for rpcbenchmark.

JIRA: CONTROLLER-2085
Change-Id: I425f0669fd7b9a324c31f392d9f0bd39e988e237
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoSeal TransmitQueue 48/109648/1
Robert Varga [Fri, 5 Jan 2024 20:01:06 +0000 (21:01 +0100)]
Seal TransmitQueue

There should ever only be two implementations, seal the base class.

Change-Id: I2a511e49a5b29c89f5c3849972f298d98137462b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRefactor ActorInitialized 10/109510/7
Robert Varga [Sun, 31 Dec 2023 04:44:51 +0000 (05:44 +0100)]
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>
3 months agoDo not use Optional for leaderAddress 12/109512/6
Robert Varga [Sun, 31 Dec 2023 05:15:06 +0000 (06:15 +0100)]
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>
3 months agoDo not use optional in ShardLeaderStateChanged 11/109511/7
Robert Varga [Sun, 31 Dec 2023 05:01:47 +0000 (06:01 +0100)]
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>
3 months agoBump Kryo to 4.0.3 26/109526/3
Robert Varga [Sun, 31 Dec 2023 12:16:35 +0000 (13:16 +0100)]
Bump Kryo to 4.0.3

https://github.com/EsotericSoftware/kryo/releases/tag/kryo-parent-4.0.3

Change-Id: Iebb8fb4a24c2406053a77fc141fc6ed8ad9b2462
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoMake LocalSnapshotStore final 30/109530/2
Robert Varga [Sun, 31 Dec 2023 18:36:31 +0000 (19:36 +0100)]
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>
3 months agoTurn LongSerdes into an enum 28/109528/1
Robert Varga [Sun, 31 Dec 2023 14:38:29 +0000 (15:38 +0100)]
Turn LongSerdes into an enum

Use proper singleton for reuse.

JIRA: CONTROLLER-2089
Change-Id: Ia03b8610370521e97e45f67def07a32f1bf7d59b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRename DataJournalEntrySerializer 27/109527/1
Robert Varga [Sun, 31 Dec 2023 14:39:50 +0000 (15:39 +0100)]
Rename DataJournalEntrySerializer

DataJournalEntrySerdes is the proper name, use that.

JIRA: CONTROLLER-2089
Change-Id: I53247f7b226ed7ab0ff42ac24ad6f4d549e5db97
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoModernize sal-akka-segmented-journal 85/109485/6
Robert Varga [Fri, 29 Dec 2023 11:58:53 +0000 (12:58 +0100)]
Modernize sal-akka-segmented-journal

Use local variable type inference, instanceof patterns and seal
DataJournalEntry.

JIRA: CONTROLLER-2089
Change-Id: I3c2ee2de5eaae6874e2f75a44dfd6fce0942e8ae
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoServerInfo should be a plain record 86/109486/4
Robert Varga [Fri, 29 Dec 2023 12:30:50 +0000 (13:30 +0100)]
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>
3 months agoMerge ClientRequestTracker 08/109508/6
Robert Varga [Sun, 31 Dec 2023 03:31:50 +0000 (04:31 +0100)]
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>
3 months agoDo not leak ReplicatedLogEntry in Replicate message 07/109507/7
Robert Varga [Sun, 31 Dec 2023 03:15:08 +0000 (04:15 +0100)]
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>
3 months agoIntroduce CommitTransactionPayload.CandidateTransaction 04/109504/5
Robert Varga [Sun, 31 Dec 2023 02:25:32 +0000 (03:25 +0100)]
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>
3 months agoFrontendClientMetadata(Builder) should not be Identifiable 03/109503/6
Robert Varga [Sun, 31 Dec 2023 00:45:01 +0000 (01:45 +0100)]
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>
3 months agoSeal FrontendClientMetadataBuilder 02/109502/5
Robert Varga [Sun, 31 Dec 2023 00:24:42 +0000 (01:24 +0100)]
Seal FrontendClientMetadataBuilder

This is a simple specialization, seal it.

Change-Id: I5516da14e423b83369e5da1c64e45da3c2ed24d7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoSeal AbstractProxyTransaction 00/109500/5
Robert Varga [Sun, 31 Dec 2023 00:19:58 +0000 (01:19 +0100)]
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>
3 months agoAccess clientActor exactly once 06/109506/5
Robert Varga [Sun, 31 Dec 2023 02:39:35 +0000 (03:39 +0100)]
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>
3 months agoTurn ShardContainer into a record 01/109501/4
Robert Varga [Sun, 31 Dec 2023 00:23:35 +0000 (01:23 +0100)]
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>
3 months agoUse instanceof patterns in ShardManager 96/109496/4
Robert Varga [Sat, 30 Dec 2023 21:58:36 +0000 (22:58 +0100)]
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>
3 months agoUse a switch expression in getServerChangeException() 95/109495/2
Robert Varga [Sat, 30 Dec 2023 22:08:37 +0000 (23:08 +0100)]
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>
3 months agoShardDataTreeCohort should not be identifiable 99/109499/2
Robert Varga [Sun, 31 Dec 2023 00:12:30 +0000 (01:12 +0100)]
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>
3 months agoSeal LeaderFrontendState 98/109498/2
Robert Varga [Sat, 30 Dec 2023 23:56:20 +0000 (00:56 +0100)]
Seal LeaderFrontendState

We have only internal implementations, express that in the class
hierarchy explicitly.

Change-Id: I56dda91d8c14fc4e6ed10424dfbc5da2629092cb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoDo not use static import for Patterns.ask() 97/109497/3
Robert Varga [Sat, 30 Dec 2023 21:46:02 +0000 (22:46 +0100)]
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>
3 months agoRemove SuccessReply 91/109491/2
Robert Varga [Sat, 30 Dec 2023 20:40:18 +0000 (21:40 +0100)]
Remove SuccessReply

This message is not used, remove it.

Change-Id: I23c9be05063d7ed92779e4fb66904a0fd848062d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoDeprecate SuccessReply for removal 90/109490/2
Robert Varga [Sat, 30 Dec 2023 20:39:31 +0000 (21:39 +0100)]
Deprecate SuccessReply for removal

This class is not used anywhere, deprecate it for removal.

Change-Id: I26b51aeda81ed9811171b53e9f797baa1c2bf994
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRemove EmptyExternalizable 93/109493/2
Robert Varga [Sat, 30 Dec 2023 20:45:29 +0000 (21:45 +0100)]
Remove EmptyExternalizable

This class is not used, remove it.

Change-Id: I1cd54f24b07075c386f357c9be7af486985239b0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoDeprecate EmptyExternalizable for removal 92/109492/2
Robert Varga [Sat, 30 Dec 2023 20:44:53 +0000 (21:44 +0100)]
Deprecate EmptyExternalizable for removal

This class is not used anywhere, deprecate it for removal.

Change-Id: I3303a14570bfadaa524841e7622f20dd955f67e3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRemove ask-based protocol client 67/108867/13
bentom-binoy [Tue, 7 Nov 2023 06:44:41 +0000 (06:44 +0000)]
Remove ask-based protocol client

Remove the use-tell-based-protocol knob, effectively making it always
true.

This means DistributedDataStore cannot be instantiated, which leads to
its removal. That in turn makes all of DatastoreContext,
OperationLimiter and similar classes superfluous, so we remove those as
well.

A few classes are used to drive the shard backend in integration tests,
and hence those are moved to test sources.

JIRA: CONTROLLER-2054
Change-Id: Ie20b1c898576d3c89b70b34121310e58faddbf8e
Signed-off-by: bentom-binoy <bentom.binoy@infosys.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoUnconditionally remove knownFrontends 89/109489/1
Robert Varga [Sat, 30 Dec 2023 19:58:06 +0000 (20:58 +0100)]
Unconditionally remove knownFrontends

As noted in the comment, known frontends end up being restored from
metadata when we unpause (or become leader for that matter).

The DatastoreContext property being used in this conditional is a
frontend thing anyway, so the only thing it could really affect is
tests.

The only case where this would be needed is when we are the leader, have
started persisting the DisableTrackingPayload, but it has not propagated
during pause/unpause.

That is okay, as the leader handover ensures that all locally-appended
entries are appended, so that the new leader just continues on.

Change-Id: Icf775823aed91c15f7a8f74fa2f07faee3a084a0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoMigrate ActorBehaviorTest to JUnit5 81/109481/2
Robert Varga [Fri, 29 Dec 2023 11:10:26 +0000 (12:10 +0100)]
Migrate ActorBehaviorTest to JUnit5

Eliminate the need for mockito-subclass by migrating to JUnit5 and
correcting mocking configuration.

Change-Id: I3d3a772abe71e0d0576474aa9f2b22cef7fbea0a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoClean up DistributedDataStoreRemotingIntegrationTest 62/109462/6
Robert Varga [Fri, 29 Dec 2023 02:10:21 +0000 (03:10 +0100)]
Clean up DistributedDataStoreRemotingIntegrationTest

Migrate checks so they do not reference DistributedDataStore.

JIRA: CONTROLLER-2054
Change-Id: I3735f45661a31bed1e5da14750e48b7fefd782da
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoDo not special-case AbstractDistributedDataStoreIntegrationTest 60/109460/6
Robert Varga [Fri, 29 Dec 2023 01:52:25 +0000 (02:52 +0100)]
Do not special-case AbstractDistributedDataStoreIntegrationTest

AbstractDistributedDataStoreIntegrationTest has a few references to
DistributedDataStore. Remove them in favor of alternatives assuming
ClientBackedDataStore.

JIRA: CONTROLLER-2054
Change-Id: I99ae9584b9dd14cc39f7ca23eac56d9deef472d6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRemove ask-based datastore integration tests 56/109456/7
Robert Varga [Fri, 29 Dec 2023 01:12:38 +0000 (02:12 +0100)]
Remove ask-based datastore integration tests

Eliminate DistributedDataStore as an argument.

JIRA: CONTROLLER-2054
Change-Id: If44dd72706c028f5d3901a759549fec27257d5d3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRemove DistributedDataStoreTest 55/109455/7
Robert Varga [Fri, 29 Dec 2023 00:56:48 +0000 (01:56 +0100)]
Remove DistributedDataStoreTest

Rehost the tests for waiting into ClientBackedDataStoreTest, leaving
only limiter tests around -- and those are no longer useful.

JIRA: CONTROLLER-2054
Change-Id: Idf908cd33110c610c8fe0c0b37cd69dabdd3f367
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoSwitch MemberNode to ClientBackedDatastore 59/109459/6
Robert Varga [Fri, 29 Dec 2023 01:44:19 +0000 (02:44 +0100)]
Switch MemberNode to ClientBackedDatastore

DistributedDataStore is on its way out, switch to using the sole
AbstractDataStore implementation.

JIRA: CONTROLLER-2054
Change-Id: I5a8ee344c56a7a768c373ffa4bc489ef249529ff
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoSwitch DataTreeCohortIntegrationTest to tell-based datastore 61/109461/5
Robert Varga [Fri, 29 Dec 2023 01:57:39 +0000 (02:57 +0100)]
Switch DataTreeCohortIntegrationTest to tell-based datastore

DistributedDataStore is going away and this test should not care anyway.
Migrate it to use ClientBackedDataStore.

JIRA: CONTROLLER-2054
Change-Id: I67f92c91a8aa441ac52a5f9ad9c178c5c6faff01
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoBump versions to 9.0.0-SNAPSHOT 72/109472/1
Robert Varga [Fri, 29 Dec 2023 07:28:57 +0000 (08:28 +0100)]
Bump versions to 9.0.0-SNAPSHOT

This starts the next major development iteration.

Change-Id: I4b34962db224b70d3c13f365acbb5f0986937fed
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoBump versions to 8.0.5-SNAPSHOT 71/109471/1
Robert Varga [Fri, 29 Dec 2023 07:27:57 +0000 (08:27 +0100)]
Bump versions to 8.0.5-SNAPSHOT

This starts the next development iteration.

Change-Id: Ib1a36a0278af6034f2378fa91a7e2103b9abf0ce
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRelease controller v8.0.4
jenkins-releng [Fri, 29 Dec 2023 05:11:03 +0000 (05:11 +0000)]
Release controller

3 months agoClean up Shard a bit 63/109463/2
Robert Varga [Fri, 29 Dec 2023 02:40:00 +0000 (03:40 +0100)]
Clean up Shard a bit

Use instanceof patterns and local variable type inference to simplify
code a bit.

Change-Id: If437909b1a012a60fa5fd296dda6bffeb161fd25
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months ago{Start,Stop}DropMessages is generic 57/109457/3
Robert Varga [Fri, 29 Dec 2023 01:19:26 +0000 (02:19 +0100)]
{Start,Stop}DropMessages is generic

Add a diamond to constructor invocations to remove warnings.

Change-Id: I29f063eaf65656aef6715a8fe710e2afb35169e7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRemove setupDistributedDataStore() 58/109458/1
Robert Varga [Fri, 29 Dec 2023 01:40:16 +0000 (02:40 +0100)]
Remove setupDistributedDataStore()

These methods are no longer in use, remove them.

JIRA: CONTROLLER-2054
Change-Id: I8be5220eddb093e43ff3c71aa13fa40a60ddcc5a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoBump upstreams 48/109448/4
Robert Varga [Thu, 28 Dec 2023 20:35:07 +0000 (21:35 +0100)]
Bump upstreams

Adopt:
- odlparent-13.0.10
- yangtools-11.0.5
- mdsal-12.0.4

Change-Id: Ia6f7420c5751436ec97d0a45187d79dadf9c3d94
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoClean up ClientBackedDataStoreTest 54/109454/2
Robert Varga [Fri, 29 Dec 2023 00:46:03 +0000 (01:46 +0100)]
Clean up ClientBackedDataStoreTest

Use local variable type inference to simplify code a bit.

Change-Id: I5d6c116f40fb84250b3f775e92b98de558dde14d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRemove setupDistributedDataStoreWithoutConfig() 53/109453/2
Robert Varga [Fri, 29 Dec 2023 00:40:16 +0000 (01:40 +0100)]
Remove setupDistributedDataStoreWithoutConfig()

These legacy methods have been deprecated since previous major version,
remove them.

JIRA: CONTROLLER-2054
Change-Id: I13077de6ca505af6bf8627d7094e49a719636e32
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoUse constructor injection in OSGiDistributedDataStore 50/109450/1
Robert Varga [Thu, 28 Dec 2023 21:27:36 +0000 (22:27 +0100)]
Use constructor injection in OSGiDistributedDataStore

Upgraded SpotBugs does not like unitialized fields. Use constructor
injection to properly set them up.

Change-Id: I8d5226a8b0b6b2929eba3d4d9a73ac8e1c72613a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoUse VarHandles.fullFence() instead of an 'updated' field 49/109449/1
Robert Varga [Thu, 28 Dec 2023 21:10:15 +0000 (22:10 +0100)]
Use VarHandles.fullFence() instead of an 'updated' field

Upgraded SpotBugs does not like an otherwise-unused field. Preempt
failures by using VarHandles.fullFence() instead.

Also modernize ActorUtils by using instanceof patterns and local
variable type inference.

Change-Id: Iec9b717eaf821657f3ced659e0c6e86f360b21c5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoUse constructor injection in OSGiActorSystemProvider 47/109447/1
Robert Varga [Thu, 28 Dec 2023 20:57:03 +0000 (21:57 +0100)]
Use constructor injection in OSGiActorSystemProvider

Upgraded SpotBugs does not like us not having initialized fields, use
contructor injection to side-step these warnings.

Change-Id: I3eef23b3cea88c97ccd8cb8794ec0587f07ccc77
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoDo not allow global timer to be stopped 46/109446/1
Robert Varga [Thu, 28 Dec 2023 20:34:11 +0000 (21:34 +0100)]
Do not allow global timer to be stopped

We have a globally-shared instance, it should never be stopped via
Timer.stop(). Log a warning whenever that is atttempted.

Change-Id: Id29f3799024b826d2278bf95f75cc661f85ab8e8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoUse constructor injection for OSGiGlobalTimer 45/109445/1
Robert Varga [Thu, 28 Dec 2023 20:32:15 +0000 (21:32 +0100)]
Use constructor injection for OSGiGlobalTimer

Upgraded SpotBugs is warning about field initialization, side-step it by
using constructor injection.

Change-Id: I1697459db8d72c956649f3c61f3d090322c3e9fb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoUse constructor injection in OSGiRemoteOpsProvider 44/109444/1
Robert Varga [Thu, 28 Dec 2023 20:18:13 +0000 (21:18 +0100)]
Use constructor injection in OSGiRemoteOpsProvider

We have a simple component here, use constructor injection to preempty
upgraded SpotBugs issuing errors on it.

Change-Id: Id65f63b374497aabccb98ebe06b52195f76f8099
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>