controller.git
7 years agoMerge "Bug 1819 - Moved bundle up in features.xml to avoid exception in log Change...
Tony Tkacik [Tue, 16 Sep 2014 10:32:53 +0000 (10:32 +0000)]
Merge "Bug 1819 - Moved bundle up in features.xml to avoid exception in log   Change-Id: Icbd3d8957d38ca74797c11f2c60683fa017c3246 Signed-off-by: Devin Avery <devin.avery@brocade.com>"

7 years agoMerge "BUG 1883 - Ensure that all debug logging is done conditionally"
Moiz Raja [Tue, 16 Sep 2014 10:22:28 +0000 (10:22 +0000)]
Merge "BUG 1883 - Ensure that all debug logging is done conditionally"

7 years agoMerge "Bug 1688: Fix IllegalStateEx from FlowCapableTopologyExporter"
Moiz Raja [Tue, 16 Sep 2014 09:59:09 +0000 (09:59 +0000)]
Merge "Bug 1688: Fix IllegalStateEx from FlowCapableTopologyExporter"

7 years agoBUG 1883 - Ensure that all debug logging is done conditionally 18/11218/4
Harman Singh [Tue, 16 Sep 2014 00:14:17 +0000 (17:14 -0700)]
BUG 1883 - Ensure that all debug logging is done conditionally

This commit is mostly about conditional logging.

It also sneaks in a couple of other things,
1. Cleanup of ClientRequestTracker
2. Removal of some dead code

Change-Id: I0862f1273e94856e19107d3a4beec4d66452787d
Signed-off-by: Moiz Raja <moraja@cisco.com>
Signed-off-by: Harman Singh <harmasin@cisco.com>
7 years agoMerge "Bug 1804: the condition was not working correctly to report leader"
Moiz Raja [Tue, 16 Sep 2014 00:26:17 +0000 (00:26 +0000)]
Merge "Bug 1804: the condition was not working correctly to report leader"

7 years agoMerge "Bug#1854 - Exit command in console causing OOM."
Moiz Raja [Mon, 15 Sep 2014 23:25:21 +0000 (23:25 +0000)]
Merge "Bug#1854 - Exit command in console causing OOM."

7 years agoBug 1804: the condition was not working correctly to report leader 12/11212/1
Harman Singh [Mon, 15 Sep 2014 22:48:45 +0000 (15:48 -0700)]
Bug 1804: the condition was not working correctly to report leader

Change-Id: Ie9b4d76f2cf623ecc17e17e3e64e6fe6a98c05be
Signed-off-by: Harman Singh <harmasin@cisco.com>
7 years agoBug#1854 - Exit command in console causing OOM. 97/11197/1
Sharon Aicler [Mon, 15 Sep 2014 17:17:23 +0000 (10:17 -0700)]
Bug#1854 - Exit command in console causing OOM.

Change-Id: I20606d7918b730c6b3d7e77a85227bc6a87a59b0
Signed-off-by: Sharon Aicler <saichler@cisco.com>
7 years agoMerge "Bug-1828 - Raft apply state missing index log should be of type warn and not...
Moiz Raja [Mon, 15 Sep 2014 17:00:42 +0000 (17:00 +0000)]
Merge "Bug-1828 - Raft apply state missing index log should be of type warn and not error"

7 years agoMerge "Bug-1830:Move install snapshot messages from akka-raft to sal-commons"
Moiz Raja [Mon, 15 Sep 2014 16:58:39 +0000 (16:58 +0000)]
Merge "Bug-1830:Move install snapshot messages from akka-raft to sal-commons"

7 years agoMerge "BUG 1853 : Clustered Data Store causes Out of Memory"
Tom Pantelis [Mon, 15 Sep 2014 16:36:26 +0000 (16:36 +0000)]
Merge "BUG 1853 : Clustered Data Store causes Out of Memory"

7 years agoBug 1819 - Moved bundle up in features.xml to avoid exception in log 62/11062/5
Devin Avery [Thu, 11 Sep 2014 17:38:03 +0000 (13:38 -0400)]
Bug 1819 - Moved bundle up in features.xml to avoid exception in log

Change-Id: Icbd3d8957d38ca74797c11f2c60683fa017c3246
Signed-off-by: Devin Avery <devin.avery@brocade.com>
7 years agoMerge "BUG-1871: FRM rpc register path (nodeIdent)"
Ed Warnicke [Mon, 15 Sep 2014 14:29:52 +0000 (14:29 +0000)]
Merge "BUG-1871: FRM rpc register path (nodeIdent)"

7 years agoBUG-1871: FRM rpc register path (nodeIdent) 68/11168/3
Robert Varga [Sun, 14 Sep 2014 19:42:40 +0000 (21:42 +0200)]
BUG-1871: FRM rpc register path (nodeIdent)

- removed FlowCapableNode from the end of provider lookup identifier

Change-Id: I7939a1dd8f2bcef60c3ca18600350515985598c3
Signed-off-by: Michal Rehak <mirehak@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-650: use SameThreadExecutor for commits 89/11189/4
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>
7 years agoBUG-650: allow executor stats to work with other executors 87/11187/3
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>
7 years agoBUG-650: use an EnumMap for datastore map 88/11188/2
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>
7 years agoBUG-865: TransactionCommitDeadlockException safety 86/11186/1
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>
7 years agoMerge "Activate findbugs sonar profile"
Tony Tkacik [Mon, 15 Sep 2014 09:50:34 +0000 (09:50 +0000)]
Merge "Activate findbugs sonar profile"

7 years agoMerge "BUG-1521 netconf-client line coverage"
Tony Tkacik [Mon, 15 Sep 2014 09:23:08 +0000 (09:23 +0000)]
Merge "BUG-1521 netconf-client line coverage"

7 years agoBug-1830:Move install snapshot messages from akka-raft to sal-commons 83/11183/1
Kamal Rameshan [Mon, 15 Sep 2014 07:08:57 +0000 (00:08 -0700)]
Bug-1830:Move install snapshot messages from akka-raft to sal-commons

Change-Id: I0bc5e68879ce0b7026c8bfda94ad7e2038aedff8
Signed-off-by: Kamal Rameshan <kramesha@cisco.com>
7 years agoMerge "Bug 1861 - Adding the missing moxy related bundles to the NSF feature that...
Giovanni Meo [Mon, 15 Sep 2014 06:32:12 +0000 (06:32 +0000)]
Merge "Bug 1861 - Adding the missing moxy related bundles to the NSF feature that resulted in Neutron Northbound API failures"

7 years agoBug-1828 - Raft apply state missing index log should be of type warn and not error 81/11181/1
Kamal Rameshan [Mon, 15 Sep 2014 05:21:42 +0000 (22:21 -0700)]
Bug-1828 - Raft apply state missing index log should be of type warn and not error

Change-Id: Iede5050f337fc89e41d5f72c373ace0c2fcce540
Signed-off-by: Kamal Rameshan <kramesha@cisco.com>
7 years agoMerge "Bug 1850 - Adding the missing update and delete connectors for LBaaS Pool...
Madhu Venugopal [Sun, 14 Sep 2014 18:36:43 +0000 (18:36 +0000)]
Merge "Bug 1850 - Adding the missing update and delete connectors for LBaaS Pool and PoolMember CRUD. Without this patch state bloats up and causes problems for user."

7 years agoMerge "Bug 1856 - Fixing the correct cache access for NeutronLoadBalancer northbound...
Madhu Venugopal [Sun, 14 Sep 2014 18:35:21 +0000 (18:35 +0000)]
Merge "Bug 1856 - Fixing the correct cache access for NeutronLoadBalancer northbound. Without this patch, all calls are lost from the cache."

7 years agoMerge "Bug 1852 - Setting the right type for the XMLelement members in NeutronLoadBal...
Madhu Venugopal [Sun, 14 Sep 2014 18:34:44 +0000 (18:34 +0000)]
Merge "Bug 1852 - Setting the right type for the XMLelement members in NeutronLoadBalancerPool"

7 years agoMerge "Bug 1673 - Adding pool_id element to the NeutronLoadBalancerPoolMember and...
Madhu Venugopal [Sun, 14 Sep 2014 18:33:27 +0000 (18:33 +0000)]
Merge "Bug 1673 - Adding pool_id element to the NeutronLoadBalancerPoolMember and associated get/set functions. Note that the pool_id is not part of the request, but the URI."

7 years agoBUG 1853 : Clustered Data Store causes Out of Memory 40/11140/2
Moiz Raja [Sat, 13 Sep 2014 18:47:44 +0000 (11:47 -0700)]
BUG 1853 : Clustered Data Store causes Out of Memory

createSnapshotTransaction was not being set to null which caused
snapshots from being created in the future and thus did not compact
the memory ultimately leading to the JVM running out of memory

Switched to using an InMemorySnapshotstore for test to avoid having
to deal with the file system and adding unneccessary sleeps

Change-Id: I0cb4b219a09a9bc736bd47533888999ee543a4e5
Signed-off-by: Moiz Raja <moraja@cisco.com>
7 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"

7 years agoMerge "Bug 1860: raise MaxMem and MaxPermGen limits for karaf"
Moiz Raja [Sun, 14 Sep 2014 13:32:12 +0000 (13:32 +0000)]
Merge "Bug 1860: raise MaxMem and MaxPermGen limits for karaf"

7 years agoActivate findbugs sonar profile 30/11030/5
Robert Varga [Thu, 11 Sep 2014 09:25:24 +0000 (11:25 +0200)]
Activate findbugs sonar profile

Change-Id: Icdce41aa13b8c2e761630cb67fe9d618e9a855c4
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-650: clarify TransactionFactory close state handling 24/11124/5
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>
7 years agoBug 1850 - Adding the missing update and delete connectors for LBaaS Pool and PoolMem... 44/11144/4
Srini Seetharaman [Sat, 13 Sep 2014 19:31:39 +0000 (12:31 -0700)]
Bug 1850 - Adding the missing update and delete connectors for LBaaS Pool and PoolMember CRUD. Without this patch state bloats up and causes problems for user.

Also renaming the INeutronLoadBalancerPoolMemberRequest to NeutronLoadBalancerPoolMemberRequest for consistency.

Change-Id: I9fb7b051b4b7e53d5c5921e5250c9cd8661764c8
Signed-off-by: Srini Seetharaman <srini.seetharaman@gmail.com>
7 years agoBug 1861 - Adding the missing moxy related bundles to the NSF feature that resulted... 49/11149/1
Madhu Venugopal [Sun, 14 Sep 2014 05:12:27 +0000 (22:12 -0700)]
Bug 1861 - Adding the missing moxy related bundles to the NSF feature that resulted in Neutron Northbound API failures

Change-Id: I8a8947234aab013ff2bcf2e9ae74f2635f2298ac
Signed-off-by: Madhu Venugopal <mavenugo@gmail.com>
7 years agoBug 1860: raise MaxMem and MaxPermGen limits for karaf 47/11147/1
Ed Warnicke [Sat, 13 Sep 2014 22:53:42 +0000 (17:53 -0500)]
Bug 1860: raise MaxMem and MaxPermGen limits for karaf

Change-Id: Ia3845f16836467e359d61e127e777355468f7885
Signed-off-by: Ed Warnicke <eaw@cisco.com>
7 years agoBug 1856 - Fixing the correct cache access for NeutronLoadBalancer northbound. Withou... 43/11143/1
Srini Seetharaman [Sat, 13 Sep 2014 19:30:10 +0000 (12:30 -0700)]
Bug 1856 - Fixing the correct cache access for NeutronLoadBalancer northbound. Without this patch, all calls are lost from the cache.

Change-Id: I61c8265b7ec4d1b5a0cc5e815e7df9d22c011319
Signed-off-by: Srini Seetharaman <srini.seetharaman@gmail.com>
7 years agoBug 1852 - Setting the right type for the XMLelement members in NeutronLoadBalancerPool 42/11142/1
Srini Seetharaman [Sat, 13 Sep 2014 19:27:14 +0000 (12:27 -0700)]
Bug 1852 - Setting the right type for the XMLelement members in NeutronLoadBalancerPool

Change-Id: I967fc0957de7af939648cdba9ed1db514276ea91
Signed-off-by: Srini Seetharaman <srini.seetharaman@gmail.com>
7 years agoBug 1673 - Adding pool_id element to the NeutronLoadBalancerPoolMember and associated... 41/11141/1
Srini Seetharaman [Sat, 13 Sep 2014 19:25:42 +0000 (12:25 -0700)]
Bug 1673 - Adding pool_id element to the NeutronLoadBalancerPoolMember and associated get/set functions. Note that the pool_id is not part of the request, but the URI.

Change-Id: I58d9124688f2f0ac9cec3eb6db16264066edbd14
Signed-off-by: Srini Seetharaman <srini.seetharaman@gmail.com>
7 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

7 years agoMerge "Created Benchmark for InMemoryDataStore Write Op"
Tony Tkacik [Sat, 13 Sep 2014 10:31:15 +0000 (10:31 +0000)]
Merge "Created Benchmark for InMemoryDataStore Write Op"

7 years agoBUG-650: speed CommitCoordinationTask up 23/11123/2
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>
7 years agoBUG-650: SnapshotBackedWriteTransaction performance 21/11121/2
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>
7 years agoBUG-650: improve transaction chaining performance 22/11122/2
Robert Varga [Fri, 12 Sep 2014 18:21:53 +0000 (20:21 +0200)]
BUG-650: improve transaction chaining performance

Transaction chaining has mucked inside SnapshotBackedWriteTransaction to
get its state everytime a new transaction was allocated. Instead we
expose proper lifecycle hooks, so the chain handling logic can keep
track of state itself.

As an added feature, this fixes a bug, where a chain would become
unusable if the user closed a write transaction without actually calling
ready() on it.

Finally it fixes a synchronization bug, where a commit task would not be
properly synchronized with listener registrations.

Change-Id: Iebe4701f1712a95a9316ea8380fe12c8c5fe6b89
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-650: speedup DOMDataBrokerTransactionChainImpl 05/11105/3
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>
7 years agoMerge "bug 1827 XSQL hangs when there is an empty dataset + Add Configuration datastore."
Moiz Raja [Fri, 12 Sep 2014 23:31:57 +0000 (23:31 +0000)]
Merge "bug 1827 XSQL hangs when there is an empty dataset + Add Configuration datastore."

7 years agoBUG-650: optimize DOMDataBrokerImpl chain creation 04/11104/3
Robert Varga [Fri, 12 Sep 2014 12:54:29 +0000 (14:54 +0200)]
BUG-650: optimize DOMDataBrokerImpl chain creation

An EnumMap is better than an immutable map when accessing via the
enumeration value. Also add a check for closed factory.

Change-Id: I208005a2b13c0a16cb594da7c74556f4e9a54e50
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-650: speedup AbstractDOMForwardedTransactionFactory 03/11103/3
Robert Varga [Fri, 12 Sep 2014 12:41:29 +0000 (14:41 +0200)]
BUG-650: speedup AbstractDOMForwardedTransactionFactory

Another speedup -- as it turns out we do not have to take the full lock
to close down the transaction factory. A volatile write is enough to do
that -- which means a volatile read is enough to check for it having
been closed.

Change-Id: I3488ccccc4d91d34665b3ff6e70e047407be48bb
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-650: AbstractDOMForwardedTransactionFactory 02/11102/2
Robert Varga [Fri, 12 Sep 2014 12:31:49 +0000 (14:31 +0200)]
BUG-650: AbstractDOMForwardedTransactionFactory

ImmutableMap is not really what we want to track datastores -- EnumMap
has constant time lookups for everything, plus its use eliminates a
needless builder object allocation.

Change-Id: I0bea628b82d8366bf14532d3bc321067584a84b5
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoMerge "Bug 1826: moving clustering test application from integration branch to contro...
Moiz Raja [Fri, 12 Sep 2014 18:20:58 +0000 (18:20 +0000)]
Merge "Bug 1826: moving clustering test application from integration branch to controller"

7 years agoMerge "BUG-650: speedup getSubtransaction()"
Tony Tkacik [Fri, 12 Sep 2014 15:31:24 +0000 (15:31 +0000)]
Merge "BUG-650: speedup getSubtransaction()"

7 years agoMerge "BUG-650: optimize DOMForwardedWriteTransaction"
Tony Tkacik [Fri, 12 Sep 2014 14:12:04 +0000 (14:12 +0000)]
Merge "BUG-650: optimize DOMForwardedWriteTransaction"

7 years agoMerge "BUG-650: cache translated future"
Tony Tkacik [Fri, 12 Sep 2014 14:11:09 +0000 (14:11 +0000)]
Merge "BUG-650: cache translated future"

7 years agoMerge "Fixed Karaf Distribution Archetype add dependent bundles"
Ed Warnicke [Fri, 12 Sep 2014 13:15:51 +0000 (13:15 +0000)]
Merge "Fixed Karaf Distribution Archetype add dependent bundles"

7 years agoBUG-650: speedup getSubtransaction() 01/11101/1
Robert Varga [Fri, 12 Sep 2014 11:20:37 +0000 (13:20 +0200)]
BUG-650: speedup getSubtransaction()

getSubtransaction() is on fast path and it performs two map lookups:
first with containsKey() and then with get(). We know the map cannot
contain null values, so we can perform only the get() and then make
a precondition check on the returned value being non-null.

Change-Id: I477969c8512e3c22e5b7ae5455e0281613a9c752
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-650: optimize DOMForwardedWriteTransaction 00/11100/1
Robert Varga [Fri, 12 Sep 2014 10:05:14 +0000 (12:05 +0200)]
BUG-650: optimize DOMForwardedWriteTransaction

First make sure we get visiblity into cohorts as a collections. This
allows us to optimize allocation of the list where we hold the futures.
We also make it non-immutable -- it is handed off, so there is no reason
to pay the price of an additional allocation.

Second we optimize the transaction state checking by eliminating as
many volatile read/writes as possible. The bottom line is the following:

1) the put/merge/delete paths see only a single volatile read instead of
   two
2) the submit path performs only one volatile get+set and an ordered
   write -- instead of two reads and two writes
3) the cancel path performs a volatile get+set and either an ordered
   write (fast path) or a spin on volatile read (slow path) -- instead of
   a synchronized block, four volatile reads and two volatile writes

Change-Id: I5ec875e65acdee62a4f0daf233617e6af024637f
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-650: cache translated future 99/11099/1
Robert Varga [Fri, 12 Sep 2014 09:42:10 +0000 (11:42 +0200)]
BUG-650: cache translated future

We are instantiating a done future with fixed result -- this is an
invariant, which can readily be shared. do precisely that by retaining a
single global instance.

Change-Id: I0a24adf6f3df4794fda5148c04baed7bbde11c64
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoMerge "BUG 1758 - Clustering : CompositeModificationPayload ClassNotFoundException"
Tom Pantelis [Fri, 12 Sep 2014 12:47:20 +0000 (12:47 +0000)]
Merge "BUG 1758 - Clustering : CompositeModificationPayload ClassNotFoundException"

7 years agoMerge "Bug 1348 - TopologyCommitHandler NullPointerException on edgeUpdate CHANGED"
Tony Tkacik [Fri, 12 Sep 2014 11:10:53 +0000 (11:10 +0000)]
Merge "Bug 1348 - TopologyCommitHandler NullPointerException on edgeUpdate CHANGED"

7 years agoMerge "BUG-1521 Unit tests for netconf-util xml package."
Tony Tkacik [Fri, 12 Sep 2014 11:06:50 +0000 (11:06 +0000)]
Merge "BUG-1521 Unit tests for netconf-util xml package."

7 years agoBUG-1521 netconf-client line coverage 48/11048/5
Filip Tehlar [Thu, 11 Sep 2014 13:07:26 +0000 (15:07 +0200)]
BUG-1521 netconf-client line coverage

Change-Id: I44c7d6a627e21aabe9c46ea678a90d81268ef438
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 years agoBUG-1521 Unit tests for netconf-util xml package. 32/11032/3
Maros Marsalek [Thu, 11 Sep 2014 10:53:55 +0000 (12:53 +0200)]
BUG-1521 Unit tests for netconf-util xml package.

Change-Id: Iaafba131555b948130a9916127b808c00016f502
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
7 years agoBUG-600 Netconf testtool for scale test, set connection timeout on server side. 96/10996/4
Maros Marsalek [Wed, 10 Sep 2014 13:26:28 +0000 (15:26 +0200)]
BUG-600 Netconf testtool for scale test, set connection timeout on server side.

Change-Id: I21507bce0961dc9b149db6f10b31f34c27188b3a
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
7 years agoMerge "Bug 650: Removed uncessary wrapping and allocation of futures"
Tony Tkacik [Fri, 12 Sep 2014 07:58:31 +0000 (07:58 +0000)]
Merge "Bug 650: Removed uncessary wrapping and allocation of futures"

7 years agoCreated Benchmark for InMemoryDataStore Write Op 48/10948/6
Lukas Sedlak [Tue, 9 Sep 2014 14:35:44 +0000 (16:35 +0200)]
Created Benchmark for InMemoryDataStore Write Op

Created Benchmark suite for testing InMemoryDataStore write operations. The benchmark
is designed to measure efficiency of InMemoryDataStore write operations for scenarios:
 -100K Writes executed as One commit (100K items in one commit) of One outer list item with one inner list item
 -100K Writes executed as Each commit per Write (100K commits) of One outer list item with one inner list item
 -50K Writes executed as One commit (50K items in one commit) of One outer list item with two inner list items
 -50K Writes executed as Each commit per Write (50K commits) of One outer list item with two inner list items
 -10K Writes executed as One commit (10K items in one commit) of One outer list item with ten inner list items
 -10K Writes executed as Each commit per Write (10K commits) of One outer list item with ten inner list items

Benchmark suite contains of three benchmark scenarios where InMemoryDataStore is instantiated with different combinations
of executors. This will allow us to see how executor services has performance impact on DataStore write operations.

The md-sal parent pom is extended with benchmarks profile.

Change-Id: I04f6e4545445d5879d8de9785d7ba1a53ec007af
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
7 years agoBUG 1758 - Clustering : CompositeModificationPayload ClassNotFoundException 54/10954/4
Moiz Raja [Tue, 9 Sep 2014 16:47:36 +0000 (09:47 -0700)]
BUG 1758 - Clustering : CompositeModificationPayload ClassNotFoundException

This patch also fixes BUG 1753 by enabling the SLF4J Adapter so that logging
goes to the karaf log.

For the most part the fix for CompositeModificationPayload not being found
is because of a DynamicImport missing in sal-akka-raft. I've also moved
Payload and CompositeModificationPayload to sal-clustering-commons

Change-Id: I82f6f598b8c912f8109526ebe7340c70f52fdcde
Signed-off-by: Moiz Raja <moraja@cisco.com>
7 years agoBug 1782 : Removing empty files from codebase 78/11078/2
Harman Singh [Fri, 12 Sep 2014 01:31:36 +0000 (18:31 -0700)]
Bug 1782 : Removing empty files from codebase

Empty files cause sonar to fail and we should not have empty files at first place.

Change-Id: I2d4bcaf26962318851953d078eafc390538057c4
Signed-off-by: Harman Singh <harmasin@cisco.com>
7 years agoBug 1826: moving clustering test application from integration branch to controller 71/11071/4
Basheeruddin Ahmed [Thu, 11 Sep 2014 21:04:42 +0000 (14:04 -0700)]
Bug 1826: moving clustering test application from integration branch to controller

This test application is used by robo test cases for clustering

patch 4:
fixed the overwrite of wrong groupId fix in patch 2
Patch 3:
Basheeruddin just included module-shards.conf and modules.conf for
clustering test app

Change-Id: Iac47e986e36662b1f61e711a194a8c72c8c76a29
Signed-off-by: Harman Singh <harmasin@cisco.com>
Signed-off-by: Basheeruddin Ahmed <syedbahm@cisco.com>
7 years agobug 1827 XSQL hangs when there is an empty dataset + 70/11070/2
Sharon Aicler [Thu, 11 Sep 2014 21:05:11 +0000 (14:05 -0700)]
bug 1827 XSQL hangs when there is an empty dataset +
Add Configuration datastore.

Change-Id: I95a712640d15282e0d4ba3e68b5f315ddb4e83dd
Signed-off-by: Sharon Aicler <saichler@cisco.com>
7 years agoBug 1348 - TopologyCommitHandler NullPointerException on edgeUpdate 50/11050/2
Jan Hajnar [Thu, 11 Sep 2014 13:13:17 +0000 (15:13 +0200)]
Bug 1348 - TopologyCommitHandler NullPointerException on edgeUpdate
CHANGED

* added null check for non-existent edge properties
* added test to test if issue is fixed

Change-Id: I0e2b2f9502be47ac87be5e4213068bcb45295366
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
7 years agoBug 650: Removed uncessary wrapping and allocation of futures 40/11040/3
Robert Varga [Thu, 11 Sep 2014 11:58:32 +0000 (13:58 +0200)]
Bug 650: Removed uncessary wrapping and allocation of futures

There is no need to use an intermediate checkfuture just to communicate
the list over, so let's get rid of the warpping. At the same time we
eliminate lists and opt for arrays. The sizing requirements for arrays
are determined precisely once, when a coordinator is allocated.

Change-Id: Id5c4c7852210b99c4da3e9e77a84c0d2d0fa622d
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoMerge "Fixed test which tested incorrect string formating"
Tom Pantelis [Thu, 11 Sep 2014 16:16:12 +0000 (16:16 +0000)]
Merge "Fixed test which tested incorrect string formating"

7 years agoMerge "Bug 1789: Reorder odl-mdsal-clustering feature before odl-restconf"
Ed Warnicke [Thu, 11 Sep 2014 15:46:55 +0000 (15:46 +0000)]
Merge "Bug 1789: Reorder odl-mdsal-clustering feature before odl-restconf"

7 years agoMerge "BUG 1735 Registering a data change listener should be asynchronous"
Tom Pantelis [Thu, 11 Sep 2014 15:41:12 +0000 (15:41 +0000)]
Merge "BUG 1735 Registering a data change listener should be asynchronous"

7 years agoFixed test which tested incorrect string formating 56/11056/1
Tony Tkacik [Thu, 11 Sep 2014 14:45:53 +0000 (16:45 +0200)]
Fixed test which tested incorrect string formating

It turned out, that this test suite tested returned
formated string from YANGTools, which format was not
part of API Contract.

Updated test to test to only for non nulls, which
are parts of API Contract.

Change-Id: I6e33993928667c6e8b4a830b6d0a9c8d10cd4fa2
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
7 years agoMerge "BUG-1521 Netconf-netty-util missing unit tests"
Tony Tkacik [Thu, 11 Sep 2014 11:57:24 +0000 (11:57 +0000)]
Merge "BUG-1521 Netconf-netty-util missing unit tests"

7 years agoMerge "BUG 1582 - PUT fails validate outer object name"
Tony Tkacik [Thu, 11 Sep 2014 09:54:46 +0000 (09:54 +0000)]
Merge "BUG 1582 - PUT fails validate outer object name"

7 years agoMerge "BUG-1792: share QNames in both cases"
Tony Tkacik [Thu, 11 Sep 2014 09:01:38 +0000 (09:01 +0000)]
Merge "BUG-1792: share QNames in both cases"

7 years agoBUG-1792: share QNames in both cases 07/11007/1
Robert Varga [Wed, 10 Sep 2014 18:12:47 +0000 (20:12 +0200)]
BUG-1792: share QNames in both cases

As it turns out we cached the QNames only in case where the revision was
not present. This adds the misssing call site.

Change-Id: Ic59e1788f85f3f863241b85fd115097a6e3e3e19
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG 1735 Registering a data change listener should be asynchronous 91/10891/6
Moiz Raja [Mon, 8 Sep 2014 00:39:45 +0000 (17:39 -0700)]
BUG 1735 Registering a data change listener should be asynchronous

Change-Id: I1a819976afe6ca44ac811ee30d305fbe76bb8acf
Signed-off-by: Moiz Raja <moraja@cisco.com>
7 years agoMerge "BUG 1734 - Applying a recovered journal to Shard does not happen during recovery"
Tom Pantelis [Wed, 10 Sep 2014 16:54:59 +0000 (16:54 +0000)]
Merge "BUG 1734 - Applying a recovered journal to Shard does not happen during recovery"

7 years agoMerge "BUG 1712 - Distributed DataStore does not work properly with Transaction...
Tom Pantelis [Wed, 10 Sep 2014 16:50:57 +0000 (16:50 +0000)]
Merge "BUG 1712  - Distributed DataStore does not work properly with Transaction Chains"

7 years agoBUG 1734 - Applying a recovered journal to Shard does not happen during recovery 90/10890/5
Moiz Raja [Mon, 8 Sep 2014 00:37:42 +0000 (17:37 -0700)]
BUG 1734 - Applying a recovered journal to Shard does not happen during recovery

This patch applies the state in the journal to the in-memory state immediately
on recovery

Change-Id: I0b97f146d31a38cd103d16cde97aaf1c6ce97b07
Signed-off-by: Moiz Raja <moraja@cisco.com>
7 years agoBUG 1712 - Distributed DataStore does not work properly with Transaction Chains 33/10833/8
Moiz Raja [Fri, 5 Sep 2014 04:53:46 +0000 (21:53 -0700)]
BUG 1712  - Distributed DataStore does not work properly with Transaction Chains

The fix is as follows,

1. When Creating a trasaction chain create a unique identifier for the transaction chain
   using the member name and the current timestamp

2. When a transaction is created using the transaction chain pass the transaction chain id
   along to the remote shard

3. If the remote shard receives a transaction with a valid transaction chain (one which is
   not empty) then it creates a new transaction chain if one does not exist. If one does exist
   then the Shard just creates a new transaction on the existing transaction chain.
   This way if a single transaction chai was used to create transactions on multiple
   different shards the a transaction chain would  be created on each one of those shards.

4. When a transaction chain is closed a Close Transaction Chain message is broadcast to all
   the Shards in the system. If those shards had a transaction chain with the specified id
   then the transaction chain would be closed. The sender does not care about receiving a
   response

5. When a state change occurs on a Shard we check if the Shard is not a leader. If that is
   the case we automatically close all existing transaction chains on that shard and clear
   the map which tracks the transaction chains for that shard

Change-Id: I6bcfb9de3d0ec666e4152afb69c702dda4f38171
Signed-off-by: Moiz Raja <moraja@cisco.com>
7 years agoBUG-1521 Netconf-netty-util missing unit tests 50/10950/2
Maros Marsalek [Tue, 9 Sep 2014 13:54:48 +0000 (15:54 +0200)]
BUG-1521 Netconf-netty-util missing unit tests

Change-Id: I1cb19296d2c428214212f342fab64999ad3eb5f3
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
7 years agoBug 1520 - Increased test coverage 04/10104/7
Maros Marsalek [Tue, 9 Sep 2014 07:25:17 +0000 (09:25 +0200)]
Bug 1520 - Increased test coverage

Added new tests for ConfigTransactionClients

Change-Id: I0b31e37902804594dda3683556005a3b40414048
Signed-off-by: Igor Bartak <ibartak@cisco.com>
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
7 years agoMetrics and Configuration 65/10665/15
Abhishek Kumar [Wed, 27 Aug 2014 20:07:30 +0000 (13:07 -0700)]
Metrics and Configuration

1. Adds a new abstract class AbstractMeteredUntypedActored that
   extends AbstractUntypedActor. This adds metrics capture
   capability which can be turned on using Config Subsystem.
   By default its turned off.

2. Updates Shard actor; adds metrics capture capability which can be
   turned on via Config Subsystem.

3. In remote-rpc-connector module, we can now pass configuration
   obtained from config subsystem to actor system so that its
   available to all actors. This obviates the need to manually pass
   the configuration via constructors or other *Constant or *Util
   classes. It brings all configuration items in the module at one
   place and makes it easier to move them to config subsystem, if
   its required.

4. In spirit of DRY, moves common code to clustering-commons

5. Minor code inspection fixes.

6. Makes mailbox-capacity configurable via config subsystem.

Patch 9:
Adds a new behaviour (MeteringBehavior.java).
AbstractUntypedActorWithMetering and Shard actor exhibit this
behavior current.
This patch also refactors unified configuration (config subsystem
+ typesafe config) pieces.

Note that in subsequent commits distributed-datastore will have
its configuration added to actor system configuration. Also few
more configuration items in remote-rpc-connector will go to
config subsystem. I wanted to limit the amount of changes going
into this already large commit.

Change-Id: I383ec813c16ed09ed0e68ee59179f454c0d174cf
Signed-off-by: Abhishek Kumar <abhishk2@cisco.com>
7 years agoBUG-1704: do not emit separator 39/10939/1
Robert Varga [Tue, 9 Sep 2014 12:23:23 +0000 (14:23 +0200)]
BUG-1704: do not emit separator

When reusing JSONNormalizedNodeStreamWriter, it retains enough state to
know to emit a separator, so if we do it here, we will break the output.

Change-Id: Ie7acc269b4546230fad532f0abf14c0ba6c4121a
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoMerge "Allowed Jolokia to use HttpService"
Moiz Raja [Tue, 9 Sep 2014 12:10:04 +0000 (12:10 +0000)]
Merge "Allowed Jolokia to use HttpService"

7 years agoMerge "BUG-1521 Add missing unit tests for config-persister-impl"
Tony Tkacik [Tue, 9 Sep 2014 07:18:46 +0000 (07:18 +0000)]
Merge "BUG-1521 Add missing unit tests for config-persister-impl"

7 years agoMerge "BUG-650: allocation-free ResolveDataChangeState.needsProcessing()"
Tony Tkacik [Tue, 9 Sep 2014 07:15:44 +0000 (07:15 +0000)]
Merge "BUG-650: allocation-free ResolveDataChangeState.needsProcessing()"

7 years agoMerge "BUG-650: optimize subtree listener collection"
Tony Tkacik [Tue, 9 Sep 2014 07:14:48 +0000 (07:14 +0000)]
Merge "BUG-650: optimize subtree listener collection"

7 years agoMerge "BUG-650: squash maps to Collections.emptyMap()"
Tony Tkacik [Tue, 9 Sep 2014 07:14:03 +0000 (07:14 +0000)]
Merge "BUG-650: squash maps to Collections.emptyMap()"

7 years agoMerge "BUG-650: ResolveDataChangeState.inheritedOne should be a Collection"
Tony Tkacik [Tue, 9 Sep 2014 07:13:36 +0000 (07:13 +0000)]
Merge "BUG-650: ResolveDataChangeState.inheritedOne should be a Collection"

7 years agoMerge "BUG-650: speed up ResolveDataChangeState.needsProcessing()"
Tony Tkacik [Tue, 9 Sep 2014 07:12:46 +0000 (07:12 +0000)]
Merge "BUG-650: speed up ResolveDataChangeState.needsProcessing()"

7 years agoAllowed Jolokia to use HttpService 25/10925/1
Mathieu Lemay [Mon, 8 Sep 2014 22:37:28 +0000 (18:37 -0400)]
Allowed Jolokia to use HttpService

Removed the flag in custom.properties that was preventing Jolokia
from registering to the HttpService. This was ported from previous
distribution but should not be used in karaf-based distros.

Change-Id: I54d143abe9ae6378683b22d83110814b13225fa2
Signed-off-by: Mathieu Lemay <mlemay@inocybe.com>
7 years agoBUG-650: allocation-free ResolveDataChangeState.needsProcessing() 20/10920/2
Robert Varga [Mon, 8 Sep 2014 18:46:32 +0000 (20:46 +0200)]
BUG-650: allocation-free ResolveDataChangeState.needsProcessing()

Critical path optimization. Based on logic introduced in previous
patches, we now know that when the inherited subtree listener iterable
is not a Collection, it is by definition non-empty. Use this knowledge
to elide Iterables.isEmpty() which is (relatively) costly due to
object allocation.

With this patch, ResolveDataChangeState.needsProcessing() does not
allocate any objects and relies on readily-available state to determine
whether additional processing is required.

Change-Id: I0322e0a8f58165f695f2284116057d03e2d4cb45
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-650: optimize subtree listener collection 19/10919/1
Robert Varga [Mon, 8 Sep 2014 18:29:16 +0000 (20:29 +0200)]
BUG-650: optimize subtree listener collection

This further optimizes passing of subtree listeners by retaining the
first collection of subtree listeners rather than immediately skipping
to interable concatenation.

Change-Id: I08fd63b092043ef814a47daba67744042d5c29be
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoMerge "Bug 1740: add missing features/mdsal/pom.xml dependencies"
Devin Avery [Mon, 8 Sep 2014 18:17:06 +0000 (18:17 +0000)]
Merge "Bug 1740: add missing features/mdsal/pom.xml dependencies"

7 years agoBUG-650: squash maps to Collections.emptyMap() 14/10914/2
Robert Varga [Mon, 8 Sep 2014 17:11:54 +0000 (19:11 +0200)]
BUG-650: squash maps to Collections.emptyMap()

If possible, we do not retain mutable maps, but rather short-cut to
emptyMap(). This should help us a bit when traversing empty elements.

Change-Id: Iff7eccfcc99c451d11f87cf466c7f09bde63ee10
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-650: ResolveDataChangeState.inheritedOne should be a Collection 15/10915/1
Robert Varga [Mon, 8 Sep 2014 17:20:56 +0000 (19:20 +0200)]
BUG-650: ResolveDataChangeState.inheritedOne should be a Collection

There is no need to demote this to Iterable just to then use
Iterables.isEmpty(), as we are always initializing it with a collection,
which has a quick isEmpty() method. Also promote its order before
interitedSub, so the slow path can be faster a bit.

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