Robert Varga [Wed, 1 Apr 2015 11:27:25 +0000 (13:27 +0200)]
Make TransactionProxyCleanupPhantomReference self-contained
This tracker can be broken out cleanly, if we clean up interactions with
TransactionProxy and TransactionFutureCallback. That allows us to split
the class out, making it self-contained. Leaking fields from
TransactionProxy will be fixed up in a follow-up patch.
Change-Id: I14dbb44a2c94e758ad492222eaa9d038f5b6b858
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Thu, 2 Apr 2015 10:52:08 +0000 (12:52 +0200)]
CDS: introduce AbstractThreePhaseCommitCohort
This is a rework of ChainedTransactionProxy/TransactionProxy
interactions. Rather than invoking a callback from TransactionProxy to
ChainedTransactionProxy, wrap the ready() call in
ChainedTransactionProxy and extract the required information from the
returned cohort object. Also make sure we preallocate the cohort future
collection.
Change-Id: I539ffb085800e4d62f1eab5bc8dae284e73c6aab
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Thu, 2 Apr 2015 09:58:48 +0000 (11:58 +0200)]
CDS: fix TransactionProxy close()/ready() interaction
TransactionProxy is vulnerable to wrong use of close() after ready().
Fix this up so we detect this condition and make it explicit what
happens when.
Change-Id: Id966b57ce53cdc92bc3e53cb0d38b77303ba1c54
Signed-off-by: Robert Varga <rovarga@cisco.com>
Moiz Raja [Tue, 7 Apr 2015 02:17:34 +0000 (02:17 +0000)]
Merge "Refactor ReplicatedLogImpl to separate class"
Moiz Raja [Tue, 7 Apr 2015 01:51:30 +0000 (01:51 +0000)]
Merge "Bug 2588: Fix read transaction failures"
Moiz Raja [Tue, 7 Apr 2015 01:48:15 +0000 (01:48 +0000)]
Merge "Fix bug bug 2651 - XSQL does not pickup augmentation data "
Ed Warnicke [Tue, 3 Mar 2015 17:04:47 +0000 (09:04 -0800)]
Bug 2903: Turning on clustering by default
See Weather event:
https://wiki.opendaylight.org/view/Weather#Clustered_Data_Store_Switch_over
Change-Id: I36b64d7eb657641bacfe2fd6e53a595baf2ad4a0
Signed-off-by: Ed Warnicke <eaw@cisco.com>
Sharon Aicler [Thu, 19 Mar 2015 17:51:59 +0000 (10:51 -0700)]
Fix bug bug 2651 - XSQL does not pickup augmentation data
Change-Id: I350de6ccf5efd8e427c5823a0f03c91e0df33f19
Signed-off-by: Sharon Aicler <saichler@cisco.com>
Tony Tkacik [Thu, 2 Apr 2015 20:46:28 +0000 (20:46 +0000)]
Merge "Remove SimpleDataTreeCandidate"
Tom Pantelis [Thu, 2 Apr 2015 19:45:30 +0000 (15:45 -0400)]
Bug 2588: Fix read transaction failures
TransactionContextImpl#read now sends the ReadData message immediately
instead of waiting for the previous modification operation Futures to
complete. This ensures the read will be performed by the actor before
the transaction is readied. Also did the same for dataExists.
Change-Id: I9c56b32162a957e27f9ff01485686e90ebec77a7
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Robert Varga [Thu, 2 Apr 2015 09:03:00 +0000 (11:03 +0200)]
Use isEmpty() instead of size() == 0
isEmpty() is a simpler check and a bit more explicit.
Change-Id: I336acfba64da299d00ccff5abcd850058c85c9e0
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Thu, 2 Apr 2015 09:11:44 +0000 (11:11 +0200)]
Split out TransactionOperation
This splits the interface out and makes it an abstract class for faster
method dispatch.
Change-Id: Idcdd0f0edcf184abc54b4c3b44cf82d289abe7a7
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Wed, 1 Apr 2015 12:43:04 +0000 (14:43 +0200)]
Fix AbstractTransactionContext field visibility
Make fields final and add proper lifecycle, so we do not have to leak
the collection to potential mutators.
Change-Id: Ia7c793475c41d3aadf928804f78c39dda2a6b1ef
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tom Pantelis [Thu, 2 Apr 2015 11:33:59 +0000 (11:33 +0000)]
Merge "Split out ChainedTransactionProxy"
Tom Pantelis [Thu, 2 Apr 2015 11:33:08 +0000 (11:33 +0000)]
Merge "Split out NoOpDOMStoreThreePhaseCommitCohort"
Tom Pantelis [Thu, 2 Apr 2015 11:32:05 +0000 (11:32 +0000)]
Merge "Speed up class check"
Tom Pantelis [Thu, 2 Apr 2015 11:30:14 +0000 (11:30 +0000)]
Merge "Speed up enumeration lookups"
Tom Pantelis [Thu, 2 Apr 2015 11:26:41 +0000 (11:26 +0000)]
Merge "Add ForwardingDOMStoreThreePhaseCommitCohort"
Robert Varga [Wed, 1 Apr 2015 10:47:27 +0000 (12:47 +0200)]
Split out ChainedTransactionProxy
Rather than having it as a inner class, move it into its own file,
increasing clarity.
Change-Id: I83d667db353cc01a950ac24da7ee68fc66ceb46d
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Wed, 1 Apr 2015 10:41:39 +0000 (12:41 +0200)]
Split out NoOpDOMStoreThreePhaseCommitCohort
This is an independent class, which has a single instance.
Change-Id: Icc16b6a9b83e5820e9031a2f73666142abe26256
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Wed, 1 Apr 2015 11:55:04 +0000 (13:55 +0200)]
Speed up class check
Class.equals() returns the same, but calling it on a constant very
obvious to JIT that it can inline things.
Change-Id: I9e13a4b55ec194f51c8a39302433e22194a44b64
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Wed, 1 Apr 2015 11:17:56 +0000 (13:17 +0200)]
Speed up enumeration lookups
All enumeration types have a static values() method, which returns an
array of possible values. Use that instead of cascading ifs to get the
appropriate enum value.
Change-Id: Ic91cd04ac3e64e7d8263e6535e354f7ef2d713cf
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Wed, 1 Apr 2015 21:32:02 +0000 (23:32 +0200)]
Make sure to pull trie library
This library is no longer embedded in yangtools, so we need to pull it
in.
Change-Id: I1a6daeae653508f0b177b6ec70e3f7b23c6748ec
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Wed, 1 Apr 2015 10:16:27 +0000 (12:16 +0200)]
Add ForwardingDOMStoreThreePhaseCommitCohort
This class is useful for decorator pattern, so publish it as a beta SPI.
Change-Id: I69707067da4935d68ca41ed7ad1764d5ddf9812e
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Wed, 1 Apr 2015 09:56:55 +0000 (11:56 +0200)]
Move AbstractDOMStoreTransaction into SPI
It is a useful base for DOMStoreTransaction implementations, with some
debugging capabilities. Publish it as a beta SPI.
Change-Id: Iea3551720b2a8df7c268ce003147fc3a734f3871
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Tue, 31 Mar 2015 09:12:53 +0000 (11:12 +0200)]
Remove SimpleDataTreeCandidate
yangtools already exposes a utility class which does the same thing, so
let's use DefaultDataTreeCandidate instead.
Change-Id: Id8a6d6c0a5b817e4c3f5cdbb3bfdadcd596c0030
Signed-off-by: Robert Varga <rovarga@cisco.com>
Moiz Raja [Mon, 30 Mar 2015 23:13:25 +0000 (23:13 +0000)]
Merge "Adjust Tx rate limiter for unused transactions"
Ed Warnicke [Mon, 30 Mar 2015 17:39:42 +0000 (17:39 +0000)]
Merge "Export BindingNormalizedNodeSerializer via Config Subsystem."
Moiz Raja [Mon, 30 Mar 2015 17:13:38 +0000 (17:13 +0000)]
Merge changes I34538a22,I520b0d83
* changes:
Refactor ElectionTermImpl into separate class
Refactor DataPersistenceProviders and RaftActor#persistence
Moiz Raja [Mon, 30 Mar 2015 16:37:41 +0000 (16:37 +0000)]
Merge "Increase unit test coverage in SnapshotManager"
Tony Tkacik [Mon, 30 Mar 2015 14:51:19 +0000 (16:51 +0200)]
Export BindingNormalizedNodeSerializer via Config Subsystem.
Change-Id: I2cabdc89b01739ef2ffdbedeff9b11038e0fa41f
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tom Pantelis [Sun, 29 Mar 2015 01:35:43 +0000 (21:35 -0400)]
Increase unit test coverage in SnapshotManager
Added more unit test cases to SnapshotManager and added more assertions
to existing tests.
Change-Id: I35446caa38eb25393a592583e8e3218b53b30e6c
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Tony Tkacik [Mon, 30 Mar 2015 08:27:43 +0000 (08:27 +0000)]
Merge "BUG 2743 - Added support for runtime RPC's to netconf mdsal northbound."
Tony Tkacik [Mon, 30 Mar 2015 08:27:31 +0000 (08:27 +0000)]
Merge "Avoid IllegalArgument on missing source"
Tony Tkacik [Mon, 30 Mar 2015 08:25:17 +0000 (08:25 +0000)]
Merge "Increase default negotiation timeout for netconf server to 30s"
Tony Tkacik [Mon, 30 Mar 2015 08:22:19 +0000 (08:22 +0000)]
Merge "Set unable-to-connect(netconf node) if no sources are available"
Tony Tkacik [Mon, 30 Mar 2015 08:20:45 +0000 (08:20 +0000)]
Merge "BUG-1567 Expose sources for submodules in netconf"
Tony Tkacik [Mon, 30 Mar 2015 08:19:46 +0000 (08:19 +0000)]
Merge "BUG-2877: Allow hello message with no namespace"
Tom Pantelis [Thu, 26 Mar 2015 05:25:11 +0000 (01:25 -0400)]
Refactor ReplicatedLogImpl to separate class
To reduce the size of the RaftActor class for improved readability.
Change-Id: I845cfeb4bc48f0c5eb96ba2cc0a925d9ce5fa416
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Robert Varga [Fri, 27 Mar 2015 11:35:37 +0000 (12:35 +0100)]
Make LeaderLocalDelegateFactory a bit more useful
It seems that the two isntantiations use functionality which can be
easily abstracted out, simplifying code.
Change-Id: Id5e7cb71055ef14b2139be2ba74e29f9cd10da60
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tom Pantelis [Tue, 31 Mar 2015 17:33:14 +0000 (17:33 +0000)]
Merge "CDS: Move DataChangeListener into a support class"
Tom Pantelis [Tue, 31 Mar 2015 17:27:52 +0000 (17:27 +0000)]
Merge "BUG-2673: make CDS implement DOMDataTreeChangeListener"
Robert Varga [Fri, 27 Mar 2015 11:10:04 +0000 (12:10 +0100)]
CDS: Move DataChangeListener into a support class
This patch follows up the pattern set by DataTreeChangeListener and
moves the related code out.
Change-Id: Ib945dc308c2264f21c0a7df8152c1f9f8f908a43
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Tue, 17 Mar 2015 10:18:53 +0000 (11:18 +0100)]
BUG-2673: make CDS implement DOMDataTreeChangeListener
This patch adds the base support for registering
DOMDataTreeChangeListeners. These are delivered only on the local node,
as efficient serialization requires interaction with the cluster
topology and shard leadership handoff. That functionality will be
delivered in a follow-up patch.
It also introduces a bit common infrastructure to be used by
DataChangeListener code, as it performs a very similar function.
Change-Id: Ifb91d08857684fb160fd923bc25c294d2fca4bc3
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Tue, 31 Mar 2015 08:01:00 +0000 (08:01 +0000)]
Merge "Tune NotificationRouter wait strategy"
Robert Varga [Mon, 30 Mar 2015 13:59:54 +0000 (15:59 +0200)]
Tune NotificationRouter wait strategy
CPU traces show we are seeing NotificationRouter spin for more work even
when there are no notifications being generated. Change the strategy so
we end up block the thread after a period of spinning/yielding. The
default spin period is set to 1ms, followed by 30ms of yielding,
followed by a block.
This should provide reasonable throughput on notification-heavy
workloads as well as not waste a lot of CPU when there are no
notifications.
Change-Id: Ia1de5ff2616392609a0868b9b8ba3bce15baa105
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tom Pantelis [Wed, 25 Mar 2015 19:25:48 +0000 (15:25 -0400)]
Adjust Tx rate limiter for unused transactions
I have a test that submits an arbitrary number of config transactions
and I noticed it can take an unusually long time depending on the
initial Tx rate limit setting. With the default setting of 100 it was
very slow even though I could see the adjusted limit increasing where
the elapsed time should've been much shorter.
It turns out the config datastore rate limit wasn't issue. When a
front-end Tx is created, a Tx instance is created in each data store.
The operation Tx's were unused but they artificially limited the config
rate since the operational rate wasn't getting updated, ie it stayed at
100.
I made changes to adjust the rate limit for unused Tx's if there have
been no prior "real" Tx's for that data store. In this case, the
percentile metrics will be 0 so I basically adjust to the current rate
from the other data store. I think this makes sense if we have no other
data to go by.
This required some infa changes so the ActorContext could get access to
the metrics timer for the other data store. Mainly, we need a global
MericsRegistry and JmxReporter across both data stores. I reused the
MetricsReporter class for this to get the static instance (with changes to
support multiple MetricsReporters per domain name). I also added
a static method to get all the data store names.
I found it useful to see the current rate limit via JMX so I added a new
DatastoreInfoMXBean to report it.
Change-Id: I09def94e40a1fe57779e76763e48696140f3a125
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Tony Tkacik [Fri, 27 Mar 2015 14:48:34 +0000 (14:48 +0000)]
Merge "Add dependency on config file to startup archetype"
Tom Pantelis [Fri, 27 Mar 2015 12:56:43 +0000 (12:56 +0000)]
Merge "BUG 2792 : ThreePhaseCommitCohortProxy should serialize CanCommit"
Tom Pantelis [Fri, 27 Mar 2015 12:52:22 +0000 (12:52 +0000)]
Merge "BUG 2773 : Transition Shard to Leader state when it has no peers"
Ed Warnicke [Wed, 25 Mar 2015 16:02:14 +0000 (12:02 -0400)]
Add dependency on config file to startup archetype
Change-Id: Ie41e8c47826789b53811c6a92279abaec510d3b9
Signed-off-by: Ed Warnicke <eaw@cisco.com>
Tony Tkacik [Fri, 27 Mar 2015 12:40:28 +0000 (12:40 +0000)]
Merge "BUG-2424 Bump mina sshd-core version to 0.14"
Tom Pantelis [Fri, 27 Mar 2015 12:05:08 +0000 (12:05 +0000)]
Merge "BUG 2584 : Datastore is ready when all local shards have a leader"
Maros Marsalek [Fri, 27 Mar 2015 10:24:54 +0000 (11:24 +0100)]
BUG-1567 Expose sources for submodules in netconf
Yang submodules were not exposed by netconf monitoring in netconf server (for
both config and mdsal servers).
Change-Id: I7adfa5ccf20199a8b8310286ef5194af8545b2e8
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Moiz Raja [Fri, 27 Mar 2015 10:17:33 +0000 (10:17 +0000)]
Merge "Make FollowerLogInformationImpl fields non-volatile"
Moiz Raja [Fri, 27 Mar 2015 10:15:57 +0000 (10:15 +0000)]
Merge "Remove RaftActor#trimPersistentData method"
Moiz Raja [Thu, 26 Mar 2015 00:43:36 +0000 (17:43 -0700)]
BUG 2792 : ThreePhaseCommitCohortProxy should serialize CanCommit
Besides the front-end ConcurrentDOMDataBroker the ThreePhaseCommitCohortProxy
also sends CanCommitTransaction to different Shards. This can also cause us
to get into the deadlock situation described in the bug and so we serialize the
can commits.
Change-Id: Iad527ce812f0b285cf41ce29abab30ec0f975aa1
Signed-off-by: Moiz Raja <moraja@cisco.com>
Moiz Raja [Thu, 26 Mar 2015 01:32:48 +0000 (18:32 -0700)]
BUG 2584 : Datastore is ready when all local shards have a leader
Earlier we were pre-maturely marking the datastore ready even when
the localshards simply transitioned to the follower state.
Change-Id: I41337497c762384317386ba9feebc192671bf65c
Signed-off-by: Moiz Raja <moraja@cisco.com>
Tom Pantelis [Thu, 26 Mar 2015 04:07:18 +0000 (00:07 -0400)]
Refactor ElectionTermImpl into separate class
To reduce the size of tye RaftActor class for improved readability.
Change-Id: I34538a227ac36355a1a0fcc06bb7167d1b19cf61
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Maros Marsalek [Tue, 24 Mar 2015 09:38:41 +0000 (10:38 +0100)]
BUG-2877: Allow hello message with no namespace
Several network equipments (such as Cisco routers) do not set the namespace
attribute (xmlns) in their NETCONF messages. Whether this is valid or not is
unclear according to RFC 6241 (NETCONF). This patch improves interoperability
by relaxing the constraint for a namespace in NETCONF hello messages.
Change-Id: Ie3de4fe454adf0d7dfd3d11eaacacf5d03736502
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Tom Pantelis [Thu, 26 Mar 2015 02:22:45 +0000 (22:22 -0400)]
Refactor DataPersistenceProviders and RaftActor#persistence
Refactored protected DataPersistenceProvider inner class impls to new
files for reuse in unit tests and to reduce inner code.
Also modified RaftActor so the DataPersistenceProvider is set rather
than having derived classes provide via the persistence() abstract method.
This makes it a little easier for derived RaftActors in that they don't
have to maintain a field and easier for unit tests to change the
DataPersistenceProvider impl.
Added a DelegatingPersistentDataProvider that holds the actual impl for
RaftActor. This allows the DataPersistenceProvider to be passed to
internal helper classes without having to update them if the underlyting
impl is changed.
These changes will facilitate further refactoring of code in RaftActor
into separate classes to simplify it.
Change-Id: I520b0d83635356f195e6bff33e44ac8f49e793cf
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Moiz Raja [Thu, 26 Mar 2015 01:21:22 +0000 (01:21 +0000)]
Merge "Bug 2194: Find primary shard on remote ShardManager"
Tom Pantelis [Thu, 26 Mar 2015 00:40:14 +0000 (20:40 -0400)]
Remove RaftActor#trimPersistentData method
The recent snapshot refactoring moved the code in trimPersistentData to
the SnapsotManager and it's no longer called so should be removed.
Change-Id: Ieb7c3b5595f562b8debf62b2ea5b16e656e5fea4
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Tom Pantelis [Thu, 26 Mar 2015 19:23:55 +0000 (19:23 +0000)]
Merge "Use SnapshotManager"
Tom Pantelis [Thu, 26 Mar 2015 19:22:37 +0000 (19:22 +0000)]
Merge "Refactor snapshot code"
Tom Pantelis [Thu, 26 Mar 2015 19:12:20 +0000 (19:12 +0000)]
Merge "BUG 2792 : Serialize phase processing in ConcurrentDOMDatBroker"
Moiz Raja [Fri, 20 Mar 2015 05:21:09 +0000 (22:21 -0700)]
BUG 2773 : Transition Shard to Leader state when it has no peers
This patch attempts to still take a Shard through it's normal state transitions
so that we still get the term incrementing and other stuff which is specific
to Raft to happen.
Change-Id: Ic786b5440a258eda7ec311300bffeac2ab49e6c2
Signed-off-by: Moiz Raja <moraja@cisco.com>
Tom Pantelis [Fri, 13 Mar 2015 23:57:47 +0000 (19:57 -0400)]
Bug 2847: Recovery of a large journal runs out of memory
Changed the ShardRecoveryCoordinator to commit each log entries batch
immediately instead of using an executor to prepare write transaction in
parallel and then commit them all on recovery complete. This resulted in
a lot of memory overhead for little to no gain. I also changed it to
cache the serialized ModificationPayload instances instead of
immediately de-serializing - this further reduces the memory footprint
as the serialized instances are much smaller
As a result, all of the recovery code is now in the
ShardRecoveryCoordinator - Shard is essentially a pass through.
I also reduced the shardJournalRecoveryLogBatchSize to 1000 to further
reduce the memory footprint.
Change-Id: I3aaabe52781bc0db14975e0a292ef9fd18aa3d7c
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Moiz Raja [Wed, 25 Mar 2015 22:44:34 +0000 (15:44 -0700)]
BUG 2792 : Serialize phase processing in ConcurrentDOMDatBroker
Ensure that any given submit phase is completed for a cohort before
proceeding to run the same submit phase on the next cohort in the
transaction.
For example if a transaction has 2 cohorts then canCommit on cohort1
must complete before we proceed to canCommit on cohort2.
If we try to concurrently try to process the phase on all cohorts in
a transaction it can lead to deadlocks as outlined in the bug
Change-Id: I4e758770c711d92920a456e2ac3757ebbb63eb46
Signed-off-by: Moiz Raja <moraja@cisco.com>
Tom Pantelis [Fri, 13 Mar 2015 05:30:32 +0000 (01:30 -0400)]
Make FollowerLogInformationImpl fields non-volatile
The FollowerLogInformationImpl fields nextIndex and matchIndex don't
need to be volatile as they're only accessed via the RaftActor and
akka's happens-before rule guarantees actor state visibility when a
subsequent message is processed.
Change-Id: Ibee0cc8d04c0d65b2f512e44398474439363a00e
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Tom Pantelis [Wed, 25 Mar 2015 18:43:11 +0000 (18:43 +0000)]
Merge "Do not use ActorSystem.actorFor as it is deprecated"
Moiz Raja [Tue, 3 Mar 2015 18:11:41 +0000 (10:11 -0800)]
Use SnapshotManager
Change-Id: I0d5d5aee12afb2b1f89fb7e4113c4fa5cc334dd3
Signed-off-by: Moiz Raja <moraja@cisco.com>
Moiz Raja [Sun, 22 Feb 2015 20:45:25 +0000 (12:45 -0800)]
Refactor snapshot code
Snapshot manipulation code and logic is now spread across multiple classes
and is becoming difficult to maintain and understand. This is an attempt to
simplify the implementation and make it easy to move forward.
Change-Id: I34e61c9d4bb4663d5f87d6c11fb6ed75c1bb33f2
Signed-off-by: Moiz Raja <moraja@cisco.com>
Tom Pantelis [Wed, 25 Mar 2015 17:18:50 +0000 (17:18 +0000)]
Merge "Bug-2842:If an install snapshot is in progress, Follower should return immediately on appendentries"
Ed Warnicke [Wed, 25 Mar 2015 17:04:39 +0000 (17:04 +0000)]
Merge "Remove redundant features: odl-adsal-controller-northbound and odl-nsf-controller-managers"
Tom Pantelis [Wed, 25 Mar 2015 17:01:51 +0000 (17:01 +0000)]
Merge "BUG 2852 : Reduce and improve logging in RemoteRpcImplementation"
Moiz Raja [Wed, 25 Mar 2015 16:15:58 +0000 (16:15 +0000)]
Merge "Bug 2194: Modify FindPrimary to check for leader"
Moiz Raja [Wed, 25 Mar 2015 16:15:32 +0000 (16:15 +0000)]
Merge "Add LeaderStateChanged notification"
Maros Marsalek [Wed, 25 Mar 2015 10:10:19 +0000 (11:10 +0100)]
BUG-2424 Bump mina sshd-core version to 0.14
The 0.14 version includes fix for following issue:
https://issues.apache.org/jira/browse/SSHD-393
It caused the transfer over ssh to freeze completely when sending big messages
e.g. 8Mb
Tested using connection between ODL and netconf-testtool transfering yang schema
with size of 40Mb.
Change-Id: I8a2dc38f0feed30a0f6b6c4197e9a546df16491b
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Flavio Fernandes [Wed, 25 Mar 2015 12:58:03 +0000 (08:58 -0400)]
Remove redundant features: odl-adsal-controller-northbound and odl-nsf-controller-managers
With changes introduced by [1], the two features mentioned above are equivalent to their
conterparts: odl-adsal-northbound and odl-nsf-managers. This change eliminates the redundant
features, which were introduced in [2].
Patch 2: typo (redundant)
[1]: https://git.opendaylight.org/gerrit/#/c/15749/
[2]: https://git.opendaylight.org/gerrit/#/c/15566/
Change-Id: Ia3c955603a165e5c00f9f623e18901352efe2ba4
Signed-off-by: Flavio Fernandes <ffernand@redhat.com>
Maros Marsalek [Wed, 25 Mar 2015 12:09:11 +0000 (13:09 +0100)]
Set unable-to-connect(netconf node) if no sources are available
Currently the state was set to connecting even though the connection attempts
stopped.
Change-Id: I9c5eaa1c7a547c2efaa7224d1c75f1c0c7dad5cc
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Tony Tkacik [Wed, 25 Mar 2015 09:18:32 +0000 (09:18 +0000)]
Merge "BUG 2799: Migration of Message Bus from deprecated Helium MD-SAL APIs to Lithium API"
Maros Marsalek [Tue, 24 Mar 2015 12:33:54 +0000 (13:33 +0100)]
Increase default negotiation timeout for netconf server to 30s
5s is a bit too short. especially when testing.
Change-Id: I47a1ccedab596c78e9d1ba314679d0b542722889
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Tomas Cere [Mon, 2 Mar 2015 09:50:47 +0000 (10:50 +0100)]
BUG 2743 - Added support for runtime RPC's to netconf mdsal northbound.
Change-Id: I7f978502926c47535efc074a0522f6cfc0a3c3a5
Signed-off-by: Tomas Cere <tcere@cisco.com>
Tom Pantelis [Wed, 25 Mar 2015 04:07:39 +0000 (00:07 -0400)]
Bug 2194: Find primary shard on remote ShardManager
If there is no local shard, the ShardManager now forwards the FindPrimary
message to another ShardManager member.
I changed the FindPrimary and PrimaryFound messages to Serializable.
Previously they implemented SerializableMessage but they didn't have
equivalent protobuff messages so they couldn't be sent over the wire.
These are simple messages and we don't need protobuff.
I also obsoleted the ActorNotInitialized and PrimaryNotFound messages as
we also have equivalent exception classes (which are inhently
Serializable) so the former messages are redundant. This avoids
translation in ActorContext#findPrimaryShardAsync.
Change-Id: I5762ec1dafb9aa12ee8230efe245b154b0bb9b72
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Moiz Raja [Fri, 13 Mar 2015 01:56:51 +0000 (18:56 -0700)]
BUG 2852 : Reduce and improve logging in RemoteRpcImplementation
- Log an invoke rpc error only at warn level by default
- At debug level log the failure stack trace
- Include more context like rpc name and identifier in the log message
Change-Id: I00d3a52418acd07232ed0f4cc93b8de55d03d144
Signed-off-by: Moiz Raja <moraja@cisco.com>
Kamal Rameshan [Mon, 16 Mar 2015 05:54:40 +0000 (22:54 -0700)]
Bug-2842:If an install snapshot is in progress, Follower should return immediately on appendentries
Change-Id: I6593bbd1661880bedc17f3850488a022f8c7ed80
Signed-off-by: Kamal Rameshan <kramesha@cisco.com>
Signed-off-by: Moiz Raja <moraja@cisco.com>
Tom Pantelis [Tue, 24 Mar 2015 18:46:21 +0000 (14:46 -0400)]
Bug 2194: Modify FindPrimary to check for leader
Write-only transaactions now bypass sending the CreateTransaction
message to the shard however we still need to check if the shard has
a leader.
So I modified the ShardManager to check for this on FindPrimaryShard
message utilizing the RoleChanged and LeaderStateChanged events recently
added. On FindPrimaryShard, if the shard is not ready, ie its role is
Candidate or it has no leaderId or is not initialized, the sender is
recorded and a timeout schedule is started. If the shard becomes ready,
the success message is sent to the sender. If the timer expires, an error
message is sent to the sender, either ActorNotInitilized or
NoShardLeaderException.
I also changed the ShardInformation peerAddresses map to String key
instead of ShardIdentifier for convenient lookup of the leaderId to
obviate the need to parse a ShardIdentifier from a String. The key is
not used/needed as a ShardIdentifier and the Shard converts the keys to
Strings anyway so it made sense to define the key as String. Several
unit tests had to be changed as a result of this.
In ActorContext#findPrimaryShardAsync, I added a check for
NoShardLeaderException. I also removed the synchronous findPrimaryShard
and findPrimaryShardOrNull methods to avoid having to duplicate the
exception handling. ActorContext#broadcast was the only caller and it
should use findPrimaryShardAsync anyway.
Change-Id: I22bc661314b25812024b7d274afb390768408b0b
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Tom Pantelis [Tue, 24 Mar 2015 17:55:27 +0000 (13:55 -0400)]
Add LeaderStateChanged notification
For upcoming work, the ShardManager will need to know a shard's
leaderId and, eventually, version. In the RaftActor, when the
behavior's leaderId changes, it now sends a LeaderStateChanged message
to the RoleChangedNotifier actor. The ShardManager will listen for
LeaderStateChanged messages (in another patch).
Change-Id: I53e2d7cae8fd19f96650546af395f82189a09fd8
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Tom Pantelis [Sat, 7 Mar 2015 04:40:15 +0000 (23:40 -0500)]
Optimize TransactionProxy for write-only transactions
For write-only transactions, modified TransactionProxy to prepare
the Tx modifications directly on the Shard rather than having the
Shard create a separate ShardTransaction actor. The BatchedModifications
messages are sent directly to the shard. On ready, the last
BatchedModifications is flagged as ready, thus also eliminating the
ReadyTransaction message. In this manner, we eliminate the
CreateTransaction and the ReadyTransaction messages and the
the ShardTransaction actor.
Several new fields were added to the BatchedModifications message:
transactionID, transactionChainID, and ready. On the last, readied
BatchedModifications message, the Shard returns the
BatchedModificationsReply message with the cohort actor (the Shard
itself).
The BatchedModifications messages are handled by the
ShardCommitCoordinator. I started creating a separate
ShardTransactionCoordinator but realized I'd have to duplicate some
storage plus the 2 coordinators should have to interface. The
CohortEntry is used to store the prepared DOMStoreWriteTransaction.
Perhaps ShardCommitCoordinator should be renamed to
ShardTransactionCoordinator but that can be refactored later.
I create a DOMTransactionFactory that is used by both the
ShardCommitCoordinator and the Shard to create DOM transactions and
update the mbean stats.
Change-Id: I0d8126149f80854feb504ed9d8e49bcc7db253ce
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Moiz Raja [Tue, 24 Mar 2015 17:03:46 +0000 (17:03 +0000)]
Merge "Add more info to ShardStats JXM bean"
Tom Pantelis [Tue, 24 Mar 2015 12:43:46 +0000 (12:43 +0000)]
Merge "BUG 2849 : Reduce sending of duplicate replication messages"
Tom Pantelis [Tue, 24 Mar 2015 12:39:29 +0000 (12:39 +0000)]
Merge "BUG 2854 : Do not add empty read write transactions to the replicable journal"
Maros Marsalek [Mon, 23 Mar 2015 13:43:48 +0000 (14:43 +0100)]
Avoid IllegalArgument on missing source
If source was not reported in hello, but was listed in ietf-netconf-monitoring
and it was unable to download it, sal-netconf-connector would fail to build
unavailable-capability from it and fail with IllegalArgumentException.
Look up the QNames for Sources properly.
Change-Id: Ic60135e3ba569fe52e6552f62f846d2aa9c8cc21
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Marian Adamjak [Mon, 23 Mar 2015 09:55:28 +0000 (10:55 +0100)]
BUG 2799: Migration of Message Bus from deprecated Helium MD-SAL APIs to Lithium API
- remove creation RO transaction instance in try-resouce
(at notifyExistingNodes method)
Change-Id: Id75c79568b1ad2560aefe27f7a9c567102a7dd05
Signed-off-by: Marian Adamjak <madamjak@cisco.com>
Robert Varga [Mon, 16 Mar 2015 23:22:12 +0000 (00:22 +0100)]
Do not use ActorSystem.actorFor as it is deprecated
Stopped using ActorSystem.actorFor and instead replace the
actor path serialization with the right way to serialize an
ActorRef.
Change-Id: I282ec46d88a531eb5ce189a55e25fe6e75413c66
Signed-off-by: Robert Varga <rovarga@cisco.com>
Signed-off-by: Moiz Raja <moraja@cisco.com>
Tom Pantelis [Fri, 13 Mar 2015 11:42:02 +0000 (07:42 -0400)]
Add more info to ShardStats JXM bean
Added more raft state information to the ShardStats, including lastIndex,
lastTerm, snapShotIndex, snapshotTerm, replicatedToAllIndex, info about
each follower (if the leader), and peer addresses. Basically all the
pertinent raft actor state is now reported.
Instead of having the Shard update the stats bean as things change,
which would be difficult with some of the state, I changed ShardStats to
send a GetOnDemandRaftState message to the shard actor which returns all
the state info in an OnDemandRaftState reply. This captures the state in
a thread-safe manner. Since each piece of information is returned by the
ShardStats bean in separate methods, I didn't want each call to send the
message so I cache the last OnDemandRaftState reply for 2 seconds.
With this change, the Shard no longer needs to keep the ShardStats up to date
with the current state.
Change-Id: I1775ba35747c68028f5c3e31789b958d35afa172
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Moiz Raja [Mon, 23 Mar 2015 17:41:15 +0000 (17:41 +0000)]
Merge "Refactor LeaderElectionScenarioTests"
Moiz Raja [Mon, 23 Mar 2015 17:37:32 +0000 (17:37 +0000)]
Merge changes Idfb4fbea,Ief82b050
* changes:
Add RaftActor integration tests
Refactor InMemoryJournal and InMemorySnapshot to sal-akka-raft
Tony Tkacik [Mon, 23 Mar 2015 11:05:09 +0000 (11:05 +0000)]
Merge "BUG-2878: Add the XML declaration to every outgoing NETCONF message."