controller.git
2 years agoRelease controller v3.0.15
jenkins-releng [Wed, 19 Jan 2022 11:58:13 +0000 (11:58 +0000)]
Release controller

2 years agoBump upstream versions 77/99377/1
Robert Varga [Wed, 19 Jan 2022 10:23:34 +0000 (11:23 +0100)]
Bump upstream versions

Adopt:
- odlparent 8.1.8
- yangtools 6.0.11
- mdsal 7.0.13

Change-Id: Ib030d74a52f058547d422f4ed07fc076b7a05401
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump akka to 2.6.18 94/99294/1
Robert Varga [Mon, 20 Dec 2021 11:52:55 +0000 (12:52 +0100)]
Bump akka to 2.6.18

https://akka.io/blog/news/2021/12/20/akka-2.6.18-released

JIRA: CONTROLLER-2027
Change-Id: I7ec7581f48610d8d8479e971186a16d6b870ed9c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 6cdbf02bf11ece7ef75e5d4d1982c71c00e8cebf)

2 years agoBump scala-java8-compat_2.13 to 1.0.2 92/99292/1
Robert Varga [Thu, 13 Jan 2022 10:23:18 +0000 (11:23 +0100)]
Bump scala-java8-compat_2.13 to 1.0.2

Akka 2.6.16+ is using version 1.0.0, and they are binary compatible,
let's make sure we align to a newer version as well.

https://github.com/scala/scala-java8-compat/releases/tag/v1.0.0
https://github.com/scala/scala-java8-compat/releases/tag/v1.0.1
https://github.com/scala/scala-java8-compat/releases/tag/v1.0.2

Change-Id: I6c5f21c296dae9ca7236487e460755f0ef3e7622
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 1289583f253ffb7547cd3998650afc6a9124ea7a)

2 years agoBump scala to 2.13.8 87/99287/1
Robert Varga [Thu, 13 Jan 2022 09:29:04 +0000 (10:29 +0100)]
Bump scala to 2.13.8

https://github.com/scala/scala/releases/tag/v2.13.7
https://github.com/scala/scala/releases/tag/v2.13.8

Change-Id: Ifc5ac268e531b10a9920c7a16bfbdbb3de12d611
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit bd4a1f759f4894b595b2569a165931939e61fc50)

2 years agoBump versions to 3.0.15-SNAPSHOT 23/99223/1
Robert Varga [Sun, 9 Jan 2022 12:02:54 +0000 (13:02 +0100)]
Bump versions to 3.0.15-SNAPSHOT

This starts the next development iteration.

Change-Id: I27af4399648b244049efcecf472d865b1a32e303
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump upstream versions 22/99222/1
Robert Varga [Sun, 9 Jan 2022 12:01:31 +0000 (13:01 +0100)]
Bump upstream versions

Adopt:
- odlparent 8.1.6
- yangtools 6.0.10
- mdsal 7.0.12

Change-Id: I854b2a0ba0e29d75a781476be396c78dc1aacd44
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump versions to 3.0.14-SNAPSHOT 55/99155/1
Robert Varga [Fri, 24 Dec 2021 18:56:57 +0000 (19:56 +0100)]
Bump versions to 3.0.14-SNAPSHOT

This starts the next development iteration.

Change-Id: Id70e6273c15142a8ba81335b2e1ba0c194665417
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump upstream versions 54/99154/1
Robert Varga [Fri, 24 Dec 2021 18:01:42 +0000 (19:01 +0100)]
Bump upstream versions

Adopt:
- odlparent 8.1.5
- yangtools 6.0.9
- mdsal 7.0.11

Change-Id: I2a11e401cbbbd25034a9384b446a1d81568bde82
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoHandle ModifyTransactionRequest in forward path 90/98490/1
Robert Varga [Sat, 13 Nov 2021 18:38:08 +0000 (19:38 +0100)]
Handle ModifyTransactionRequest in forward path

When we have remote -> local handoff, we will use a
ModifyTransactionRequest, which we need to apply before moving on.

JIRA: CONTROLLER-2022
Change-Id: I04bdfda162d474966b153223c7480fd5b3af8099
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 920660971adda2a58672596e8ce93ac3c42b40bb)

2 years agoFix error message concatenation 78/98478/1
Robert Varga [Sat, 13 Nov 2021 12:08:56 +0000 (13:08 +0100)]
Fix error message concatenation

We are missing a space here, fix that up.

Change-Id: I2eba64ddcb7db14a56eb65a84d25851e4869ba5a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 94c5a97a4c7e1c2374b88327de205ad91088104e)

2 years agoEnable testTransactionWithIsolatedLeader() for tell-based protocol 77/98477/1
Robert Varga [Sat, 13 Nov 2021 14:47:43 +0000 (15:47 +0100)]
Enable testTransactionWithIsolatedLeader() for tell-based protocol

Behaviour differs between ask-based (which fails) and tell-based (which
continues retrying). Modify the test suite to account for this
difference.

JIRA: CONTROLLER-2018
Change-Id: I208fd8aa8088558dbe2160168ee35182e02c97fa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 7bc006db12e2d24756192309515f3d0bc65442f1)

2 years agoAdd update FIXME to enable test 76/98476/1
Robert Varga [Thu, 11 Nov 2021 06:16:35 +0000 (07:16 +0100)]
Add update FIXME to enable test

Add an explicit reference to the issue tracking enablement of this
test.

JIRA: CONTROLLER-2018
Change-Id: I62fb6377e138cfb00deb0a3fd9093ec13f76dc46
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit f37b08069ae01215fb72e8d85db045c34c0ba6c2)

2 years agoEnable testLeadershipTransferOnShutdown() 40/98440/4
Robert Varga [Thu, 11 Nov 2021 01:01:42 +0000 (02:01 +0100)]
Enable testLeadershipTransferOnShutdown()

We are looking at cohort caches here -- and those are not used by
ClientBackedDatastore.

Change-Id: I3abfa3299d8222df6edfa98cc4a3d108a05454e4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 09d76ff670a3d54dac595336b9fe3151b793d630)

2 years agoTrack skipped transactions 39/98439/4
Robert Varga [Tue, 12 Nov 2019 22:50:34 +0000 (23:50 +0100)]
Track skipped transactions

We are allocating transaction identifiers which are shared across
shards. As a transaction can touch only some shards, non-participating
shards will never see the transaction ID, leading to holes in their
UnsignedLongSets -- and those holes gradually eat up more and more
memory.

Track when we have such a hole and lazily forward a new request, which
purges one or more such identifiers -- plugging the memory leak.

The crux of the machinery is exchanging state between ProxyHistory
and FrontendHistoryMetadataBuilder.

JIRA: CONTROLLER-1991
Change-Id: I3817fa2841e5f9c405bb20ff1a104537ad459ce3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit c7078128d6f35eebee2f98108ff929dcccfc322d)

2 years agoMinor sal-distributed-datastore cleanups 38/98438/3
Robert Varga [Sun, 7 Nov 2021 00:19:18 +0000 (01:19 +0100)]
Minor sal-distributed-datastore cleanups

Corrent a @GuardedBy annotations, add @NonNull annotations, fix javadocs
and make a few methods final.

Change-Id: Icb93aae229fb0aece5ece223a759ce9f36ee0297
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 27e0cf91aaba3d2a9f9e3f33e31f0faece502cd4)

2 years agoHandle SnapshotComplete message 83/98083/1
Robert Varga [Thu, 11 Nov 2021 07:38:58 +0000 (08:38 +0100)]
Handle SnapshotComplete message

This is an internally-generated message, make sure we handle it in
support to indicate when we have finished completely propagating
state.

JIRA: CONTROLLER-2019
Change-Id: I4f5c5231070140d54531c2e5379dffcaf1c5c4ee
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit e131c3498d286ff14890120ff5e9020ba89f10f9)

2 years agoDisable state tracking on ReadyLocalTransaction 35/98435/1
Robert Varga [Thu, 11 Nov 2021 08:22:08 +0000 (09:22 +0100)]
Disable state tracking on ReadyLocalTransaction

We are failing to recognize ReadyLocalTransaction as an ask-based
message, leading to us populating state.

JIRA: CONTROLLER-2021
Change-Id: I48b3c57e11430a5ca15e0559f2a8e13627f4bab1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 35b5462f1ebde45b569664af28199acb437a28d9)

2 years agoRename UnsignedLongSet.size() 14/98414/5
Robert Varga [Wed, 10 Nov 2021 21:05:44 +0000 (22:05 +0100)]
Rename UnsignedLongSet.size()

Since we have 'Set' in our name, size() invokes Set.size(), which is
not we provide w.r.t. the number of distinct elements that are contained
in the set.

We are communicating how many ranges are stored, hence the method's name
is 'rangeSize()'.

Change-Id: Iaf9999db86fe03a8e753107638fc2e189b680677
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit a2779b483b7f4696d6c0f4973e2e392e870e03ed)

2 years agoMove assumption 29/98429/1
Robert Varga [Thu, 11 Nov 2021 01:00:13 +0000 (02:00 +0100)]
Move assumption

Let's assume things only just before we are hitting and error and tag
the FIXME with an issue.

JIRA: CONTROLLER-2017
Change-Id: I114ff0f3ef2e72fdc1be5e8eb61adac8ed00ff42
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit e8c92cf0ebc968dc37dd549f3eefbd9b09567c4f)

2 years agoFixup assertions a bit 28/98428/1
Robert Varga [Wed, 10 Nov 2021 12:52:15 +0000 (13:52 +0100)]
Fixup assertions a bit

The tests are using different transaction mix, pass down explicit
expected transaction count.

Change-Id: I5007fe0ad90009fcafb727bac8d37bd07dfaae94
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 07efe2f14bac8054dddca07b8d9b75238a0e14cd)

2 years agoImprove tell-based protocol assumptions 27/98427/1
Robert Varga [Wed, 10 Nov 2021 11:34:30 +0000 (12:34 +0100)]
Improve tell-based protocol assumptions

Make failures a bit more visible by comparing human-readable things.

Change-Id: I682c020be348c61fcdf4c3f31949ba0f666af020
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 8e4ea1b1109f2c4bf167cd2cca2a7ffe2e1f7b73)

2 years agoCleanup DistributedDataStoreRemotingIntegrationTest 26/98426/1
Robert Varga [Wed, 10 Nov 2021 06:33:12 +0000 (07:33 +0100)]
Cleanup DistributedDataStoreRemotingIntegrationTest

We have a few @Ignored tests and assumptions scattered a bit, perform
a general cleanup on them.

JIRA: CONTROLLER-1991
Change-Id: I70054276b5ffa179337a302e5d2498e925b65ce8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 4e097d8d56a7e3814c63a69da183765fd4c78a56)

2 years agoPartially enable testSingleTransactionsWritesInQuickSuccession() 24/98424/3
Robert Varga [Tue, 9 Nov 2021 20:02:31 +0000 (21:02 +0100)]
Partially enable testSingleTransactionsWritesInQuickSuccession()

Split the asserts into two methods, asserting the two datastore
options. The ask-based path remains disabled because it currently
fails tests.

Also improve tell-based protocol assertions, which need to wait
for the purge process to settle.

Change-Id: I8b2f3d84b2c7cd01dec4f7994eda716d022a98aa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 9503012683559849cd2f01b882b57fdcbcca59f0)

2 years agoMake UnsignedLongSet.Entry immutable 13/98413/1
Robert Varga [Wed, 10 Nov 2021 19:44:05 +0000 (20:44 +0100)]
Make UnsignedLongSet.Entry immutable

Having entries mutable is just a drag when transferring them to
mutable, as we need to perform deep copies. Let's turn them into
immutables and be done with it.

JIRA: CONTROLLER-2015
Change-Id: I3be807cbdf71a51e6b9506e0932857a230924986
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 245165804cb8c11340fa5b225e5cccbe32c01337)

2 years agoFix UnsignedLongSet entry lifecycle 12/98412/1
Robert Varga [Wed, 10 Nov 2021 17:51:05 +0000 (18:51 +0100)]
Fix UnsignedLongSet entry lifecycle

When we are copying things around, we have to ensure we copy Entries,
because they cannot be shared.

JIRA: CONTROLLER-2015
Change-Id: I8a484a3bf52ffeaf4f4d0e770bc77dba31dbb221
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 1a13d6e1410df52e3b8fd9d4fe6b6e7b04490e4a)

2 years agoFix Eclipse compilation error 11/98411/1
Robert Varga [Wed, 10 Nov 2021 13:43:58 +0000 (14:43 +0100)]
Fix Eclipse compilation error

JDT has trouble with Scala classes here, make sure we specify
more general scala.collections.Set instead of its immutable counterpart.

Change-Id: I60b56e6b7ec5705409aee8d1e30a8ae9e5579bfb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 25e140045dd07b173278460f20e17bd2c704e806)

2 years agoCleanup ShardInformation 10/98410/1
Robert Varga [Wed, 10 Nov 2021 10:12:33 +0000 (11:12 +0100)]
Cleanup ShardInformation

Drop unneeded 'this.' qualifiers and use a simple return expression
in getSerializedLeaderActor().

Change-Id: I9a11410f8bc6d8246bacf99fa86c42de85c328ae
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 91de24b1731af5882873391b27eae90956814fc2)

2 years agoCleanup ShardWriteTransaction 09/98409/1
Robert Varga [Wed, 10 Nov 2021 10:10:52 +0000 (11:10 +0100)]
Cleanup ShardWriteTransaction

A few arguments can be made final and an if/else block can be
simplified.

Change-Id: Ib5464482b4e4cc1d73f755b4b467470fc3b2af25
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit a213231082af487d8b65ea3d411cd029e48b34fa)

2 years agoExpose ImmutableList from FrontendClientMetadata 08/98408/1
Robert Varga [Tue, 9 Nov 2021 18:48:16 +0000 (19:48 +0100)]
Expose ImmutableList from FrontendClientMetadata

ImmutableList is an API contract, exposed it to callers.

Change-Id: I7fb2a09c2b225ce48ece7400128c8215d70292fe
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit bf54edf4eb5fffb48e005d07a0a20c8971b77a99)

2 years agoCleanup cds-access-api dependencies 07/98407/1
Robert Varga [Tue, 9 Nov 2021 18:31:28 +0000 (19:31 +0100)]
Cleanup cds-access-api dependencies

We are using Guava, declare that as a dependency.

Change-Id: Ibe905f0d2d87c5e7dfb4fad598acb27b4323c7b8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 66b01aae92d17af1e06bad0c0e380feb5c6cf2de)

2 years agoAdd MutableUnsignedLongSet.addAll() 06/98406/1
Robert Varga [Tue, 9 Nov 2021 10:23:05 +0000 (11:23 +0100)]
Add MutableUnsignedLongSet.addAll()

Add the ability to merge two UnsignedLongSets. This is useful when
we are using ImmutableUnsignedLongSet as a data interchange format
to communicate changes to a MutableUnsignedLongSet.

JIRA: CONTROLLER-2015
Change-Id: Ia84474b685872586722914f20db8f96a3c172f97
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 824dce54df4b23120461e112574d2ff2effafcf6)

2 years agoAdd UnsignedLongBitmap 05/98405/1
Robert Varga [Sat, 6 Nov 2021 15:04:48 +0000 (16:04 +0100)]
Add UnsignedLongBitmap

Rather than using a ImmutableMap<UnsignedLong, Boolean>, we can do
have a much denser representation with a specialized class. Here we
are introducing an explicit UnsignedLongBitmap, which stores an array
of longs and an array of booleans, ditching the intermediate objects.

Also clean up error reporting, throwing an IOException instead of a
VerifyException when things should go south unexpectedly.

JIRA: CONTROLLER-2013
Change-Id: Ie64da0af68ea2898dc77368afd4fce8abd2cccea
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 3402cfce32b05957219e54754dd7ca5b0a54cd0e)

2 years agoSprinkle @NonNull annotations 04/98404/1
Robert Varga [Mon, 8 Nov 2021 15:50:25 +0000 (16:50 +0100)]
Sprinkle @NonNull annotations

We have a few return methods which could use @NonNull annotations,
sprinkle them around.

Change-Id: I48c0f8879127673eb122321dd6c92d4572098f68
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 26b290518d362a85311c5b5591e3ef72e0772cf2)

2 years agoInline Entry.contains() 64/98364/1
Robert Varga [Mon, 8 Nov 2021 08:22:45 +0000 (09:22 +0100)]
Inline Entry.contains()

MutableUnsignedLongSet.add() has half of the check done in contains()
as an invariant. Inline the second part there, improving performance a
bit.

Thisleaves only UnsignedLongSet.contains() as the sole caller of
Entry.contains(). Inline it there, reducing the footprint a bit.

JIRA: CONTROLLER-2014
Change-Id: Ie38283a1fc46aff8fbc717a23aa9a068805636db
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit a8ebf0b87a2fd613a5b08bd9e295006415f7de27)

2 years agoRemove UnsignedLongSet.addImpl() 63/98363/1
Robert Varga [Mon, 8 Nov 2021 07:49:15 +0000 (08:49 +0100)]
Remove UnsignedLongSet.addImpl()

We now do not share utilities in UnsignedLongSet, hence relocate
implementation code to MutableUnsignedLongSet.add().

JIRA: CONTROLLER-2014
Change-Id: Id1578a8ea639ed512d55b2e6dca26de5abdf3ab0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit ec1d15d2b52cb8f378ff685c2c3400b71c5ec360)

2 years agoImprove UnsignedLongSet efficiency 62/98362/1
Robert Varga [Mon, 8 Nov 2021 07:42:03 +0000 (08:42 +0100)]
Improve UnsignedLongSet efficiency

We can use NavigableMap's higher() and floor() methods to elide object
object allocations.

JIRA: CONTROLLER-2014
Change-Id: I75747c58027caee2678e32187dbd628d60ce6604
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit fb830fa236f32513f759893270552e320c122c5d)

2 years agoUse ImmutableList.Builder in FrontendClientMetadata 13/98313/1
Robert Varga [Sat, 6 Nov 2021 14:20:11 +0000 (15:20 +0100)]
Use ImmutableList.Builder in FrontendClientMetadata

We are performing a defensive copy in constructor, hence it is
better to allocate a builder, skipping an untrusted copy operation.

Change-Id: I95d7aa90f6da325aaae6a340caf49a6e17fe9f64
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 42769c3ac0d99f8fe4f845fed66408ff4dfb2388)

2 years agoUse ImmutableSortedSet for small ImmutableUnsignedLongSets 12/98312/1
Robert Varga [Sat, 6 Nov 2021 13:31:20 +0000 (14:31 +0100)]
Use ImmutableSortedSet for small ImmutableUnsignedLongSets

This adds a bit of indirection, but for a few entries this ends up
using arrays instead of an RB tree, offering better density.

JIRA: CONTROLLER-2012
Change-Id: I09714c6bf3272946f6cee4360f80a106453d0e61
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 318c0bbc4ecfdf532a4cc3e219508a7c5744d160)

2 years agoUse UnsignedLongSet instead of RangeSet in metadata 11/98311/1
Robert Varga [Sat, 6 Nov 2021 10:18:54 +0000 (11:18 +0100)]
Use UnsignedLongSet instead of RangeSet in metadata

Split UnsignedLongSet into two implementations, mutable and immutable.
Use the mutable implementation in runtime tracking of identifiers and
use the immutable implementation for tracking identifiers in metadata.

The serialization format is kept compatible with RangeSets, although
that implies a minor penalty in serdes.

This switch ends up potentially using more objects for small sets, but
that is offset by not having Cut indirections and most notably being
resistent to allocation of huge arrays.

JIRA: CONTROLLER-2011
Change-Id: I0c84ffaaa4ce39299cef9006784b8aff78dd0f83
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit e9efe27538adb5ae575f77fda90f147d46341801)

2 years agoReimplement UnsignedLongRangeSet 08/98308/1
Robert Varga [Sat, 6 Nov 2021 01:15:46 +0000 (02:15 +0100)]
Reimplement UnsignedLongRangeSet

We are tracking simple discrete values, for which a RangeSet is an
overkill due to it being generalized utility working with all possible
ranges.

Reimplement UnsignedLongRangeSet as UnsignedLongSet, tracking discrete
closed ranges of longs, which improves both memory footprint and speed
of contains()/add() operations.

This also spots a failure to disconnect purged histories during
FrontendHistoryMetadataBuilder.toLeaderState().

JIRA: CONTROLLER-1720
Change-Id: I24fae4174201fd133a282f27589d6c274c06c8dc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 19a6bcd20358c883478ee3b82e67cb147113f1c0)

2 years agoImprove Frontend{Client,History}Metadata 06/98306/1
Robert Varga [Sat, 6 Nov 2021 09:20:00 +0000 (10:20 +0100)]
Improve Frontend{Client,History}Metadata

We are using Guava's immutable implementations, make sure we annotate
fields with @NonNull and use concrete types.

Change-Id: I4fc2a0ff39b2b8166deca41425771ea9ed04e469
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit a66474c41883733413a6851d49fb5ade892764b3)

2 years agoSprinkle @NonNull on FrontendClientMetadataBuilder fields 05/98305/1
Robert Varga [Sat, 6 Nov 2021 09:18:02 +0000 (10:18 +0100)]
Sprinkle @NonNull on FrontendClientMetadataBuilder fields

We have two fields which are guaranteed to be @NonNull, mark them as
such, making it clear we comply to getIdentifier() contract.

Change-Id: I9159823fb6c8a4a3c064796cb6752f57d98846c2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 535d499672a88b772ca0b296fa40882f8fd0cf03)

2 years agoCorrect Frontend{Client,History}Metadata deserialization 04/98304/1
Robert Varga [Sat, 6 Nov 2021 09:08:05 +0000 (10:08 +0100)]
Correct Frontend{Client,History}Metadata deserialization

We are turning Range.closedOpen() into Range.closed() during
deserialization, which the resulting ends up also covering the upper
bound, which it should not.

JIRA: CONTROLLER-1942
Change-Id: Ib8f9016e2eddcf014ff5e451ac82cd77b66d7019
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 546cd1fd100dbaa36908b22c2f422320dbd8c4b2)

2 years agoCorrect annotations 03/98303/1
Robert Varga [Fri, 5 Nov 2021 10:25:41 +0000 (11:25 +0100)]
Correct annotations

Correct @GuardedBy vs @Holding and add @NonNull annotations.

Change-Id: I2142b1c5910f2388e8f30a04f7ff8bc8237dde26
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit d502ae8e1529b69af55a59c3e664a02457c05ec6)

2 years agoBump versions to 3.0.13-SNAPSHOT 21/98021/1
Robert Varga [Thu, 21 Oct 2021 07:47:03 +0000 (09:47 +0200)]
Bump versions to 3.0.13-SNAPSHOT

This starts the next development iteration.

Change-Id: Ie7b5ff764ab17a8a72714d4bc7cb4370e7e27ac2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRevert parts of 6c0f2e3d6b25fe5c87aa51f1ed967c5fd290c808 20/98020/1
Robert Varga [Thu, 21 Oct 2021 07:05:55 +0000 (09:05 +0200)]
Revert parts of 6c0f2e3d6b25fe5c87aa51f1ed967c5fd290c808

Version bump accidentally also enabled artery, disable it again.

JIRA: CONTROLLER-2007
Change-Id: Ia0ab9257d779f8ee7558786e4e027035865d08e0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump versions to 3.0.12-SNAPSHOT 08/98008/1
Robert Varga [Wed, 20 Oct 2021 17:48:26 +0000 (19:48 +0200)]
Bump versions to 3.0.12-SNAPSHOT

This starts the next development iteration.

Change-Id: Ie883c8bd2e5e31a39af5dc456efca440bf16dfbe
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump to akka-2.6.17 05/98005/1
Robert Varga [Fri, 15 Oct 2021 11:41:34 +0000 (13:41 +0200)]
Bump to akka-2.6.17

https://akka.io/blog/news/2021/10/15/akka-2.6.17-released

Change-Id: I4183b02b42fb3dcda599ba77c73d26832fabea7b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 3b3733ab6cd51e95079b7a4b814aa5f6a49e75f5)

2 years agoBump akka to 2.6.16 04/98004/1
Robert Varga [Wed, 24 Feb 2021 09:05:26 +0000 (10:05 +0100)]
Bump akka to 2.6.16

https://akka.io/blog/news/2021/02/23/akka-2.6.13-released
https://akka.io/blog/news/2021/04/08/akka-2.6.14-released
https://akka.io/blog/news/2021/06/10/akka-2.6.15-released
https://akka.io/blog/news/2021/08/19/akka-2.6.16-released

Change-Id: I6d255bd6d2b4b1284bb6c7d8ccae4ec44a691556
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
(cherry picked from commit e2c835865f5c6534758d2bfd0451efef1545a98f)

2 years agoBump upstream versions 03/98003/1
Robert Varga [Wed, 20 Oct 2021 14:53:34 +0000 (16:53 +0200)]
Bump upstream versions

Adopt following upstreams:
- odlparent-8.1.4
- yangtools-6.0.8
- mdsal-7.0.9

Change-Id: I550796f95cc49ba66d86c9834025443d1462a334
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump Scala to 2.13.6 05/97905/1
Robert Varga [Fri, 15 Oct 2021 11:39:23 +0000 (13:39 +0200)]
Bump Scala to 2.13.6

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

Change-Id: I6fba6c4d7856446d54cb016ec3a93f4976375a0a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit fb9cb91d371f7bbd0ff2e199673ce61b64d16b19)

2 years agoUse URLEncoder.encode(String, Charset) 21/97721/1
Robert Varga [Tue, 21 Sep 2021 20:10:37 +0000 (22:10 +0200)]
Use URLEncoder.encode(String, Charset)

We are running with Java 11 and as Modernizer correctly points out, we
can use direct charset variant which was introduced with Java 10. This
cuts down a tiny bit of dead code.

Change-Id: I7c42984bc1e05e94f5266f26e13aaab650ae4f70
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 02215a58e5c9ebe4624e6ca2103b00a796fcd5f7)

2 years agoBump versions to 3.0.11-SNAPSHOT 67/97167/1
Robert Varga [Wed, 11 Aug 2021 15:14:41 +0000 (17:14 +0200)]
Bump versions to 3.0.11-SNAPSHOT

This starts the next development iteration.

Change-Id: Id95704bbf39ad80768f6df37fec6c14e9fb0fe9a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump mdsal to 7.0.9 66/97166/1
Robert Varga [Wed, 11 Aug 2021 15:14:00 +0000 (17:14 +0200)]
Bump mdsal to 7.0.9

Pick up latest fixes from upstream.

Change-Id: Ib850282bfe0cfd8cf5dea2896332225cd2087585
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoIgnore DataTreeChangeReply message 21/96621/1
Robert Varga [Tue, 13 Jul 2021 11:31:26 +0000 (13:31 +0200)]
Ignore DataTreeChangeReply message

DataTreeChangeListenerActor is sending replies towards shard on each
processed datatree change. This is not handled by Shard, which ends up
flooding dead letters.

Make sure we ignore these messages, so that the logs are cleaner. Also
speed up the non-null check in DTCLActor.

JIRA: CONTROLLER-1986
Change-Id: I11b172d778c5b8cdf16aec58e77ec7faa9b6b146
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit d6bc529eaf624afe74d9bf9ee9ab0cb926bba576)

2 years agoBump versions to 3.0.10-SNAPSHOT 28/96828/1
Robert Varga [Wed, 7 Jul 2021 21:50:05 +0000 (23:50 +0200)]
Bump versions to 3.0.10-SNAPSHOT

This start the next development iteration.

Change-Id: I9bdeb286b18b35da531cfc6f6eb3093c61260b54
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump upstream versions 22/96822/1
Robert Varga [Wed, 7 Jul 2021 12:52:59 +0000 (14:52 +0200)]
Bump upstream versions

Adopt following upstreams:
- odlparent-8.1.3
- yangtools-6.0.7
- mdsal-7.0.8

Change-Id: I6ea0e2142dfda71be1ec1e3017b1b1cb0173af44
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix sal-common-util dependencies 12/96612/1
Robert Varga [Thu, 1 Jul 2021 07:40:45 +0000 (09:40 +0200)]
Fix sal-common-util dependencies

We have a number of unused dependencies here, clean them up.

Change-Id: Ibc534ab9ba28a7e70270a042a1b8e55f8934bc28
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 7adae02ae943d3d537dafcda1f10877ab5040ea2)

2 years agoUpgrade lz4-java to 1.8.0 10/96610/1
Robert Varga [Tue, 29 Jun 2021 08:47:28 +0000 (10:47 +0200)]
Upgrade lz4-java to 1.8.0

https://github.com/lz4/lz4-java/releases/tag/1.8.0

Change-Id: Ica9bc96f8db76cb8dd8eda19264f72bfb1ea674c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 47de86692709658b4495d2566c91e7a61d62de91)

2 years agoCorrectly forward DOMDataTreeChangeListener.onInitialData() 08/96608/1
Robert Varga [Fri, 25 Jun 2021 12:13:25 +0000 (14:13 +0200)]
Correctly forward DOMDataTreeChangeListener.onInitialData()

When registering proxy listener, make sure we do not lose
onInitialData() events.

Change-Id: I2529d64d10f477ad52e90dec15d88c6228a47af0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit d33f2a4667e423fcbff25454f28412a5b3d01a42)

2 years agoBump versions to 3.0.9-SNAPSHOT 20/96020/1
Robert Varga [Fri, 7 May 2021 11:16:03 +0000 (13:16 +0200)]
Bump versions to 3.0.9-SNAPSHOT

This starts the next development iteration.

Change-Id: Ic59562a4c6e9b4f4dd2f293d9cda7439e4919476
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUse correct failure detector for akka clustering 17/96017/1
Oleksii Mozghovyi [Fri, 26 Mar 2021 22:21:41 +0000 (00:21 +0200)]
Use correct failure detector for akka clustering

Since we are not using classic remoting, we need to use proper
tuning for clustering's failure-detector. Correct the template
to reflect that.

Change-Id: I4bff994b786237778df5bdfb83df858b00b549ed
Signed-off-by: Oleksii Mozghovyi <oleksii.mozghovyi@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 1b2f032084fc334f1027524afe40c608706c56e3)

2 years agoSwitch to Akka Artery 16/96016/1
Kostiantyn Nosach [Thu, 4 Mar 2021 11:15:32 +0000 (13:15 +0200)]
Switch to Akka Artery

The migration away from legacy akka remoting to artery tcp.

JIRA: CONTROLLER-1968
Change-Id: Iac1a0186292eb5a303cf075e540f3f6c8c09a932
Signed-off-by: Kostiantyn Nosach <kostiantyn.nosach@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 229c55fbdc5907129c9c35b3e98963b5fa2528f0)

2 years agoUse memory-mapped segmented journal by default 14/96014/3
Robert Varga [Tue, 23 Feb 2021 16:38:39 +0000 (17:38 +0100)]
Use memory-mapped segmented journal by default

Segmented file implementation requires a buffer double the size
of the file's maximum size. This ends up being allocated on-healp, which
is wasteful from effeciency perspective. Switch default configuration
so that it uses memory-mapped files instead.

JIRA: CONTROLLER-1954
Change-Id: Icad9ef74c50467323e31567828a949c0cae52a9e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump upstream versions 13/96013/2
Robert Varga [Thu, 6 May 2021 11:40:23 +0000 (13:40 +0200)]
Bump upstream versions

Adopt following upstreams:
- odlparent-8.1.2
- yangtools-6.0.6
- mdsal-7.0.7

Change-Id: Ib033f4b8a52ff18e2050d9755d7d1d461a6fd617
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoMigrate javax.inject references 93/95993/1
Robert Varga [Wed, 5 May 2021 09:26:42 +0000 (11:26 +0200)]
Migrate javax.inject references

Use GuicedEE reference instead of the old javax.inject jar.

Change-Id: Id54d90aee20f967a013c90c1be39437ad5abc97e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit f871ca61aa4554d35fc7ecd32ce7afca4e0dc169)

2 years agoMigrate osgi.core reference 92/95992/1
Robert Varga [Wed, 5 May 2021 09:24:52 +0000 (11:24 +0200)]
Migrate osgi.core reference

OSGi core artifact was renamed for Release 7, update references to
eliminate dependency on OSGi R6.

Change-Id: I1e51f5bd82e15e3cefb7dad637e0e771abcefcea
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 0539878063506ceba2a165869f5651f29437a47c)

3 years agoDeprecate DOMDataTreeProducer-related classes 61/95161/6
Robert Varga [Sun, 14 Feb 2021 09:00:07 +0000 (10:00 +0100)]
Deprecate DOMDataTreeProducer-related classes

DOMDataTreeProducer is being removed by upstream, deprecate our
constructs relying on it.

JIRA: CONTROLLER-1976
Change-Id: Ib1d6d84a2023bdb9964b6fa2d337924a7359e459
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoClean up use of MockitoAnnotations.initMocks 31/95531/2
Robert Varga [Fri, 19 Mar 2021 08:26:28 +0000 (09:26 +0100)]
Clean up use of MockitoAnnotations.initMocks

Using MockitoAnnotations.initMocks() is deprecated, use JUnitRunner
in cds-access-client and sal-clustering-commons.

Change-Id: I10b52bfd0a989f722538e3983352c4465f918950
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMigrate sal-akka-raft tests 27/95427/2
Robert Varga [Tue, 9 Mar 2021 04:49:48 +0000 (05:49 +0100)]
Migrate sal-akka-raft tests

Do not use MockitoAnnotations.initMocks() and modernize collection
handling.

Change-Id: I2770ae6ff68a60cc4800e718fa8e42acbbfbff8f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump versions to 3.0.8-SNAPSHOT 61/95361/1
Robert Varga [Thu, 25 Feb 2021 16:08:43 +0000 (17:08 +0100)]
Bump versions to 3.0.8-SNAPSHOT

This starts the next development iteration.

Change-Id: I0fb33bade8ed75fe5e38ef2c14c0e628a2664d40
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump upstream versions 60/95360/1
Robert Varga [Thu, 25 Feb 2021 00:50:28 +0000 (01:50 +0100)]
Bump upstream versions

Adopt following upstreams:
- odlparent-8.1.1
- yangtools-6.0.5
- mdsal-7.0.6

Change-Id: I099a92b96385ac8a3669e42ec5174b9cdd4b05cc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump Scala to 2.13.5 10/95310/1
Robert Varga [Tue, 23 Feb 2021 09:55:44 +0000 (10:55 +0100)]
Bump Scala to 2.13.5

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

Change-Id: I77c156f84b52f7c7b8763e4fe1c97527c1dfc6f7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoDeprecate messagebus for removal 30/95230/1
Robert Varga [Fri, 19 Feb 2021 06:43:50 +0000 (07:43 +0100)]
Deprecate messagebus for removal

This component is going away, deprecate it.

JIRA: CONTROLLER-1973
Change-Id: I993cf6311c30b37bc64c9d7dbd244d54c26c8da5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMigrate to new expectTerminated() 28/93028/7
Robert Varga [Mon, 12 Oct 2020 13:34:07 +0000 (15:34 +0200)]
Migrate to new expectTerminated()

There is a new overload which takex java.time.Duration.

Change-Id: I21568e7dc893ea695b99313b1f1869978fc9a654
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump versions to 3.0.7-SNAPSHOT 30/95030/1
Robert Varga [Fri, 5 Feb 2021 06:03:47 +0000 (07:03 +0100)]
Bump versions to 3.0.7-SNAPSHOT

This starts the next development iteration.

Change-Id: I4f6988859d555060be1468a78b9abcd307c697fe
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump akka to 2.6.12 26/92926/47
tadei.bilan [Tue, 6 Oct 2020 14:32:36 +0000 (16:32 +0200)]
Bump akka to 2.6.12

Release notes:
https://akka.io/blog/news/2019/11/06/akka-2.6.0-released
https://akka.io/blog/news/2019/12/06/akka-2.6.1-released
https://akka.io/blog/news/2020/01/27/akka-2.6.2-released
https://akka.io/blog/news/2020/01/28/akka-2.6.3-released
https://akka.io/blog/news/2020/03/13/akka-2.6.4-released
https://akka.io/blog/news/2020/04/30/akka-2.6.5-released
https://akka.io/blog/news/2020/06/08/akka-2.6.6-released-split-brain-resolver
https://akka.io/blog/news/2020/07/10/akka-2.6.7-released
https://akka.io/blog/news/2020/07/16/akka-2.6.8-released
https://akka.io/blog/news/2020/09/09/akka-2.6.9-released
https://akka.io/blog/news/2020/10/09/akka-2.6.10-released
https://akka.io/blog/news/2021/01/15/akka-2.6.11-released
https://akka.io/blog/news/2021/01/28/akka-2.6.12-released

JIRA: CONTROLLER-1962
Change-Id: Ibbfc11a8ca27a8c09337bf49de910c38a9239886
Signed-off-by: tadei.bilan <tadei.bilan@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Oleksii Mozghovyi <oleksii.mozghovyi@pantheon.tech>
3 years agoBump versions to 3.0.6-SNAPSHOT 99/94799/3
Robert Varga [Mon, 25 Jan 2021 19:35:57 +0000 (20:35 +0100)]
Bump versions to 3.0.6-SNAPSHOT

This starts the next development iteration.

Change-Id: I24d091b64e7fd17fc923a40058e7bcf8e2217744
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump upstream versions 95/94695/5
Robert Varga [Thu, 21 Jan 2021 15:27:31 +0000 (16:27 +0100)]
Bump upstream versions

Adopt following upstreams:
- odlparent-8.1.0
- yangtools-6.0.4
- mdsal-7.0.5

Change-Id: I97521261a496a6ed47c3250143fe75adfb6f4648
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix docs version parsing 25/94725/2
Robert Varga [Thu, 21 Jan 2021 22:54:28 +0000 (23:54 +0100)]
Fix docs version parsing

We do not want to pick just any <version> tag that comes first,
as that well may be parent/version.

Change-Id: Ic51ca768f42de498dd86f470f839e64a063c1dd4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix modernizer warnings in sal-distributed-eos 97/94697/1
Robert Varga [Thu, 21 Jan 2021 16:08:08 +0000 (17:08 +0100)]
Fix modernizer warnings in sal-distributed-eos

There are just two violations, fix them up and enable enforcement.

Change-Id: I07e38270d0b24fa5ca4a701808e2b20c0b820803
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump versions to 3.0.5-SNAPSHOT 05/94505/1
Robert Varga [Fri, 8 Jan 2021 19:12:47 +0000 (20:12 +0100)]
Bump versions to 3.0.5-SNAPSHOT

This starts the next development iteration.

Change-Id: I700a155f7a1ef06a89bcfb00bfea7d424745b745
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMigrate isFoo() callers 04/94504/1
Robert Varga [Fri, 8 Jan 2021 18:27:22 +0000 (19:27 +0100)]
Migrate isFoo() callers

isFoo() is deprecated for removal, migrate callers to getFoo()
instead.

Change-Id: Ic7d70762ff55e5840654ef6fe17767909bddf91b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump upstream versions 03/94503/1
Robert Varga [Fri, 8 Jan 2021 14:59:30 +0000 (15:59 +0100)]
Bump upstream versions

Adopt:
- odlparent-8.0.3
- yangtools-6.0.3
- mdsal-7.0.4

Change-Id: I2c166ae111d423a76d9ea97ee2e3d0ce11c4b1da
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump versions to 3.0.4-SNAPSHOT 85/94285/2
Robert Varga [Sat, 19 Dec 2020 20:45:27 +0000 (21:45 +0100)]
Bump versions to 3.0.4-SNAPSHOT

This starts the next development iteration.

Change-Id: I2d57e89a9791e6e11e5413a3b3abe695c359f64c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump upstream versions 83/94283/2
Robert Varga [Sat, 19 Dec 2020 12:04:06 +0000 (13:04 +0100)]
Bump upstream versions

Adopt:
- odlparent-8.0.2
- yangtools-6.0.2
- mdsal-7.0.3

Change-Id: Iba37fd205fd3059da8d97fff65eed9e0ee56bcb7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump versions to 3.0.3-SNAPSHOT 91/94091/1
Robert Varga [Mon, 7 Dec 2020 14:49:01 +0000 (15:49 +0100)]
Bump versions to 3.0.3-SNAPSHOT

This starts the next development iteration.

Change-Id: I659290b6799826f90b9aeac4e3d9ae88e5e9b294
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix mdsal-parent reference 90/94090/1
Robert Varga [Mon, 7 Dec 2020 13:47:22 +0000 (14:47 +0100)]
Fix mdsal-parent reference

The relative reference has shifted, preventing a release build
from working. Fix it up.

Change-Id: I0a200c3d32800b26592c69e2d67c88d13164ff16
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix initial datastore configuration 27/93627/8
tadei.bilan [Fri, 6 Nov 2020 14:47:25 +0000 (16:47 +0200)]
Fix initial datastore configuration

Shards need to be initialized with initial configuration upon creation,
otherwise they end up being reconfigured. Make sure callers are aware
of this caveat by requiring explicit properties on instantiation.

JIRA: CONTROLLER-1970
Change-Id: I3d6f96780d26435ac178ec9935f0f67befe3687a
Signed-off-by: tadei.bilan <tadei.bilan@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoEnable modernizer in sal-distributed-datastore 61/93861/3
Robert Varga [Tue, 17 Nov 2020 15:39:31 +0000 (16:39 +0100)]
Enable modernizer in sal-distributed-datastore

We are down to a single offender, suppress it and enable moderinizer
enforcement.

Change-Id: I9daf9f54276c48aac09e999327add7ade92dfc95
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUse java.lang.ref.Cleaner for ClientBackedTransaction 87/93287/7
tadei.bilan [Fri, 23 Oct 2020 11:29:50 +0000 (14:29 +0300)]
Use java.lang.ref.Cleaner for ClientBackedTransaction

Improve temporary file clean up by using a Cleaner to dispatch
cleaning tasks. Since it gives us a Cleanable, we can dispense with
a tracking map and removal from it -- Cleanable makes sure it is
called exactly once.

JIRA: CONTROLLER-1911
Change-Id: I02d2ee57a9fada2c54ba06008b6c28681a709748
Signed-off-by: tadei.bilan <tadei.bilan@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoSpeed up root overwrite check 60/93860/1
Robert Varga [Tue, 17 Nov 2020 14:48:13 +0000 (15:48 +0100)]
Speed up root overwrite check

We can use YangInstanceIdentifier.isEmpty() and extract the single
ModificationType we care about.

Change-Id: Ie29c32ea0b197547bce67a7b2ffdd530e79276da
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUse Objects.requireNonNullElse() 59/93859/1
Robert Varga [Tue, 17 Nov 2020 14:42:04 +0000 (15:42 +0100)]
Use Objects.requireNonNullElse()

Modernizer is pointing this one out, drop the MoreObjects
dependency.

Change-Id: Ibfe3f79dae3b53bc30d130ae68bfab83214ee128
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUse java.lang.ref.Cleaner in controller.cluster.io 86/93286/2
tadei.bilan [Fri, 23 Oct 2020 11:12:06 +0000 (14:12 +0300)]
Use java.lang.ref.Cleaner in controller.cluster.io

Improve temporary file clean up by using a Cleaner to dispatch
cleaning tasks. Since it gives us a Cleanable, we can dispense with
a tracking map and removal from it -- Cleanable makes sure it is
called exactly once.

JIRA: CONTROLLER-1911
Change-Id: I5fb715102912359cf002129d25a7433199826982
Signed-off-by: tadei.bilan <tadei.bilan@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMake cds-mgmt-api a JPMS module 10/93310/5
Robert Varga [Fri, 23 Oct 2020 16:54:51 +0000 (18:54 +0200)]
Make cds-mgmt-api a JPMS module

There is little content here, let's formalize it into a module,
so it plays nice with others.

While we are at it, add explicit @MXBean annotations, so that our
intent is documented beyond naming properties.

JIRA: CONTROLLER-1965
Change-Id: I27cc7070559f1156b0cd1d85916356e3297a49f9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump upstream versions 39/93839/1
Robert Varga [Sun, 15 Nov 2020 21:49:41 +0000 (22:49 +0100)]
Bump upstream versions

Adopt:
- odlparent-8.0.1
- yangtools-6.0.1
- mdsal-7.0.2

Change-Id: I1097eacead9ca43f57f2f602b864762b0c76a3a8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMake sure to clear candidate from memory 65/93565/2
Tomas Cere [Tue, 3 Nov 2020 11:38:04 +0000 (12:38 +0100)]
Make sure to clear candidate from memory

The candidate needs to be cleared even when processing
replicated candidate(ie on a follower) as there is no need
to keep it deserialized in memory

JIRA: CONTROLLER-1928
Change-Id: I1403dbe27def5e0040a8d9f145a92ac06aae9d1e
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
3 years agoDeprecate common.util.Arguments for removal 12/93312/1
Robert Varga [Fri, 23 Oct 2020 17:31:58 +0000 (19:31 +0200)]
Deprecate common.util.Arguments for removal

The method hosted is used only in 6 call sites across all
downstreams. Deprecate it for removal, so they can come up with
a replacement.

Change-Id: Iddfc75ef40710944e8f6e5a420dd0c467d973671
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoDeprecate NoopAutoCloseable for removal 11/93311/1
Robert Varga [Fri, 23 Oct 2020 17:28:51 +0000 (19:28 +0200)]
Deprecate NoopAutoCloseable for removal

This utility is not used here, just in NETCONF, which can brew its
own. Deprecate it for removal.

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