controller.git
16 months agoRelease controller v6.0.4
jenkins-releng [Fri, 2 Dec 2022 15:38:04 +0000 (15:38 +0000)]
Release controller

16 months agoDefine RaftVersions.ARGON_VERSION 21/103521/1
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>
(cherry picked from commit 9a091425d16dadf09a5be4e764785707f5253013)

16 months agoUse instanceof patterns in Follower 18/103518/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>
(cherry picked from commit b8de4ba085d8d165a7bb48511dc374ed278fa8bd)

16 months agoAdd sal-akka-raft serialization assertions 17/103517/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>
(cherry picked from commit 0096ccec7c45aa0d22cf56250b06517881ca2300)

16 months agoDeprecate ABIVersion.{BORON,NEON_SR2,SODIUM_SR1} 03/103503/1
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>
(cherry picked from commit edfd0bcb062ade225d26b74d4f289ee98f15a79d)

16 months agoAssert new request sizes 99/103499/1
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>
(cherry picked from commit 8cfb2b25798db8916cb5d30e65cdf1bbfd07767c)

16 months agoAdd ABIVersion.CHLORINE_SR2 98/103498/1
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>
(cherry picked from commit 8d4821705d12546cb554c5c2e67f446be81a28eb)

16 months agoAdd new cds-access-api proxies 97/103497/1
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>
(cherry picked from commit d92bd0e575983b3d6a09a73089ef8f9c62f94eaa)

16 months agoAdd serialization size assertions for Request{Failure,Success} 80/103480/1
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>
(cherry picked from commit e085f22bb1934959f9d6f7f4368c1afe964b1e07)

16 months agoAdd missing final keywords 75/103475/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>
(cherry picked from commit 3f406c078a3fc91f1ea2199fe32d53e9e1064f4b)

16 months agoDefine efficient serialization proxies 67/103467/2
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>
(cherry picked from commit 2dedb8231e13abe55d6b75eb532d23dbe536e168)

16 months agoUse a switch expression for Payload parsing 66/103466/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>
(cherry picked from commit 16b15aea2abdda554ce89da99061e159417596ee)

16 months agoUse a switch expression for TreeType 65/103465/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>
(cherry picked from commit 04502b115693e22d215716feef7b34b6d3c37f6a)

16 months agoUse an instanceof pattern 61/103261/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>
(cherry picked from commit 034d4e72ffaffc2081a2a6df83ad2ed8a794e2e6)

16 months agoAssert payload serialized size 57/103457/2
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>
(cherry picked from commit deaa438d6cb6d271bd800bb1879dbdc2360e5392)

16 months agoAdd serialVersionUID fields 56/103456/2
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>
(cherry picked from commit 0597bd64ca6214fd3ca3fb152ab2ca7fd3b32ed5)

16 months agoBump upstrems 54/103454/2
Robert Varga [Mon, 28 Nov 2022 22:06:52 +0000 (23:06 +0100)]
Bump upstrems

Adopt:
- odlparent-11.0.3
- yangtools-9.0.4
- mdsal-10.0.4

Change-Id: I41a097ffc5e4f1aae4f81d5e051faed64856d572
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>
17 months agoPromote OSGiGlobalEventExecutor 49/103049/1
Robert Varga [Thu, 3 Nov 2022 02:29:10 +0000 (03:29 +0100)]
Promote OSGiGlobalEventExecutor

Drop @Beta annotation.

Change-Id: I15e93a4645dd586fe80aab36e6d27495508fda82
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 months agoDo not reference immutable node builders 40/103040/1
Robert Varga [Wed, 2 Nov 2022 22:17:39 +0000 (23:17 +0100)]
Do not reference immutable node builders

Use Builders/ImmutableNodes instead of direct implementation reference.
Also use fluent nature of builders, which flushes out a number of unused
constructs, which we remove here.

Change-Id: I8803da6a244f4f4dceaf4da06934b0f8df24b827
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoBump scala to 2.13.10 66/102666/1
Robert Varga [Thu, 13 Oct 2022 13:42:31 +0000 (15:42 +0200)]
Bump scala to 2.13.10

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

Change-Id: I2c18e38c5f72be43f4bfb71c67049552ad690784
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoBump Scala to 2.13.9 45/102445/1
Robert Varga [Thu, 22 Sep 2022 15:26:13 +0000 (17:26 +0200)]
Bump Scala to 2.13.9

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

Change-Id: I2d004d2c3e7d193c803786191c55b53018f63156
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
19 months agoBump versions to 6.0.3-SNAPSHOT 74/102374/1
Robert Varga [Wed, 14 Sep 2022 14:27:23 +0000 (16:27 +0200)]
Bump versions to 6.0.3-SNAPSHOT

This starts the next development iteration.

Change-Id: Ia7fdafe6d534daeef8fb636907367358d135ae24
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
19 months agoBump mdsal to 10.0.2 73/102373/1
Robert Varga [Wed, 14 Sep 2022 14:26:41 +0000 (16:26 +0200)]
Bump mdsal to 10.0.2

Pick up fixes from upstream.

Change-Id: I66e104394b41052d6821da6d3d159fa49f5a0626
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
19 months agoBump junit-4-13_2.13 05/102305/4
Robert Varga [Wed, 7 Sep 2022 16:13:02 +0000 (18:13 +0200)]
Bump junit-4-13_2.13

Adopt version 3.2.13.0.

Change-Id: I421dd2ae4be9a560eaeffe6f86d9828ed9c2e7eb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
19 months agoBump Akka to 2.6.20 03/102303/4
Robert Varga [Wed, 7 Sep 2022 10:33:40 +0000 (12:33 +0200)]
Bump Akka to 2.6.20

https://akka.io/blog/news/2022/09/06/akka-2.6.20-released
https://github.com/real-logic/agrona/releases/tag/1.15.0
https://github.com/real-logic/agrona/releases/tag/1.15.1
https://github.com/real-logic/agrona/releases/tag/1.15.2
https://github.com/real-logic/aeron/releases/tag/1.38.0
https://github.com/real-logic/aeron/releases/tag/1.38.1

JIRA: CONTROLLER-2048
Change-Id: I4d3b2da9bd1a716403bfae5b957c73b05406ba15
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
19 months agoBump reactive-streams to 1.0.4 06/102306/4
Robert Varga [Wed, 7 Sep 2022 16:13:35 +0000 (18:13 +0200)]
Bump reactive-streams to 1.0.4

https://github.com/reactive-streams/reactive-streams-jvm/blob/master/RELEASE-NOTES.md#version-104-released-on-2022-05-20

Change-Id: I6f9072f4b053f831a4855c2c5c97ad8509d9e8bb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
20 months agoBump versions to 6.0.2-SNAPSHOT 50/102150/1
Robert Varga [Thu, 18 Aug 2022 13:59:11 +0000 (15:59 +0200)]
Bump versions to 6.0.2-SNAPSHOT

This starts the next development iteration.

Change-Id: I313fd43923f2f8c82aaf8d999846e7c98a1e81d0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
20 months agoBump upstreams 48/102148/1
Robert Varga [Thu, 18 Aug 2022 11:01:35 +0000 (13:01 +0200)]
Bump upstreams

Adopt:
- odlparent-11.0.1
- yangtools-9.0.1
- mdsal-10.0.1

Change-Id: I63b6d252955e9397dd9283fd37522046eabf7036
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
21 months agoUse FrameworkUtil.asDictionary() 08/101808/1
Robert Varga [Mon, 11 Jul 2022 21:25:38 +0000 (23:25 +0200)]
Use FrameworkUtil.asDictionary()

We do not need a Hashtable, use FrameworkUtil to give us what we need.

Change-Id: I50099a7b8f036d7f7f8af467242005e74b48d89d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
21 months agoBump versions to 6.0.1-SNAPSHOT 31/101631/1
Robert Varga [Mon, 27 Jun 2022 11:55:25 +0000 (13:55 +0200)]
Bump versions to 6.0.1-SNAPSHOT

This starts the next development iteration.

Change-Id: If243be33db2568b59ceee22084e1abf19d95dae0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
21 months agoUse mdsal-10.0.0 29/101629/1
Robert Varga [Mon, 27 Jun 2022 11:07:30 +0000 (13:07 +0200)]
Use mdsal-10.0.0

Use released artifacts instead of snapshots.

Change-Id: Ia6f4c28001d19449ee47c62a5754f6966103e4ea
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
21 months agoUse yangtools-9.0.0 13/101613/1
Robert Varga [Mon, 20 Jun 2022 17:25:28 +0000 (19:25 +0200)]
Use yangtools-9.0.0

We have a release available, use that instead of snapshots.

Change-Id: I845de0908448e1e8dbceda3f5700d090226d0fb3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
22 months agoFix a documentation reference 84/101484/1
Robert Varga [Tue, 7 Jun 2022 09:06:24 +0000 (11:06 +0200)]
Fix a documentation reference

We do not use ConstructorProperties, fix the reference.

Change-Id: I3fed8217367ce3948fa561bdf4b00a4e99087c07
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
22 months agoFixup javadoc build 82/101482/1
Robert Varga [Tue, 7 Jun 2022 07:33:46 +0000 (09:33 +0200)]
Fixup javadoc build

javadoc-3.4.0 has problems with scala-parser-combinators, as it cannot
derive its module name. Fix this by downgrading javadoc plugin version
for now.

Change-Id: Ica9274e2afc50306c1620e9f32efc5d7371a7c2b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
22 months agoAdd an automatic module name for repackaged akka 79/101479/2
Robert Varga [Mon, 6 Jun 2022 17:43:27 +0000 (19:43 +0200)]
Add an automatic module name for repackaged akka

We need to be referencing this artifact, let's make sure it has a proper
JPMS name.

Change-Id: Idb6981a5e550bb1572600b317789cf23922897c2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
22 months agoDrop unused cds-dom-api dependencies 80/101480/2
Robert Varga [Mon, 6 Jun 2022 17:51:00 +0000 (19:51 +0200)]
Drop unused cds-dom-api dependencies

We have two dependencies which are not used, one of which is causing
problems to our build. Fix them up.

Change-Id: I10505acc6649a699ebd78cd761df8f71de208b39
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
22 months agoUse odlparent-11.0.0 release 74/101474/5
Robert Varga [Mon, 6 Jun 2022 14:44:46 +0000 (16:44 +0200)]
Use odlparent-11.0.0 release

We have released artifacts, use them instead of snapshots.

Change-Id: I4cad35236149feca2ed18bd2ae40a6bdfcf350a6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
22 months agoUpdate javadoc links 73/101473/5
Robert Varga [Mon, 6 Jun 2022 14:43:59 +0000 (16:43 +0200)]
Update javadoc links

We have slightly updated versions, fix links to them.

Change-Id: Ib849b18dafe7f6e491cde8ac209df3cac1795a3b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
22 months agoModernize AutoCloseableEventExecutor 95/101395/3
Robert Varga [Tue, 31 May 2022 21:47:23 +0000 (23:47 +0200)]
Modernize AutoCloseableEventExecutor

Remove unneeded indirection through a class, so that we can eliminate
a suppression.

Change-Id: I52710d8a85a2081afe4b325d57acef70d434acce
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
22 months agoCleanup sal-distributed-datastore dependencies 23/101423/1
Robert Varga [Wed, 1 Jun 2022 21:31:54 +0000 (23:31 +0200)]
Cleanup sal-distributed-datastore dependencies

We have quite a few warnings here, fix some of those up.

Change-Id: I99da5099c006d8af8d6622bb15d0881763b03965
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
22 months agoSwitch to jakarta.annotation-api 22/101422/1
Robert Varga [Wed, 1 Jun 2022 20:24:21 +0000 (22:24 +0200)]
Switch to jakarta.annotation-api

odlparent has switched to a more modern version, follow it.

Change-Id: Ia17c4d91a5e6e5da6d327ccaa96e41bbd629a8de
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
22 months agoMore pattern matching 11/101311/1
Robert Varga [Thu, 26 May 2022 20:51:47 +0000 (22:51 +0200)]
More pattern matching

Remove mulitple casts in favor of instanceof pattern match.

Change-Id: I301a00ec98127c2e5f6ae2326d95fd68c8e31ad0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
22 months agoAdd Payload.serializedSize() 11/101211/9
Robert Varga [Wed, 18 May 2022 07:15:22 +0000 (09:15 +0200)]
Add Payload.serializedSize()

There is a rather big difference in payload sizing when we consider
how big an entry is: in-memory size can easily be "zero", which can
translate to a serialized size of hundreds of bytes. This difference
is problematic, as we use the former to estimate how many payloads
we can squeeze in AppendEntries and we compare that to the configured
payload limit. Even when there is some (32KiB by default) cushion, we
can end up blowing past the frame size.

Add Payload.serializedSize(), which should provide a semi-conservative
estimate of serialized size and use that to select the cut-off.

Also improve SimpleReplicatedLogEntry's estimates by performing a a
quick serialization operation -- which reduces potential waste for each
entry by 294 bytes, as our hard-coded estimate of 400 bytes was way too
conservative.

JIRA: CONTROLLER-2037
Change-Id: I5abe7d00db9e10f1c66e6db0f7c82854f9aa352d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
22 months agoAdd a missing @Override annotation 06/101306/1
Robert Varga [Thu, 26 May 2022 17:12:25 +0000 (19:12 +0200)]
Add a missing @Override annotation

writeReplace() is specified by payload, make sure we mark it as such.

JIRA: CONTROLLER-2037
Change-Id: I21902a859563baf990e8bb8513281516d099c619
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
22 months agoFix raw type warnings in OSGiDistributedDataStore 05/101305/1
Robert Varga [Thu, 26 May 2022 17:05:52 +0000 (19:05 +0200)]
Fix raw type warnings in OSGiDistributedDataStore

Component{Factory,Instance} are now properly generic, specify arguments
pointing to OSGiDOMStore.

Change-Id: I4593b18df88302f933647ed09818633d76efca41
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
23 months agoMake Payload Serializable 10/101210/3
Robert Varga [Fri, 13 May 2022 12:52:16 +0000 (14:52 +0200)]
Make Payload Serializable

All payloads are serialized via Java serialization, which is not great,
but needs to be expressed in the API contract. Also codify that each
payload needs to have a serializable proxy.

JIRA: CONTROLLER-2037
Change-Id: I99f146413e42af68bb33b942c2222c091a87cf3f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
23 months agoMove {Identifiable,Persistent,}Payload 12/101112/7
Robert Varga [Fri, 13 May 2022 12:23:27 +0000 (14:23 +0200)]
Move {Identifiable,Persistent,}Payload

Payloads are really part of raft message specification, not some vague
sal-clustering-commons detail. They have a strong relationship with
AppendEntries and therefore really need to be co-located.

As a first step in dealing with AppendEntries sizing, move Payloads so
we can properly evolve them.

JIRA: CONTROLLER-2037
Change-Id: I069f311b1c1b211b8429a721e6b239e5e08ed813
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
23 months agoUse instanceof pattern 17/101217/1
Robert Varga [Wed, 18 May 2022 09:41:03 +0000 (11:41 +0200)]
Use instanceof pattern

We have a few places where we check-and-cast, use an instanceof pattern
for that.

Change-Id: I6acba1b1b2167e4e81a33efad4621ba5973ca66b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
23 months agoSimplify cutover expression 16/101216/1
Robert Varga [Wed, 18 May 2022 09:39:24 +0000 (11:39 +0200)]
Simplify cutover expression

Rather than having a !(A&&B), use (!A || !B).

Change-Id: I4acd9a3851640f666eccebb81e6e1bab5ea90d84
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
23 months agoChange RTE to an ISE 39/101139/5
Robert Varga [Mon, 16 May 2022 09:03:29 +0000 (11:03 +0200)]
Change RTE to an ISE

SpotBugs does not like our throwuign a plain RuntimeException, throw an
ISE instead.

Change-Id: I1d900144757294df2ebd5b230010cf654372cfcb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
23 months agoDo not use RevisionSourceIdentifier 77/101077/2
Robert Varga [Wed, 11 May 2022 13:48:36 +0000 (15:48 +0200)]
Do not use RevisionSourceIdentifier

We only have a plain SourceIdentifier, adjust codebase to that.

Change-Id: Ib981bb8955c4e29f14e29a8f461daf02616b694a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
23 months agoDitch Google Truth 73/100873/1
Robert Varga [Thu, 28 Apr 2022 17:37:31 +0000 (19:37 +0200)]
Ditch Google Truth

Google Truth is bringing absolutely nothing to the table here, use
baseline JUnit assertions instead.

Change-Id: I777368d1ebeee16a71a73d79839636c9e3fb8e26
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
23 months agoDo not depend directly on mdsal-binding-dom-codec 72/100872/1
Robert Varga [Thu, 28 Apr 2022 17:34:35 +0000 (19:34 +0200)]
Do not depend directly on mdsal-binding-dom-codec

Depend on the API package, not the entire codec.

Change-Id: Ibcb0e8187cbf9bbca179ebe93b25bde56098b24c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
23 months agoFixup version mis-bump 38/100838/1
Robert Varga [Wed, 27 Apr 2022 14:01:39 +0000 (16:01 +0200)]
Fixup version mis-bump

We have missed the config artifacts, bump them to 0.17.0-SNAPSHOT.

Change-Id: I5ac96840f6d567b02679b287c48c44c5550ad3ea
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
23 months agoBump upstreams to snapshots 27/100827/7
Robert Varga [Tue, 26 Apr 2022 19:26:37 +0000 (21:26 +0200)]
Bump upstreams to snapshots

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

Also adjust to identity mapping change by referencing .VALUE instead of
.class.

Change-Id: Idf2e4a845aa20ec029708a174e2787490170a927
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
23 months agoDo not implement concepts.Builder 36/100836/1
Robert Varga [Wed, 27 Apr 2022 09:21:44 +0000 (11:21 +0200)]
Do not implement concepts.Builder

concepts.Builder is going away, do not implement it.

Change-Id: I1f1f8d72965225f4342c52b0602f8266109700a4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
23 months agoBump versions to 6.0.0-SNAPSHOT 26/100826/2
Robert Varga [Tue, 26 Apr 2022 19:24:47 +0000 (21:24 +0200)]
Bump versions to 6.0.0-SNAPSHOT

This starts the next major development iteration.

Change-Id: I83abc669c47abc5142f9cfb41e7a886b651b94c8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
23 months agoImprove SegmentedJournalActor logging 25/100825/2
Robert Varga [Tue, 26 Apr 2022 19:22:58 +0000 (21:22 +0200)]
Improve SegmentedJournalActor logging

Log timing around journal open and each write message. Also include
the number of bytes written in each message, so there is a correlation.

JIRA: CONTROLLER-2043
Change-Id: I27bb6bc6edf0baf4ec0b3ec0d07f6bfd1adf867e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
23 months agoCorrect tracing arguments 24/100824/2
Robert Varga [Tue, 26 Apr 2022 16:21:57 +0000 (18:21 +0200)]
Correct tracing arguments

We have arguments switched around, resulting in a confusing message.
Fix that up.

JIRA: CONTROLLER-2043
Change-Id: I7f99b8665a1790aa9fd9d5607bfb44c69cf2a03d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
23 months agoBump versions to 5.0.4-SNAPSHOT 81/100781/1
Robert Varga [Sun, 24 Apr 2022 19:32:12 +0000 (21:32 +0200)]
Bump versions to 5.0.4-SNAPSHOT

This starts the next development iteration.

Change-Id: I950d01305027fccb4fc70162457d75d6ca8f2f8d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
23 months agoHandle the case when newModification() fails 57/100657/9
Robert Varga [Tue, 19 Apr 2022 20:53:18 +0000 (22:53 +0200)]
Handle the case when newModification() fails

When we are chaining DataTreeModification on top of each other, it is
possible that we have an invalid modification, which fails to apply. In
that case there is nothing we can do, as we cannot establish a baseline.

Handle this case by allocating a specialized modification
implementation, which allows close to no interactions.

JIRA: CONTROLLER-2039
Change-Id: I9b55da7ccc89c9aeae641a049397d2120e292a9c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
23 months agoFail read requests after we have observed a modification failure 65/100765/7
Robert Varga [Sun, 24 Apr 2022 08:16:42 +0000 (10:16 +0200)]
Fail read requests after we have observed a modification failure

A local RW transaction can intercept a modification. If this happens, we
postpone the failure until commit time, but we must not allow further
reads to be satisfied, as they may end up returning incorrect data.

JIRA: CONTROLLER-2041
Change-Id: Ic1bb4c33b786e5926022125be8ee66aebfafee87
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
23 months agoCleanup Local*ProxyTransactionTest 76/100776/2
Robert Varga [Sun, 24 Apr 2022 16:26:06 +0000 (18:26 +0200)]
Cleanup Local*ProxyTransactionTest

Do not use expected exceptions and use static imports for asserts.

Change-Id: Ib7838b36683b9e1d2042f1832272b88a0195cef6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
23 months agoImprove IdentifiablePayload.toString() implementations 75/100775/3
Robert Varga [Sun, 24 Apr 2022 16:01:13 +0000 (18:01 +0200)]
Improve IdentifiablePayload.toString() implementations

We can expose at least the size (and most of the time identity) of the
payload. Let's do that to ease debugging.

JIRA: CONTROLLER-2043
Change-Id: Ia0f1e17ca46de8a9d117d5f8bdb85b246e32be01
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
23 months agoAdd more tracing to DataJournalV0 74/100774/2
Robert Varga [Sun, 24 Apr 2022 14:58:40 +0000 (16:58 +0200)]
Add more tracing to DataJournalV0

We seem to have a problem with completing a specific write, add a few
more traces to try to pin the problem down.

JIRA: CONTROLLER-2043
Change-Id: I9efb37fd40e48ff81c988da7edcb0ae0010f7baf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
23 months agoCompare messages in the log 73/100773/1
Robert Varga [Sun, 24 Apr 2022 13:54:04 +0000 (15:54 +0200)]
Compare messages in the log

Make sure we have the distinction between reordered messages and
messages getting missed.

JIRA: CONTROLLER-2024
Change-Id: If1f65eaa93b71911dcf197f8b053282f6ea0303c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
23 months agoBump atomix to 3.1.12 72/100772/2
Robert Varga [Sun, 24 Apr 2022 12:45:36 +0000 (14:45 +0200)]
Bump atomix to 3.1.12

I could not find any release notes, so all we have is
https://github.com/atomix/atomix/compare/atomix-3.1.5...atomix-3.1.12

Of that only
https://github.com/atomix/atomix/commit/4a65503db2c810df7aa9f9b1dc0aec4debe21380
seems relevant.

Change-Id: Ifdefc9a5c00b1acb3db2e141b0c63fc74ef4513c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
23 months agoRoute {Journal,Snapshot}Protocol messages to DataPersistenceProvider 69/100769/1
Robert Varga [Sun, 24 Apr 2022 11:17:15 +0000 (13:17 +0200)]
Route {Journal,Snapshot}Protocol messages to DataPersistenceProvider

The way we wire our messages ends up being not exactly nice, as the
baseline RaftActor is not cognizant of all persistence operations. This
means it cannot correctly ignore responses to deletion of journal and
snapshot entries -- and hence we get dead letters logged.

Route JournalProtocol and SnapshotProtocol messages to
DataPersistenceProvider, which can then handle them and correctly
tell us whether to log them or not.

JIRA: CONTROLLER-2042
Change-Id: I47b8c3ae67d0a0ea0aad9f0a64e1bb8dc11400fc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
23 months agoImprove AbstractClientConnection nullness guarantees 67/100767/1
Robert Varga [Sun, 24 Apr 2022 08:45:15 +0000 (10:45 +0200)]
Improve AbstractClientConnection nullness guarantees

We have a few missing @NonNull annotations, make sure to add them.
Also remove a superfluous requireNonNull() in copy constructor.

Change-Id: I1bbd46d31856be3ce25483f05eae8e9f2a67370f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
23 months agoDo not use NPE for consistency checks 66/100766/1
Robert Varga [Sun, 24 Apr 2022 08:37:29 +0000 (10:37 +0200)]
Do not use NPE for consistency checks

We are using Preconditions.checkNotNull() when guarding against illegal
state. Improve this by using verifyNotNull(), which results in
VerifyException, making the intent clearer.

Also migrate a verify(foo != null) to a proper verifyNotNull(), using
the resoluting value.

Change-Id: I2689852d396315714f126743b70469ceef75ce45
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
23 months agoClean up unhandled request exceptions 64/100764/1
Robert Varga [Sun, 24 Apr 2022 08:23:22 +0000 (10:23 +0200)]
Clean up unhandled request exceptions

We have a few places which throw the same exception, make sure we
share the formatting and expose the proper control flow to Java.

Change-Id: I514faf987b780de813fe6a1374c5e634e22326a6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
23 months agoEnable tell-based protocol by default in DTO 07/100707/1
Ivan Hrasko [Thu, 21 Apr 2022 14:25:37 +0000 (16:25 +0200)]
Enable tell-based protocol by default in DTO

We have switched to tell-based protocol by default in datastore.cfg
configuration. Reflect that change in DTO DatastoreContext as well.

JIRA: CONTROLLER-2040
Change-Id: I2ed6c287fe7a39415afe49cb45fd485b64208e03
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 years agoImprove LocalProxyTransaction.doExists() 56/100656/1
Robert Varga [Tue, 19 Apr 2022 20:50:22 +0000 (22:50 +0200)]
Improve LocalProxyTransaction.doExists()

We can use immediateBooleanFluentFuture() and skip allocating two
objects.

Change-Id: I11747ddef4fa8e3dbf950b5e1879d2e1ccc395ba
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove FindBugs workaround 55/100655/2
Robert Varga [Tue, 19 Apr 2022 20:15:10 +0000 (22:15 +0200)]
Remove FindBugs workaround

SpotBugs no longer throws a fit on callback's nullness, remove the
workaround. Also do not execute read/exists if there is no callback
-- although there always should be.

Change-Id: I3609d3be076de488f7fa64c72ad3b875e77a633e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoExpose CursorAwareDataTreeSnapshot from local RW proxy 54/100654/1
Robert Varga [Tue, 19 Apr 2022 19:00:44 +0000 (21:00 +0200)]
Expose CursorAwareDataTreeSnapshot from local RW proxy

We can improve type safety a bit by exposing the fact the backing
snapshot supports cursors.

Change-Id: If65549d6a28851c0abd1c8b826e48503ef12860c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump versions to 5.0.3-SNAPSHOT 82/100582/1
Robert Varga [Thu, 14 Apr 2022 09:18:12 +0000 (11:18 +0200)]
Bump versions to 5.0.3-SNAPSHOT

This starts the next development iteration.

Change-Id: I3cf534a6c69bd38fa3a178d9becd61275fefae0f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump to yangtools-8.0.3/mdsal-9.0.2 81/100581/1
Robert Varga [Thu, 14 Apr 2022 09:17:36 +0000 (11:17 +0200)]
Bump to yangtools-8.0.3/mdsal-9.0.2

Pick up fixes from upstream.

Change-Id: I38ff023ba4828e36f5ebb89fed7d6f54db1fdc24
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoImplement scatter/gather on module shards 78/100478/3
Robert Varga [Thu, 7 Apr 2022 15:45:48 +0000 (17:45 +0200)]
Implement scatter/gather on module shards

ClientBackedDatastore does perform module shard root scatter/gather,
hence reads of root end up talking to only the default shard.

Refactor the scatter/gather logic from DistributedDatastore into a
common component and use it for both modes of operation.

JIRA: CONTROLLER-2038
Change-Id: Ib04efab46e36e512eb89606d026fd2082de1b693
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoNormalizedNodeAggregator should also report empty 79/100479/1
Robert Varga [Thu, 7 Apr 2022 20:23:33 +0000 (22:23 +0200)]
NormalizedNodeAggregator should also report empty

DataTree root is always present as of now, which means that even if we
pretend there is no result, the result of aggregation is non-empty.

Fix NormalizedNodeAggregator to check whether there was any operation
applied before running actual transaction.

JIRA: CONTROLLER-2038
Change-Id: Ie7e4625ad2377483d0623d96234bcc77fbba033d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUse ImmutableBiMap builder fluently 76/100476/2
Robert Varga [Thu, 7 Apr 2022 15:16:07 +0000 (17:16 +0200)]
Use ImmutableBiMap builder fluently

We can simply allocate the builder without intermediate local, saving
us an import. Also split the locked update part into a separate method
to aid inlining.

Change-Id: I34b3dffd49c5bd637792c743e9b71e31082201f4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCap shard-snapshot-chunk-size to 480KiB 28/100428/1
Robert Varga [Wed, 6 Apr 2022 06:07:51 +0000 (08:07 +0200)]
Cap shard-snapshot-chunk-size to 480KiB

We have a few places where we are using a default of 2MiB for chunk
size. Bring them down to 480KiB to match datastore.cfg.

JIRA: CONTROLLER-2037
Change-Id: I4dfc4cf3f41acd8c4b782e6450d17f5d5e8bf281
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdd supervisor to EOS singleton actor 57/100357/3
Shibu Vijayakumar [Fri, 1 Apr 2022 18:14:34 +0000 (18:14 +0000)]
Add supervisor to EOS singleton actor

The actor may fail, for example due to AskTimeoutException. This still
needs to be investigated, but mitigate the failure by adding an
OwnerSupervisor to restart it on failure.

JIRA: CONTROLLER-2035
Change-Id: I2dafaa35804357415d9aaa5400372cfd8e54b85b
Signed-off-by: Shibu Vijayakumar <shibu.vijayakumar@infosys.com>
2 years agoBump versions to 5.0.2-SNAPSHOT 62/100262/1
Robert Varga [Fri, 25 Mar 2022 17:31:19 +0000 (18:31 +0100)]
Bump versions to 5.0.2-SNAPSHOT

This starts the next development iteration.

Change-Id: Icae7ce95024658ee30b8672300fa11c40f50f47b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUpdate upstreams 55/100255/1
Robert Varga [Fri, 25 Mar 2022 13:38:39 +0000 (14:38 +0100)]
Update upstreams

Adopt yangtools-8.0.2 and mdsal-9.0.1.

Change-Id: I7d010a073386cd5e9144f92c83d4351058f4b5d2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump akka to 2.6.19 48/100248/1
Robert Varga [Thu, 24 Mar 2022 20:23:11 +0000 (21:23 +0100)]
Bump akka to 2.6.19

https://akka.io/blog/news/2022/03/21/akka-2.6.19-released

Change-Id: Ib53536c127fa0b4b2e6e0d80f5c78828bec1e750
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump versions to 5.0.1-SNAPSHOT 59/100159/1
Robert Varga [Sun, 20 Mar 2022 13:38:34 +0000 (14:38 +0100)]
Bump versions to 5.0.1-SNAPSHOT

This starts the next development iteration.

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