Maros Marsalek [Wed, 22 Apr 2015 07:34:42 +0000 (09:34 +0200)]
Use ImmutableNodes.fromInstanceId in restconf
Build normalized node strcuture from Yang Instance Id using new utilities from
yang-data-impl.
Change-Id: Iee74bc0a7529b0fe7b901c04d2e26f9e2e60fac1
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Tom Pantelis [Wed, 22 Apr 2015 17:44:27 +0000 (13:44 -0400)]
Fix compile errors in NetconfDeviceSimulator
Jenkins builds are failing due to compile errors in
NetconfDeviceSimulator apparently due to recent yangtools changes.
Change-Id: If48d23f8907f848def5f448bb95f10fd5486f89e
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Robert Varga [Thu, 16 Apr 2015 14:30:47 +0000 (16:30 +0200)]
CDS: use internal DataTree instance
Instead of using a captive InMemoryDataStore instance, which is geared
toward interaction with a DOMDataBroker, use the baseline DataTree
instance and utility classes for implementing the data store behavior.
Since most of CDS is geared for interactions with the usual DOMStore
interfaces, this patch provides a set of bare-bone workalike classes,
but taking advantage of the safeties provided by the AKKA actor system.
Immediate benefit should be a speed up in backend processing, as we
eliminate intermediate Future instances when accessing and manipulating
data.
We also gain explicit control over DataTree lifecycle, which enables us
switching to DataTreeCandidate as the replication and persistence unit,
as opposed to individual modifications.
Change-Id: I031d0ed4d82dcc923fd377c13fefba2819923f9b
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Sun, 19 Apr 2015 01:03:10 +0000 (03:03 +0200)]
Clustering: Expose PathArgument writer
In our upcoming clustering work we will be serializing
DataTreeCandidate, which is a PathArgument-indexed tree structure.
Expose PathArgument writer and read methods for later use. Also fix
NormalizedNodeOutputStreamWriter not calling flush() on close().
Change-Id: Ided34a8bc1bc77b5ef357346e3d5b057bffc40c1
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Wed, 22 Apr 2015 08:01:07 +0000 (08:01 +0000)]
Active ennunciate for AD-SAL only on JDK 7
Change-Id: I204ea5feb6a1df103d9321c88eec958e1d1ee263
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Moiz Raja [Tue, 21 Apr 2015 20:25:27 +0000 (20:25 +0000)]
Merge "Elide front-end 3PC for single-shard Tx"
Tony Tkacik [Tue, 21 Apr 2015 13:25:28 +0000 (13:25 +0000)]
Merge "BUG-3033: DataBroker should extend DataTreeChangeService"
Robert Varga [Tue, 21 Apr 2015 11:49:40 +0000 (13:49 +0200)]
BUG-3033: DataBroker should extend DataTreeChangeService
The implementation already implements it, but users are not awat of this
capability, as they need to use an explicit cast. Fix it by requiring
all DataBroker implementations to also provide DataTreeChangeService.
Change-Id: Idf61a665b303e03106c223f9bacd9a827b2d9046
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Tue, 21 Apr 2015 11:35:19 +0000 (13:35 +0200)]
Simplify instantiation of NormalizedNodeInputStreamReader
Constructor which takes a DataInput does not need to throw, so remove
that declaration. That makes it easier for users to instantiate it.
Change-Id: Ia9267c6610fe2ebbfa2cb24a4475bba5c486f6df
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Tue, 21 Apr 2015 10:41:20 +0000 (10:41 +0000)]
Merge "Add assertNotNull to prevent null analysis warnings"
Tony Tkacik [Tue, 21 Apr 2015 07:41:12 +0000 (07:41 +0000)]
Merge "Improve xml lookup in edit-config rpc for md-sal"
Tony Tkacik [Tue, 21 Apr 2015 07:40:38 +0000 (07:40 +0000)]
Merge "Bug 2998 - RESTCONF not recogizing top-level input."
Moiz Raja [Tue, 21 Apr 2015 07:15:45 +0000 (07:15 +0000)]
Merge "Cleanup: Remove passing around of DataPersistenceProvider"
Moiz Raja [Tue, 21 Apr 2015 07:15:35 +0000 (07:15 +0000)]
Merge "Address comment in gerrit 17266"
Moiz Raja [Tue, 21 Apr 2015 07:15:28 +0000 (07:15 +0000)]
Merge "Bug 2948: Perform create snapshot synchronously"
Tony Tkacik [Mon, 20 Apr 2015 15:23:49 +0000 (15:23 +0000)]
Merge "Netconf testtool stress client"
Tony Tkacik [Mon, 20 Apr 2015 15:12:52 +0000 (15:12 +0000)]
Merge "BUG-3018: report DataTreeChangeListener initial state"
Maros Marsalek [Sat, 18 Apr 2015 17:44:46 +0000 (19:44 +0200)]
Netconf testtool stress client
Change-Id: I4bd351fe17e596e9153a48bf233432b8c8b19ea9
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Robert Varga [Sat, 18 Apr 2015 19:26:27 +0000 (21:26 +0200)]
BUG-3018: report DataTreeChangeListener initial state
Once we have make callout to AbstractDOMStoreTreeChangePublisher, also
examine our current state to see if we should report an initial event.
Requires https://git.opendaylight.org/gerrit/18583 in yangtools.
Change-Id: If6ccdb32057d1cf54bfc83888bf1540142c3ec7f
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Fri, 17 Apr 2015 21:29:18 +0000 (23:29 +0200)]
Improve DataExistsReply construction
DataExistsReply is immutable and has low cardinality. Pre-construct the
two possible instances and the two possible serializable instances and
expose them through a static factory method, which reuses these
instances, thus lowering garbage creation. Also remove unneeded
autoboxing of boolean to Boolean in ShardTransaction.
Change-Id: I2b1e0db5abb00a7b98eda4c3cc21ad35b9a921c6
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Mon, 20 Apr 2015 08:28:55 +0000 (08:28 +0000)]
Merge "Parse Xml Netconf msgs without defer-node-expansion option"
Tony Tkacik [Mon, 20 Apr 2015 08:24:07 +0000 (08:24 +0000)]
Merge "Fix compilation with JDK8"
Jan Hajnar [Fri, 17 Apr 2015 14:42:17 +0000 (16:42 +0200)]
Bug 2998 - RESTCONF not recogizing top-level input.
* added choice resolution when top level element is from case node.
Resolved choice is then fed into parser.
Change-Id: Iadea8cc3d190afb13fa2447edd05abd8708e591a
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
Maros Marsalek [Sat, 18 Apr 2015 21:10:38 +0000 (23:10 +0200)]
Improve xml lookup in edit-config rpc for md-sal
Lookup the attributes of rpc in xml payload directly to improve lookup
performance instead of using utility XmlElement class
Change-Id: I47e8f47f279ccbd271e5ed903a352ebbc307d0f9
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Robert Varga [Sat, 18 Apr 2015 15:40:19 +0000 (17:40 +0200)]
Add assertNotNull to prevent null analysis warnings
Eclipse can perform null-derefence analysis, which triggers a warning
here.
Change-Id: I42f85f98009717214c8029b5517b1142431dfbc8
Signed-off-by: Robert Varga <rovarga@cisco.com>
Maros Marsalek [Fri, 17 Apr 2015 11:46:21 +0000 (13:46 +0200)]
Parse Xml Netconf msgs without defer-node-expansion option
The defer-node-expansion expands inner nodes on traversal, but its suitable for
bigger xmls (100k bytes) and messages that are not fully traversed. This is not
the case with incomming netconf rpc.
Source:
https://xerces.apache.org/xerces2-j/faq-performance.html
Tested:
Netconf server pipeline performance was improved by 5-6%
Change-Id: I3bd4b917841f0ebe212ff753d6e0f655d618968c
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Robert Varga [Sat, 18 Apr 2015 11:31:02 +0000 (13:31 +0200)]
Fix compilation with JDK8
Direct cast was not working, so restructure it a bit.
Change-Id: I58bb6ab2d636cdfe15d1a7ed9c47c393ff6a6920
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tom Pantelis [Fri, 17 Apr 2015 22:53:21 +0000 (18:53 -0400)]
Elide front-end 3PC for single-shard Tx
A new method, directCommit, was added to TransactionContext.
In TransactionContextImpl#directCommit, it sends the final ready
BatchedModifications message as before but with a new flag,
doCommitOnReady, set to true. In ShardCommitCoordinator, if
doCommitOnReady is true, it immediately initiates the canCommit
phase without waiting for the CanCommitTransaction message.
In ShardWriteTransaction, if doCommitOnReady is true, it sets a new
similar flag in the ForwardedReadyTransaction message. Similarly,
the ShardCommitCoordinator immediately initiates the canCommit phase.
This code path is executed for read-write transactions as they still
utilize the transaction actor.
In TransactionProxy, when only 1 shard was accessed, it creates a
SingleCommitCohortProxy instance. This class also implements
DOMStoreThreePhaseCommitCohort but the 3 phases are essentially a
no-op with direct commit. The canCommit phase simply waits for the direct
commit Future to complete and returns success (true). If a failure occurs
from the Shard, the exception is propagated to the caller.
For backwards compatibility, we still need the
ThreePhaseCommitCohortProxy even with a single-shard transaction. A
complication with this is that TransactionProxy#ready may not know
immediately if it can do direct commit or not because it may not have the
TransactionContext instance yet due to the async nature of things.
So in either case it still creates a SingleCommitCohortProxy. When it gets
the callback to finally complete the operation, it checks the
TransactionContext to see if it supports direct commit (only
pre-Lithium versions won't). If supported, it calls directCommit, otherwise
readyTransaction. In the SingleCommitCohortProxy, on successful
completion of the ready/direct commit Future, it checks the response
type. If it's an ActorSelection then it needs to do 3-phase commit
so it creates and delegates to a ThreePhaseCommitCohortProxy.
I moved the code in Shard#handleCommitTransaction to the
ShardCommitCoordinator as this is also needed for direct commit. I
also moved the handleForwardedReadyTransaction code into
ShardCommitCoordinator to make it easier to handle direct commit.
Change-Id: I40b04dd5abd24c78709598a5acfc16484e165427
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Robert Varga [Fri, 17 Apr 2015 10:27:50 +0000 (12:27 +0200)]
Expose ResolveDataChangeEventsTask
ListenerTree is already visible from implementation, this is a utility
class for taking advantage of this functionality.
Change-Id: Ia75d90f3729afb112da48264d5552fc3b0cb1d37
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Wed, 8 Apr 2015 11:45:35 +0000 (13:45 +0200)]
Bug 2351: Introduced LazySerializedDOMNotification
Change-Id: I4a6c5c19b2d59050ddf01f92a76ef0d5add2bfb2
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tom Pantelis [Fri, 17 Apr 2015 13:51:58 +0000 (13:51 +0000)]
Merge "Notification Listener Adapter uses NotificationListenerInvoker"
Tony Tkacik [Fri, 17 Apr 2015 10:26:43 +0000 (12:26 +0200)]
Bug 2907: Downgraded karaf maven plugin to 3.0.1
Karaf Maven plugin 3.0.2 and 3.0.3 during installation
of boot features reinstalls already installed features
when it's referenced by other features.
This actually prolongs build and increases logs in
large amount - eg.
https://jenkins.opendaylight.org/releng/job/iotdm-integration-master/522/
Change-Id: I1fa1a1c4853becf49b790e3a4add56ca9d263ba0
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Thu, 16 Apr 2015 21:12:08 +0000 (23:12 +0200)]
Disabled logging bridge in ad-sal features.
With Karaf 3.0.3 in place AD-SAL logging-bridge
created loop in logs, which polluted logs
with exponential prepending of prefix to
log messages.
During SingleFeatureTest run these logs
creates around 400MB of repeated log message
without any meaning.
Change-Id: I8896956c7a377eaf3139ba64bb70ce46a31e6ea3
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Thu, 16 Apr 2015 10:53:33 +0000 (12:53 +0200)]
Bug 2907: Make sure we are properly bumped to Karaf 3.0.3
Change-Id: Ic9303c71fcfc39849401a7cdaa24b44f3836067b
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Thu, 16 Apr 2015 09:38:36 +0000 (11:38 +0200)]
Bug 2907: Fixed missing reference to parent pom.
Change-Id: I9dc0bca738288d18a3943e8528f3ac81c5bbc07e
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Ed Warnicke [Thu, 16 Apr 2015 03:55:18 +0000 (03:55 +0000)]
Merge "Bug 2358: Fixed warnings in Restconf"
Ed Warnicke [Mon, 16 Feb 2015 01:35:40 +0000 (18:35 -0700)]
Bug 2907 - corrections for upgrade to karaf 3.0.3
Needs patch: https://git.opendaylight.org/gerrit/15391
from odlparent
So far this seems to work fine except for the issues
with aaa-authn's use of sqllite.
If you want to test with integration, you will need patch:
https://git.opendaylight.org/gerrit/15392
Change-Id: I34d9adf31562a0650abba015d19dd8c6958b2bf3
Signed-off-by: Ed Warnicke <eaw@cisco.com>
Moiz Raja [Wed, 15 Apr 2015 18:29:20 +0000 (18:29 +0000)]
Merge "Split out sal-akka-raft example"
Moiz Raja [Wed, 15 Apr 2015 18:26:20 +0000 (18:26 +0000)]
Merge "Bug 2948: Recovered log entries not applied after prior snapshot"
Tony Tkacik [Wed, 15 Apr 2015 14:49:44 +0000 (14:49 +0000)]
Merge "BUG-2953: do not use a complete InMemoryDataStore"
Tony Tkacik [Tue, 7 Apr 2015 12:02:39 +0000 (14:02 +0200)]
Notification Listener Adapter uses NotificationListenerInvoker
Change-Id: I64bd1c031d979b087ad1dbc659020e1716213e42
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Igor Bartak [Mon, 13 Apr 2015 11:52:07 +0000 (13:52 +0200)]
Message-bus - removed trailing witespaces of new tests for messagebus-impl
Change-Id: I0d3c23504ac2420e43d65a78abe50a761855e661
Signed-off-by: Igor Bartak <ibartak@cisco.com>
Robert Varga [Mon, 13 Apr 2015 13:54:23 +0000 (15:54 +0200)]
Split out sal-akka-raft example
The example should not be included in production code, so split it out
into a separate component.
Change-Id: Iacf4d57d5e0ec85a975f8611dab1524b6556ce39
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tom Pantelis [Tue, 14 Apr 2015 12:12:07 +0000 (12:12 +0000)]
Merge "Extracted NotificationInvokerImpl to separate class."
Tom Pantelis [Tue, 14 Apr 2015 12:03:23 +0000 (12:03 +0000)]
Merge "Unify sal-akka-raft version"
Robert Varga [Mon, 13 Apr 2015 14:31:28 +0000 (16:31 +0200)]
Use Collections.emptyList()
This fixes a warning about generic argument mismatch.
Change-Id: If856d00e21d3eaa333f57ada582ec4b3eb7b0d20
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Mon, 13 Apr 2015 13:53:34 +0000 (15:53 +0200)]
Unify sal-akka-raft version
Make sure the artifact is published, so we can reuse the same version.
Change-Id: I1dd1aac1d45e1ef2f27fe232cb59218651463618
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Mon, 13 Apr 2015 13:20:43 +0000 (15:20 +0200)]
BUG-2953: do not use a complete InMemoryDataStore
Aggregator functionality does not require sequencing or listener, but
rather simple manipulation. Instantiate a DataTree instead, simplifying
the class.
Change-Id: I1edc38f0722ddbd1145149bbc5efef5ab41b0146
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Tue, 7 Apr 2015 11:41:29 +0000 (13:41 +0200)]
Extracted NotificationInvokerImpl to separate class.
Change-Id: Ie7494e872200581ce6cf5dcae2088ab2afda3671
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tom Pantelis [Sat, 11 Apr 2015 00:05:23 +0000 (20:05 -0400)]
Cleanup: Remove passing around of DataPersistenceProvider
Now that the DataPersistenceProvider instance is store in the
RaftActorContext, we no longer need to pass it to various other classes
methods that have access to the RaftActorContext instance.
Change-Id: Iccbfac82819451e28432e15f5eb970fded4b181e
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Tom Pantelis [Fri, 10 Apr 2015 21:08:06 +0000 (17:08 -0400)]
Address comment in gerrit 17266
As per comment in https://git.opendaylight.org/gerrit/#/c/17266/ , moved
check for snapshot messages to the else clause.
Change-Id: I84405dfb6c832058a1bcc041a539748f4499dd8f
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Tom Pantelis [Wed, 8 Apr 2015 07:32:15 +0000 (03:32 -0400)]
Bug 2948: Perform create snapshot synchronously
Performing the create snapshot phase asynchronously via sending
the CaptureSnapshot message may result in subsequent modifications
that are applied after the CaptureSnapshot message is sent but before
it's received to be included in the snapshot and also included as
unapplied entries in the snapshot. On recovery, the modifications
would be redundantly applied. This could result in data tree errors,
eg if a modification was a delete, the redundant apply would cause an
exception due to the non-existent node.
To avoid this, the SnapshotManager was changed to immediately call the
create procedure in the capture method instead of sending the
CaptureSnapshot message. The create procedure is now set in the
SnapshotManager by the RaftActorSnapshotMessageSupport. The Capturing
state was removed.
Change-Id: I0efe8966d83e019c9dd8a82799193ea7ac49ba65
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Tom Pantelis [Sat, 4 Apr 2015 03:39:52 +0000 (23:39 -0400)]
Bug 2948: Recovered log entries not applied after prior snapshot
Modified SnapshotManager#capture to obtain and cache the last journal sequence
number. On commit, the cached sequence number is used to delete
messages. This preserves any ApplyJournalEntries and ReplicatedLogEntry
messages that occur after the capture is initiated.
As a result of his change, we also have to obtain the unapplied entries
at the time the snapahot is initiated and not when we persist.
Otherwise, log entries persisted after the capture is initiated and
before it's persisted would be included in the snapshot's unapplied
list. On recovery, both entries would be recovered and added to the in-memory
journal resulting in duplicate entries.
These changes may result in a subsequent modification that is applied
after the snapshot is initiated to be included in the snapshot and also
persisted in the journal or included as unapplied in the snapshot. On
recovery, the modification entry would be redundantly applied. This could
result in data tree errors, eg if the modification was a delete, the
redundant apply would cause an exception due to the non-existent node.
We'll have to live with that - I think the only way to prevent it is if
we create the snapshot synchronously. Note this could also have occurred
before these changes.
Change-Id: I745d94f5417e17627c1c4d53be8d6fdf01587d35
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Moiz Raja [Mon, 13 Apr 2015 19:45:01 +0000 (19:45 +0000)]
Merge "Bug 2948: Store DataPersistenceProvider in RaftActorContext"
Tom Pantelis [Mon, 13 Apr 2015 18:14:17 +0000 (14:14 -0400)]
Fix unit test failure in ReplicatedImplLogTest
All verify builds are faling.
Change-Id: Ie92f47dab8eed13284a48c51bb52f3516cfb68a1
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Tony Tkacik [Mon, 13 Apr 2015 09:11:40 +0000 (09:11 +0000)]
Merge "Stop swallowing exceptions in XmlElement optional methods."
Tony Tkacik [Mon, 13 Apr 2015 07:46:46 +0000 (07:46 +0000)]
Merge "Remove isCloseMsg check for each rpc"
Moiz Raja [Sat, 11 Apr 2015 01:13:56 +0000 (01:13 +0000)]
Merge "Add LeadershipChangeCount to ShardStats"
Moiz Raja [Sat, 11 Apr 2015 01:09:47 +0000 (01:09 +0000)]
Merge "Add new DeleteEntries class wih long "fromIndex" field"
Moiz Raja [Sat, 11 Apr 2015 01:06:11 +0000 (01:06 +0000)]
Merge "Add unit test for ElectionTermImpl"
Tom Pantelis [Sat, 4 Apr 2015 03:27:51 +0000 (23:27 -0400)]
Bug 2948: Store DataPersistenceProvider in RaftActorContext
This will make the DataPersistenceProvider accessible to callers that
don't have access to the RaftActor. In particular, the SnapshotManager
will need access from the capture method (subsequent patch). The
DataPersistenceProvider can't be passed to capture b/c it is also
called from AbstractLeader which doesn't have access to the
DataPersistenceProvider.
With thus change we no longer have to pass the DataPersistenceProvider to
the persist and commit methods either.
Change-Id: I187901476f2728e4b7f72238e72006c95c188b55
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Tom Pantelis [Sat, 4 Apr 2015 02:01:40 +0000 (22:01 -0400)]
Bug 2948: Add getLastSequenceNumber method to DataPersistenceProvider
New method that returns the last sequence number from akka's persisted
journal. This will be used in a subsequent patch.
Change-Id: Ie2b77358c57eb3e30fea7af317f277d7e660125e
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Tom Pantelis [Wed, 8 Apr 2015 18:09:46 +0000 (14:09 -0400)]
Add LeadershipChangeCount to ShardStats
It's useful to see how many shard leadership changes have occurred so I
added a LeadershipChangeCount stat to the ShardStats mbean. This helps
to determine if spurious leadership changes are occurring. I also added
LastLeadershipChangeTime.
Change-Id: I33ddbcd96d6fa93fbfa9887393a2f5a40027d9f3
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Tom Pantelis [Sun, 29 Mar 2015 12:57:40 +0000 (08:57 -0400)]
Add new DeleteEntries class wih long "fromIndex" field
Added a new DeleteEntries message class that defines the fromIndex field
as a long. The previous DeleteEntries class (inner class of RaftActor)
defined it as an int which could cause rollover. The previous DeleteEntries
must be kept for the time being for backwards compatibility as instances
are persisted.
Change-Id: I774128d9a1af2410a23d2739c37484a508c8a80f
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Tom Pantelis [Sun, 29 Mar 2015 12:23:38 +0000 (08:23 -0400)]
Add unit test for ElectionTermImpl
Added a unit test class ElectionTermImplTest and removed the equivalent
test case from RaftActorTest.
Change-Id: I1c3f0e59784422777d742ade4c01e1e18914a213
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Tom Pantelis [Sun, 29 Mar 2015 04:40:09 +0000 (00:40 -0400)]
Add unit tests for ReplicatedLogImpl
Some test cases in RaftActorTest directly test the ReplicatedLogImpl so
they were moved to a new specific test class ReplicatedLogImplTest as
they donlt need the overhead of creating a RaftActor.
Also added more tests and increased coverage in
AbstractReplicatedLogImplTest.
Change-Id: I14e65620d1c8bc89bab055488aed89837ff3f4e7
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Tom Pantelis [Sun, 29 Mar 2015 00:51:05 +0000 (20:51 -0400)]
Add unit tests for RaftActorSnapshotMessageSupport
Change-Id: Ic0f5be5c9741f62bae572953d89ac8800ee371af
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Tom Pantelis [Sat, 28 Mar 2015 15:27:06 +0000 (11:27 -0400)]
Add unit tests for RaftActorRecoverySupport
Also removed redundant recovery tests from RaftActorTest and added a
test that verifies the RaftActor forwards all recovery messages to the
RaftActorRecoverySupport.
I also refactored MockRactorActor and RaftActorTestKit to their own
files to reduce the size of RaftActorTest.
Change-Id: I75d0a1cfe0d0b168e488ce5cecda29dae4fe4321
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Moiz Raja [Fri, 10 Apr 2015 16:13:01 +0000 (16:13 +0000)]
Merge "CDS: Split out TransactionFutureCallback"
Moiz Raja [Fri, 10 Apr 2015 16:12:02 +0000 (16:12 +0000)]
Merge "Remove deprecation suppression"
Moiz Raja [Fri, 10 Apr 2015 16:08:56 +0000 (16:08 +0000)]
Merge "Add generic arguments"
Moiz Raja [Fri, 10 Apr 2015 15:29:20 +0000 (15:29 +0000)]
Merge "Update lispflowmapping options in custom.properties"
Moiz Raja [Fri, 10 Apr 2015 15:28:23 +0000 (15:28 +0000)]
Merge "Fixes Bug 2935"
Moiz Raja [Fri, 10 Apr 2015 15:21:28 +0000 (15:21 +0000)]
Merge changes I114cbac1,I45c2e7cd
* changes:
Calculate replicated log data size on recovery
Refactor snapshot message processing to RaftActorSnapshotMessageSupport
Moiz Raja [Fri, 10 Apr 2015 15:20:04 +0000 (15:20 +0000)]
Merge "Verify BatchedModifications messages sent vs received"
Moiz Raja [Fri, 10 Apr 2015 15:19:30 +0000 (15:19 +0000)]
Merge "Use BatchedModifications message in place of ReadyTransaction message"
Robert Varga [Tue, 7 Apr 2015 15:13:30 +0000 (17:13 +0200)]
CDS: Split out TransactionFutureCallback
This moves the TransactionFutureCallback inner class out of
TransactionProxy, so its interaction with TransactionProxy is defined
using methods.
Change-Id: Ib07bf91e32074b721552c8ef4952bbd40369283a
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tom Pantelis [Wed, 8 Apr 2015 03:48:14 +0000 (23:48 -0400)]
Verify BatchedModifications messages sent vs received
A previous patch removed the verification of the response
Futures for BatchedModifications messages sent in
TransactionContextImpl. This was used to verify all modifications
were successfully received and processed by the transaction actor.
In lieu of that, this patch adds a totalMessagesSent field to
BatchedModifications and the transaction actor verifies it matches
the total number of messages received and successfully processed.
Change-Id: I247d3a09794142813cdca67b63d77412261a282b
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Tom Pantelis [Tue, 7 Apr 2015 23:54:51 +0000 (19:54 -0400)]
Use BatchedModifications message in place of ReadyTransaction message
For the optimized write transactions (currently disabled), we used the
last BatchedModifications message with the ready flag set to elide
sending the ReadyTransaction message. We can do this in general for both
read-write and write-only.
In ShardWriteTransaction, if the BatchedModifications indicates ready,
it simply calls readyTransaction to send ForwardedReadyTransaction
message to the shard, same as with the ReadyTransacton message.
Instead of returning a BatchedModificationsReply with the cohort path,
I kept the ReadyTransactionReply so the Shard code mostly remains the
same - otherwise we'd have to introduce an equivalent
batched ForwardedReadyTransaction message.
I also made ReadyTransactionReply Externalizable so we don't have to
deal with sending it serialized or not (except for backwards
compatibility - had to keep the protobuff class).
TransactionContextImpl#readyTransaction is now the same as
WriteTransactionContextImpl#readyTransaction so
WriteTransactionContextImpl is no longer needed and was removed.
Change-Id: I5175c77ca08a1877af9593a28e7c4cb46f03287a
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Moiz Raja [Fri, 10 Apr 2015 13:04:08 +0000 (13:04 +0000)]
Merge "Refactor raft recovery code to a RaftActorRecoverySupport class"
Moiz Raja [Fri, 10 Apr 2015 12:10:23 +0000 (12:10 +0000)]
Merge "Remove recorded modification Futures from TransactionContext"
Tony Tkacik [Fri, 10 Apr 2015 09:59:33 +0000 (09:59 +0000)]
Merge "BUG 1848 : Use OrderedNormalizedNodeWriter in rpc transformation."
Tony Tkacik [Fri, 10 Apr 2015 09:56:01 +0000 (09:56 +0000)]
Merge "BUG-1848 : OrderedNormalizedNodeWriter implementation"
Tom Pantelis [Fri, 10 Apr 2015 01:46:38 +0000 (01:46 +0000)]
Merge "BUG-2953 : Unable to read from datastore root with clustering enabled"
Lorand Jakab [Mon, 23 Mar 2015 19:40:51 +0000 (21:40 +0200)]
Update lispflowmapping options in custom.properties
One property changed default and a new property was added, see
https://git.opendaylight.org/gerrit/#/c/15505/
https://git.opendaylight.org/gerrit/#/c/16982/
Change-Id: Icf91d2ddcc63ee13d2e23ad9a5673ca1bc1efb93
Signed-off-by: Lorand Jakab <lojakab@cisco.com>
Moiz Raja [Thu, 9 Apr 2015 17:53:55 +0000 (10:53 -0700)]
BUG-2953 : Unable to read from datastore root with clustering enabled
This patch adds a NormalizedNodeAggregator which makes it possible to read
from the root of the datastore tree.
Writing, merging and checking for the existence of the root path is not
supported yet but we could in a future patches if needed.
Change-Id: I892bdc733ec316f41926d8bbccdbbdc6c31a5c25
Signed-off-by: Moiz Raja <moraja@cisco.com>
Tony Tkacik [Thu, 9 Apr 2015 13:00:39 +0000 (15:00 +0200)]
Bug 2358: Fixed warnings in Restconf
Removed dead-code and fixed generics and casts
related warnings in restconf codebase.
Change-Id: I5cfad51fbf8856685259bcedd77ebe6d7527c899
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tomas Cere [Tue, 7 Apr 2015 15:54:26 +0000 (17:54 +0200)]
Stop swallowing exceptions in XmlElement optional methods.
Performance increase.
Change-Id: I41629b5ea356be697629eb7f9238344f87a62a5e
Signed-off-by: Tomas Cere <tcere@cisco.com>
Robert Varga [Fri, 21 Nov 2014 17:04:24 +0000 (18:04 +0100)]
Remove deprecation suppression
Suppressed deprecation leads to false sense of completeness. This patch
removes suppression in tests, so we see how muchh of the code relies on
deprecated APIs.
Change-Id: I01d56f3ef4fe385806a8fbebdbe96fd6af63828c
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tomas Cere [Wed, 8 Apr 2015 13:25:30 +0000 (15:25 +0200)]
BUG 1848 : Use OrderedNormalizedNodeWriter in rpc transformation.
Makes the rpc processing in netconf northbound and sal-netconf-connector use
the new ordered writer.
Change-Id: I1367ba07069fa5b6525358f265fe664d00d71500
Signed-off-by: Tomas Cere <tcere@cisco.com>
Tomas Cere [Wed, 8 Apr 2015 08:50:33 +0000 (10:50 +0200)]
BUG-1848 : OrderedNormalizedNodeWriter implementation
Writes nodes in the order defined in yang files.
Change-Id: I72b2a867ad47b2c9de0444a8a0a2f279a8360021
Signed-off-by: Tomas Cere <tcere@cisco.com>
Tom Pantelis [Fri, 3 Apr 2015 09:39:56 +0000 (05:39 -0400)]
Remove recorded modification Futures from TransactionContext
This removes the recorded batched modification message Futures
from TransactionContext to avoid the overhead of waiting for
the Futures to complete on ready and transforming them. The
Futures were recorded to ensure all modification messages
were successfully processed before committing the transaction
but we can do that by including the count of modification
messages sent in the ready message for the transaction actor
to verify (later patch).
Change-Id: I8d6ad80cac3e8e13fde48fbf5c57a476cca003dd
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Robert Varga [Thu, 9 Apr 2015 09:32:48 +0000 (11:32 +0200)]
BUG-2967: Expose before-state from DataObjectModification
Not exposing the before-state requires users to track this state
themselves. The problem is most visible in the delete case, if
the user needs some attributes to reconstruct keys to other structures
in order to perform cleanup -- they would effectively have to retain
a InstanceIdentifier->data map to efficiently perform deletes.
Rather than forcing everyone to duplicate data, expose the before-state,
as best available. Note that applications still need to deal with the
fact that the before-state in delete can be null -- at least by issuing
a warning to the operator.
Change-Id: I72c886f384254a6808159eaee612b07083073492
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Thu, 9 Apr 2015 09:16:49 +0000 (11:16 +0200)]
Fix DataTreeIdentifier losing type
DataTreeIdentifier needs to retain the type of encapsulated
InstanceIdentifier, otherwise the users cannot really use it (or have to
suppress warnings/cast).
Change-Id: Icc7214923531f9ffeafe55b12a8ad6813d431573
Signed-off-by: Robert Varga <rovarga@cisco.com>
Thanh Ha [Thu, 9 Apr 2015 01:38:03 +0000 (21:38 -0400)]
Remove non-existant features-flow from dependencies
Change-Id: I9018abd2e4c185cdfed92b5c7040360cf03cb394
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Tony Tkacik [Wed, 8 Apr 2015 19:04:09 +0000 (19:04 +0000)]
Merge "BUG 2799: SPI for EventSources"
Robert Varga [Fri, 27 Mar 2015 17:31:02 +0000 (18:31 +0100)]
Add generic arguments
This patch silences a few eclipse warnings about use of generic types
without proper arguments.
Change-Id: Ia260593e7b5b5fa4cb49894752a286c47aa7c049
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Wed, 8 Apr 2015 09:10:09 +0000 (09:10 +0000)]
Merge "Fixed NPE when RuntimeRpc could not find module in schemaContext."
Tony Tkacik [Wed, 8 Apr 2015 09:09:47 +0000 (09:09 +0000)]
Merge "BUG 2889 : migration of netconf-cli to NormalizedNode api's"
Tony Tkacik [Wed, 8 Apr 2015 09:06:14 +0000 (09:06 +0000)]
Merge "Add DOMDataTreeIdentifier.toString()"