controller.git
6 months agoSimplify DistributedShardFrontendTest assertions 77/88877/2
Robert Varga [Fri, 3 Apr 2020 14:05:20 +0000 (16:05 +0200)]
Simplify DistributedShardFrontendTest assertions

Rather than matching entries in their order, realize that an
entry is need not retain its argument values, and hence can be
expected to apply children in different order.

Change-Id: I8ab97750e593a2f2d548f97075b1ee36c04179c3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 months agoRemove deprecated MD-SAL APIs 36/87936/15
Robert Varga [Fri, 21 Feb 2020 05:41:50 +0000 (06:41 +0100)]
Remove deprecated MD-SAL APIs

The APIs in controller have been deprecated for removal and cannot
sustain an upgrade to Guava-28+. Remove them along with all supporting
implementations.

JIRA: CONTROLLER-1903
Change-Id: I213797b7045cfd7bef744e249614e2b1f6169c1c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 months agoMigrate OSGI compendium reference 48/88848/2
Robert Varga [Thu, 2 Apr 2020 12:24:03 +0000 (14:24 +0200)]
Migrate OSGI compendium reference

OSGi R6 has moved the artifact declaration, make sure we do not use
the R5 one.

Change-Id: If1fcfbdc97fbba1d6ee962a77046a13bdf6da7e2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 months agoFix checkstyle 53/88853/2
Robert Varga [Thu, 2 Apr 2020 12:26:12 +0000 (14:26 +0200)]
Fix checkstyle

Upgraded checkstyle is finding some violations, fix them up.

Change-Id: I7d29834cb38eda40f90fdf04935bef137da843f0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 months agoFixup "Leader should always apply modifications as local" regression 16/87616/4
Tomas Cere [Wed, 12 Feb 2020 12:23:22 +0000 (13:23 +0100)]
Fixup "Leader should always apply modifications as local" regression

This reintroduces the original commit:
 e66759266dc43d5f58b2837aca5047b42c205e4a
and fixes up the two bugs it introduced.

First one didn't account for the fact that the new leader might have not
tracked forwarded transactions from the previous leader which would
be ignored. Previously not tracked transactions are now applied
normally on the new leader.

Second issue was that we started keeping around deserialized
candidates in memory in each CommitTransactionPayload even after they
were applied and no longer needed.During the final use of the
candidate in ShardDataTree the candidate is now clearedduring
CommitTransactionPayload.acquireCandidate() which allows the
deserialized candidate to be cleared by GC.

JIRA: CONTROLLER-1927
JIRA: CONTROLLER-1928
Change-Id: I47876d4d29a8e9b6b9283d70e47108f3dc2ed3ee
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
7 months agoDo not use passive connections 37/88437/1
Robert Varga [Mon, 16 Mar 2020 11:45:48 +0000 (12:45 +0100)]
Do not use passive connections

We are seeing issues with passive connections, pointing towards
switching them off (or migrate to Artery TCP, which is one-way).

As Artery TCP has memory leaks before 2.5.29, opt to disable passive
connections.

Change-Id: Ia9779ad6a7d9d2bc73306d0968e5d22553450fac
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 months agoRemove NormalizedNodeInputOutput and related classes 35/87935/3
Robert Varga [Fri, 21 Feb 2020 05:33:21 +0000 (06:33 +0100)]
Remove NormalizedNodeInputOutput and related classes

This functionality is available from yangtools, remove compatibility
wrappers as they have been deprecated.

JIRA: CONTROLLER-1925
Change-Id: I40be1adb795a6663d647191eeab2f52afb6cbbb1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 months agoExpose more fine-grained shutdown methods 34/87934/2
Robert Varga [Fri, 21 Feb 2020 05:28:55 +0000 (06:28 +0100)]
Expose more fine-grained shutdown methods

We want to the user to be in control of timing of shutdown, expose
appropriate methods to do that.

Change-Id: Id0a787a1b707a3eb6c2909c52023cc5eac3c1402
JIRA: CONTROLLER-1929
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 months agoBump versions by x.y.(z+1) 86/87986/1
jenkins-releng [Sat, 22 Feb 2020 04:30:15 +0000 (04:30 +0000)]
Bump versions by x.y.(z+1)

Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
Change-Id: I4cbd97f4e31c98c1456142f8bbee0bf0c3be1377

8 months agoPropagate TimeoutException when ActorSystem fails to terminate 82/87482/2
Tibor Král [Thu, 6 Feb 2020 11:19:42 +0000 (12:19 +0100)]
Propagate TimeoutException when ActorSystem fails to terminate

ActorSystemProviderImpl waits 10s for the ActorSystem to terminate.
If this timeout is reached propagate the resulting TimeoutException
so the caller knows something went wrong.

JIRA: CONTROLLER-1929
Change-Id: I6518600e2930e3a0a955215b24a9b3074730ff64
Signed-off-by: Tibor Král <tibor.kral@pantheon.tech>
8 months agoRevert "Leader should always apply modifications as local" 52/87452/1
Robert Varga [Wed, 5 Feb 2020 14:13:46 +0000 (15:13 +0100)]
Revert "Leader should always apply modifications as local"

This reverts commit 9b319f491af1c65705b69e8a182aab5006a2f959, which
broke both upgrade-recovery and pre-leader entry application. We
will re-visit the patch and try again.

JIRA: CONTROLLER-1927
JIRA: CONTROLLER-1928
Change-Id: I23e4264cf6a20e9d2369d44005c31db1ef7635c9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
9 months agoCache full datastore context 71/87071/2
Robert Varga [Tue, 21 Jan 2020 22:31:31 +0000 (23:31 +0100)]
Cache full datastore context

While the context is small, it is also invariant across a number of
test cases, each of which is instantiating it. Just share one
instance across all tests to speed them up.

While we are at it, we switch to using EffectiveModelContext to
ease our future migration.

Change-Id: I29a89e93903e7582bde4984828405aa2a8e45c27
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
9 months agoForce pruning during data migration 67/87067/2
Robert Varga [Tue, 21 Jan 2020 13:31:48 +0000 (14:31 +0100)]
Force pruning during data migration

Our current PruningDataTreeModification performs pruning only in
two cases:
1) the root is being written (i.e. Snapshot recovery)
2) DataTree reports a validation issue

This is not sufficient for uint-type migration, as we have to
subject all writes and merges to pruning/translation irrespective
of where they occur.

Split up PruningDataTreeModification into two implementations,
Proactive and Reactive and use them as appropriate based on migration
requirements.

JIRA: CONTROLLER-1923
Change-Id: I4184c56380b7f52a8d7af6f17346f9c5edd31b28
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
9 months agoCleanup PruningDataTreeModification 66/87066/1
Robert Varga [Tue, 21 Jan 2020 13:22:21 +0000 (14:22 +0100)]
Cleanup PruningDataTreeModification

Rename arguments to match API contract, simplify empty
YangInstanceIdentifier checks and do not attempt pruning multiple
times.

JIRA: CONTROLLER-1923
Change-Id: I4c5c8af89116b9c6f7c9dd30f63e32eca94de941
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
9 months agoTranslate uint values for old streams 42/87042/10
Robert Varga [Sun, 19 Jan 2020 12:11:28 +0000 (13:11 +0100)]
Translate uint values for old streams

When we encounter a commit that was produced before Mg, we know
uints are upcasted and hence want to convert values. Same goes
for recovery snapshots.

JIRA: CONTROLLER-1923
Change-Id: Id22830abaf5adc2d9ca7f5d0233409a971cf0c01
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
9 months agoAllow programmatic module sharding configuration 26/85326/12
Tibor Král [Tue, 22 Oct 2019 16:24:21 +0000 (18:24 +0200)]
Allow programmatic module sharding configuration

Adds the option to create Configuration without the need for
module-shards.conf file. Current version only accepts a path
to the module-shards.conf. The file is later loaded and
deserialized into a Config object. This patch provides the
option to pass the Config object directly.

Change-Id: Ibeb666bd5f01d7ae972d26453046c959749a0656
Signed-off-by: Tibor Král <tibor.kral@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
9 months agoExpose stream version used for DataTreeCandidate stream 38/87038/8
Robert Varga [Sun, 19 Jan 2020 10:53:05 +0000 (11:53 +0100)]
Expose stream version used for DataTreeCandidate stream

We need to properly version the payload stream, as it gives us
the view into which version produced it. This allows us to make
proper typing assumptions in normalization (and thus pruning).

JIRA: CONTROLLER-1923
Change-Id: Iaea995a5ac58e1fba2a4199d3355b321cf9fcff3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
9 months agoAdd PathArgument uint adaptation 31/87031/12
Robert Varga [Tue, 17 Dec 2019 11:56:56 +0000 (12:56 +0100)]
Add PathArgument uint adaptation

Legacy uint values may be present in NodeWithValue as well
as NodeIdentifierWithPredicates. Make sure we run the appropriate
adaptation.

JIRA: CONTROLLER-1923
Change-Id: Ib59adb9e596e4d63110cbe9987feeedc61cb05eb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
9 months agoRefactor PruningDataTreeModification instantiation 41/87041/4
Robert Varga [Sun, 19 Jan 2020 11:39:58 +0000 (12:39 +0100)]
Refactor PruningDataTreeModification instantiation

Hiding the pruner works against what we want to do, as we need
to be able to control how pruning works. While we are at it, hide
delegate() so that users are forced to hold on to this invariant.

JIRA: CONTROLLER-1923
Change-Id: Iba78b2fd5f775281bf4bc04f449539d185c94f9c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
9 months agoRework PruningDataTreeModificationTest 37/87037/2
Robert Varga [Sun, 19 Jan 2020 10:20:08 +0000 (11:20 +0100)]
Rework PruningDataTreeModificationTest

Eliminate the use of a dedicated constructor, ensure invariants
are shared across tests.

JIRA: CONTROLLER-1923
Change-Id: Ieaec8bafcb7c2f6bf4fe22815b1b14f84d396ef9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
9 months agoLeader should always apply modifications as local 76/82576/24
Tomas Cere [Tue, 18 Jun 2019 12:54:56 +0000 (14:54 +0200)]
Leader should always apply modifications as local

Normally an entry application is as follows:
1. leader sends an append entry off to persistence and replicates it to
   followers
2. leaders creates its ClientRequestTracker
3. when the entry is done with persistence and replication leader moves its
   commit index
4. part of moving the commit index is sending an ApplyState message which
   finalizes the entry application in the DataTree
5. The ApplyState determines if a ClientRequestTracker is present and adds
   an identifier to the ApplyState message if it is. This determines the way
   in which the finalize of the entry application happens in the DataTree.
   If it is present the entry is applied as if it originated on the leader,
   if it is not present it is applied as if the node is a follower.

The problem is when the leader flaps in a leader -> follower -> leader
transition after 2. and before 4..

This would mean that the new leader no longer has the ClientRequestTracker
which was created in the previous leader state, which means that when it
starts with 5. it will create the ApplyState without an identifier
and the entry finishes up the application as if the node is a follower.

This means that it will be applied without finishCommit which means that
the transaction will be forever stuck in COMMIT_PENDING state until
the node would be restarted.

Change this up, so that the leader will apply modifications as local, even
when it looses its ClientRequestTracker and add Identifiable to payloads
which require it.

Since this code path should never occur when we are candidate, catch this
transition. As ClientRequestTracker becomes an optional entity, we hide that
as well.

JIRA: CONTROLLER-1927
Change-Id: I636f998cd62ec82ef02193261624e4a51275fb86
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
9 months agoBump to odlparent-6.0.4/yangtools-4.0.6/mdsal-5.0.9 94/86994/2
Robert Varga [Thu, 16 Jan 2020 21:02:40 +0000 (22:02 +0100)]
Bump to odlparent-6.0.4/yangtools-4.0.6/mdsal-5.0.9

Pick up latest fixes and upgrades.

Change-Id: I362cc1e6bee6b9d3b6183747188cec24ad005b60
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
9 months agoSplit out sal-distributed-eos 79/86679/7
Robert Varga [Thu, 2 Jan 2020 12:20:37 +0000 (13:20 +0100)]
Split out sal-distributed-eos

This splits out entity ownership implementation from
sal-distributed-datastore. Key point here is that the tie with
CDS is an implementation detail, which is subject to future
revision (for example by using purely raft-based-approach).

JIRA: CONTROLLER-1922
Change-Id: Ia62b0a14991e64424b08e0d4274b0e8eaffdacbd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
9 months agoRefactor AbstractClientHandle a bit 45/85745/10
Robert Varga [Tue, 12 Nov 2019 11:21:13 +0000 (12:21 +0100)]
Refactor AbstractClientHandle a bit

We can pull the proxy creation method down into the subclass,
making it simpler to follow.

Change-Id: I0d025ace708a0646fb0c7dc49fc3f819453b90e5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
9 months agoLower dependency to minimal network topology 21/86721/1
Robert Varga [Sun, 5 Jan 2020 16:53:15 +0000 (17:53 +0100)]
Lower dependency to minimal network topology

Controller does not need topology model extensions, it just needs
the base model. Lower feature dependencies to express that.

Change-Id: I0ccf880420eae05909fc9e2a35223a051bc49a1a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
9 months agoRemove unneeded checkstyle suppression 85/86685/1
Robert Varga [Fri, 3 Jan 2020 12:44:17 +0000 (13:44 +0100)]
Remove unneeded checkstyle suppression

We are not catching anything here, remove the suppression.

Change-Id: If15723f11bc7099d55fc1eaaa9bfa6b86461dae9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
10 months agoRemove jsr173-ri from dependencies 79/86479/1
Robert Varga [Wed, 18 Dec 2019 11:09:46 +0000 (12:09 +0100)]
Remove jsr173-ri from dependencies

JSR173 is part of JRE, hence there is no point to inherit this
dependency. It also helps to have our releases consumable from
Central (which does not carry the .jar).

Change-Id: I3cd50c6f20149e48c1946c0ea50a3a8e57f847b1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
10 months agoUse yang-data-codec-binfmt 25/86425/6
Robert Varga [Sun, 15 Dec 2019 16:41:34 +0000 (17:41 +0100)]
Use yang-data-codec-binfmt

yang-data-codec-binfmt now carries migrated code from sal-clustering-commons,
make sure we use as much as we can, so that we do not duplicate code.

Change-Id: I5d50a63317c2d502c0eb7f71e1e6875cd95d7f9a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
10 months agoRemove unneeded Java 9+ check 56/86456/1
Robert Varga [Tue, 17 Dec 2019 02:47:56 +0000 (03:47 +0100)]
Remove unneeded Java 9+ check

We are running at least on Java 11, hence this check is useless.

Change-Id: I802c80384e652b18ef9ec0586acbface73a2cde4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
10 months agoRemove ARIES-1923 workaround 40/86440/3
Robert Varga [Mon, 16 Dec 2019 21:07:05 +0000 (22:07 +0100)]
Remove ARIES-1923 workaround

We now have proper monkey-patch in place and can therefore remove
this workaround.

Change-Id: I2f4665131953964a1ed64848843e039ccc7015c3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
10 months agoFix mdsal-it-base karaf setup 55/86455/2
Robert Varga [Tue, 17 Dec 2019 02:43:17 +0000 (03:43 +0100)]
Fix mdsal-it-base karaf setup

Since we are setting up a karaf environment, we must make sure
we are not overriding opendaylight-karaf-empty, otherwise we are
not matching distribution (and not picking up its fixes,
to ARIES-1923 for example).

JIRA: ODLPARENT-209
Change-Id: I9f723ee2edd13ee4848e302c572285517a1d552b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
10 months agoBump odlparent/yangtools/mdsal to 6.0.3/4.0.3/5.0.6 62/86362/6
Robert Varga [Wed, 11 Dec 2019 23:48:08 +0000 (00:48 +0100)]
Bump odlparent/yangtools/mdsal to 6.0.3/4.0.3/5.0.6

Pick up the latest upgrades and fixes.

Change-Id: I05d54f6ad7ec934f77f123efaffc9a8a090a6384
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
10 months agoRemove unneeded javassist dependency 12/86412/1
Robert Varga [Thu, 12 Dec 2019 15:32:19 +0000 (16:32 +0100)]
Remove unneeded javassist dependency

The test is not using javassist, let's ditch the declaration.

Change-Id: I9226f2029cc4679f4fee8e126db8735e2e1ecd7d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoBail faster on not found module 77/85977/4
Robert Varga [Tue, 26 Nov 2019 14:31:49 +0000 (15:31 +0100)]
Bail faster on not found module

If we fail to find config for a particular module, we can bail
directly without going through another empty check.

Change-Id: I47dc844d51ecbe1ca3f22fd355532539e07f798b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoSwitch default stream output to Magnesium 95/84695/23
Robert Varga [Wed, 25 Sep 2019 06:16:56 +0000 (08:16 +0200)]
Switch default stream output to Magnesium

This flips the switch and uses Magnesium format for all unversioned
users. Also updates tests to reflect new expected stream sizes.

JIRA: CONTROLLER-1919
Change-Id: I0ed5abe495124b525b7a8c877a3cc7b09f3244ca
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoSwitch current {ABI,DataStore,Payload}Version to Magnesium 10/84710/7
Robert Varga [Wed, 25 Sep 2019 14:29:34 +0000 (16:29 +0200)]
Switch current {ABI,DataStore,Payload}Version to Magnesium

This mass-switches versioned resources to use Magnesium streaming
format. It also updates the hand-written test data to use Uint64
instead of BigInteger, as Magnesium does not support BigIntegers.

JIRA: CONTROLLER-1919
Change-Id: I4734fe3fe0064809fde899ea127e98380c8aacf4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoAllow shard settle timeout to be tuned 41/85741/9
Tibor Král [Mon, 11 Nov 2019 17:23:31 +0000 (18:23 +0100)]
Allow shard settle timeout to be tuned

When we are starting the datastore, we wait up to a fixed number of
election timeout intervals (3) for shards to finish electing a leader.

This is not always enough, especially if recovery takes a long time,
hence introduce shardLeaderElectionTimeoutMultiplier to make this
tunable.

JIRA: CONTROLLER-1914
Change-Id: Iba1d116d0248fc6046aeeae3ec30ecac50f373c9
Signed-off-by: Tibor Král <tibor.kral@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoAdd javadoc links to yangtools-docs and mdsal-docs 78/85878/1
Robert Varga [Wed, 20 Nov 2019 08:14:27 +0000 (09:14 +0100)]
Add javadoc links to yangtools-docs and mdsal-docs

Cross reference controller-docs with upstreams.

Change-Id: I2143d6971b4bf4bceab331e350c7363755b03a4a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoBump to odlparent-6.0.1/yangtools-4.0.2/mdsal-5.0.4 49/85549/1
Robert Varga [Mon, 4 Nov 2019 13:34:56 +0000 (14:34 +0100)]
Bump to odlparent-6.0.1/yangtools-4.0.2/mdsal-5.0.4

This picks up latest upgrades and fixes.

Change-Id: I8db358b0af81394a561071d98bffea168dda47cc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 months agoAllow AbstractClientActor generation to start from non-zero 97/85397/2
Robert Varga [Fri, 25 Oct 2019 13:50:59 +0000 (15:50 +0200)]
Allow AbstractClientActor generation to start from non-zero

This adds the ability to override the initial generation seeded
into persistence. The requested generation is controlled via
system properties on a per-client-type basis:

org.opendaylight.controller.cluster.access.client.initial.generation.datastore-operational = 500

This is useful during bringup of a zombie node, which lost all
of its persistence, for example during recovery from backup.

JIRA: CONTROLLER-1626
Change-Id: If32487fedcb5b6b39551a3359c069df940a6a725
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 months agoAdd the ability to report known connected clients 73/85373/8
Robert Varga [Thu, 24 Oct 2019 11:54:38 +0000 (13:54 +0200)]
Add the ability to report known connected clients

In order to allow from-scratch recovery, we need the ability to
query all existing shards to provide the identifiers of clients
they know about. This patch adds the models to support such a query
as well as implementing it in cluster-admin.

JIRA: CONTROLLER-1626
Change-Id: Id69aeb9021c8111dad10930620c9eaacfccd0d94
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 months agoRemove dependency section from mdsal parent 84/85384/1
Robert Varga [Fri, 25 Oct 2019 07:59:36 +0000 (09:59 +0200)]
Remove dependency section from mdsal parent

This pom acts as an extension to binding parent, it is not a good
idea to also add dependencies here -- each artifact should list
them as needed.

Change-Id: I1524a234043ce334ca1a82f4e72f4fec7acdacbf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 months agoImport scala.concurrent.Future 74/85374/2
Robert Varga [Thu, 24 Oct 2019 15:49:08 +0000 (17:49 +0200)]
Import scala.concurrent.Future

Since we are returning ListenableFuture from RPCs, we can freely
import Scala's Future and shorten references to it.

Change-Id: I77c911fa6d9eca5804547039715f3e57866bafcf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 months agoMigrate Props.create() call sites 71/85371/3
Robert Varga [Thu, 24 Oct 2019 10:58:27 +0000 (12:58 +0200)]
Migrate Props.create() call sites

Props.create() now takes a class identifying the class being
instantiated. Fix callsites to do that.

Change-Id: I4a0169663465b0c1ba62fc87ca13423cf5a4464f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 months agoUse singleton NodeIdentifierWithPredicates 66/85366/1
Robert Varga [Thu, 24 Oct 2019 09:38:23 +0000 (11:38 +0200)]
Use singleton NodeIdentifierWithPredicates

NodeIdentifierWithPredicates has a specialized single-entry class,
rendering SharedSingletonMap(Template) use unnecessary, which is
flag as a warning. Use the singleton constructor directly.

Change-Id: Ib16348192040d4e4f9d135e792880d8519cad4d6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 months agoRemove unused model imports 40/85340/1
Robert Varga [Wed, 23 Oct 2019 09:07:24 +0000 (11:07 +0200)]
Remove unused model imports

pyang is pointing out these imports as unused, fix them up.

Change-Id: Id3d59d35d764bc91e1d381de72caca2622ae4a6d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 months agoRemove unneeded checkstyle/spotbugs declaration 81/85281/2
Robert Varga [Mon, 21 Oct 2019 03:59:08 +0000 (05:59 +0200)]
Remove unneeded checkstyle/spotbugs declaration

odlparent is enabling these, remove superfluous configuration.

Change-Id: I80179e97046653b7e96ee79dbbd4e392ab47ae0f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 months agoAdd locate-shard RPC 38/85038/5
Robert Varga [Thu, 10 Oct 2019 13:36:42 +0000 (15:36 +0200)]
Add locate-shard RPC

This adds the ability to query what is the preferred node to talk
to a particular shard.

Change-Id: Idcdf9e60829d14c2f1a8cc4aceec0b3b989ef07d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 months agoCleanup cluster-admin.yang 33/85033/6
Robert Varga [Thu, 10 Oct 2019 11:08:00 +0000 (13:08 +0200)]
Cleanup cluster-admin.yang

We are redefining the same leaves over and over, make sure we
define them in a grouping for common definition. Also ensure
shard name requires at least one character -- just as we expect
it to happen in the implementation.

Change-Id: I917d8a7767467dceb4f3e076ffca4b5aa4b048a1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 months agoRegister action MXBean only during start 01/85201/1
Robert Varga [Fri, 18 Oct 2019 10:58:28 +0000 (12:58 +0200)]
Register action MXBean only during start

We should not be registering resources until we are started, this
fixes an exception seen in Genius UT.

Change-Id: I5a95d7e2ddbc71eca23c57843eea64f0c58dfc7c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 months agoRemove unneeded version declaration 47/85147/1
Robert Varga [Wed, 16 Oct 2019 12:01:45 +0000 (14:01 +0200)]
Remove unneeded version declaration

The model is properly exposed from artifacts, do not override the
managed version.

Change-Id: Iaf5fe83bc0e0f7c7fb5a20a0b23b848b572e73e6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 months agoUse ConcurrentHashMap.newKeySet() 46/85146/1
Robert Varga [Wed, 16 Oct 2019 11:51:16 +0000 (13:51 +0200)]
Use ConcurrentHashMap.newKeySet()

Instead of using Sets.newConcurrentHashSet(), use the utility
method provided by ConcurrentHashMap.

Change-Id: I796e8b6b260f865138a2716f1bb61c983972a4d4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 months agoSplit DistributedShardRegistration into its own file 44/85144/2
Robert Varga [Wed, 16 Oct 2019 10:32:42 +0000 (12:32 +0200)]
Split DistributedShardRegistration into its own file

This interface is holding us back at Java 10 due to ARIES-1923,
as blueprint fails to process DistributedShardFactory. As this
interface really is private, factor DistributedShardRegistration
into its own file and move to Java 11.

Change-Id: Idea1c31b7e82a9df5cef34da8e2bd95bb51d4f00
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 months agoMigrate deprecated testing components 41/85141/2
Robert Varga [Wed, 16 Oct 2019 09:26:42 +0000 (11:26 +0200)]
Migrate deprecated testing components

org.scalatest.junit.JUnitRunner and org.mockito.Matchers have
replacements, migrate to using them.

Change-Id: Iff6fa0c937361bb68d4d001feee29af21a430836
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 months agoUse careful byte-masking/shifting in Mg Input 99/85099/2
Robert Varga [Mon, 14 Oct 2019 08:16:02 +0000 (10:16 +0200)]
Use careful byte-masking/shifting in Mg Input

We really want to operate on byte and not int, the bytes are to
be treated as unsigned, which gets wrecked by sign extension.

Introduce an explicit mask(byte, byte) method and use it where
we are potentially sign-extending.

JIRA: CONTROLLER-1919
Change-Id: I0484f440c1589859fb268947f5a80a2b4969451e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 months agoDeprecate old MD-SAL APIs for removal 57/84857/10
Robert Varga [Tue, 1 Oct 2019 17:05:29 +0000 (19:05 +0200)]
Deprecate old MD-SAL APIs for removal

These APIs are slated for removal in Aluminium, make sure our
warning is more stern.

JIRA: CONTROLLER-1917
Change-Id: Ib4f7dcfd5183b87dd10b9ce2b773a59a548892c9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 months agoDo not use Binding DTO compat methods 12/84712/20
Robert Varga [Wed, 25 Sep 2019 14:47:24 +0000 (16:47 +0200)]
Do not use Binding DTO compat methods

This removes the use of compat methods, preferring explicit
instantiation of the correct type.

Change-Id: Ie3b739e1e31ba2762cdda92444f4734a8ac47ae8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 months agoBump mdsal to 5.0.3 61/85061/1
Robert Varga [Fri, 11 Oct 2019 14:09:15 +0000 (16:09 +0200)]
Bump mdsal to 5.0.3

This bumps mdsal to 5.0.3 to workaround issues with Blueprint
injection.

Change-Id: I848c9220ce06ec7b4af304ab64948bdc30257dbd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 months agoRegister MXBean only during start 57/85057/1
Robert Varga [Fri, 11 Oct 2019 12:32:14 +0000 (14:32 +0200)]
Register MXBean only during start

We should not be registering resources until we are started, this
fixes an exception seen in Genius UT.

Change-Id: I550b586f905ec95a06cc9aaec167eb584592ba46
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 months agoDisable slf4j SSL link 42/85042/3
Robert Varga [Thu, 10 Oct 2019 18:59:08 +0000 (20:59 +0200)]
Disable slf4j SSL link

slf4j does not provide apidocs over TLS (WTF?!?!?!), link HTTP
site instead.

Change-Id: I2158c043a2d9e810a329587159fc6af9d57d8e56
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 months agoRemove CheckedFuture from RemoteSchemaProvider 36/85036/5
Robert Varga [Thu, 10 Oct 2019 12:05:49 +0000 (14:05 +0200)]
Remove CheckedFuture from RemoteSchemaProvider

The API contract we are implementing is defined in terms of
ListenableFuture, hence we can drop the use of CheckedFuture.

Change-Id: I9d99b2e42c3995c4c11b44e595a81a93b2b31b7e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 months agoBump mdsal to 5.0.2 03/83803/53
Robert Varga [Tue, 20 Aug 2019 14:37:14 +0000 (16:37 +0200)]
Bump mdsal to 5.0.2

This bumps mdsal to 5.0.2 as part of Magnesium MRI.

Change-Id: I93e10e95b7a241d678829afb732e2adef82c1a24
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 months agoBump yangtools to 4.0.1 04/83804/49
Robert Varga [Tue, 20 Aug 2019 14:37:51 +0000 (16:37 +0200)]
Bump yangtools to 4.0.1

This bumps yangtools to 4.0.1 as part of Magnesium MRI.

Change-Id: I1ac7d3f856af310f4e8015875223d30eac3a8276
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 months agoBump odlparent to 6.0.0 02/83802/42
Robert Varga [Tue, 20 Aug 2019 14:36:13 +0000 (16:36 +0200)]
Bump odlparent to 6.0.0

This bumps odlparent to 6.0.0 as part of Magnesium MRI.

Change-Id: I084c6a32c4facafd85e3b87c6d8a9a29a33848a8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 months agoSplit up transaction chunks 53/84553/13
Robert Varga [Thu, 19 Sep 2019 23:50:56 +0000 (01:50 +0200)]
Split up transaction chunks

This adds the infrastructure to prevent allocation of large byte[]s,
as when those exceed 0.5-16MiB, under G1GC they end up in humongous
object region. Not only that, but after some cut-off point, the
copying of arrays starts to dominate performance.

What we do here is ensure we always receive up to a configurable
number of bytes, defaults to 256KiB, and keep those chunks in a list.
This way we may end up with larger overhead, but that really is
neglibeble -- even a 2GiB payload would end up using only about
8K arrays.

While the input/output streams are similar to
org.apache.commons.io.output.ByteArrayOutputStream, the design here
is geared towards having the intermediate representation available
as well as devolving to a single byte[] for memory efficiency
reasons.

JIRA: CONTROLLER-1920
Change-Id: I2b79a633ebf4fdf8d68d2accc644326e30b41f22
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 months agoUse ReusableNormalizedNodeReceiver 65/84765/3
Robert Varga [Fri, 27 Sep 2019 05:12:32 +0000 (07:12 +0200)]
Use ReusableNormalizedNodeReceiver

This simplifies some APIs by using ReusableStreamReceiver, as it
is an API-level construct rather than a particular implementation.

Change-Id: Id9d14d512ac7150a3e71c104577546e219cd86d0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoFixup docs references 91/84791/1
Robert Varga [Fri, 27 Sep 2019 15:50:34 +0000 (17:50 +0200)]
Fixup docs references

This updates references very slightly, so that we do not have
outdated or unnecessary pointers.

Change-Id: I5c9429cf8ec1af244cbd4e73772a80213af91a85
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoMove DataTreeCandidate extraction to where it is applied 10/82410/15
Robert Varga [Wed, 5 Jun 2019 10:45:15 +0000 (12:45 +0200)]
Move DataTreeCandidate extraction to where it is applied

This patch just moves the code that is extracting the candidate
from payload into the same method that is going to apply it, giving
us an opportunity to merge the two interfaces.

JIRA: CONTROLLER-1889
Change-Id: I44a5e2f7181147dca9377d0a9516bbe6b3ba85e3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoAdd uint adaptation to AbstractNormalizedNodePruner 16/84716/3
Robert Varga [Wed, 25 Sep 2019 15:34:53 +0000 (17:34 +0200)]
Add uint adaptation to AbstractNormalizedNodePruner

When migrating from old snapshots to magnesium format we have to
make sure we also legacy uint mapped values, so that after recovery
we end up with proper types being present.

JIRA: CONTROLLER-1919
Change-Id: I86ee49efee0d6c0519680197ea3e3985b1566e0c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoRework AbstractNormalizedNodePruner 20/81320/41
Robert Varga [Tue, 14 May 2019 08:15:19 +0000 (10:15 +0200)]
Rework AbstractNormalizedNodePruner

This refactors NormalizedNodePruner to use
ReusableImmutableNormalizedNodeStreamWriter for creation of the
actual NormalizedNode tree.

It simplifies the implementation and allows the reuse of minor
optimizations like LeafInterner.

JIRA: CONTROLLER-1889
Change-Id: I93bd00bcff13245d808f7adf6122a6c20156e9fd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoDo not update term from unreachable members 76/82876/10
Tomas Cere [Tue, 2 Jul 2019 07:58:13 +0000 (09:58 +0200)]
Do not update term from unreachable members

In case of a one way connection problem, a follower that cannot
receive messages but can send them, it will change into Candidate
and continuosly bump its term while it cannot receive any
RequestVoteReplies.

Since the messages it sends can actually get through, this means
that the healthy part of the cluster will have its leader dropped
every 2 election timeouts.

Change this up so we only update term when receiving a RequestVote
from a reachable node.

Change-Id: Ia8a0b59cfb2d0cd68096172a1d2d47f68e7ed473
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoSwitch default stream output to Sodium SR1 39/84539/40
Robert Varga [Wed, 25 Sep 2019 06:01:47 +0000 (08:01 +0200)]
Switch default stream output to Sodium SR1

This flips the switch and uses Sodium SR1 format for all unversioned
users. Also updates tests to reflect new expected stream sizes.

JIRA: CONTROLLER-1919
Change-Id: I9973bb93f469c1b59533ce580c795cd30c9edda4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoSwitch current {ABI,DataStore,Payload}Version to Sodium SR1 09/84709/4
Robert Varga [Wed, 25 Sep 2019 14:25:08 +0000 (16:25 +0200)]
Switch current {ABI,DataStore,Payload}Version to Sodium SR1

This mass-switches versioned resources to use Sodium SR1 streaming
format.

JIRA: CONTROLLER-1919
Change-Id: Ic712fa04e16c68481eeecccc61d8e6a7dfabac52
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoDefine PayloadVersion.MAGNESIUM 05/84705/10
Robert Varga [Wed, 25 Sep 2019 10:45:18 +0000 (12:45 +0200)]
Define PayloadVersion.MAGNESIUM

This adds the PayloadVersion which uses Magnesium normalized node
stream.

JIRA: CONTROLLER-1919
Change-Id: Ie43e9932a19bd19c92f14890da13646bf56e2f6f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoEliminate reference to YangInstanceIdentifier.EMPTY 11/84711/3
Robert Varga [Wed, 25 Sep 2019 14:45:57 +0000 (16:45 +0200)]
Eliminate reference to YangInstanceIdentifier.EMPTY

This constant has been removed, migrate to its replacement.

Change-Id: I0937b4602552ec8101132319889bc92e63de06cb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoDefine DataStoreVersions.MAGNESIUM_VERSION 03/84703/10
Robert Varga [Wed, 25 Sep 2019 10:38:17 +0000 (12:38 +0200)]
Define DataStoreVersions.MAGNESIUM_VERSION

This adds Magnesium version, which is using Magnesium normalized
node stream.

JIRA: CONTROLLER-1919
Change-Id: Icc1314d61e37b8a4bf2df759860b4d0bc170c90c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoAdd cds-access-api MAGNESIUM version 04/84704/9
Robert Varga [Wed, 25 Sep 2019 10:41:24 +0000 (12:41 +0200)]
Add cds-access-api MAGNESIUM version

This adds a new ABI version, which uses Magnesium normalized node
stream.

JIRA: CONTROLLER-1919
Change-Id: Ie27b6cbd090b6f155c9600055ac6ef12304b1a99
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoDefine PayloadVersion.SODIUM_SR1 02/84702/9
Robert Varga [Wed, 25 Sep 2019 10:33:15 +0000 (12:33 +0200)]
Define PayloadVersion.SODIUM_SR1

This adds the PayloadVersion which uses Sodium SR1 normalized node
stream.

JIRA: CONTROLLER-1919
Change-Id: I3dfa6ea053ea356bb68b458f3d6787904b2904c0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoMark historic DataStoreVersions deprecated 00/84700/2
Robert Varga [Wed, 25 Sep 2019 10:26:43 +0000 (12:26 +0200)]
Mark historic DataStoreVersions deprecated

We do not support anything before Boron, hence mark these constants
as deprecated.

Change-Id: Ibda5ab8f5bbcb8136e01018d713685e1e3b6ee7c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoSwitch ABIVersion/DataStoreVersions back to Neon SR2 08/84708/1
Robert Varga [Wed, 25 Sep 2019 14:16:22 +0000 (16:16 +0200)]
Switch ABIVersion/DataStoreVersions back to Neon SR2

This switches the current versions for use back to Neon SR2, reverting
the rollout.

JIRA: CONTROLLER-1919
Change-Id: I57175fb26a86a1de589602bcec3b4c022ddf8a72
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoUse explicit versioning in MetadataShardDataTreeSnapshot 07/84707/3
Robert Varga [Wed, 25 Sep 2019 13:39:28 +0000 (15:39 +0200)]
Use explicit versioning in MetadataShardDataTreeSnapshot

Rather than relying on the default version, make sure we use
whatever the version is defined for the message at hand.

JIRA: CONTROLLER-1919
Change-Id: Ic325ba93e5152570586f7a0baa8ce2abf8053c4e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoDefine DataStoreVersions.SODIUM_SR1_VERSION 01/84701/3
Robert Varga [Wed, 25 Sep 2019 10:24:39 +0000 (12:24 +0200)]
Define DataStoreVersions.SODIUM_SR1_VERSION

This adds Sodium SR1 version, which is using SodiumSR1 normalized
node stream.

JIRA: CONTROLLER-1919
Change-Id: Ic79940cd80dfa1e2844079bc3003ab815c586662
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoAdd cds-access-api SODIUM_SR1 version 99/84699/4
Robert Varga [Wed, 25 Sep 2019 10:18:29 +0000 (12:18 +0200)]
Add cds-access-api SODIUM_SR1 version

This adds a new ABI version, which uses SodiumSR1 normalized node
stream.

JIRA: CONTROLLER-1919
Change-Id: I457c2fcc7e10f4ba2021ce6ddb4fbc2adbfdd596
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoAdd Magnesium stream version 94/84694/8
Robert Varga [Wed, 25 Sep 2019 06:07:50 +0000 (08:07 +0200)]
Add Magnesium stream version

This is a variant of Sodium SR1 streaming format, which does not
allow presence of BigInteger tokens, as those values are superseded
by Uint64.

JIRA: CONTROLLER-1919
Change-Id: I1dc5c7376bf1ecf105e965e42d74806ed99ab9b1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoAdd LithiumSR1 input/output support 74/84274/53
Robert Varga [Mon, 9 Sep 2019 08:29:57 +0000 (10:29 +0200)]
Add LithiumSR1 input/output support

This is a code drop of both DataInput and DataOutput for Sodium SR1
streaming format. It uses its own dedicated tokes, along with quite
a few of stateful encoding rules.

Where Lithium did encoding did not perform any look-behind except
for LeafSetEntryNodes and only maintained simple coding tables,
this coder maintains simple 'parent' state tracking.

While the state tracking is not mandated on the encoder side, some
amount of tracking is required in the decoder side to provide full
coverage of coding constructs.

Two examples of this are:
- parent QName references, which are expanded to cover not only
  LeafSet/LeafSetEntry, but also UnkeyedList/UnkeyedListEntry
  and most importantly Map/MapEntry pairs
- Map/MapEntry tracking is also important for coding leaf nodes
  which represent keys -- in those cases emitting the leaf value
  is superfluous, as it can be looked up from MapEntry's predicates

Also this state tracking is maintained on-stack, thus making issues
related with it nigh impossible (unlike the Lithium LeafSetEntry
bugs).

JIRA: CONTROLLER-1919
Change-Id: I5fcf85a76750301cd3f8bcbd505baa0f95397cb5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoAdd Magnesium encoding tokens 57/84557/13
Robert Varga [Fri, 20 Sep 2019 08:07:10 +0000 (10:07 +0200)]
Add Magnesium encoding tokens

Changes to how uint8/16/32/64 types are mapped results in the need
to transfer the new value types. These represent 4 brand new tokens,
which need to be handled.

One option would be to fork NeonSR2 and modify it, somehow dealing
with value lookups (i.e. Uint8 is not valid in SR2 stream, but tokens
are shared across Lithium/NeonSR).

Another option is to create a streaming format from scratch, coming
up with a completely new family of tokens and encoding rules. This
is attractive, as both current formats have three deficiencies:

1) they encode MapEntry key values twice, once in the leaf itself
   and once in the entry's NodeIdentifierWithPredicates
2) they are '0-happy', i.e. they do not recognize that integer codes
   and sizes are typically much smaller than the 4-byte range and thus
   much of the stream is just small ints encoded as 4 bytes
3) while they are simple and straighforward, they also end up wasting
   bits -- the four token families (codes, value types, node types,
   path argument types) each have at most 15 distinct values, and
   hence the bytes used to transmit them have 4 empty bits (or more)

Hence we take the other option and design a streaming format with
brand new tokens, which are structured to carry as much more
information per byte.

This is done by combining 'type' information with forward coding
hints, for example:

- a Boolean leaf value would previously require 2 bytes:
    (byte)    ValueTypes.BOOL_TYPE
    (byte)    true/falseIn the new tokens
  whereas new tokens express this in one byte:
    (byte)    LeafValue.BOOLEAN_{FALSE,TRUE}
- a byte[5] value would require 10 bytes to encode:
    (byte)    ValueTypes.BINARY_TYPE
    (int)     length
    (5 bytes) bytes
  whereas new tokens express this in 6 bytes:
    (byte)    ValueTypes.BINARY_0 + 5 (works up to 127)
    (5 bytes) bytes

A similar approach is taken when encoding NormalizedNode types. Here
we recognize there are only 14 node types (currently) and hence we
can provide up to 4 additional bits for information about how the
node's identifier is encoded.

For PathArguments, we also use separate coding, where the format
is flexible based on the 4 types on identifiers there are, each
having slightly different format. Most notable here is the integration
of QName reference coding (for normal PathArguments) and integrated
set size coding (for AugmentationIdentifiers).

This this patch adds just the token definitions, along with basic
documentation and version declaration.

JIRA: CONTROLLER-1919
Change-Id: I9f6f58a7cb77d9d98c46e13b8dc6955c8e3c0737
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoAdd an explicit namespace sharing test 91/84691/2
Robert Varga [Tue, 24 Sep 2019 13:16:15 +0000 (15:16 +0200)]
Add an explicit namespace sharing test

This adds a test to target QName/QNameModule/String reference
differentiation.

JIRA: CONTROLLER-1919
Change-Id: Iad736a81f627da4a04753b380acb530ccc8ba219
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoSuppress modernization 33/83833/28
Robert Varga [Tue, 20 Aug 2019 19:29:51 +0000 (21:29 +0200)]
Suppress modernization

Modernize as much as possible, but as we have legacy APIs in play,
we have to add also some suppressions.

Change-Id: I844821f129ad0bb0e186b6a4848a6d2937513f7b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoRework PathArgumentTypes lookup 90/84090/19
Robert Varga [Fri, 30 Aug 2019 09:08:37 +0000 (11:08 +0200)]
Rework PathArgumentTypes lookup

This lookup relying on final methods, which is not a correct
assumption, with NodeIdentifierWithPredicates having at least two
properly-hidden implementations.

Rework the lookup in terms of instanceof checks, which saves a table
lookup and unboxing operation.

Change-Id: Ia6b272715d19e432e7e0839b6294035e12b1d293
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoAdd more serialization assertions 22/84622/3
Robert Varga [Mon, 23 Sep 2019 06:23:29 +0000 (08:23 +0200)]
Add more serialization assertions

This adds a few more assertions to ensure our serialization format
does not move without us knowing.

Change-Id: Ieed326e9e57fb15ea46cd7a088d713222963e2e5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoMove Neon SR2 tokens into its own class 63/84563/3
Robert Varga [Fri, 20 Sep 2019 17:42:15 +0000 (19:42 +0200)]
Move Neon SR2 tokens into its own class

Same as with base Lithium tokens, these can create confusion about
where they are used. Make sure we encapsulate them in their own
class, so no confusion ensues.

JIRA: CONTROLLER-1919
Change-Id: I197b9118a5d9a09562db0a899bb6b8dc0dfae28b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoRename ValueTypes to LithiumValue 62/84562/3
Robert Varga [Fri, 20 Sep 2019 17:59:04 +0000 (19:59 +0200)]
Rename ValueTypes to LithiumValue

These constants are only used in Lithium-based streams, make sure
we reflect that in the name of the class, so they do not end up
being confused.

JIRA: CONTROLLER-1919
Change-Id: I2e880b825d82b8a9b76008248d7663eab4bc1d71
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoRename PathArgumentTypes to LithiumPathArgument 61/84561/3
Robert Varga [Fri, 20 Sep 2019 17:55:39 +0000 (19:55 +0200)]
Rename PathArgumentTypes to LithiumPathArgument

These tokens are only used in Lithium-based streams, but the global
name is slightly confusing. Rename to LithiumPathArgument, which
makes the context more obvious.

JIRA: CONTROLLER-1919
Change-Id: I2b92be4c469de8dffba6e071449b5ae947b9ace8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoRename NodeTypes to LithiumNode 60/84560/3
Robert Varga [Fri, 20 Sep 2019 17:54:04 +0000 (19:54 +0200)]
Rename NodeTypes to LithiumNode

This makes it clear these constants are only used in Lithium
encoding.

JIRA: CONTROLLER-1919
Change-Id: I1fb44f49d3409fdd007fe58dc6ce92b0eb6744b8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoMove Lithium tokens to their own class 59/84559/3
Robert Varga [Fri, 20 Sep 2019 17:36:10 +0000 (19:36 +0200)]
Move Lithium tokens to their own class

TokenTypes assumes singularity, which can create confusion, as we
have multiple multiple distinct sets. This separates out
Lithium-specific tokens into their own class.

JIRA: CONTROLLER-1919
Change-Id: Id8c47be7c432b44980dbeac8ef41d430c64e5490
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoMigrate from YangInstanceIdentifier.EMPTY 91/84091/17
Robert Varga [Fri, 30 Aug 2019 09:10:53 +0000 (11:10 +0200)]
Migrate from YangInstanceIdentifier.EMPTY

This migrates to the replacement empty() method.

Change-Id: I32ca026a33835edb16f8e1e6142e9192c880076b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoBump mdsal to 4.0.6 20/84420/7
Robert Varga [Fri, 13 Sep 2019 18:56:56 +0000 (20:56 +0200)]
Bump mdsal to 4.0.6

This picks up latest fixes.

Change-Id: I64e1f277bd00e132f40647eb0a2e7fc00eb56705
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoBump yangtools to 3.0.5 85/84385/8
Robert Varga [Fri, 13 Sep 2019 14:13:53 +0000 (16:13 +0200)]
Bump yangtools to 3.0.5

This picks up the latest fixes and improvements.

Change-Id: Icb9c44cd6f8206e78e7d50322dde3356405721c8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoBump odlparent to 5.0.2 01/83801/24
Robert Varga [Tue, 20 Aug 2019 13:59:12 +0000 (15:59 +0200)]
Bump odlparent to 5.0.2

This bumps odlparent to pick up latest references.

Change-Id: I73af7ad69f686cb5bacc6ccfe0f57d226a43994b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoAdd a 100K-entry test 52/84552/2
Robert Varga [Thu, 19 Sep 2019 21:59:24 +0000 (23:59 +0200)]
Add a 100K-entry test

This adds a test for serialization of a Map of 100K entries,
each of which has the key leaf and a simple constant non-key leaf.
Unlike other tests, this quantifies how well the encoding works
when faced with large maps.

JIRA: CONTROLLER-1919
Change-Id: I306e5175ba595a0967432393766f8317e7205492
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.