controller.git
13 months agoRemove most of io.atomix.utils.concurrent 84/104684/1
Robert Varga [Thu, 2 Mar 2023 01:00:14 +0000 (02:00 +0100)]
Remove most of io.atomix.utils.concurrent

Most of the stuff in the concurrent package is not used, remove it.

JIRA: CONTROLLER-2071
Change-Id: Ife0ea74b9327075dac9dfb605364bf2a9301362f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoRemove most of atomix.utils.* 83/104683/1
Robert Varga [Thu, 2 Mar 2023 00:54:33 +0000 (01:54 +0100)]
Remove most of atomix.utils.*

Most of the defined interfaces are not used anywhere, remove them.

JIRA: CONTROLLER-2071
Change-Id: Iffa3fc760be89752868249f7e8eb189e231f8006
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoRemove atomix.utils.Generics 82/104682/1
Robert Varga [Thu, 2 Mar 2023 00:51:15 +0000 (01:51 +0100)]
Remove atomix.utils.Generics

This class is not used anywhere, remove it.

JIRA: CONTROLLER-2071
Change-Id: I592727427e4604953f59fddb87f92c398c13c001
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoRemove {Atomix,Ordered}Future 81/104681/1
Robert Varga [Thu, 2 Mar 2023 00:27:48 +0000 (01:27 +0100)]
Remove {Atomix,Ordered}Future

These classes are unused, remove them

JIRA: CONTROLLER-2071
Change-Id: I14a2b31a035739debe6168dd5b5f2d060acd61a3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoRemove most of io.atomix.utils.misc 80/104680/1
Robert Varga [Thu, 2 Mar 2023 00:25:36 +0000 (01:25 +0100)]
Remove most of io.atomix.utils.misc

There is only one class used from this package, remove all the others.

Change-Id: I0a5d751ec2ef9cdf07694a4a640fe1ca25bf1afb
JIRA: CONTROLLER-2071
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoRemove io.atomix.utils.tim 79/104679/1
Robert Varga [Thu, 2 Mar 2023 00:23:22 +0000 (01:23 +0100)]
Remove io.atomix.utils.tim

Nothing in this package is needed here, remove it.

JIRA: CONTROLLER-2071
Change-Id: I92b26b9010bbf00fe7f2b9d3ddb9b380b06c80d9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoRemove io.atomix.utils.logging 78/104678/1
Robert Varga [Thu, 2 Mar 2023 00:20:52 +0000 (01:20 +0100)]
Remove io.atomix.utils.logging

Nothing in this package is needed here, remove it.

JIRA: CONTROLLER-2071
Change-Id: Ie4715a34d532c905251ade6a9ca9dd01037ba1f5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoRemove io.atomix.utils.event 77/104677/1
Robert Varga [Thu, 2 Mar 2023 00:19:32 +0000 (01:19 +0100)]
Remove io.atomix.utils.event

Nothing in this package is needed here, remove it.

JIRA: CONTROLLER-2071
Change-Id: Ib3d75d07b4e9c7b902471c31863bd6fe2b558e19
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoRemove io.atomix.utils.net 76/104676/2
Robert Varga [Thu, 2 Mar 2023 00:18:45 +0000 (01:18 +0100)]
Remove io.atomix.utils.net

Nothing in this package is needed here, remove it.

JIRA: CONTROLLER-2071
Change-Id: I77df3011a124e0b01b7d241c127233deb7ad0595
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoRemove Abstract{Identifier,Named} 75/104675/1
Robert Varga [Thu, 2 Mar 2023 00:14:31 +0000 (01:14 +0100)]
Remove Abstract{Identifier,Named}

These classes will not be needed, remove them.

JIRA: CONTROLLER-2071
Change-Id: If96076bfe30fa4405afbde225bcf54e7400e9512
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoRemove Accumulator and its dependencies 74/104674/2
Robert Varga [Thu, 2 Mar 2023 00:11:44 +0000 (01:11 +0100)]
Remove Accumulator and its dependencies

We are not going to use this class, remove it along with everything that
(transitively) needs it.

JIRA: CONTROLLER-2071
Change-Id: I07e0b8143d54068e9ac6d1e8060279086ff79e22
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoPlug atomix into the build 73/104673/1
Robert Varga [Wed, 1 Mar 2023 23:45:21 +0000 (00:45 +0100)]
Plug atomix into the build

This adds the basics to plug in atomis into the build using the bare
minimum of modifications.

JIRA: CONTROLLER-2071
Change-Id: I92fe884f1ac44973c7ac0a9930be88f08b8d6643
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoImport atomix/{storage,utils} 70/104670/1
Robert Varga [Wed, 1 Mar 2023 22:47:19 +0000 (23:47 +0100)]
Import atomix/{storage,utils}

This is an import of our upstream dependency, atomix-storage, along with
its dependency, atomix-utils.

The atomix.io team has decided to abandon their Java code and archived
it under https://github.com/atomix/atomix-archive.

As per https://github.com/atomix/atomix-archive/blob/master/LICENSE,
this code is licensed under Apache License 2.0, which is compatible with
Eclipse Public License 1.0, which we are using.

This code drop imports the source code for the two artifacts we use, as
of their latest available state as available at
https://github.com/atomix/atomix-archive/tree/5c57662f8be16d3448c4c9cac2e2bec9317c4300
in verbatim, without any changes or actual build integration.

JIRA: CONTROLLER-2069
Change-Id: I873779dba9eac350e92e1c4dae69a79da43d3068
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
14 months agoRemove commons-lang dependencies 70/104570/1
Robert Varga [Thu, 23 Feb 2023 18:39:44 +0000 (19:39 +0100)]
Remove commons-lang dependencies

Use commons-lang3 instead, as it provides better interface anyway.

Change-Id: I8574166cf77f8f40c9a2ada4b06cc0d8b14244a9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
14 months agoBump versions to 7.0.5-SNAPSHOT 69/104569/1
Robert Varga [Thu, 23 Feb 2023 18:31:06 +0000 (19:31 +0100)]
Bump versions to 7.0.5-SNAPSHOT

This starts the next development iteration.

Change-Id: I1b490c02d7201f4de9a090a5cbb48748f7452499
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
14 months agoClean up blueprint dependencies 68/104568/1
Robert Varga [Thu, 23 Feb 2023 18:28:45 +0000 (19:28 +0100)]
Clean up blueprint dependencies

Fixup dependency declarations to eliminate most of warnings.

Change-Id: Id3d865787c13aa0cac4d5a282813820824072688
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
14 months agoFixup sal-cluster-admin-impl dependencies 67/104567/1
Robert Varga [Thu, 23 Feb 2023 18:20:37 +0000 (19:20 +0100)]
Fixup sal-cluster-admin-impl dependencies

The dependencies here are rather baroque, clean them up to the point
of confusigng maven-dependency-plugin.

Change-Id: Ifbc3e605217b0ece2ea7691d96eea28ec7bef3fe
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
14 months agoFix eos-dom-akka dependencies 66/104566/1
Robert Varga [Thu, 23 Feb 2023 17:47:18 +0000 (18:47 +0100)]
Fix eos-dom-akka dependencies

We are misplacing a number of dependencies, declare them at proper
scope.

Change-Id: I58b5fdd2fbfe0a1fb743c134aaf111c937078bbb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
14 months agoFix sal-cluster-admin-api dependencies 65/104565/1
Robert Varga [Thu, 23 Feb 2023 17:44:41 +0000 (18:44 +0100)]
Fix sal-cluster-admin-api dependencies

We have two dependencies which we do not declare, fix that.

Change-Id: I5e7428f77a1da526c8fe813f320c66082a98c7f4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
14 months agoRun test with MockitoJUnitRunner 64/104564/1
Robert Varga [Thu, 23 Feb 2023 17:42:01 +0000 (18:42 +0100)]
Run test with MockitoJUnitRunner

Fix an unsafe warning, which unfortunately requires resetting the mock.

Change-Id: I9e9ce4bec7d8730fa844f23808de6dc2a722b514
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
14 months agoFix sal-akka-segmented-journal dependencies 63/104563/1
Robert Varga [Thu, 23 Feb 2023 17:37:13 +0000 (18:37 +0100)]
Fix sal-akka-segmented-journal dependencies

We have two dependencies which we do not declare, fix that up.

Change-Id: Ic34b42065df880857c21c56e8cd0b2a5f421b814
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
14 months agoClean up sal-akka-raft dependencies 62/104562/1
Robert Varga [Thu, 23 Feb 2023 17:32:42 +0000 (18:32 +0100)]
Clean up sal-akka-raft dependencies

We have a number of underclared dependencies, fix that up.

Change-Id: Idaa44f5b3d0f2f84c71b4cdf2e0c0c6c29e66b56
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
14 months agoDiagnose mockito downgrade better 61/104561/1
Robert Varga [Thu, 23 Feb 2023 16:33:16 +0000 (17:33 +0100)]
Diagnose mockito downgrade better

Mockito is doing a very weird thing to get the inline MockMaker work,
which is known to not work with OSGi. Clean up the way we are
approaching byte-buddy and provide a pointer to the issue.

Change-Id: I87420710c5b6859e984fb72204826b91c7e4863a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
14 months agoClean up cds-access-client dependencies 60/104560/2
Robert Varga [Thu, 23 Feb 2023 15:22:04 +0000 (16:22 +0100)]
Clean up cds-access-client dependencies

Update dependencies to match what we are actually using.

Change-Id: I8c6e17cfe853e6e7105fdc497315aaf008cf4c7e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
14 months agoReduce mockito workaround 59/104559/1
Robert Varga [Thu, 23 Feb 2023 15:14:33 +0000 (16:14 +0100)]
Reduce mockito workaround

Use mockito-inline and upgraded mockito.

Change-Id: Ibc3ff9afbef0d586ed186c08de5364420c795fce
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
14 months agoBump upstreams 53/104553/3
Robert Varga [Thu, 23 Feb 2023 10:54:54 +0000 (11:54 +0100)]
Bump upstreams

Adopt:
- odlparent-12.0.3
- yangtools-10.0.4
- mdsal-11.0.7

Change-Id: I0324391b51565686299f1f5e930847390cd3aca8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
14 months agoBump versions to 7.0.4-SNAPSHOT 62/104262/1
Robert Varga [Sun, 5 Feb 2023 22:59:19 +0000 (23:59 +0100)]
Bump versions to 7.0.4-SNAPSHOT

This starts the next development iteration.

Change-Id: I6258d8a8722f8276e30c90d0226d431cee6cfb21
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
14 months agoBump mdsal to 11.0.6 55/104255/1
Robert Varga [Sun, 5 Feb 2023 11:11:56 +0000 (12:11 +0100)]
Bump mdsal to 11.0.6

Pick up latest updates.

Change-Id: I568d004c7a310176f280f9dc32539645b25f4741
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
14 months agoMigrate toaster-consumer to OSGi DS 46/103146/13
Robert Varga [Tue, 8 Nov 2022 12:57:28 +0000 (13:57 +0100)]
Migrate toaster-consumer to OSGi DS

Use declarative services instead of blueprint and do not pull in the
blueprint extension.

JIRA: CONTROLLER-2003
Change-Id: I1c7987086c0469001a7e1ee5cd5e8f921b57f7a7
Signed-off-by: Samuel Schneider <samuel.schneider@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
14 months agoMigrate toaster-producer to OSGi DS 20/103920/8
Samuel Schneider [Wed, 4 Jan 2023 16:20:46 +0000 (17:20 +0100)]
Migrate toaster-producer to OSGi DS

Use declarative services instead of blueprint, removing unnecessary
models in the process. ToasterTest is updated to wait for
ToasterService, as we are touching its MXBean.

Change-Id: I6b947ccb0024da934457e4c52d0665f3fc9a5bb6
Signed-off-by: Oleksandr Panasiuk <oleksandr.panasiuk@pantheon.tech>
Signed-off-by: Samuel Schneider <samuel.schneider@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
14 months agoBump upstreams 14/104214/3
Robert Varga [Wed, 1 Feb 2023 15:46:37 +0000 (16:46 +0100)]
Bump upstreams

Adopt:
- odlparent-12.0.2
- yangtools-10.0.3
- mdsal-11.0.5

Change-Id: I2fa6e32b7275bb50118289af2d096b98cce95680
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
15 months agoBump versions to 7.0.3-SNAPSHOT 97/104097/1
Robert Varga [Mon, 23 Jan 2023 10:09:52 +0000 (11:09 +0100)]
Bump versions to 7.0.3-SNAPSHOT

This starts the next development iteration.

Change-Id: I3449be174e52ea7b964a321545254165f326d575
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
15 months agoBump mdsal to 11.0.4 96/104096/1
Robert Varga [Mon, 23 Jan 2023 10:09:09 +0000 (11:09 +0100)]
Bump mdsal to 11.0.4

Pick up codegen fix for bits.

Change-Id: I341ab659a3f1874d902e55cf656702d3d8eae18c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoBump versions to 7.0.2-SNAPSHOT 99/103699/1
Robert Varga [Sun, 18 Dec 2022 12:26:48 +0000 (13:26 +0100)]
Bump versions to 7.0.2-SNAPSHOT

This starts the next development iteration.

Change-Id: I2fdeca1eaac7770d1e147c37edac62500434559c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoBump mdsal to 11.0.3 98/103698/1
Robert Varga [Sun, 18 Dec 2022 12:24:38 +0000 (13:24 +0100)]
Bump mdsal to 11.0.3

Adopt fixes from upstream.

Change-Id: I5d37f13c2c9c09895b5c34f58d98985635c2bbab
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoModernize cds-access-client 80/103580/4
Robert Varga [Sun, 4 Dec 2022 20:46:03 +0000 (21:46 +0100)]
Modernize cds-access-client

Use instanceof patterns to reduce the number of casts.

Change-Id: If0f3d0d47e9a68b24372b79e93aa478ec32cf9b0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoModernize sal-remoterpc-connector 81/103581/4
Robert Varga [Sun, 4 Dec 2022 20:55:04 +0000 (21:55 +0100)]
Modernize sal-remoterpc-connector

Use instanceof patterns to reduce casts.

Change-Id: Iafcb05461e2c241310857ee2bf93591bed66a7d4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoModernize sal-clustering-commons 79/103579/2
Robert Varga [Sun, 4 Dec 2022 20:39:46 +0000 (21:39 +0100)]
Modernize sal-clustering-commons

Use instanceof patterns to reduce the number of casts.

Change-Id: I40eb35b3b1afdae30d461a608aeabda2d7e09ce8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoBump versions to 7.0.1-SNAPSHOT 78/103578/1
Robert Varga [Sun, 4 Dec 2022 20:26:24 +0000 (21:26 +0100)]
Bump versions to 7.0.1-SNAPSHOT

This starts the next development iteration.

Change-Id: Ia719b57550d7d8f3e26a20b5bfbc4c1935dd8a25
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoRemove blueprint from clustering-test-app 47/103147/13
matus.matok [Mon, 28 Nov 2022 07:28:35 +0000 (08:28 +0100)]
Remove blueprint from clustering-test-app

Replace bluprint wiring with explicit MD-SAL registration and OSGi
Declarative Services.

JIRA: CONTROLLER-2002
Change-Id: Ibbc7129062224b666d04ec76a04b2779f2662a6e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: matusmatok <matus.matok@pantheon.tech>
16 months agoBump upstreams 72/103572/1
Robert Varga [Sun, 4 Dec 2022 17:44:19 +0000 (18:44 +0100)]
Bump upstreams

Adopt:
- yangtools-10.0.2
- mdsal-11.0.2

Change-Id: I7e3214e2a4ef430eb1c111d4a8c77c042d66419c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoObsolete ask-based protocol 03/103103/11
Robert Varga [Sat, 5 Nov 2022 02:11:54 +0000 (03:11 +0100)]
Obsolete ask-based protocol

Mark the switch to use ask-based protocol obsolete and deprecate all
classes implementing it.

JIRA: CONTROLLER-2053
Change-Id: Ib0f5d6a946090addde255423d51746a52e785b2a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoFix more Sonar warnings 44/103544/3
Robert Varga [Sat, 3 Dec 2022 12:24:16 +0000 (13:24 +0100)]
Fix more Sonar warnings

Ignored exceptions, mergeable if statements and similar.

Change-Id: Iea262b7c410cfde16fd4f101d3c7c8195ff1ea1f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoFixup Sonar issues 34/103534/4
Robert Varga [Sat, 3 Dec 2022 00:32:37 +0000 (01:32 +0100)]
Fixup Sonar issues

Perform automatic conversions and also fixup Sonar issues reported,
which tend to be very minor.

Change-Id: Ia0d980105f4635218bacb9161a39ecb87838a9ff
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoSeal Snapshot 30/103530/2
Robert Varga [Fri, 2 Dec 2022 16:57:24 +0000 (17:57 +0100)]
Seal Snapshot

We do not want people to subclass this class, make sure it is sealed.

Change-Id: I81e8a2ba5232471a8f153a710d957e3cb22bbb5e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoSwitch to use PayloadVersion.CHLORINE_SR2 20/103520/6
Robert Varga [Fri, 2 Dec 2022 12:05:36 +0000 (13:05 +0100)]
Switch to use PayloadVersion.CHLORINE_SR2

PayloadVersion.CHLORINE_SR2 is more efficient format, switch to using
it and deprecate old versions for removal.

JIRA: CONTROLLER-2056
Change-Id: Id05a34a28e4d3e817fc6ff783669493ee80af3b7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoModernize sal-akka-raft 29/103529/2
Robert Varga [Fri, 2 Dec 2022 16:17:54 +0000 (17:17 +0100)]
Modernize sal-akka-raft

Use instanceof and switch expressions to improve code flows. Also
shortcut handleRequestVote(), as we can have the instance casted
in AbstractLeader.

Change-Id: Ib726c79fbcc667335a3749f528b3836dc3896e73
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoTrigger snapshots on legacy persisted entries 25/103525/1
Robert Varga [Fri, 2 Dec 2022 16:00:02 +0000 (17:00 +0100)]
Trigger snapshots on legacy persisted entries

We have migrated proxies, hence we should be purging them from journal
if we encounter them during recovery. Introduce a marker interface for
that and subclasses which implement it.

JIRA: CONTROLLER-2064
Change-Id: Ie16b1247306d64580df977bece70a94eb3187cbf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoSwitch to ARGON raft version 14/103514/9
Robert Varga [Fri, 2 Dec 2022 08:10:07 +0000 (09:10 +0100)]
Switch to ARGON raft version

We have new, more efficient serialization format. Switch to using it and
deprecate old proxies.

JIRA: CONTROLLER-2064
Change-Id: Ie549f08d62953ff6019ff915b12d0d4fedb1d3a0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoDefine RaftVersions.ARGON_VERSION 13/103513/9
Robert Varga [Fri, 2 Dec 2022 08:00:40 +0000 (09:00 +0100)]
Define RaftVersions.ARGON_VERSION

Our serialization proxies result in a unnecessarity-big footprint.
Define their replacements for forward compatibility with Argon raft
version.

JIRA: CONTROLLER-2058
Change-Id: I545485c6abdf16f6d81a48672b36eb83613013e1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoDeprecate old RaftVersions 10/103510/2
Robert Varga [Fri, 2 Dec 2022 07:29:49 +0000 (08:29 +0100)]
Deprecate old RaftVersions

Mark old RaftVersion constants as deprecated and adjust checks to work
on BORON instead of FLUORINE, so they can be properly removed when we
remove BORON support.

Change-Id: Id5b4d2995306d9639a2cd81b82304e090d1f105d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoUse instanceof patterns in Follower 16/103516/1
Robert Varga [Fri, 2 Dec 2022 10:33:42 +0000 (11:33 +0100)]
Use instanceof patterns in Follower

We can reduce casts and improve logic a bit with instanceof patterns.

Change-Id: Ife036c99cba938b79c35fb042f642e96b6a769a3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoAdd sal-akka-raft serialization assertions 09/103509/1
Robert Varga [Fri, 2 Dec 2022 06:55:33 +0000 (07:55 +0100)]
Add sal-akka-raft serialization assertions

We need to be in control of serialized payload size. This patch adds the
assertions on sizes.

Change-Id: Ic73724d0acc51d7d7f28acb392fe569f719762c9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoDeprecate ABIVersion.MAGNESIUM 82/103482/17
Robert Varga [Wed, 30 Nov 2022 17:58:22 +0000 (18:58 +0100)]
Deprecate ABIVersion.MAGNESIUM

This version is using inefficient Externalizable proxy and has been
supersed by CHLORINE_SR2. Deprecate it for removal and old proxies
as deprecated as well.

JIRA: CONTROLLER-2061
Change-Id: I0959f88d759d2aad33e16e13e9fefe34cd51a740
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoPrune old ABI versions 99/103099/12
Robert Varga [Fri, 4 Nov 2022 21:11:03 +0000 (22:11 +0100)]
Prune old ABI versions

Remove all ABIVersion constants before MAGNESIUM, and adjust the test
for that. Also modernize tests a bit.

JIRA: CONTROLLER-2060
Change-Id: Ie9e3106e24b0b75d58b360ba2296d85e46be351a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoDeprecate ABIVersion.{BORON,NEON_SR2,SODIUM_SR1} 93/103493/5
Robert Varga [Thu, 1 Dec 2022 13:50:52 +0000 (14:50 +0100)]
Deprecate ABIVersion.{BORON,NEON_SR2,SODIUM_SR1}

These versions are ancient and should not be used. They will be removed
in version 7.0.0.

JIRA: CONTROLLER-2059
Change-Id: I1e4584f0771d3e40eee1fcf9ada6e564a9bb2475
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoSwitch identifiers to new proxies 85/103485/10
Robert Varga [Wed, 30 Nov 2022 22:07:11 +0000 (23:07 +0100)]
Switch identifiers to new proxies

We have more efficient serialization proxies defined, use them for
writeout and deprecate the old ones.

JIRA: CONTROLLER-2051
Change-Id: I1daa83e8fcdd3776951fc1c284c9e6d0d7f64078
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoSwitch ABIVersion.current() to CHLORINE_SR2 92/103492/4
Robert Varga [Thu, 1 Dec 2022 12:31:49 +0000 (13:31 +0100)]
Switch ABIVersion.current() to CHLORINE_SR2

We should be safe to enable this version by default, reaping
serialization overhead benefits. This impacts envelope serialization
tests, as those are picking up default versions and flipping it enables
new codepath.

JIRA: CONTROLLER-2051
Change-Id: I7720871775777bf187137482ad72d473acbece16
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoUse current ABIVersion for testing 96/103496/1
Robert Varga [Thu, 1 Dec 2022 16:37:25 +0000 (17:37 +0100)]
Use current ABIVersion for testing

There is no point in cloning messages we use, just use the current ABI
version, whichever that is.

Change-Id: Id19780dc402077e5c0883db238d4af081112a4c8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoAssert new request sizes 79/103479/14
Robert Varga [Wed, 30 Nov 2022 14:26:48 +0000 (15:26 +0100)]
Assert new request sizes

We now have ABIVersion.CHLORINE_SR2, use it to test serialization
proxy sizes -- showing the improvements to size.

JIRA: CONTROLLER-2051
Change-Id: I8c37201e531c00c5ff9d1322db911dfbcf8fd97b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoAdd ABIVersion.CHLORINE_SR2 77/103477/14
Robert Varga [Wed, 30 Nov 2022 13:24:23 +0000 (14:24 +0100)]
Add ABIVersion.CHLORINE_SR2

We have a fresh set of serialization proxies used when we have a version
newer than MAGNESIUM. This patch defines that new version.

JIRA: CONTROLLER-2051
Change-Id: Id91201652afc9dd55d4b44c73bd2d9d3fa3853d3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoAdd new cds-access-api proxies 47/103447/26
Robert Varga [Sun, 27 Nov 2022 12:59:16 +0000 (13:59 +0100)]
Add new cds-access-api proxies

Externalizable serialization format record class hierarchy, which leads
to significant overheads. This patch introduces proxies which are are
flat, i.e. have java.Object as their superclass, eliminating this
overhead.

The way we do this is we defined SerialForm interfaces which extend
Externalizable and define the serialization protocol in terms of default
methods. We then define a bunch of classes which are pure data holders
implementing individual SerialForms.

Also ensure messages properly implement cloneAsVersion() to propagate
the target version, now that it matters for them.

Finally audit use of java.io.Serial so that we do not import it -- it is
just pure overhead vs. using @java.io.Serial directly.

JIRA: CONTROLLER-2051
Change-Id: I01132665027687edc1c6d44dda8a6ab0cab6ad6a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoAdd serialization size assertions for Request{Failure,Success} 78/103478/2
Robert Varga [Wed, 30 Nov 2022 13:37:20 +0000 (14:37 +0100)]
Add serialization size assertions for Request{Failure,Success}

We have a bunch of unasserted sizes, make sure we fill them in.

JIRA: CONTROLLER-2051
Change-Id: I7b812d53133425b5ac754652901787b202e16c63
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoAdd missing final keywords 69/103469/1
Robert Varga [Tue, 29 Nov 2022 21:07:21 +0000 (22:07 +0100)]
Add missing final keywords

We have a few ommissions here, fix that up.

Change-Id: If633f22e293e7a0ca022d12bed8f39ec68ae05d0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoDefine PayloadVersion.CHLORINE_SR2 64/103464/3
Robert Varga [Tue, 29 Nov 2022 19:00:38 +0000 (20:00 +0100)]
Define PayloadVersion.CHLORINE_SR2

Add the definition of PayloadVersion.CHLORINE_SR2. This is backwards
compatiblein most senses.

JIRA: CONTROLLER-2056
Change-Id: Ia39ccf117ec1a0eb0edf909fbaea903f13c185f3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoUse a switch expression for Payload parsing 63/103463/1
Robert Varga [Tue, 29 Nov 2022 18:55:04 +0000 (19:55 +0100)]
Use a switch expression for Payload parsing

We can simplify the switch statement here, making it easier to read.

Change-Id: Ie6e23e7817072b5968f14d17d7063e036563122b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoDefine efficient serialization proxies 22/103422/25
Robert Varga [Sat, 26 Nov 2022 17:35:35 +0000 (18:35 +0100)]
Define efficient serialization proxies

Superclasses have footprint in serialization protocol, as their
descriptors get written out.

Capture Externalizable logic into SerialForm, which implements
Externalizable -- the protocol to be easily implemented without a
superclass. This entails updating the API footprint of AbstractProxy
to reuse its methods.

Then introduce shorthand proxy classes which behave exactly like their
AbstractProxy counterparts, but without the AbstractProxy baggage.

This enables reading implied serialization format, if we encounter it,
providing forward compatibility with the format.

JIRA: CONTROLLER-2056
Change-Id: I4da54ca57849c2bfdaaf76c22e7903abcfa58be9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoUse a switch expression for TreeType 62/103462/1
Robert Varga [Tue, 29 Nov 2022 15:17:23 +0000 (16:17 +0100)]
Use a switch expression for TreeType

Use exhaustiveness of a switch expression to peel an impossible case.

Change-Id: I7d1d228484656fc81b51762878d569698d570f80
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoUse an instanceof pattern 60/103460/1
Robert Varga [Tue, 29 Nov 2022 09:50:48 +0000 (10:50 +0100)]
Use an instanceof pattern

We can merge the check and cast here.

Change-Id: I95cb4d5574dab43e4f5f06c9c372fe294c131224
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoReuse cause message 53/103453/2
Robert Varga [Mon, 28 Nov 2022 19:41:53 +0000 (20:41 +0100)]
Reuse cause message

We are actually hiding information, make sure we reuse the message from
cause.

Change-Id: Ia361c0b06ed173cbe1a3c8a7fb86b1869ea88da2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoAssert payload serialized size 21/103421/9
Robert Varga [Sat, 26 Nov 2022 11:42:15 +0000 (12:42 +0100)]
Assert payload serialized size

We want to be in control over the size of our serialization, make sure
to add assertions.

JIRA: CONTROLLER-2051
JIRA: CONTROLLER-2056
Change-Id: I72957eaf284bfd5498cfdb11301239ac50d612f1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoAdd serialVersionUID fields 46/103446/7
Robert Varga [Mon, 28 Nov 2022 17:38:48 +0000 (18:38 +0100)]
Add serialVersionUID fields

We are missing a few definitions and are about to modify the classes
in backwards-compatible ways, but the changes would end up changing
the versions. Make sure to define generated serialVersionUIDs.

JIRA: CONTROLLER-2051
JIRA: CONTROLLER-2056
Change-Id: I006f51e16dd3fee66fb9c344bb99235780b08d3e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoShardSnapshotState is final 32/103432/3
Robert Varga [Sat, 26 Nov 2022 21:59:08 +0000 (22:59 +0100)]
ShardSnapshotState is final

This is a well-known contract, it should be final.

Change-Id: Ib1748ed05969a56266a62477dc794d6df43b2df1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoDatastoreSnapshot is final 31/103431/3
Robert Varga [Sat, 26 Nov 2022 21:15:14 +0000 (22:15 +0100)]
DatastoreSnapshot is final

This is DTO, it should be final.

Change-Id: I46944b1a3b6aff51e2fe20f117c598d88e1e8469
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoShardSnapshot is final 30/103430/3
Robert Varga [Sat, 26 Nov 2022 20:50:07 +0000 (21:50 +0100)]
ShardSnapshot is final

There is no point in extending this class, make it final.

Change-Id: I6f73c5be57e6fb58e7c74b5681907ae0f492437d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoShardManagerSnapshot is final 29/103429/3
Robert Varga [Sat, 26 Nov 2022 20:04:07 +0000 (21:04 +0100)]
ShardManagerSnapshot is final

This is a well-known construct, it does not have any subclasses.

Change-Id: I40d0c605c776e0cf185bcd0425cfe48bb92d64f0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoSeal CommitTransactionPayload 28/103428/3
Robert Varga [Sat, 26 Nov 2022 19:02:41 +0000 (20:02 +0100)]
Seal CommitTransactionPayload

We only provide two specializations, seal the base class.

Change-Id: I27f55a79fb1b9b284f1cb4c1c639e28ab9b9df51
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoAdopt mdsal-11.0.1 52/103452/1
Robert Varga [Mon, 28 Nov 2022 19:18:16 +0000 (20:18 +0100)]
Adopt mdsal-11.0.1

We have exposed a regression in mdsal-11.0.0, adopt the fix from
upstream.

Change-Id: I0f82ba6d0748f7cbb159e800a964b3abe4b3742f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 months agoRemove unused ShardManagerSnapshot 20/103420/1
Robert Varga [Sat, 26 Nov 2022 11:59:17 +0000 (12:59 +0100)]
Remove unused ShardManagerSnapshot

This class has been migrated to persisted package. Remove it.

Change-Id: Ie5390eb1679f4ffc74d7d6a8cccf45f1f273105a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 months agoUse diamond notation 19/103419/1
Robert Varga [Sat, 26 Nov 2022 10:48:51 +0000 (11:48 +0100)]
Use diamond notation

We do not need to specify arguments here.

Change-Id: If92534ae0306e8abe27919cbc368da55683fa97b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 months agoUpdate upstreams 05/103405/2
Robert Varga [Fri, 25 Nov 2022 23:23:37 +0000 (00:23 +0100)]
Update upstreams

Adopt:
- odlparent-12.0.1
- yangtools-10.0.1
- mdsal-11.0.0

Change-Id: Ied40be292d9de2ea2d20ba3a454582d910624474
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 months agoDo not allow multi-datastore transactions 81/103181/3
Ruslan Kashapov [Wed, 9 Nov 2022 17:16:58 +0000 (19:16 +0200)]
Do not allow multi-datastore transactions

The ability to access multiple datastores from the same transaction
has been long-deprecated. This patch disables that ability, binding
each transaction to the datastore it first accesses.

JIRA: CONTROLLER-2055
Change-Id: I57fed3daf2ae9cd0cc6f4899fe1975c05def5c46
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 months agoBump upstreams 44/103144/6
Robert Varga [Tue, 8 Nov 2022 10:30:12 +0000 (11:30 +0100)]
Bump upstreams

Adopt:
- odlparent-12.0.0
- yangtools-10.0.0
- mdsal-11.0.0-SNAPSHOT

Update toaster test to not use the same transaction for both config
and oper access.

Update RPC invocation paths to assume ContainerNode as opposed to a
plain NormalizedNode.

Change-Id: I31c6350746be4e176a389d8a14a12de89119a78b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 months agoUse a VarHandle for closed flag 45/103145/1
Robert Varga [Tue, 8 Nov 2022 11:26:22 +0000 (12:26 +0100)]
Use a VarHandle for closed flag

This eliminates type safety warnings and make it more explicit as to
what we mean.

Change-Id: I2335ff7c970ec7f5f55624a02a0c49b349deaa64
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 months agoImprove AbstractDOMTransactionFactory 43/103143/1
Robert Varga [Tue, 8 Nov 2022 11:23:19 +0000 (12:23 +0100)]
Improve AbstractDOMTransactionFactory

AutoCloseable.close() is recommended to be idempotent, follow that
guidance, producing a warning with a stack trace if that is not the
case.

Change-Id: I1b65466f9b84e05417d8cd24c1b7a5e89e8e836b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 months agoBump versions to 7.0.0-SNAPSHOT 13/103113/1
Robert Varga [Sun, 6 Nov 2022 20:44:15 +0000 (21:44 +0100)]
Bump versions to 7.0.0-SNAPSHOT

This starts the next development iteration.

Change-Id: I78683b4b6ce4cc03e211d39c0a72f34446bd8b1e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 months agoBump verions to 6.0.4-SNAPSHOT 02/103102/1
Robert Varga [Sat, 5 Nov 2022 00:38:26 +0000 (01:38 +0100)]
Bump verions to 6.0.4-SNAPSHOT

This starts the next development iteration.

Change-Id: Icca925e3b86b9e44aa7000ce0844c274857936d1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 months agoBump upstrems 48/103048/6
Robert Varga [Thu, 3 Nov 2022 02:15:17 +0000 (03:15 +0100)]
Bump upstrems

Adopt:
- odlparent-11.0.2
- yangtools-9.0.2
- mdsal-10.0.3

Change-Id: I221bb0697db1987c2cb3069ec88f492ce7201e5a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 months agoSwitch default ABIVersion 98/103098/2
Robert Varga [Fri, 4 Nov 2022 21:09:56 +0000 (22:09 +0100)]
Switch default ABIVersion

Somehow we missed an update of version here. Make sure to use Magnesium.

JIRA: CONTROLLER-2052
Change-Id: I1d45b4fc558c34c0c40faba41f29522772431a24
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 months agoModernize AbstractLocalTransactionRequestTest 97/103097/1
Robert Varga [Fri, 4 Nov 2022 21:17:46 +0000 (22:17 +0100)]
Modernize AbstractLocalTransactionRequestTest

Use static imports and use assertThrows() and better assertion on the
thrown exception.

Change-Id: I9b11e8a6797b76efa52f1eb3506b630de4a3ae44
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 months agoModernize AbstractRequestTest 96/103096/1
Robert Varga [Fri, 4 Nov 2022 21:13:36 +0000 (22:13 +0100)]
Modernize AbstractRequestTest

Use static imports and improve message assertion.

Change-Id: I97cf242781c25988bf3bcf50f76e9a2dd1b0c8fb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 months agoModernize ABIVersionTest 95/103095/2
Robert Varga [Fri, 4 Nov 2022 21:03:42 +0000 (22:03 +0100)]
Modernize ABIVersionTest

Use assertThrows() instead of expected exception.

Change-Id: Ib2cfc2af5d8da99951d9c8fb6fcedf7eba894b6b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 months agoMore cds-access-api cleanup 64/103064/1
Robert Varga [Thu, 3 Nov 2022 13:12:34 +0000 (14:12 +0100)]
More cds-access-api cleanup

Fixup previous patch and sprinkle more @Serial annotations.

Change-Id: I74414861197bb417dadc445ebc3fc2703a97ea4d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 months agoUse constructor injection in OSGiClusterAdmin 56/103056/3
Robert Varga [Thu, 3 Nov 2022 10:04:34 +0000 (11:04 +0100)]
Use constructor injection in OSGiClusterAdmin

Remove @Beta and inject services directly into RPC service.

Change-Id: I6d836c84099f17945d0e1e6af8a38e8dbd03f123
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 months agoPromote cds-access-client constructs 55/103055/3
Robert Varga [Thu, 3 Nov 2022 03:53:53 +0000 (04:53 +0100)]
Promote cds-access-client constructs

These constructs are stable enough, remove @Beta annotation.

Change-Id: I0a63f306fea0fca884fb26ec09560420652c4983
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 months agoPromote AbstractMXBean 54/103054/3
Robert Varga [Thu, 3 Nov 2022 03:41:27 +0000 (04:41 +0100)]
Promote AbstractMXBean

This class can be evolved with SemVer, drop @Beta annotation.

Change-Id: Ie34b2b0e557691ea471cf03e23ad927153aadff5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 months agoPromote cds-access-api 53/103053/7
Robert Varga [Thu, 3 Nov 2022 02:45:41 +0000 (03:45 +0100)]
Promote cds-access-api

This API is no longer @Beta.

Change-Id: If81e77c8b2c9dc2fcfa6bcd94f58426c75f6cd0a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 months agoPromote BucketStoreAccess 51/103051/3
Robert Varga [Thu, 3 Nov 2022 02:35:17 +0000 (03:35 +0100)]
Promote BucketStoreAccess

This is no longer @Beta.

Change-Id: I294085026f7306547230d476951793e09b3d0618
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 months agoPromote cds-dom-api contracts 50/103050/2
Robert Varga [Thu, 3 Nov 2022 02:31:04 +0000 (03:31 +0100)]
Promote cds-dom-api contracts

These are stable enough not to warrant a @Beta annotation.

Change-Id: I2e493febf1a99560047b86ff5aa576c5428ff35d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 months agoPromote DataCenterControl 52/103052/2
Robert Varga [Thu, 3 Nov 2022 02:37:04 +0000 (03:37 +0100)]
Promote DataCenterControl

This is no longer @Beta.

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