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>
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
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>
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>
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>
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>
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>
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>
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>
Tony Tkacik [Fri, 12 Sep 2014 15:31:24 +0000 (15:31 +0000)]
Merge "BUG-650: speedup getSubtransaction()"
Tony Tkacik [Fri, 12 Sep 2014 14:12:04 +0000 (14:12 +0000)]
Merge "BUG-650: optimize DOMForwardedWriteTransaction"
Tony Tkacik [Fri, 12 Sep 2014 14:11:09 +0000 (14:11 +0000)]
Merge "BUG-650: cache translated future"
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>
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>
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>
Tony Tkacik [Fri, 12 Sep 2014 07:58:31 +0000 (07:58 +0000)]
Merge "Bug 650: Removed uncessary wrapping and allocation of futures"
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>
Tom Pantelis [Thu, 11 Sep 2014 16:16:12 +0000 (16:16 +0000)]
Merge "Fixed test which tested incorrect string formating"
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>
Tony Tkacik [Tue, 9 Sep 2014 07:15:44 +0000 (07:15 +0000)]
Merge "BUG-650: allocation-free ResolveDataChangeState.needsProcessing()"
Tony Tkacik [Tue, 9 Sep 2014 07:14:48 +0000 (07:14 +0000)]
Merge "BUG-650: optimize subtree listener collection"
Tony Tkacik [Tue, 9 Sep 2014 07:14:03 +0000 (07:14 +0000)]
Merge "BUG-650: squash maps to Collections.emptyMap()"
Tony Tkacik [Tue, 9 Sep 2014 07:13:36 +0000 (07:13 +0000)]
Merge "BUG-650: ResolveDataChangeState.inheritedOne should be a Collection"
Tony Tkacik [Tue, 9 Sep 2014 07:12:46 +0000 (07:12 +0000)]
Merge "BUG-650: speed up ResolveDataChangeState.needsProcessing()"
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>
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>
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>
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>
Robert Varga [Mon, 8 Sep 2014 16:32:39 +0000 (18:32 +0200)]
BUG-650: speed up ResolveDataChangeState.needsProcessing()
Checking for empty subBuilders allows us to reuse the parent's
collection. For simple cases with no listeners whis speeds up
needsProcessing() by completely reusing the emptyList and for
non-trivial cases it just omits object instantiation.
Change-Id: Ib3089bca2ec4f7e1ef826bf4192b8154ff154702
Signed-off-by: Robert Varga <rovarga@cisco.com>
Ed Warnicke [Mon, 8 Sep 2014 15:08:23 +0000 (15:08 +0000)]
Merge "Bug 1703: Added debug logging of ignored event to ease debuging."
Robert Varga [Thu, 31 Jul 2014 15:47:47 +0000 (17:47 +0200)]
BUG-997: migrate the global context schema service
This change test-drives the new re-implementation, making sure we have a
user. An immediate advantage should be faster context convergence times.
Requires I3311a3f0251868f91c385d0291365934ccfb9ede in yangtools.
Change-Id: Ic2f07144043f456ab9821013c1d690904c9a791f
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Fri, 5 Sep 2014 07:08:48 +0000 (09:08 +0200)]
Bug 1703: Added debug logging of ignored event to ease debuging.
Change-Id: Ic7bcbc249bb35018561d28d757dadca8509b933c
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Fri, 5 Sep 2014 07:10:12 +0000 (07:10 +0000)]
Merge "BUG-1690: catch wildcard InstanceIdentifiers"
Tony Tkacik [Fri, 5 Sep 2014 07:09:52 +0000 (07:09 +0000)]
Merge "Prefer InstanceIdentifier imports"
Tony Tkacik [Fri, 5 Sep 2014 07:09:35 +0000 (07:09 +0000)]
Merge "BUG-1679: optinally log allocation context"
Robert Varga [Wed, 3 Sep 2014 16:19:52 +0000 (18:19 +0200)]
BUG-1679: optinally log allocation context
Transactions can now print their allocation context.
Change-Id: I801a44d1270f8becd2835cc31b514e2e0fdaee33
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Thu, 4 Sep 2014 12:19:01 +0000 (14:19 +0200)]
BUG-1690: catch wildcard InstanceIdentifiers
Read/write/merge/delete of wildcarded instance identifiers is not
defined, so catch them early on in the binding broker implementation.
Change-Id: I97161f88b8496a78575d6a7bc1b7bab8fee1da5b
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Thu, 4 Sep 2014 10:26:44 +0000 (12:26 +0200)]
Prefer InstanceIdentifier imports
InstanceIdentifier/YangInstanceIdentifier are now separate, so we can
import them at the same time. Do precisely that.
Change-Id: I54a5cd49ef7b8584a5b09a12ab97e132fb92cb57
Signed-off-by: Robert Varga <rovarga@cisco.com>
Ed Warnicke [Thu, 4 Sep 2014 17:01:41 +0000 (17:01 +0000)]
Merge changes I9aa41251,Ibd0fb687
* changes:
Bug 1703: Fixed memory leak in TransactionChain
Bug 222: Added basic Restconf operational statistics
Tony Tkacik [Thu, 4 Sep 2014 14:18:46 +0000 (16:18 +0200)]
Bug 1703: Fixed memory leak in TransactionChain
As it turned out WeakHashMap is not cleared
if value has strong reference to key. This
required to rewrite BindingTransactionChain
to listen on submit futures for each transaction
in order to receive events mapped to binding transaction.
This actually simplifies code and removes
any need for having canonical mapping from
DOM transaction to Binding transaction.
Change-Id: I9aa4125197b022dd163f85c6965ad1227e771b99
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Thu, 4 Sep 2014 12:49:58 +0000 (12:49 +0000)]
Merge "Be sure to shutdown instance when destroyed"
Ed Warnicke [Wed, 3 Sep 2014 22:51:08 +0000 (22:51 +0000)]
Merge "Bug 1446: Add JMX stats for in-memory data store"
Tony Tkacik [Wed, 3 Sep 2014 16:10:37 +0000 (16:10 +0000)]
Merge "Datastore: Reuse successful future"
Tony Tkacik [Wed, 3 Sep 2014 16:10:11 +0000 (16:10 +0000)]
Merge "Datastore: lower in-memory change tracking overhead"
Robert Varga [Tue, 2 Sep 2014 09:25:51 +0000 (11:25 +0200)]
Datastore: Reuse successful future
ImmediateFuture does not keep any state, so we can reuse a single
instance, preventing garbage buildup just a tiny bit.
Change-Id: I200662a666f4529ea82a2ac3948be9536ca32281
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Mon, 1 Sep 2014 22:09:09 +0000 (00:09 +0200)]
Datastore: lower in-memory change tracking overhead
We needlessly track the reference to notification manager inside the
even tasks. Instead simplify the return to a Map.Entry and pipe the
resulted data into the manager. This reduces the temporary size of a
tracker, lowering the rate at which we produce garbage.
Change-Id: Ib390d0e65ce1583371a2e887525d9b7ee0392396
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Tue, 2 Sep 2014 05:42:15 +0000 (05:42 +0000)]
Merge "BUG-868: migrate ClassLoaderUtils user"
Robert Varga [Wed, 6 Aug 2014 21:30:34 +0000 (23:30 +0200)]
BUG-868: migrate ClassLoaderUtils user
Moves to yangtools.util, which is not deprecated.
Change-Id: Ibb69c68e027c4732d8967f44c869bf00797a1785
Signed-off-by: Robert Varga <rovarga@cisco.com>
Ed Warnicke [Fri, 29 Aug 2014 01:30:48 +0000 (01:30 +0000)]
Merge "Bug 1636: Fixed invalid model of inmemory-datastore configuration."
Tony Tkacik [Thu, 28 Aug 2014 13:12:54 +0000 (15:12 +0200)]
Bug 1636: Fixed invalid model of inmemory-datastore configuration.
Change-Id: I280cd4478d1dd5ab65e333658e802394693272bb
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tom Pantelis [Wed, 27 Aug 2014 15:07:32 +0000 (15:07 +0000)]
Merge "Cleanup DOMStoreReadTransaction/DOMDataReadTransaction exists API documentation"
Tony Tkacik [Wed, 27 Aug 2014 14:16:09 +0000 (14:16 +0000)]
Merge "BUG-1493: activate recursion elision"
Moiz Raja [Wed, 13 Aug 2014 23:24:36 +0000 (16:24 -0700)]
Cleanup DOMStoreReadTransaction/DOMDataReadTransaction exists API documentation
This commit also cleans up the usage of ForwardedBackwardsCompatibleDataBroker from DataBrokerTestCustomizer
Change-Id: Icfb078eb54f7dae6c436ff41e7c1657b0cf4175f
Signed-off-by: Moiz Raja <moraja@cisco.com>
Tony Tkacik [Wed, 27 Aug 2014 09:47:11 +0000 (09:47 +0000)]
Merge "BUG-650: fromYangInstanceIdentifier() can return null"
Robert Varga [Tue, 26 Aug 2014 19:49:33 +0000 (21:49 +0200)]
BUG-650: fromYangInstanceIdentifier() can return null
Properly interpret a null return as an absent identifier.
Clarified cast in #toBinding(Entry) and explained
why it is necessary, even if Eclipse reports
it as unnecessary (difference in various java compilers).
Change-Id: I2dd7cd631cb958a28ddce8db62d20e0292ae8a39
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Wed, 27 Aug 2014 08:05:27 +0000 (08:05 +0000)]
Merge "Simplify YangInstanceIdentifier references"
tpantelis [Sat, 23 Aug 2014 21:42:55 +0000 (17:42 -0400)]
Bug 1446: Add JMX stats for in-memory data store
Added stats, available via JMX, to track data for the various thread
pool executors used by the in-memory data store. Also added commit stats.
Change-Id: Ica8dff7aef8989f2b23b1fc8c100a535998273b1
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Robert Varga [Tue, 26 Aug 2014 18:44:48 +0000 (20:44 +0200)]
Simplify YangInstanceIdentifier references
Now that the (binding) InstanceIdentifier and YangInstanceIdentifier
have different names, we can import both at the same time, clarifying a
bit the code.
Change-Id: I270f2eac40c4e94eb2a61b604657bcfa28a9b3cd
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Tue, 26 Aug 2014 07:24:43 +0000 (07:24 +0000)]
Merge "BUG-650: remove unneeded sort()"
Tom Pantelis [Mon, 25 Aug 2014 15:44:32 +0000 (15:44 +0000)]
Merge "Improve SnapshotBackedReadTransaction.close()"
Robert Varga [Mon, 25 Aug 2014 12:41:20 +0000 (14:41 +0200)]
BUG-650: remove unneeded sort()
The need for sorting entries by depth disappeared with the migration to
new codec infrastructure. Tracing shows some 44% CPU being spent here,
so this should provide a marked improvement with large data changes.
Change-Id: I7c437da5656cc5946ff9413307a563d4ff9b15de
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Fri, 22 Aug 2014 22:18:26 +0000 (00:18 +0200)]
Improve SnapshotBackedReadTransaction.close()
This improves visibility of close() operation, resulting in improved
close/read collision detection.
Change-Id: I7d3367c4d669a5c3dcd3f5c6583ce64b7690f1d9
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Mon, 25 Aug 2014 10:25:52 +0000 (10:25 +0000)]
Merge "Make InMemoryDOMDataStore.ready() unsynchronized"
Robert Varga [Wed, 20 Aug 2014 11:05:51 +0000 (13:05 +0200)]
BUG-1493: activate recursion elision
Previous patch prepared the infrastructure for elision, but it did not
actually activate it. This patch flips the switch on.
Change-Id: Ic02af3ccc7f5ee5f8ae4d0617562b8fdffc771c6
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Sat, 23 Aug 2014 21:01:47 +0000 (23:01 +0200)]
Make InMemoryDOMDataStore.ready() unsynchronized
Tracing datastore operations has revealed some contention on the
datastore, specifically when users call WriteTransaction.ready(). It
seems this method does not need synchronization at all, as it is not
directly changing any state.
Change-Id: I635f6a925694e4b68e629978fbd535fedb3a6cd6
Signed-off-by: Robert Varga <rovarga@cisco.com>
Ed Warnicke [Sat, 23 Aug 2014 19:41:47 +0000 (19:41 +0000)]
Merge "Bug 1262 - Document Transaction Chaining of MD-SAL"
Robert Varga [Mon, 7 Jul 2014 12:06:21 +0000 (14:06 +0200)]
Bug 1262 - Document Transaction Chaining of MD-SAL
Improves and clarifies the transaction chain concept and related APIs.
Change-Id: Ib509cdef33f8b51f8bd142b93657eace489e03a1
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Fri, 22 Aug 2014 14:24:55 +0000 (16:24 +0200)]
Be sure to shutdown instance when destroyed
This cleans up any resources held by the instance.
Change-Id: I669264d01c5e77b6cd59cab807e15e9bbf24c16d
Signed-off-by: Robert Varga <rovarga@cisco.com>
Devin Avery [Fri, 22 Aug 2014 09:09:38 +0000 (09:09 +0000)]
Merge "Remove unused getter"
Devin Avery [Fri, 22 Aug 2014 09:04:45 +0000 (09:04 +0000)]
Merge "BUG-868: remove unused things"
Devin Avery [Fri, 22 Aug 2014 09:02:56 +0000 (09:02 +0000)]
Merge "BUG-868: remove deprecated call"
Robert Varga [Wed, 13 Aug 2014 20:29:38 +0000 (22:29 +0200)]
Remove unused getter
Change-Id: Ib43a2a6a00029260b89358e115f0549db8f3e3ed
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Wed, 13 Aug 2014 20:27:29 +0000 (22:27 +0200)]
BUG-868: remove unused things
Change-Id: Ia90c279cb4f0871e4dccc4facf2dd739ab83d573
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Wed, 13 Aug 2014 20:26:43 +0000 (22:26 +0200)]
BUG-868: remove deprecated call
Change-Id: I1dc3b1634f2439dfa456415968bb718509de2ebc
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Thu, 21 Aug 2014 09:58:22 +0000 (09:58 +0000)]
Merge "Revert "Revert "BUG-1425: Integrated new Binding to Normalized Node codec for write path"""
Tony Tkacik [Thu, 21 Aug 2014 07:18:03 +0000 (07:18 +0000)]
Merge "BUG-1493: split off recursion tracking and rework it"
Tony Tkacik [Thu, 21 Aug 2014 07:17:48 +0000 (07:17 +0000)]
Merge "BUG-1493: Add test suite documentation"
Robert Varga [Thu, 14 Aug 2014 09:13:19 +0000 (11:13 +0200)]
BUG-1493: split off recursion tracking and rework it
This patch reworks tracking of recursion state into a separate class.
This allows us to unify the four call sites and provide a simple
heuristic. A state object is allocated each time we enter a new child
and its buidlers are collected when we emerge from it -- resulting in
more accurate event reporting, eliminating false positives.
Further optimization allows us to stop recursing as soon as we know no
listeners are affected by the outcome at a particular level.
Change-Id: I2be29cebb79892c85a22e79b18c2e62f77bfb7d4
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Sat, 16 Aug 2014 00:23:50 +0000 (02:23 +0200)]
BUG-1493: Add test suite documentation
This patch adds some sorely needed documentation.
Change-Id: I2cdf5122ba861b083203f82336300736e824ca3d
Signed-off-by: Robert Varga <rovarga@cisco.com>
Devin Avery [Mon, 18 Aug 2014 15:28:25 +0000 (15:28 +0000)]
Merge "Bug 1430: Obtain config params from config system"
Ed Warnicke [Mon, 18 Aug 2014 14:52:43 +0000 (14:52 +0000)]
Merge "BUG-1558 Fix BindingAwareActivator ignoring removedService call."
Maros Marsalek [Mon, 18 Aug 2014 07:42:02 +0000 (09:42 +0200)]
BUG-1558 Fix BindingAwareActivator ignoring removedService call.
Change-Id: I0a062bb144af7d4d70bc3f708e0f919bcce3dc9b
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Robert Varga [Fri, 15 Aug 2014 19:28:52 +0000 (21:28 +0200)]
Revert "Revert "BUG-1425: Integrated new Binding to Normalized Node codec for write path""
This reverts commit
be2b35105f8e10ada7d73f4523a5a931c57323b3,
reinstating the new codecs, with hopefully all the users able to cope.
Change-Id: I1cd50e71d92a32ded32e78310f3c958e76d0bdbd
Signed-off-by: Robert Varga <rovarga@cisco.com>
Ed Warnicke [Fri, 15 Aug 2014 15:24:43 +0000 (15:24 +0000)]
Merge "Revert "BUG-1425: Integrated new Binding to Normalized Node codec for write path""
Ed Warnicke [Fri, 15 Aug 2014 14:49:27 +0000 (14:49 +0000)]
Revert "BUG-1425: Integrated new Binding to Normalized Node codec for write path"
This reverts commit
eb2bd48a9148a4fbeae292ffd03e30083c2ff024.
Change-Id: Ic8183f6620c51d8a4a87a38af1e9a554e7f9016a
Signed-off-by: Ed Warnicke <eaw@cisco.com>
Ed Warnicke [Thu, 14 Aug 2014 09:21:13 +0000 (09:21 +0000)]
Merge changes I162c84f7,Iffa37d3f
* changes:
BUG-1425: Integrated new Binding to Normalized Node codec for write path
BUG-1425: package binding-data-codec
Robert Varga [Mon, 4 Aug 2014 17:29:10 +0000 (19:29 +0200)]
BUG-1425: Integrated new Binding to Normalized Node codec for write path
Integrated binding to normalized node codec for write path to datastore,
for deserialization legacy codecs are still used.
This patch requires https://git.opendaylight.org/gerrit/9795
to be merged in YANGTools before.
Removed private dead data broker code from MD-SAL.
Change-Id: I162c84f7da8330d94992122de3af19e76c1e41d2
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
tpantelis [Sat, 9 Aug 2014 02:38:04 +0000 (22:38 -0400)]
Bug 1430: Obtain config params from config system
This is a follow-up patch to obtain the various data store executor
config params from the config system intsead of system properties.
Change-Id: Ib7fa03f053d6165fdcb52300be9add8ebe80b2c2
Signed-off-by: tpantelis <tpanteli@brocade.com>
Tom Pantelis [Wed, 13 Aug 2014 12:12:10 +0000 (12:12 +0000)]
Merge "Add exists method on DOMStoreReadTransaction and DOMDataReadTransaction"
Moiz Raja [Sun, 10 Aug 2014 23:18:33 +0000 (16:18 -0700)]
Add exists method on DOMStoreReadTransaction and DOMDataReadTransaction
Introducing this API does not impact clients as it is mostly internal.
One reason for adding this API is because of ensureParentsByMerge used in a couple of places
which keeps checking if a parent node exists by reading a node to figure out if it exists. This is
fine for the InMemoryDataStore but it can be terrible in a distributed data store where the shard
which contains the data is remote. All sorts of overhead is associated with a remote read including
serialization which can actually be pretty expensive.
Change-Id: Ib5be5f6dc60be683d7a04c81dad08c56cd5681f4
Signed-off-by: Moiz Raja <moraja@cisco.com>
Devin Avery [Mon, 11 Aug 2014 15:28:26 +0000 (15:28 +0000)]
Merge "Bug 1430: Off-load notifications from single commit thread"
Ed Warnicke [Mon, 11 Aug 2014 13:01:37 +0000 (13:01 +0000)]
Merge "BUG-1511: add FIXME markers"
Robert Varga [Sat, 9 Aug 2014 10:38:17 +0000 (12:38 +0200)]
BUG-1511: add FIXME markers
Fixes a simple typo and drops marker FIXMEs for future implementation.
Change-Id: Ic4f67afd978f4bb43314d161afcfe1e56c831be6
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Fri, 8 Aug 2014 07:19:52 +0000 (07:19 +0000)]
Merge "BUG-1495: fail future when no local RPC is found"
Tony Tkacik [Thu, 7 Aug 2014 20:17:21 +0000 (20:17 +0000)]
Merge "BUG-868: migrate ListenerRegistry"
Tony Tkacik [Thu, 7 Aug 2014 19:57:53 +0000 (19:57 +0000)]
Merge "BUG-1493: do not instantiate HashSet"
Robert Varga [Thu, 7 Aug 2014 12:15:45 +0000 (14:15 +0200)]
BUG-1495: fail future when no local RPC is found
Instead of checking state, we return a failed future, which will have a
RpcImplementationUnavailableException as its cause. The current call
site is the remote broker, which is the provider of last resort and it
throws it when it has no foreign system available.
Change-Id: Ib9d8534ca75e60f1867a7c275ee653a70dbd7a00
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Wed, 6 Aug 2014 18:01:24 +0000 (20:01 +0200)]
BUG-1493: do not instantiate HashSet
This HashSet is used to track processed nodes -- but the parent node is
already giving us a method, which checks if it contains a particular
node ID. Let's use that instead of maintaining the set.
Based on traces, this should speed the datastore up by about 4.8%.
Change-Id: I09e1135f51c8967b9fe8c520a0e166918472de7d
Signed-off-by: Robert Varga <rovarga@cisco.com>
tpantelis [Tue, 29 Jul 2014 10:42:14 +0000 (06:42 -0400)]
Bug 1430: Off-load notifications from single commit thread
Modified the InMemoryDOMDataStore to use the new
QueuedNotificationManager class added to yangtools common util for
DataChangeListener notifications.
Modified DOMDataCommitCoordinatorImpl's ListeningExecutorService to one
that off-loads ListenableFuture Runnable callbacks on a separate
executor.
Change-Id: I31f2fb002131c6d91b205d33255dd1bbc6433d9b
Signed-off-by: tpantelis <tpanteli@brocade.com>
Tony Tkacik [Wed, 6 Aug 2014 17:05:10 +0000 (17:05 +0000)]
Merge "Bug 1386: Avoid commit deadlock"