mdsal.git
9 years agoBUG-1382: do not instantiate prefixed QNames
Robert Varga [Tue, 16 Dec 2014 12:41:26 +0000 (13:41 +0100)]
BUG-1382: do not instantiate prefixed QNames

Prefix-aware QName constructor is going away, do not use it. Also fix
all references to QName.getPrefix().

Change-Id: Ife6567a269c2db16019ae97a6eace74a19ac3b23
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-2288: DOMNotification API"
Tony Tkacik [Thu, 18 Dec 2014 14:13:12 +0000 (14:13 +0000)]
Merge "BUG-2288: DOMNotification API"

9 years agoMerge "Remove throws declaration of a runtime exception"
Tony Tkacik [Mon, 15 Dec 2014 15:07:09 +0000 (15:07 +0000)]
Merge "Remove throws declaration of a runtime exception"

9 years agoMerge "Shorten org.opendaylight.controller.sal.core.api.Broker.RoutedRpcRegistration"
Tony Tkacik [Mon, 15 Dec 2014 11:42:32 +0000 (11:42 +0000)]
Merge "Shorten org.opendaylight.controller.sal.core.api.Broker.RoutedRpcRegistration"

9 years agoMerge "Registry instance cannot be null in RpcProxyRegistration"
Tony Tkacik [Mon, 15 Dec 2014 11:37:34 +0000 (11:37 +0000)]
Merge "Registry instance cannot be null in RpcProxyRegistration"

9 years agoMerge "Do not instantiate FluentIterable"
Tony Tkacik [Mon, 15 Dec 2014 11:37:25 +0000 (11:37 +0000)]
Merge "Do not instantiate FluentIterable"

9 years agoRemove throws declaration of a runtime exception
Robert Varga [Sun, 14 Dec 2014 18:18:40 +0000 (19:18 +0100)]
Remove throws declaration of a runtime exception

IllegalStateException is a RuntimeException -- hence we do not need to
declare it.

Change-Id: I681eff319b299beecf7710c44f154c1bb1b5174a
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoShorten org.opendaylight.controller.sal.core.api.Broker.RoutedRpcRegistration
Robert Varga [Sun, 14 Dec 2014 17:38:56 +0000 (18:38 +0100)]
Shorten org.opendaylight.controller.sal.core.api.Broker.RoutedRpcRegistration

We can safely import the class, shortening references to it.

Change-Id: I41d5ca29f1dd4daff726d3598c1bf14732318752
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoRegistry instance cannot be null in RpcProxyRegistration
Robert Varga [Sun, 14 Dec 2014 17:21:25 +0000 (18:21 +0100)]
Registry instance cannot be null in RpcProxyRegistration

removeRegistration() is guaranteed to be invoked at most once, and
registry cannot be null. Make it final and remove the safety check.

Change-Id: Ie8f2da7430c076d0bec71eb8b58a4adc2af25adf
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoDo not instantiate FluentIterable
Robert Varga [Sun, 14 Dec 2014 17:16:50 +0000 (18:16 +0100)]
Do not instantiate FluentIterable

We are performing an immediate transformation of the iterrable.
Instead of that we can immediately use Collections2.transform(), saving
an object.

Change-Id: Ie943a0a79e04713427bf6470e06d921412ebb179
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge topic 'stable/helium'
Tony Tkacik [Mon, 15 Dec 2014 07:57:53 +0000 (07:57 +0000)]
Merge topic 'stable/helium'

* changes:
  Shorten YangInstanceIdentifier references
  BUG-2510: handle RPC route removal

9 years agoMerge "BUG-2510: Remove all registrations when a routed rpc is closed"
Tony Tkacik [Mon, 15 Dec 2014 07:56:57 +0000 (07:56 +0000)]
Merge "BUG-2510: Remove all registrations when a routed rpc is closed"

9 years agoMerge "Mark DomBrokerImplModule.createLegacyDataService() as deprecated"
Tony Tkacik [Mon, 15 Dec 2014 07:51:25 +0000 (07:51 +0000)]
Merge "Mark DomBrokerImplModule.createLegacyDataService() as deprecated"

9 years agoMerge "BUG-2500: add current tree state to traces"
Tony Tkacik [Mon, 15 Dec 2014 07:51:15 +0000 (07:51 +0000)]
Merge "BUG-2500: add current tree state to traces"

9 years agoShorten YangInstanceIdentifier references
Robert Varga [Sun, 14 Dec 2014 17:13:10 +0000 (18:13 +0100)]
Shorten YangInstanceIdentifier references

We no longer have InstanceIdentifier name clash, so we can safely import
YangInstanceIdentifier and use it that way.

Change-Id: I48d13f9e6ecd17c1de40b5a017962cfc792810ad
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-2510: handle RPC route removal
Robert Varga [Sun, 14 Dec 2014 18:32:13 +0000 (19:32 +0100)]
BUG-2510: handle RPC route removal

DOM to Binding forwarding ignored removals of RPC implementations. Add
that case back.

Change-Id: I7af1d8b43b9b229cc9a696cfdfc61146f960b374
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-2510: Remove all registrations when a routed rpc is closed
Robert Varga [Sun, 14 Dec 2014 18:20:00 +0000 (19:20 +0100)]
BUG-2510: Remove all registrations when a routed rpc is closed

The API contract specifies that the effects of a Registration are
removed on close(). Unfortunately the routed RPC case is more funny, as
it has sub-registrations, for each added path -- and we have no mention
of the fact that the user should be removing them.

Hence we need to handle the user expecting us to remove any and all
paths which have been registered.

Change-Id: Iedf451c2a481d648173819f895cccb9e63c54d99
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMark DomBrokerImplModule.createLegacyDataService() as deprecated
Robert Varga [Mon, 24 Nov 2014 16:40:49 +0000 (17:40 +0100)]
Mark DomBrokerImplModule.createLegacyDataService() as deprecated

This marks the method deprecated, as we want to get rid of it. Fixes a
few warnings.

Change-Id: If4e613c07e9cd2b9b737fd697cbcd5709499c4d6
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-2500: add current tree state to traces
Robert Varga [Thu, 11 Dec 2014 12:10:10 +0000 (13:10 +0100)]
BUG-2500: add current tree state to traces

When a data validation exception occurs, also add the current tree state
to trace output.

Change-Id: I637973458519d4ed25fa3203fa79b72faf9a9e8b
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-2506: split out maven binding
Robert Varga [Fri, 12 Dec 2014 11:07:45 +0000 (12:07 +0100)]
BUG-2506: split out maven binding

Maven integration needs to be split out of the runtime implementation,
simply because we do not want to pull the requisite runtime into our
containers. It would never be used there anyway.

Change-Id: Ided36e3b06316739a3829d758889ba523e7e19ad
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-2470: add trace of failed modification"
Tony Tkacik [Wed, 10 Dec 2014 15:35:38 +0000 (15:35 +0000)]
Merge "BUG-2470: add trace of failed modification"

9 years agoMerge topic 'checkstyle'
Tony Tkacik [Wed, 10 Dec 2014 09:11:31 +0000 (09:11 +0000)]
Merge topic 'checkstyle'

* changes:
  Fix checkstyle if-statements must use braces liblldp
  Fix checkstyle if-statements must use braces hosttracker
  Fix checkstyle if-statements must use braces bundlescanner
  Fix checkstyle if-statements must use braces ClusterManager
  Fix checkstyle if-statements must use braces HostTrackerCallable
  Fix checkstyle if-statements must use braces ConnectionManagerNorthbound
  Fix checkstyle if-statements must use braces HostTrackerNorthbound
  Fix checkstyle if-statements must use braces BridgeDomainNorthbound
  Fix checkstyle if-statements must use braces adsal/northbound/staticrouting
  Fix checkstyle if-statements must use braces adsal/northbound/statistics
  Fix checkstyle if-statements must use braces adsal/protocol_plugins
  Fix checkstyle if-statements must use braces adsal/sal/connection
  Fix checkstyle if-statements must use braces adsal/samples/loadbalancer
  Fix checkstyle if-statements must use braces adsal/usermanager
  Fix checkstyle if-statements must use braces config-persister-file-xml-adapter
  Fix checkstyle if-statements must use braces logback-config
  Fix checkstyle if-statements must use braces yang-jmx-generator-plugin
  Fix checkstyle if-statements must use braces yang-jmx-generator
  Fix checkstyle if-statements must use braces sal-common-impl
  Fix checkstyle if-statements must use braces sal-common-util
  Fix checkstyle if-statements must use braces sal-dom-xsql
  Fix checkstyle if-statements must use braces sal-netconf-connector
  Fix checkstyle if-statements must use braces sal-rest-docgen
  Fix checkstyle if-statements must use braces md/statistics
  Fix checkstyle if-statements must use braces netconf

9 years agoFix checkstyle if-statements must use braces sal-common-impl
Thanh Ha [Tue, 9 Dec 2014 22:42:25 +0000 (17:42 -0500)]
Fix checkstyle if-statements must use braces sal-common-impl

Change-Id: Ib2d0a8bcf4cef4a589a8c23181433dd14ea84657
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
9 years agoFix checkstyle if-statements must use braces sal-common-util
Thanh Ha [Tue, 9 Dec 2014 22:41:24 +0000 (17:41 -0500)]
Fix checkstyle if-statements must use braces sal-common-util

Change-Id: I518b9fa156af55c080d7e6a55067deab2c789a42
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
9 years agoBUG-2470: add trace of failed modification
Robert Varga [Tue, 9 Dec 2014 17:01:10 +0000 (18:01 +0100)]
BUG-2470: add trace of failed modification

With this change, the InMemoryDOMDataStore trace logs should contain the
dump of failed modifications.

Change-Id: Iea3038169090a574030c5e03cf155089faa6e985
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-2288: DOMNotification API
Robert Varga [Wed, 17 Sep 2014 19:17:43 +0000 (21:17 +0200)]
BUG-2288: DOMNotification API

This API definition tries to fix the missing pieces in the
CompositeNode-centered APIs, such as inability to drop a notification
rather than waiting for resources needed to publish it to become
available.

Also adds missing documentation to the DOMService concept, which is used
by the two services being defined.

Change-Id: I93d22cf6121a7cf231b2da424e94d14b59fb883f
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Refactor DOMDataBrokerImpl"
Tony Tkacik [Wed, 3 Dec 2014 10:28:00 +0000 (10:28 +0000)]
Merge "Refactor DOMDataBrokerImpl"

9 years agoMerge "Add MD-SAL artifacts"
Tony Tkacik [Wed, 3 Dec 2014 10:27:44 +0000 (10:27 +0000)]
Merge "Add MD-SAL artifacts"

9 years agoMerge "Remove use of xtend"
Tony Tkacik [Wed, 3 Dec 2014 10:26:32 +0000 (10:26 +0000)]
Merge "Remove use of xtend"

9 years agoRefactor DOMDataBrokerImpl
Robert Varga [Mon, 24 Nov 2014 14:15:42 +0000 (15:15 +0100)]
Refactor DOMDataBrokerImpl

This patch shuffles the abstractions, eliminating two intermediate
interfaces and ensuring proper layring is maintained with
AbstractDataBroker serving as a base for the Concurrent and Serialized
versions.

Change-Id: If363aa796db0c2ebf22fdefe7659dd428745dc75
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoRemove use of xtend
Robert Varga [Thu, 27 Nov 2014 23:49:18 +0000 (00:49 +0100)]
Remove use of xtend

This patch converts RuntimeCodeGenerator into pure Java, optimizing it
in the process a bit. Since this is the last piece of Xtend code in
controller, also remove any trace of xtend.

Change-Id: I462968202d0e26c852aa683905b97bab8c5f99cf
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoAdd MD-SAL artifacts
Robert Varga [Mon, 1 Dec 2014 14:49:03 +0000 (15:49 +0100)]
Add MD-SAL artifacts

This migrates the version declarations into mdsal-artifacts artifact,
such that they can be imported by downstream projects. This will be
shuffled again as we define the scope more.

Change-Id: Ie97584dd477b786e3fc4f6d79a174425c020fa0c
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-2259: mark AbstractBindingAware* as deprecated"
Tony Tkacik [Mon, 1 Dec 2014 08:28:37 +0000 (08:28 +0000)]
Merge "BUG-2259: mark AbstractBindingAware* as deprecated"

9 years agoBUG-2259: mark AbstractBindingAware* as deprecated
Robert Varga [Thu, 20 Nov 2014 11:15:03 +0000 (12:15 +0100)]
BUG-2259: mark AbstractBindingAware* as deprecated

These classes encapsulate OSGi-activated clients, which are deprecated
in favor of using config subsystem activation.

Change-Id: I9632c6608be67e5763117a9bbb6e9c2519eb27b0
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-2255: introduce PingPongDataBroker
Robert Varga [Thu, 6 Nov 2014 19:13:59 +0000 (20:13 +0100)]
BUG-2255: introduce PingPongDataBroker

This is a forwarding DOMDataBroker implementation, which ensures that
there is at most one transaction pending for a particular transaction
chain. This is not useful in all scenarios, but if the users can
restrain themselves to use the supported semantics, they can use it.

Change-Id: I4a9ca12254763829f99e270d6716cd034b4b5ea9
Signed-off-by: Robert Varga <rovarga@cisco.com>
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
9 years agoMerge changes If7159c39,I6c84b2fe
Tony Tkacik [Tue, 25 Nov 2014 08:53:14 +0000 (08:53 +0000)]
Merge changes If7159c39,I6c84b2fe

* changes:
  Deprecate ForwardedBackwardsCompatibleDataBroker
  Migrate from using the deprecated SchemaContextProvider

9 years agoMerge "Migrate FRM/SM to use model API SchemaContextProvider"
Tony Tkacik [Tue, 25 Nov 2014 08:51:54 +0000 (08:51 +0000)]
Merge "Migrate FRM/SM to use model API SchemaContextProvider"

9 years agoDeprecate ForwardedBackwardsCompatibleDataBroker
Robert Varga [Fri, 21 Nov 2014 16:55:30 +0000 (17:55 +0100)]
Deprecate ForwardedBackwardsCompatibleDataBroker

It implements a deprecated API only, so rather than suppressing the
deprecation warnings, deprecate the entire class.

Change-Id: If7159c3960b3ca2707bb4b9c716e95ed38ddb394
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMigrate from using the deprecated SchemaContextProvider
Robert Varga [Fri, 21 Nov 2014 17:08:51 +0000 (18:08 +0100)]
Migrate from using the deprecated SchemaContextProvider

org.opendaylight.controller.sal.dom.broker.SchemaContextProvider has
been deprecated, the services away so it is no longer used.

Change-Id: I6c84b2fe6ce02dce71aed4e4c24f8bc84ba078d8
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMigrate FRM/SM to use model API SchemaContextProvider
Robert Varga [Fri, 21 Nov 2014 16:53:07 +0000 (17:53 +0100)]
Migrate FRM/SM to use model API SchemaContextProvider

Simple migration, eliminates the need for deprecation suppression.

Change-Id: Ic6d14c15dd1909d89c9b76bef20c36cdbde23187
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-8: mark deprecated classes as such"
Tony Tkacik [Fri, 21 Nov 2014 15:45:34 +0000 (15:45 +0000)]
Merge "BUG-8: mark deprecated classes as such"

9 years agoBug 865: Changed Config subsystem module for ForwardedBindingDataBroker.
Tony Tkacik [Thu, 20 Nov 2014 16:49:47 +0000 (17:49 +0100)]
Bug 865: Changed Config subsystem module for ForwardedBindingDataBroker.

Implementation of new Bidning Data Broker was wired to deprecated APIs
and used broker to discover dependencies which did not allowed for
full-fledged customized wiring. Reworked configuration to explicitly
allow injection of each required depenency and to not use
deprecated APIs for dependency injection.

Change-Id: Iccbb20ee4bb1df380f5fc4a3a1bbc5748dcc5a38
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "BUG-650: Split out CommitCoordinationTask"
Tony Tkacik [Fri, 21 Nov 2014 11:58:21 +0000 (11:58 +0000)]
Merge "BUG-650: Split out CommitCoordinationTask"

9 years agoBUG-650: Split out CommitCoordinationTask
Robert Varga [Thu, 2 Oct 2014 00:07:35 +0000 (02:07 +0200)]
BUG-650: Split out CommitCoordinationTask

The coordination task takes most of the coordinator implementation. We
do not want to expose it, but at the same time we want to evolve task.
Split it out and eliminate the unneeded atomic state updates, as it is
only ever touched by a single thread.

Change-Id: I49b494d23a8b8f9cdf6cb3dc33e08d22c5bf325e
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-650: remove executor abstraction"
Tony Tkacik [Fri, 21 Nov 2014 08:43:40 +0000 (08:43 +0000)]
Merge "BUG-650: remove executor abstraction"

9 years agoBUG-8: mark deprecated classes as such
Robert Varga [Thu, 20 Nov 2014 10:37:09 +0000 (11:37 +0100)]
BUG-8: mark deprecated classes as such

These classes refer to various deprecated interfaces of MD-SAL,
triggering a lot of warnings about deprecated constructs. Since these
classes themselves have been superseded, mark them as Deprecated,
lowering the amount of warnings we get.

Change-Id: I19753166fa1fd617ad7085b71a1218f6bc4a3f53
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-868: do not use YangInstanceIdentifier.getPath()"
Tony Tkacik [Thu, 20 Nov 2014 12:48:34 +0000 (12:48 +0000)]
Merge "BUG-868: do not use YangInstanceIdentifier.getPath()"

9 years agoBUG-650: remove executor abstraction
Robert Varga [Sat, 20 Sep 2014 10:07:05 +0000 (12:07 +0200)]
BUG-650: remove executor abstraction

This patch removes sameThreadExecutor from the commit path, eliminating
associated overhead. Relevant benchmarks show improvement pretty much
across the board:

BEFORE                                                            millis        error
write100KSingleNodeWithOneInnerItemInCommitPerWriteBenchmark    2213.735       77.597
write100KSingleNodeWithOneInnerItemInOneCommitBenchmark          171.524        2.289
write10KSingleNodeWithTenInnerItemsInCommitPerWriteBenchmark     164.282        1.391
write10KSingleNodeWithTenInnerItemsInOneCommitBenchmark           14.161        0.196
write50KSingleNodeWithTwoInnerItemsInCommitPerWriteBenchmark     982.697       29.397
write50KSingleNodeWithTwoInnerItemsInOneCommitBenchmark           93.233        2.174

AFTER                                                             millis        error   delta
write100KSingleNodeWithOneInnerItemInCommitPerWriteBenchmark    2138.900       75.844   -3.4%
write100KSingleNodeWithOneInnerItemInOneCommitBenchmark          177.839        3.997   +3.5%
write10KSingleNodeWithTenInnerItemsInCommitPerWriteBenchmark     158.666        1.090   -3.5%
write10KSingleNodeWithTenInnerItemsInOneCommitBenchmark           13.022        0.105   -8.0%
write50KSingleNodeWithTwoInnerItemsInCommitPerWriteBenchmark     935.490       30.395   -4.8%
write50KSingleNodeWithTwoInnerItemsInOneCommitBenchmark           89.907        1.204   -3.6%

Furthermore it cleans up and marks FIXMEs for defunct statistics. These
will need to be replaced with implementation which does not assume
underlying implementation.

Change-Id: I01c51462a8529a2f874ecd2f9af05faba503bc58
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-868: do not use YangInstanceIdentifier.getPath()
Robert Varga [Thu, 20 Nov 2014 09:59:09 +0000 (10:59 +0100)]
BUG-868: do not use YangInstanceIdentifier.getPath()

This method has been deprecated, so stop using it.

Change-Id: Ibfaf7e40a3d119ed05ff5743c4869e345d18e298
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Fix typos and missing space"
Tony Tkacik [Thu, 20 Nov 2014 11:27:40 +0000 (11:27 +0000)]
Merge "Fix typos and missing space"

9 years agoFix typos and missing space
Robert Varga [Sat, 1 Nov 2014 15:18:13 +0000 (16:18 +0100)]
Fix typos and missing space

Change-Id: Iaf581baea36091724eebbc5de33dda34605e1912
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Remove unneeded embedded dependency"
Tony Tkacik [Thu, 20 Nov 2014 08:42:10 +0000 (08:42 +0000)]
Merge "Remove unneeded embedded dependency"

9 years agoRemove unneeded embedded dependency
Robert Varga [Thu, 13 Nov 2014 22:12:38 +0000 (23:12 +0100)]
Remove unneeded embedded dependency

yangtools:util already embeds the dependency with a different version,
causing a potential clash. Since sal-dom-broker is not a direct user,
this will work just fine.

Change-Id: If92555d6feb15c6ee9495fb789244750a48e9129
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Bug 2347: Minor fixes to correct log output"
Moiz Raja [Thu, 13 Nov 2014 21:47:14 +0000 (21:47 +0000)]
Merge "Bug 2347: Minor fixes to correct log output"

9 years agoBug 2347: Minor fixes to correct log output
tpantelis [Thu, 13 Nov 2014 02:57:49 +0000 (21:57 -0500)]
Bug 2347: Minor fixes to correct log output

DOMConcurrentDataCommitCoordinator#handleException hard-codes the error
mapper to CAN_COMMIT_ERROR_MAPPER however this should be passed
in corresponding to the phase.

In TransactionCommitFailedExceptionMapper, the opNames for
PRE_COMMIT_MAPPER and CAN_COMMIT_ERROR_MAPPER are reversed, should be
"preCommit", "canCommit" respectively.

Change-Id: I6c0513f0f6265ec19de39476c95efefee53d2ee1
Signed-off-by: tpantelis <tpanteli@brocade.com>
9 years agoMerge "Bug 2347: DOMConcurrentDataCommitCoordinator uses wrong phase name"
Moiz Raja [Wed, 12 Nov 2014 18:14:29 +0000 (18:14 +0000)]
Merge "Bug 2347: DOMConcurrentDataCommitCoordinator uses wrong phase name"

9 years agoBug 2347: DOMConcurrentDataCommitCoordinator uses wrong phase name
tpantelis [Wed, 12 Nov 2014 16:21:40 +0000 (11:21 -0500)]
Bug 2347: DOMConcurrentDataCommitCoordinator uses wrong phase name

Change-Id: I8b9083a428553525861137fc8630635f6508c2dc
Signed-off-by: tpantelis <tpanteli@brocade.com>
9 years agoMerge "Remove dead code in RuntimeMappingModule"
Tony Tkacik [Mon, 10 Nov 2014 08:54:36 +0000 (08:54 +0000)]
Merge "Remove dead code in RuntimeMappingModule"

9 years agoMerge "Do not override managed versions"
Tony Tkacik [Mon, 10 Nov 2014 08:54:13 +0000 (08:54 +0000)]
Merge "Do not override managed versions"

9 years agoRemove dead code in RuntimeMappingModule
Robert Varga [Fri, 7 Nov 2014 19:27:49 +0000 (20:27 +0100)]
Remove dead code in RuntimeMappingModule

RuntimeMappingModule.RuntimeGeneratedMappingServiceProxy is private and
not used locally. Remove it, as it also uses deprecated classes -- thus
eliminating quite a few eclipse warnings.

Change-Id: Ica5d11dfceb34435af30811c79f9c2bd194575a8
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge changes I52c2aaab,I2509ed5e,Ic1d8a4e5,I73730f79,Ica1959e5,I0ce61b07
Tony Tkacik [Sat, 8 Nov 2014 16:06:15 +0000 (16:06 +0000)]
Merge changes I52c2aaab,I2509ed5e,Ic1d8a4e5,I73730f79,Ica1959e5,I0ce61b07

* changes:
  Fix a raw Dictionary reference
  Fix a raw Enumeration reference
  Fix a non-generic CheckedFuture
  Access static methods via class
  Remove unused local variable
  Fix non-generic references to Optional

9 years agoMerge "Do not create Map subclasses"
Tony Tkacik [Sat, 8 Nov 2014 15:59:58 +0000 (15:59 +0000)]
Merge "Do not create Map subclasses"

9 years agoFix non-generic references to Optional
Robert Varga [Fri, 7 Nov 2014 17:09:24 +0000 (18:09 +0100)]
Fix non-generic references to Optional

Just adds arguments as needed.

Change-Id: I0ce61b07e3286a2d3415c92bbbe5e5bc28b5baef
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoDo not create Map subclasses
Robert Varga [Fri, 7 Nov 2014 19:34:56 +0000 (20:34 +0100)]
Do not create Map subclasses

Rather than using subclasses for initialization, which require a serial
version, populate them normally -- thus fixing warnings.

Change-Id: Ia204b3ed6a58acaee1de2f1d780a9421cd0eea8f
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoDo not override managed versions
Robert Varga [Fri, 7 Nov 2014 18:03:48 +0000 (19:03 +0100)]
Do not override managed versions

This fixes pom.xmls to not override managed versions. Should not result
in any version shift.

Change-Id: I0e30541f71118b8ec024b941b1f04e098f0b7179
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Update junit Assert imports"
Tony Tkacik [Fri, 7 Nov 2014 14:30:42 +0000 (14:30 +0000)]
Merge "Update junit Assert imports"

9 years agoUpdate junit Assert imports
Robert Varga [Fri, 7 Nov 2014 12:42:30 +0000 (13:42 +0100)]
Update junit Assert imports

JUnit 4.11 has moved Assert to org.junit, and deprecated
junit.framework.Assert. This adjust the imports to fix the warnings.

Change-Id: Iecbf2a1b4ae097989e840ad6f6d5bf759c521639
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoAdd generic arguments to Answer
Robert Varga [Thu, 6 Nov 2014 12:42:11 +0000 (13:42 +0100)]
Add generic arguments to Answer

Just use Object as the argument to get rid of the warnings.

Change-Id: I17d2ee9c518ed53c27bd5e1c330e7c161a388194
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Introduce forwarding DOMData classes"
Tony Tkacik [Fri, 7 Nov 2014 10:30:22 +0000 (10:30 +0000)]
Merge "Introduce forwarding DOMData classes"

9 years agoMerge "Fix a typo in javadoc"
Tony Tkacik [Fri, 7 Nov 2014 10:29:10 +0000 (10:29 +0000)]
Merge "Fix a typo in javadoc"

9 years agoMerge "Bug 2233 - RPC register exception when rpc has no input"
Tony Tkacik [Fri, 7 Nov 2014 10:18:49 +0000 (10:18 +0000)]
Merge "Bug 2233 - RPC register exception when rpc has no input"

9 years agoIntroduce forwarding DOMData classes
Robert Varga [Thu, 6 Nov 2014 14:31:36 +0000 (15:31 +0100)]
Introduce forwarding DOMData classes

These classes are useful for implementing various decorator. Their sole
functionality is to forward calls to a backing instance.

Change-Id: I8a65283ab6e3f9787dc59f43d7b7e8eb37459538
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoFix a typo in javadoc
Robert Varga [Thu, 6 Nov 2014 14:30:54 +0000 (15:30 +0100)]
Fix a typo in javadoc

Simple typo.

Change-Id: I9934e8674b0bb9c2dc8a28dcb189c213e7709cb9
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 2233 - RPC register exception when rpc has no input
Jan Hajnar [Fri, 31 Oct 2014 12:59:08 +0000 (13:59 +0100)]
Bug 2233 - RPC register exception when rpc has no input

* added check that should prevent non routed Rpcs being treated as
routed and and failing at context resolution.

Change-Id: I281152879429f2020f48894753f1d57aea85bde6
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
9 years agoMerge "Cleanup RpcRoutingStrategy definition"
Tony Tkacik [Mon, 27 Oct 2014 09:28:04 +0000 (09:28 +0000)]
Merge "Cleanup RpcRoutingStrategy definition"

9 years agoMerge "Bug 2160: Added concurrent 3-phase commit coordinator"
Moiz Raja [Fri, 17 Oct 2014 16:20:25 +0000 (16:20 +0000)]
Merge "Bug 2160: Added concurrent 3-phase commit coordinator"

9 years agoMerge "Bug 865: Fixed use of removed deprecated YANGInstanceIdentifier methods."
Tony Tkacik [Fri, 17 Oct 2014 13:35:10 +0000 (13:35 +0000)]
Merge "Bug 865: Fixed use of removed deprecated YANGInstanceIdentifier methods."

9 years agoBug 865: Fixed use of removed deprecated YANGInstanceIdentifier methods.
Tony Tkacik [Fri, 17 Oct 2014 12:05:06 +0000 (14:05 +0200)]
Bug 865: Fixed use of removed deprecated YANGInstanceIdentifier methods.

Some components in controller still used methods which was deprecated
before Helium and was removed after Helium was released to accomodate
API changes for 0.7.0 Yangtools. This patch migrates code to replacement
methods.

Change-Id: I146a08caefeb0d666223cf66600a4342a5b49165
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "BUG-2006: Rework state tracking"
Tony Tkacik [Fri, 17 Oct 2014 09:17:35 +0000 (09:17 +0000)]
Merge "BUG-2006: Rework state tracking"

9 years agoBUG-2006: Rework state tracking
Robert Varga [Thu, 18 Sep 2014 13:53:24 +0000 (15:53 +0200)]
BUG-2006: Rework state tracking

Separate out the two embedded classes to allow easier analysis of
interactions. Introduce a state-tracking class within
DOMStoreTransactionChainImpl with three distinct states: Idle, Allocated
and Shutdown. The allocated state has an internal sub-state when the
transaction has been readied. Perform atomic state transitions using
compare-and-swap.

Change-Id: I4b852d42455d7e07076c56af3626f804ba572770
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoCleanup RpcRoutingStrategy definition
Robert Varga [Wed, 17 Sep 2014 12:44:20 +0000 (14:44 +0200)]
Cleanup RpcRoutingStrategy definition

Adds preconditions and final keywords as appropriate, removes single-use
private static constructors.

Change-Id: If3bc7c46cb46edb1e2059453f42e1bfc521af46d
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 2160: Added concurrent 3-phase commit coordinator
tpantelis [Tue, 7 Oct 2014 13:34:01 +0000 (09:34 -0400)]
Bug 2160: Added concurrent 3-phase commit coordinator

Added a new class DOMConcurrentDataCommitCoordinator which is an
implementation of DOMDataCommitExecutor that allows multiple concurrent
3-phase transaction commits. The 3 phases are still performed serially and
non-blocking per transaction.

A new flag, "allow-concurrent-commits", was added to the DOM in-memory
data broker's yang config. If true, the new
DOMConcurrentDataCommitCoordinator implementation is used, otherwise the
current implementation is used. The default is false.

The distributed data store will use the concurrent coordinator.

Change-Id: Ie21947d6f9c1086f89686a73442c854c08c07100
Signed-off-by: tpantelis <tpanteli@brocade.com>
9 years agoIncrementing versions by 0.1.0 for post-Helium master branch
Colin Dixon [Fri, 3 Oct 2014 22:55:46 +0000 (17:55 -0500)]
Incrementing versions by 0.1.0 for post-Helium master branch

* The only version not incrmented is aaa.version, which is left at
  0.1.0-SNAPSHOT since they depend on controller and can't update yet.
* To break the cyclic dependency, this patch temporarily stops running
  the netconf-connector and restconf feature tests.
* Also fixing a bug causing Errors like "Choice has two nodes case with
  same qnames".

A second patch (to be run after AAA increments their versions to
0.2.0-SNAPSHOT) wiil update aaa.version and re-enable these tests.

Change-Id: I70a3987d32504e798c5ed05a67a0a1174338844b
Signed-off-by: Colin Dixon <colin@colindixon.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-1845: implement proper shutdown sequence"
Tony Tkacik [Mon, 22 Sep 2014 14:13:03 +0000 (14:13 +0000)]
Merge "BUG-1845: implement proper shutdown sequence"

9 years agoBUG-1845: implement proper shutdown sequence
Robert Varga [Thu, 18 Sep 2014 17:35:52 +0000 (19:35 +0200)]
BUG-1845: implement proper shutdown sequence

The notification chain should only invoke the successful callback once
all transactions have been committed successfully. This patch does
precisely that by tracking the number of outstanding transactions. Since
this requires notification about successful transactions, too, we get
rid of the unneeded DOMDataCommitErrorInvoker/Listener abstraction.

Change-Id: I38534a3fb79a8a461059504de7b0cdd48348afef
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Bug 1763: Fixed illegal state in Binding Transaction Chain."
Ed Warnicke [Thu, 18 Sep 2014 16:02:48 +0000 (16:02 +0000)]
Merge "Bug 1763: Fixed illegal state in Binding Transaction Chain."

9 years agoBUG-509: remove HashMapDataStore
Robert Varga [Sun, 14 Sep 2014 22:21:12 +0000 (00:21 +0200)]
BUG-509: remove HashMapDataStore

The HashMapDataStore is not something we want to ship in Helium -- it
is utterly obsolete and defunct. So just remove it.

Change-Id: I62977f0f897752a388673f977222c79ff55062f0
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-1933: consult state in subtree modified path"
Tony Tkacik [Wed, 17 Sep 2014 14:08:58 +0000 (14:08 +0000)]
Merge "BUG-1933: consult state in subtree modified path"

9 years agoBUG-1933: consult state in subtree modified path
Robert Varga [Wed, 17 Sep 2014 09:34:57 +0000 (11:34 +0200)]
BUG-1933: consult state in subtree modified path

resolveSubtreeChangeEvent() was missing a state.needsProcessing() check,
which means change resolution continued down that path eventhough no
listeners were subscribed to it. Add the check and return with a true if
we terminate early.

Change-Id: I7d386f3abd67c1a241ad88b5809236598dc967dd
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Bug 1904: Handle null ThreadExecutorStatsMXBeanImpl in ShardStats"
Moiz Raja [Tue, 16 Sep 2014 15:29:29 +0000 (15:29 +0000)]
Merge "Bug 1904: Handle null ThreadExecutorStatsMXBeanImpl in ShardStats"

9 years agoBUG-650: use SameThreadExecutor for commits
Robert Varga [Sun, 14 Sep 2014 22:06:54 +0000 (00:06 +0200)]
BUG-650: use SameThreadExecutor for commits

Profiling has shown that the cost of performing a forced context switch
in execution path of the data store leads to ~2x performance
degradation (23600 vs. 40000 ops/s), with average of 20 runs:

InMemoryDataStoreWithExecutorServiceBenchmark:                     total      stddev
write100KSingleNodeWithOneInnerItemInCommitPerWriteBenchmark    4227.384 ms   61.172
write100KSingleNodeWithOneInnerItemInOneCommitBenchmark          286.954 ms   14.350
write10KSingleNodeWithTenInnerItemsInCommitPerWriteBenchmark     364.004 ms   12.687
write10KSingleNodeWithTenInnerItemsInOneCommitBenchmark           17.936 ms    0.883
write50KSingleNodeWithTwoInnerItemsInCommitPerWriteBenchmark    1979.140 ms   56.529
write50KSingleNodeWithTwoInnerItemsInOneCommitBenchmark          136.749 ms    6.402

InMemoryDataStoreWithSameThreadedExecutorBenchmark:                total      stddev
write100KSingleNodeWithOneInnerItemInCommitPerWriteBenchmark    2475.137 ms  220.396
write100KSingleNodeWithOneInnerItemInOneCommitBenchmark          267.298 ms    7.063
write10KSingleNodeWithTenInnerItemsInCommitPerWriteBenchmark     180.537 ms    1.337
write10KSingleNodeWithTenInnerItemsInOneCommitBenchmark           19.582 ms    0.200
write50KSingleNodeWithTwoInnerItemsInCommitPerWriteBenchmark    1127.771 ms   87.438
write50KSingleNodeWithTwoInnerItemsInOneCommitBenchmark          134.401 ms    2.110

The analysis is that the underlying component (yang-data-impl's
DataTree) can process operations at a rate exceeding 30K ops/s,
obviously depending on size, which means a transaction is completed
every ~35 microseconds. When we factor in the fact that there is at most
one transaction issued at a particular moment (due to ordering/conflict
resolution), the ill effects of forced context switches become very much
pronounced.

This patch switches the executor service to SameThreadExecutor, which
foregoes queueing and executes the task on the submitting thread (which
is the datastore coordinator thread, not some user thread).

The option to switch the executor service is left intact, but may be
removed in future pending further benchmarks.

Change-Id: Ic1c4c0b1b80aa77c2d85810736bdc370a465eee8
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-650: allow executor stats to work with other executors
Robert Varga [Sun, 14 Sep 2014 22:04:41 +0000 (00:04 +0200)]
BUG-650: allow executor stats to work with other executors

Instead of requiring a threadpool-backed executor, we make the
constructor private and introduce a static factory method.

Change-Id: I904b90a16d3664341e32cb0d982299fca3205f0d
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-650: use an EnumMap for datastore map
Robert Varga [Sun, 14 Sep 2014 23:23:21 +0000 (01:23 +0200)]
BUG-650: use an EnumMap for datastore map

EnumMap has better performance characteristics than immutable map -- so
let's use it.

Change-Id: Ib15be015f38841469bccee8c8a1f19266897a5de
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-865: TransactionCommitDeadlockException safety
Robert Varga [Sun, 14 Sep 2014 22:03:04 +0000 (00:03 +0200)]
BUG-865: TransactionCommitDeadlockException safety

This patch fixes safety (public non-constant field) and improves
performance by using a shared RpcError instances. Also moves over to use
a Supplier instead of a Function.

Change-Id: Id9d269fe9be6dacea3c216d4ad76efa79bdb27f0
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-650: clarify TransactionFactory close state handling"
Tony Tkacik [Sun, 14 Sep 2014 15:00:50 +0000 (15:00 +0000)]
Merge "BUG-650: clarify TransactionFactory close state handling"

9 years agoBUG-650: clarify TransactionFactory close state handling
Robert Varga [Fri, 12 Sep 2014 21:45:02 +0000 (23:45 +0200)]
BUG-650: clarify TransactionFactory close state handling

getAndSet() translates to a get() + compareAndSet(). We already know the
expected value, so we can skip the first bit. The nice thing is that CAS
will readily give us a boolean, so the code becomes a bit more clear,
too.

Change-Id: Id77dcefb7ba85512fcebbcae7f43f08cd8094fbc
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge changes I9b32ab30,Iebe4701f
Tony Tkacik [Sat, 13 Sep 2014 12:46:44 +0000 (12:46 +0000)]
Merge changes I9b32ab30,Iebe4701f

* changes:
  BUG-650: speed CommitCoordinationTask up
  BUG-650: improve transaction chaining performance

9 years agoBUG-650: SnapshotBackedWriteTransaction performance
Robert Varga [Fri, 12 Sep 2014 16:59:24 +0000 (18:59 +0200)]
BUG-650: SnapshotBackedWriteTransaction performance

Remove synchronized block from ready() and cleanup exposed interfaces,
adding some task which need to be fixed still.

Change-Id: Ib1c25819eca60d393a742ab3ebfec6083fe9745d
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-650: speed CommitCoordinationTask up
Robert Varga [Fri, 12 Sep 2014 20:47:52 +0000 (22:47 +0200)]
BUG-650: speed CommitCoordinationTask up

Eliminates synchronized block in favor of a compare-and-swap -- the
logic was doing precisely that anyway.

Change-Id: I9b32ab303eb718e8a0af52526857eead65c2b697
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-650: speedup DOMDataBrokerTransactionChainImpl
Robert Varga [Fri, 12 Sep 2014 13:29:09 +0000 (15:29 +0200)]
BUG-650: speedup DOMDataBrokerTransactionChainImpl

The transaction chain implementation does not need to have
synchronization on submit, but rather it needs to check if the chain has
not been closed (implictly or explicitly). Same goes for the close path,
thus this patch speeds things up by downgrading the synchronized
sections to volatile reads and writes.

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