controller.git
5 years agoMerge "Fix missing dependencies in opendaylight-startup archetype"
Tom Pantelis [Mon, 26 Jan 2015 19:42:51 +0000 (19:42 +0000)]
Merge "Fix missing dependencies in opendaylight-startup archetype"

5 years agoMerge "BUG 2518 : Throttle operations in a transaction"
Tom Pantelis [Mon, 26 Jan 2015 18:30:25 +0000 (18:30 +0000)]
Merge "BUG 2518 : Throttle operations in a transaction"

5 years agoFix missing dependencies in opendaylight-startup archetype 09/14509/2
Ed Warnicke [Mon, 26 Jan 2015 16:48:03 +0000 (09:48 -0700)]
Fix missing dependencies in opendaylight-startup archetype

Change-Id: I3ebc2240f89ae0bb4baddb658b0942200d4e7c20
Signed-off-by: Ed Warnicke <eaw@cisco.com>
5 years agoBUG 2518 : Throttle operations in a transaction 55/14155/4
Moiz Raja [Wed, 14 Jan 2015 23:21:35 +0000 (15:21 -0800)]
BUG 2518 : Throttle operations in a transaction

In some use cases a single transaction may do a lot of operations
in a short period of time. This happens for example when testing
the bgp-plugin. To ensure that clients do not overwhelm the datastore
this patch throttles operations on the transaction proxy side and
prevents the client from sending more operations than can be handled
by the ShardTransaction actor in a reasonable amount of time.

The throttling serves as a back-pressure mechanism. Akka recommends
that for back pressure we use a bounded mailbox with an adequate
push timeout. We are doing this. However the akka's behavior on the
timeout expiring is to send the throttled message to dead letters.
So to properly do what akka expects us to do we would need to watch
dead letters and use that as an indication that we need back pressure
which I think is inadequate for our purpose and thus the Semaphore
based throttling.

Change-Id: Ib1a0f128ffde009a82b8cd67001203e0b959fdf5
Signed-off-by: Moiz Raja <moraja@cisco.com>
5 years agoMerge changes I3e404877,Ida2a5c32,I9e6ce426,I6a4b90f6,I79717533
Tony Tkacik [Mon, 26 Jan 2015 09:04:20 +0000 (09:04 +0000)]
Merge changes I3e404877,Ida2a5c32,I9e6ce426,I6a4b90f6,I79717533

* changes:
  Change trackerList to a LinkedList
  Improve AbstractLeader tracker removal
  use AtomicLongfieldUpdater in FollowerLogInformationImpl
  Use an ImmutableList instance for getFrom()
  Hide AbstractReplicatedLogImpl index fields

5 years agoMerge changes I880310f2,I9f437328,I552372db,I587fb203,I05f0bd94, ...
Tony Tkacik [Mon, 26 Jan 2015 08:51:18 +0000 (08:51 +0000)]
Merge changes I880310f2,I9f437328,I552372db,I587fb203,I05f0bd94, ...

* changes:
  Do not leak AtomicLong from FollowerLogInformation
  Remove followers as an explicit field
  Hide AbstractLeader maps
  Hide internals of FollowerLogInformationImpl
  Speedup AbstractLeader.printFollowerStates()
  Improve RpcInvocationStrategy performance

5 years agoMerge "Bug 2265: Use new NormalizedNode streaming in messages"
Moiz Raja [Mon, 26 Jan 2015 03:57:54 +0000 (03:57 +0000)]
Merge "Bug 2265: Use new NormalizedNode streaming in messages"

5 years agoChange trackerList to a LinkedList 74/14474/1
Robert Varga [Sun, 25 Jan 2015 08:50:11 +0000 (09:50 +0100)]
Change trackerList to a LinkedList

The trackers are being added to the end and usually remove in a linear
fashion. An ArrayList's remove() method makes sure the backing array is
packed -- which means we end up copying the array over and over again.

Changing the trackerList to a LinkedList removes the need for copying at
the expense of memory footprint and cache locality.

Change-Id: I3e40487798eb64713ed4526f53a0a8c385a9a778
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoImprove AbstractLeader tracker removal 58/14458/3
Robert Varga [Fri, 23 Jan 2015 18:57:47 +0000 (19:57 +0100)]
Improve AbstractLeader tracker removal

The remove operation performs a linear lookup by index and perform a
second iteration to find the object again. Instead of that, instantiate
an iterator and use its remove() method to elide the second lookup.

Change-Id: Ida2a5c327115d2da787e397311c0a0c5a46a0d43
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agouse AtomicLongfieldUpdater in FollowerLogInformationImpl 59/14459/3
Robert Varga [Fri, 23 Jan 2015 19:10:44 +0000 (20:10 +0100)]
use AtomicLongfieldUpdater in FollowerLogInformationImpl

Instead of keeping two AtomicLong instances, we instantiate two shared
updater classes and keep the values in volatile fields. This lowers the
memory consumption.

Change-Id: I9e6ce426500ee61b8c02d75cb0edd361e996a443
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoUse an ImmutableList instance for getFrom() 56/14456/3
Robert Varga [Fri, 23 Jan 2015 17:17:14 +0000 (18:17 +0100)]
Use an ImmutableList instance for getFrom()

Since we are creating a view, we do not need to allocate a larger list
-- just use a copy constructor, which will create an
appropriately-sized copy.

Change-Id: I6a4b90f638b3f8511b5ec641ab5f9b1f14632407
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoHide AbstractReplicatedLogImpl index fields 55/14455/3
Robert Varga [Fri, 23 Jan 2015 16:51:42 +0000 (17:51 +0100)]
Hide AbstractReplicatedLogImpl index fields

The fields have proper getter/setter methods, there is no need to expose
them anywhere.

Change-Id: I7971753310dfe8c8654caeef04cfc38dfddeef86
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoDo not leak AtomicLong from FollowerLogInformation 46/14446/3
Robert Varga [Fri, 23 Jan 2015 14:57:33 +0000 (15:57 +0100)]
Do not leak AtomicLong from FollowerLogInformation

Leaking this implementation details allows callers to interact with
state outside of the official contract. Disallow that.

Change-Id: I880310f2a9692fd11ba2cd33830501d19d0a1b65
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoRemove followers as an explicit field 45/14445/3
Robert Varga [Fri, 23 Jan 2015 14:46:51 +0000 (15:46 +0100)]
Remove followers as an explicit field

The field corresponds to followerToLog.keySet(), which is immutable, so
there is no point in retaining it in a field. It allows us to realize
that we can use an entrySet() and prevent lookups to get corresponding
information.

Change-Id: I9f43732813b61d19306ef5954a97c9c8cd64ccfb
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoHide AbstractLeader maps 43/14443/3
Robert Varga [Fri, 23 Jan 2015 14:17:31 +0000 (15:17 +0100)]
Hide AbstractLeader maps

Collections should never be leaked, as they introduce the ability to
make unsynchronized changes. This patch hides the map itself, allowing
lookups.

Once we have done that, we have control over the interactions and thus
can see that the map is instantiation-constant. Use an ImmutableMap to
maintain the entries as it provides superior compactness and lookup
speeds.

Change-Id: I552372dbabe454111909bb8251637e9f3c0e0db7
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoHide internals of FollowerLogInformationImpl 42/14442/3
Robert Varga [Fri, 23 Jan 2015 13:53:55 +0000 (14:53 +0100)]
Hide internals of FollowerLogInformationImpl

The constructor should not take AtomicLong instances, as that is an
implementation-specific detail. Notably the constructor assumes
ownership of the objects and no caller uses them in a shared way.

Change-Id: I587fb2033f9b513df565471f037e20e0acc481c7
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoSpeedup AbstractLeader.printFollowerStates() 41/14441/3
Robert Varga [Fri, 23 Jan 2015 13:49:12 +0000 (14:49 +0100)]
Speedup AbstractLeader.printFollowerStates()

Instead of using string concat to append to a StringBuilder and then
concat the result of the builder, perform proper construction and
instantiate only a single string.

Change-Id: I05f0bd9404a3d6470a0b9d0b1ea71595dcba5cc0
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoImprove RpcInvocationStrategy performance 20/14420/4
Robert Varga [Fri, 23 Jan 2015 08:02:29 +0000 (09:02 +0100)]
Improve RpcInvocationStrategy performance

As it turns out, the transformation function can easily be shared,
reducing the amount of objects we create.

Change-Id: I76c86e2f0c63e87c87677ac739f980a5e7929d3f
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoUse ImmutableSet in ShardManager 29/14429/2
Robert Varga [Fri, 23 Jan 2015 11:10:39 +0000 (12:10 +0100)]
Use ImmutableSet in ShardManager

Instead of mutating the same set, use a space-optimized immutable view
and update that.

Change-Id: Iae0615580f93bb8e215d929e72abeb17f8b3eed0
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoOptimize ActorContext a bit 24/14424/1
Robert Varga [Fri, 23 Jan 2015 10:14:26 +0000 (11:14 +0100)]
Optimize ActorContext a bit

Do not perform .toString() on objects passed to loggers -- it will be
invoked automatically if the message is not filtered.

Use a simple character lookup instead of a string.

Change-Id: I262298c767a1363daf3c8f7e83f994e70e0cf6bf
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoLower Shard.DEFAULT_NAME visibility 27/14427/1
Robert Varga [Fri, 23 Jan 2015 10:33:22 +0000 (11:33 +0100)]
Lower Shard.DEFAULT_NAME visibility

Add an annotation which clarifies that the DEAFULT_NAME is only ever
used in tests.

Change-Id: I786a2e747e4f52ac4577a94fd268e13a191e07e9
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoClarify DistributedDataStoreFactory 26/14426/1
Robert Varga [Fri, 23 Jan 2015 10:31:14 +0000 (11:31 +0100)]
Clarify DistributedDataStoreFactory

DistributedDataStoreFactory used an atomic reference to manage a lazy
initialization of a singleton, which could fail to initialize. Use an
explicit volatile and lower synchronization requirements when the
singleton has already been initialized.

Change-Id: I10c38ca2441c6e7d8251560f9ea1218211490fc9
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoSpeed up ClusterWrapperImpl 25/14425/1
Robert Varga [Fri, 23 Jan 2015 10:18:06 +0000 (11:18 +0100)]
Speed up ClusterWrapperImpl

Instead of forcing a Set.toArray(), just pick the first entry in
iteration order.

Change-Id: If564ee3695707ad2482845bc8610693722e27943
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoMerge "Remove unnecessary declaration of <prerequisites> in protocol-framework"
Tony Tkacik [Fri, 23 Jan 2015 11:09:39 +0000 (11:09 +0000)]
Merge "Remove unnecessary declaration of <prerequisites> in protocol-framework"

5 years agoMerge "Remove unnecessary declaration of <prerequisites> in commons.parent"
Tony Tkacik [Fri, 23 Jan 2015 11:09:29 +0000 (11:09 +0000)]
Merge "Remove unnecessary declaration of <prerequisites> in commons.parent"

5 years agoMerge "Remove unnecessary declaration of <prerequisites> in archetypes"
Tony Tkacik [Fri, 23 Jan 2015 11:09:20 +0000 (11:09 +0000)]
Merge "Remove unnecessary declaration of <prerequisites> in archetypes"

5 years agoMerge "Remove unnecessary declaration of <prerequisites> in itests"
Tony Tkacik [Fri, 23 Jan 2015 11:09:11 +0000 (11:09 +0000)]
Merge "Remove unnecessary declaration of <prerequisites> in itests"

5 years agoMerge "Remove unnecessary declaration of <prerequisites> in features"
Tony Tkacik [Thu, 22 Jan 2015 16:19:05 +0000 (16:19 +0000)]
Merge "Remove unnecessary declaration of <prerequisites> in features"

5 years agoMerge "Use Maven Enforcer plugin to require Maven version"
Tony Tkacik [Thu, 22 Jan 2015 16:17:46 +0000 (16:17 +0000)]
Merge "Use Maven Enforcer plugin to require Maven version"

5 years agoRemove unnecessary declaration of <prerequisites> in protocol-framework 25/14225/2
Thanh Ha [Mon, 19 Jan 2015 03:34:15 +0000 (22:34 -0500)]
Remove unnecessary declaration of <prerequisites> in protocol-framework

Bug: 2605
Change-Id: I26a1a5434dfdb3d4e28bfd141f575991a8e91f03
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
5 years agoRemove unnecessary declaration of <prerequisites> in commons.parent 24/14224/2
Thanh Ha [Mon, 19 Jan 2015 03:33:20 +0000 (22:33 -0500)]
Remove unnecessary declaration of <prerequisites> in commons.parent

Bug: 2605
Change-Id: I41969c105d03af308704a2f00f84f45596e99493
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
5 years agoRemove unnecessary declaration of <prerequisites> in archetypes 23/14223/2
Thanh Ha [Mon, 19 Jan 2015 03:31:57 +0000 (22:31 -0500)]
Remove unnecessary declaration of <prerequisites> in archetypes

Bug: 2605
Change-Id: Iec369017515eca4380164558ecb6733d39235a3c
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
5 years agoRemove unnecessary declaration of <prerequisites> in itests 22/14222/2
Thanh Ha [Mon, 19 Jan 2015 03:28:22 +0000 (22:28 -0500)]
Remove unnecessary declaration of <prerequisites> in itests

Bug: 2605
Change-Id: I43f82e0f26ff0d9e41c338c662edb64d04df690b
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
5 years agoRemove unnecessary declaration of <prerequisites> in features 21/14221/2
Thanh Ha [Mon, 19 Jan 2015 03:26:19 +0000 (22:26 -0500)]
Remove unnecessary declaration of <prerequisites> in features

Bug: 2605
Change-Id: Ie17b660d81bbdce5a9f9cfd98bd8d0b5d2593919
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
5 years agoUse Maven Enforcer plugin to require Maven version 20/14220/2
Thanh Ha [Mon, 19 Jan 2015 03:22:56 +0000 (22:22 -0500)]
Use Maven Enforcer plugin to require Maven version

Using the <prerequisites> configuration in pom files is deprecated and
it is recommended to use the maven-enforcer-plugin to enforce these
rules instead.

See:
http://jira.codehaus.org/browse/MNG-5297
http://jira.codehaus.org/browse/MNG-4840

Bug: 2605
Change-Id: Ia0be6681bfac19d3a49917e172e32a26ac8e5933
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
5 years agoMore unit test code coverage for NormalizedNodeStreamReader/Writer 36/14336/3
tpantelis [Sun, 18 Jan 2015 19:29:11 +0000 (14:29 -0500)]
More unit test code coverage for NormalizedNodeStreamReader/Writer

Change-Id: Id93186bb8de8dd7fadb4a53679f964697bd45e3c
Signed-off-by: tpantelis <tpanteli@brocade.com>
5 years agoMerge changes Iae061558,I786a2e74,I10c38ca2
Moiz Raja [Sun, 25 Jan 2015 23:17:45 +0000 (23:17 +0000)]
Merge changes Iae061558,I786a2e74,I10c38ca2

* changes:
  Use ImmutableSet in ShardManager
  Lower Shard.DEFAULT_NAME visibility
  Clarify DistributedDataStoreFactory

5 years agoMerge "Speed up ClusterWrapperImpl"
Moiz Raja [Sun, 25 Jan 2015 20:11:17 +0000 (20:11 +0000)]
Merge "Speed up ClusterWrapperImpl"

5 years agoMerge "Bug 2327: Handle binary data in NormalizedNode streaming"
Moiz Raja [Sun, 25 Jan 2015 19:58:35 +0000 (19:58 +0000)]
Merge "Bug 2327: Handle binary data in NormalizedNode streaming"

5 years agobug 2616 - NPE in ControllerContext.toQName method 26/14326/2
Vaclav Demcak [Wed, 21 Jan 2015 09:55:14 +0000 (10:55 +0100)]
bug 2616 - NPE in ControllerContext.toQName method

Method works with globalSchema property without validation and somtimes it could be null.

- add a missing check method call for toQName method
- add a missing check method call for collectPathArguments method (mountpoint - line 549)

Change-Id: I4a568bbeb54720592ef42990d7dcd430df170c12
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
5 years agoBug 2265: Use new NormalizedNode streaming in messages 48/12448/19
tpantelis [Mon, 19 Jan 2015 03:21:46 +0000 (22:21 -0500)]
Bug 2265: Use new NormalizedNode streaming in messages

    Utilized the new NormalizedNode streaming classes for the WriteData,
    MergeData, ReadDataReply and DataChanged messages.

    One solution was to add a bytes field to the protobuff messages and
    make the previous fields optional. For backwards compatibility, in
    the wrapper message's fromSerializable method, check whether or not
    the protobuff message has the bytes field and act accordingly.

    While this works, it results in an undesirable inefficiency.
    Protobuff translates the bytes field to a ByteString type. So when
    streaming, we need to create a ByteArrayOutputStream and pass that to
    the NormalizedNode stream writer. Then call
    ByteString.copyFrom(bos.toByteArray) to get the resulting ByteString.
    However this results in 2 copies of the serialized byte[]. The
    byte[] cannot be passed to ByteString as is as it always copies it to
    maintain immutability. I looked into subclassing ByteString and
    lazily streaming the data on demand but the ByteString ctor is
    package scoped so they don’t allow subclassing.

    So I went with an approach to make each message Externalizable
    instead of using protobuff. The classes writes
    the version number to enable us to handle compatibility in the future.
    So in this manner, we can get the efficient direct streaming we
    want and easily handle backwards and forwards compatibility.

    I added a VersionedSerializableMessage interface whose
    toSerializable method takes a version number. The version # is passed
    from the remote version # obtained from the CreateTransactionReply.
    This allows the message classes to handle backwards compatibility. So
    if the version is Helium-1 or less, send the protobuff message
    otherwise send the Externalizable instance.

    In the fromSerializable method, it checks if the passed Object is an
    instance of the Externalizable class or the protbuff message type.

Change-Id: I5ebb968e70ac8ff92c29183c52e6c3fe5362ae34
Signed-off-by: tpantelis <tpanteli@brocade.com>
5 years agoMerge "Fixed bug in generated artifactId for ${artifactId}-karaf"
Moiz Raja [Wed, 21 Jan 2015 01:23:22 +0000 (01:23 +0000)]
Merge "Fixed bug in generated artifactId for ${artifactId}-karaf"

5 years agoFix typo in 05-clustering.xml file 69/14469/1
tpantelis [Wed, 21 Jan 2015 00:45:46 +0000 (19:45 -0500)]
Fix typo in 05-clustering.xml file

The 05-clustering.xml file fails to load - in the capabilities section
"distributed-datastore-privider" should be
"distributed-datastore-provider".

Change-Id: I28082e8a658bbb6e04714da5346d08e33678d6a4
Signed-off-by: tpantelis <tpanteli@brocade.com>
5 years agoFixed bug in generated artifactId for ${artifactId}-karaf 10/14310/1
Ed Warnicke [Tue, 20 Jan 2015 19:25:58 +0000 (12:25 -0700)]
Fixed bug in generated artifactId for ${artifactId}-karaf

Change-Id: I754a7804a2cc3c9ef2b19f29b313034517462ab4
Signed-off-by: Ed Warnicke <eaw@cisco.com>
5 years agoMerge "Added sun.misc to jre.properties"
Tony Tkacik [Tue, 20 Jan 2015 18:04:31 +0000 (18:04 +0000)]
Merge "Added sun.misc to jre.properties"

5 years agoMerge "BUG 2585 : Make Election Timeout Factor configurable"
Tom Pantelis [Tue, 20 Jan 2015 17:45:33 +0000 (17:45 +0000)]
Merge "BUG 2585 : Make Election Timeout Factor configurable"

5 years agoMerge "BUG 2586 : Disable operational persistence by default"
Tom Pantelis [Tue, 20 Jan 2015 17:43:56 +0000 (17:43 +0000)]
Merge "BUG 2586 : Disable operational persistence by default"

5 years agoMerge "Remove import-package instructions from netconf"
Tony Tkacik [Tue, 20 Jan 2015 16:16:43 +0000 (16:16 +0000)]
Merge "Remove import-package instructions from netconf"

5 years agoMerge topic 'archetype'
Tony Tkacik [Tue, 20 Jan 2015 15:05:37 +0000 (15:05 +0000)]
Merge topic 'archetype'

* changes:
  Fixed missing uses of ${artifactId} in urn
  Fixed copyrights in opendaylight-startup archetype

5 years agoRemove import-package instructions from netconf 87/14287/1
Maros Marsalek [Tue, 20 Jan 2015 13:32:54 +0000 (14:32 +0100)]
Remove import-package instructions from netconf

The instructuion set gets outdated, use default settings for import all to prevent startup failures.

Change-Id: I387dda9d823c6edc07bccde4f760acf0151093d4
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
5 years agoBUG-2283 Fix close order when reconfiguring config modules. 43/13343/13
Maros Marsalek [Wed, 3 Dec 2014 15:23:24 +0000 (16:23 +0100)]
BUG-2283 Fix close order when reconfiguring config modules.

Close is called from top(dependency source) to bottom(dependency target) while createInstance is called in opposite direction.

This commit changes API and SPI of config subsystem and thus breaks runtime compatibility.

Change-Id: I5b03f0673c5ecb95efbfccad7fa6ed7a490ff61b
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
5 years agoBUG 2585 : Make Election Timeout Factor configurable 58/14158/2
Moiz Raja [Thu, 15 Jan 2015 00:21:22 +0000 (16:21 -0800)]
BUG 2585 : Make Election Timeout Factor configurable

Keeping the Heartbeat interval small and increasing the timeout
factor allows us to skip a few heartbeats if neccessary without
causing Followers to become Candidates.

Simply increasing the heartbeat interval has the negative effect
of causing replication messages for out-of date followers to go
slower so making the election factor configurable will be helpful
in keeping the cluster state stable.

Change-Id: Iae8105d65bba4a37987bfddb9f22d9d4d862a1fd
Signed-off-by: Moiz Raja <moraja@cisco.com>
5 years agoMerge "Bug 2486: Get testAbortBeforeFinishCommit working again"
Moiz Raja [Tue, 20 Jan 2015 02:49:06 +0000 (02:49 +0000)]
Merge "Bug 2486: Get testAbortBeforeFinishCommit working again"

5 years agoMerge "Bug-2591 : Clustering: Shard does not notify a role change to Follower at...
Moiz Raja [Tue, 20 Jan 2015 02:32:47 +0000 (02:32 +0000)]
Merge "Bug-2591 : Clustering: Shard does not notify a role change to Follower at the start"

5 years agoFixed missing uses of ${artifactId} in urn 69/14269/1
Ed Warnicke [Tue, 20 Jan 2015 01:24:38 +0000 (18:24 -0700)]
Fixed missing uses of ${artifactId} in urn

Change-Id: I7a32ccacde21c79d961820807be388a0e3787ec5
Signed-off-by: Ed Warnicke <eaw@cisco.com>
5 years agoFixed copyrights in opendaylight-startup archetype 62/14262/1
Ed Warnicke [Mon, 19 Jan 2015 20:23:02 +0000 (13:23 -0700)]
Fixed copyrights in opendaylight-startup archetype

Change-Id: I784a430046e48f38d73e3f5ed999e56f36bdedb1
Signed-off-by: Ed Warnicke <eaw@cisco.com>
5 years agoBug 2327: Handle binary data in NormalizedNode streaming 97/12797/5
tpantelis [Wed, 12 Nov 2014 22:09:15 +0000 (17:09 -0500)]
Bug 2327: Handle binary data in NormalizedNode streaming

Also made optimization improvements to reuse primitive (using valueOf) and coded String
values (using intern) when read from the stream.

Also added a reusable StringBuilder instance for building qnames. After
use, the StringBuilder is cleared via the delete method. This
effectively resets the char count to 0. Previously, the
code used string concatenation which the compiler will translate to use
an imlicit StringBuilder. These changes avoid the implicit creation of a
StringBuilder instance each time which should reduce object churn.

Change-Id: Ic9c745d97d1b5eed2dd24bc5d252d05ac1355cbb
Signed-off-by: tpantelis <tpanteli@brocade.com>
5 years agoMerge "findModule method refactoring"
Tom Pantelis [Sat, 17 Jan 2015 19:04:47 +0000 (19:04 +0000)]
Merge "findModule method refactoring"

5 years agoMerge "BUG 2593 : Fix flakiness in ShardManager ActorNotInitialized tests"
Tom Pantelis [Sat, 17 Jan 2015 19:01:19 +0000 (19:01 +0000)]
Merge "BUG 2593 : Fix flakiness in ShardManager ActorNotInitialized tests"

5 years agoBug 2486: Get testAbortBeforeFinishCommit working again 15/14215/1
tpantelis [Sat, 17 Jan 2015 17:27:31 +0000 (12:27 -0500)]
Bug 2486: Get testAbortBeforeFinishCommit working again

The previous patch for this bug caused the testAbortBeforeFinishCommit
to fail and was changed to Ignore. This patch gets the test to work
again.

Change-Id: Ie2b61c13f0547b058b7f80a61b2a969b3ba98754
Signed-off-by: tpantelis <tpanteli@brocade.com>
5 years agoMerge "BUG 2486 : Optimizations for a single node cluster deployment"
Tom Pantelis [Sat, 17 Jan 2015 17:17:52 +0000 (17:17 +0000)]
Merge "BUG 2486 : Optimizations for a single node cluster deployment"

5 years agoMerge "Fixed missing dependencies in netconf-netty-util."
Tony Tkacik [Fri, 16 Jan 2015 12:50:26 +0000 (12:50 +0000)]
Merge "Fixed missing dependencies in netconf-netty-util."

5 years agoMerge "Increase timeout in config pusher for conflicting version ex"
Tony Tkacik [Fri, 16 Jan 2015 12:49:55 +0000 (12:49 +0000)]
Merge "Increase timeout in config pusher for conflicting version ex"

5 years agoMerge "Remove dead code"
Tony Tkacik [Fri, 16 Jan 2015 12:05:59 +0000 (12:05 +0000)]
Merge "Remove dead code"

5 years agoMerge "Remove string concatenation in preconditions"
Tony Tkacik [Fri, 16 Jan 2015 12:05:40 +0000 (12:05 +0000)]
Merge "Remove string concatenation in preconditions"

5 years agoMerge "Make check methods static"
Tony Tkacik [Fri, 16 Jan 2015 12:05:30 +0000 (12:05 +0000)]
Merge "Make check methods static"

5 years agoMerge "Migrace is() to isA()"
Tony Tkacik [Fri, 16 Jan 2015 12:05:20 +0000 (12:05 +0000)]
Merge "Migrace is() to isA()"

5 years agoIncrease timeout in config pusher for conflicting version ex 21/14121/2
Maros Marsalek [Mon, 12 Jan 2015 09:00:27 +0000 (10:00 +0100)]
Increase timeout in config pusher for conflicting version ex

Change-Id: Ie03354ec464f7f3e43a1df236d948533386484e1
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
5 years agoBug-2591 : Clustering: Shard does not notify a role change to Follower at the start 52/14152/2
Kamal Rameshan [Wed, 14 Jan 2015 22:43:42 +0000 (14:43 -0800)]
Bug-2591 : Clustering: Shard does not notify a role change to Follower at the start

Change-Id: I8a1accbfa3e1e7ae23300382251c273d876f40ae
Signed-off-by: Kamal Rameshan <kramesha@cisco.com>
5 years agoMerge "Bug 2358: Removed unused Hydrogen Data Store leftovers"
Tony Tkacik [Thu, 15 Jan 2015 15:49:44 +0000 (15:49 +0000)]
Merge "Bug 2358: Removed unused Hydrogen Data Store leftovers"

5 years agoBUG-2288: binding Notification API 45/13445/12
Robert Varga [Sat, 8 Nov 2014 10:48:47 +0000 (11:48 +0100)]
BUG-2288: binding Notification API

This is the definition of the new interfaces required to expose the new
DOM notification API to the users. It uses only the typed actor pattern,
reducing overall confusion to end users.

Change-Id: I12f14c1fa931511aa7b73d3b0491f848d6c08ba7
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoBug 2358: Removed unused Hydrogen Data Store leftovers 67/14167/3
Tony Tkacik [Thu, 15 Jan 2015 11:31:57 +0000 (12:31 +0100)]
Bug 2358: Removed unused Hydrogen Data Store leftovers

Removed unused legacy code, which  just increases complexity of code,
is not used and will be not used, since better solution exists
and was in place in Helium.

Change-Id: Ie58033d34ef3fcc7419db9ed9bce548b32fa24fd
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
5 years agoFixed missing dependencies in netconf-netty-util. 03/14103/2
Tomas Cere [Mon, 12 Jan 2015 11:33:32 +0000 (12:33 +0100)]
Fixed missing dependencies in netconf-netty-util.

Change-Id: I75a7d9c39d537abf3f64e9750f154b0b70484524
Signed-off-by: Tomas Cere <tcere@cisco.com>
5 years agoMerge "Fix a race PingPongTransactionChain"
Tony Tkacik [Thu, 15 Jan 2015 10:12:10 +0000 (10:12 +0000)]
Merge "Fix a race PingPongTransactionChain"

5 years agoRemove dead code 02/14102/2
Robert Varga [Mon, 12 Jan 2015 11:58:03 +0000 (12:58 +0100)]
Remove dead code

The moduleIdentity reference is checked for non-null in a preceding condition,
so the entire branch is provably dead. Also removes string
concatenation.

Change-Id: I8c2ad967af53a5216359677b8d7e3975294c942b
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoRemove string concatenation in preconditions 01/14101/2
Robert Varga [Mon, 12 Jan 2015 11:55:15 +0000 (12:55 +0100)]
Remove string concatenation in preconditions

Preconditions support String.format()-style arguments, the use of which
actually makes them faster, as the singular string need not be
constructed if it's not used.

Change-Id: Ib60bf458e2ef57df71fa6d2820af0110632cb37f
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoMake check methods static 00/14100/2
Robert Varga [Mon, 12 Jan 2015 11:54:52 +0000 (12:54 +0100)]
Make check methods static

The check methods do not have to have access to the object, so make them
static, making the interactions a bit more clear.

Change-Id: I954fbfe95d727532c17a5bf20b5d9434da40d27f
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoMigrace is() to isA() 99/14099/2
Robert Varga [Mon, 12 Jan 2015 11:55:32 +0000 (12:55 +0100)]
Migrace is() to isA()

The former is deprecated, so move to using the non-deprecated method.

Change-Id: I5b83e41e2c591fd3a742c64733e0205a60b08de5
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoBUG 2593 : Fix flakiness in ShardManager ActorNotInitialized tests 64/14164/1
Moiz Raja [Thu, 15 Jan 2015 03:19:04 +0000 (19:19 -0800)]
BUG 2593 : Fix flakiness in ShardManager ActorNotInitialized tests

Change-Id: I5bd37c3e37fc2db50654ce0255f7c84dfd3872d6
Signed-off-by: Moiz Raja <moraja@cisco.com>
5 years agoMerge "Fix bug #2569 XSQL delay controller load when in cluster env"
Moiz Raja [Thu, 15 Jan 2015 01:49:04 +0000 (01:49 +0000)]
Merge "Fix bug #2569 XSQL delay controller load when in cluster env"

5 years agoBUG 2586 : Disable operational persistence by default 57/14157/1
Moiz Raja [Wed, 14 Jan 2015 23:56:56 +0000 (15:56 -0800)]
BUG 2586 : Disable operational persistence by default

Change-Id: I000be115a7cf21003fc240bbe60c213c70876db0
Signed-off-by: Moiz Raja <moraja@cisco.com>
5 years agoBUG 2486 : Optimizations for a single node cluster deployment 43/13943/3
Moiz Raja [Thu, 18 Dec 2014 02:44:07 +0000 (18:44 -0800)]
BUG 2486 : Optimizations for a single node cluster deployment

The Clustered DataStore maintains an in-memory journal which contains
a list of modifications that were made to the underlying in-memory
data store. In a system with many transactions this journal will grow
and use up a lot of memory. This is what happens when we have a high
frequency writer like StatisticsManager.

The whole reason for maintaining an in-memory journal is for replication.
Recovery for the most part requires only the disk journal.

Since memory used by the in-memory journal grows dramatically it needs
to be trimmed occasionally. We do this trimming via the snapshotting
mechanism which both trims the journal and creates a snapshot on disk.

When we do not have replication on, i.e there are no followers for a
Shard there is no need for us to maintain this in-memory journal. This
patch adds an optimization in the RaftActor where if a RaftActor(Shard)
has no followers any entry that is persisted to the journal is immediately
removed by snapshotting. However since the only reason we are snapshotting
is to trim the log we do not need to go through the usual snapshotting
mechanism which creates a serialized version of the state in in-memory
data store and then writes it to disk. So, this patch does a further
optimization by fake snapshotting. Fake snapshotting just increments the
snapshotIndex in the in-memory journal - this helps when occasionally
we do the real snapshotting.

When we have no replication and no persistence a further optimization
can be done which is to completely ignore writing (or) maintaining an
in-memory journal. This means that when a commit comes through we
immediately apply the modification made by that transaction to the
state.

With these optimizations in-place the memory usage of the controller is
well in-line with what one would see with the in-memory data store. The
performance will not quite be there because of the additional queues
and executors that a Clustered Data Store transaction has to go through.

Change-Id: I4db056e26ea48f342ec2c5a934a3ad15f52cca0f
Signed-off-by: Moiz Raja <moraja@cisco.com>
5 years agoWorking opendaylight-startup archetype 15/14115/4
Ed Warnicke [Mon, 12 Jan 2015 23:26:54 +0000 (17:26 -0600)]
Working opendaylight-startup archetype

Change-Id: I48b68884ccae84379fe9896ba9d660eea5cd37d6
Signed-off-by: Ed Warnicke <eaw@cisco.com>
5 years agoRemoved deprecated methods from BindingAwareProvider 06/13806/12
Ed Warnicke [Mon, 12 Jan 2015 01:02:35 +0000 (19:02 -0600)]
Removed deprecated methods from BindingAwareProvider

Also deprecated
BindingAwareBroker.registerConsumer(BindingAwareConsumer,BundleContext)
in favor of the newly added:
BindingAwareBroker.registerConsumer(BindingAwareConsumer)

and
BindingAwareBroker.registerProvider(BindingAwareProvider,BundleContext)
in favor of the newly added:
BindingAwareBroker.registerProvider(BindingAwareProvider)

Change-Id: Id256c81a7210640b9a493a3f0fc71a9e0379e317
Signed-off-by: Ed Warnicke <eaw@cisco.com>
5 years agoFix bug in config-parent clean configuration 94/14094/2
Ed Warnicke [Mon, 12 Jan 2015 03:17:19 +0000 (21:17 -0600)]
Fix bug in config-parent clean configuration

Change-Id: I1866bfdc069d8c3d5f0f0c8990f08c727cfe64a1
Signed-off-by: Ed Warnicke <eaw@cisco.com>
5 years agoMerge "Optimize Capability.getLocation()"
Tony Tkacik [Mon, 12 Jan 2015 16:31:29 +0000 (16:31 +0000)]
Merge "Optimize Capability.getLocation()"

5 years agoMerge "Make sure NetconfTestImplModule is indented"
Tony Tkacik [Mon, 12 Jan 2015 16:31:09 +0000 (16:31 +0000)]
Merge "Make sure NetconfTestImplModule is indented"

5 years agoFix a race PingPongTransactionChain 06/14106/2
Robert Varga [Mon, 12 Jan 2015 15:52:00 +0000 (16:52 +0100)]
Fix a race PingPongTransactionChain

As it turns out, we have made an illegal shortcut while readying a transaction. This results in the following exception,
which occurs if we happen to want to allocate a transaction while it is being submitted to backed.

Exception in thread "Thread-18" java.lang.IllegalStateException: Previous transaction DOM-OPER-9 is not ready yet
        at com.google.common.base.Preconditions.checkState(Preconditions.java:176)
        at org.opendaylight.controller.md.sal.dom.store.impl.DOMStoreTransactionChainImpl$Allocated.getSnapshot(DOMStoreTransactionChainImpl.java:68)
        at org.opendaylight.controller.md.sal.dom.store.impl.DOMStoreTransactionChainImpl.getSnapshot(DOMStoreTransactionChainImpl.java:111)
        at org.opendaylight.controller.md.sal.dom.store.impl.DOMStoreTransactionChainImpl.newReadWriteTransaction(DOMStoreTransactionChainImpl.java:131)
        at org.opendaylight.controller.md.sal.dom.broker.impl.AbstractDOMForwardedTransactionFactory.newReadWriteTransaction(AbstractDOMForwardedTransactionFactory.java:206)
        at org.opendaylight.controller.md.sal.dom.broker.impl.PingPongTransactionChain.slowAllocateTransaction(PingPongTransactionChain.java:128)
        at org.opendaylight.controller.md.sal.dom.broker.impl.PingPongTransactionChain.allocateTransaction(PingPongTransactionChain.java:145)
        at org.opendaylight.controller.md.sal.dom.broker.impl.PingPongTransactionChain.newReadWriteTransaction(PingPongTransactionChain.java:279)
        at org.opendaylight.controller.md.sal.dom.broker.impl.PingPongTransactionChain.newWriteOnlyTransaction(PingPongTransactionChain.java:310)
        at org.opendaylight.controller.md.sal.binding.impl.BindingTranslatedTransactionChain.newWriteOnlyTransaction(BindingTranslatedTransactionChain.java:77)
        at org.opendaylight.protocol.bgp.rib.impl.RIBImpl$1.run(RIBImpl.java:125)
        at java.lang.Thread.run(Thread.java:745)

Change-Id: Ie21cf5f0ebba79fa25358da2ee1e6b22cfb0f906
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoCancel transaction on failure in restconf 14/13714/3
Maros Marsalek [Wed, 17 Dec 2014 13:38:35 +0000 (14:38 +0100)]
Cancel transaction on failure in restconf

This allows for proper resource cleanup for e.g. remote netconf transaction

Change-Id: Ib072ca3497a363d1a813c2161f25d10c536c3614
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
5 years agofindModule method refactoring 79/9279/10
Jozef Gloncak [Thu, 24 Jul 2014 09:06:09 +0000 (11:06 +0200)]
findModule method refactoring

From method findModule() of RestconfImpl was removed original exception
because the case when data == null can't (before every call of findModule
is checked whether data != null)

New exception was added because just after calling of findModule() method
was always checked whether returning value is != null and if it was so the
exception was raised.

Change-Id: I7023ab50e06e6056bc312a2a702bac8bab48ef0a
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
5 years agoMerge "Fix compilation warnings: replace deprecated org.apache.felix classes"
Tom Pantelis [Fri, 9 Jan 2015 23:49:30 +0000 (23:49 +0000)]
Merge "Fix compilation warnings: replace deprecated org.apache.felix classes"

5 years agoAdded sun.misc to jre.properties 21/14021/1
Ed Warnicke [Fri, 9 Jan 2015 17:47:58 +0000 (11:47 -0600)]
Added sun.misc to jre.properties

Change-Id: I7a65f74a92e5c6a5b2b77f2503f6ca14814e70af
Signed-off-by: Ed Warnicke <eaw@cisco.com>
5 years agoOptimize Capability.getLocation() 11/13411/13
Maros Marsalek [Fri, 9 Jan 2015 09:05:54 +0000 (10:05 +0100)]
Optimize Capability.getLocation()

Instead of wrapping a List in an Optional, return a Collection -- when
empty, it is the same thing as Optional.absent(). We can then optimize
some of the object allocations.

Change-Id: I040e1e80d9012c2809370accb89daf038c7cd2e4
Signed-off-by: Robert Varga <rovarga@cisco.com>
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
5 years agoMerge "Fix compilation warnings: replace deprecated junit.framework.Assert"
Tom Pantelis [Thu, 8 Jan 2015 21:48:23 +0000 (21:48 +0000)]
Merge "Fix compilation warnings: replace deprecated junit.framework.Assert"

5 years agoFix bug #2569 XSQL delay controller load when in cluster env 06/14006/1
Sharon Aicler [Thu, 8 Jan 2015 19:01:35 +0000 (11:01 -0800)]
Fix bug #2569 XSQL delay controller load when in cluster env

Change-Id: I3507bf6106f49b9881fc02a0be8d4ec2db90dd28
Signed-off-by: Sharon Aicler <saichler@cisco.com>
5 years agoMerge "BUG-2560 Canonical write to remote netconf devices"
Tony Tkacik [Thu, 8 Jan 2015 13:34:07 +0000 (13:34 +0000)]
Merge "BUG-2560 Canonical write to remote netconf devices"

5 years agoMerge "Optimize inflight transitions"
Tony Tkacik [Thu, 8 Jan 2015 13:23:40 +0000 (13:23 +0000)]
Merge "Optimize inflight transitions"

5 years agoMerge "Remove lock out of the congested/reuse case"
Tony Tkacik [Thu, 8 Jan 2015 13:23:33 +0000 (13:23 +0000)]
Merge "Remove lock out of the congested/reuse case"

5 years agoMake sure NetconfTestImplModule is indented 93/13993/1
Robert Varga [Thu, 8 Jan 2015 13:04:44 +0000 (14:04 +0100)]
Make sure NetconfTestImplModule is indented

The stub file is copied as-is, leading to a generated file which does
not conform to checkstyle and fails build.

Change-Id: I5fbdd06aebc4b41607d386665a532901b1ec7e4e
Signed-off-by: Robert Varga <rovarga@cisco.com>
5 years agoOptimize inflight transitions 24/13124/4
Robert Varga [Mon, 24 Nov 2014 23:49:51 +0000 (00:49 +0100)]
Optimize inflight transitions

Change-Id: Iaab4941ab777eaef1068523fc055391d31ca3072
Signed-off-by: Robert Varga <rovarga@cisco.com>

©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.