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>
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>
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>
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>
Moiz Raja [Mon, 30 Mar 2015 23:13:25 +0000 (23:13 +0000)]
Merge "Adjust Tx rate limiter for unused transactions"
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>
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 [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 [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>
Jan Hajnar [Wed, 18 Mar 2015 14:25:15 +0000 (15:25 +0100)]
BUG 2412 - remove CompositeNode from sal-clustering-common
* cleaning all help methods from Util classes which are working
with deprecated CompositeNode class
Change-Id: I31397a1379ef541d642acec68542860ac689481e
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
Robert Varga [Wed, 11 Mar 2015 09:59:11 +0000 (10:59 +0100)]
BUG-1513: migrate users to ChoiceSchemaNode
This migrates all users to the new interface name, cleaning them up as
the data.api and model.api name clash is resolved.
Change-Id: Ibdc317d5ff86c6a895cccdacf6dfea1fb005d9b6
Signed-off-by: Robert Varga <rovarga@cisco.com>
Maros Marsalek [Fri, 6 Mar 2015 13:37:57 +0000 (14:37 +0100)]
Migrate users of AnyXml node to DOMSource
AnyXml node used to wrap Node<?> but now wraps a DOMSource
Change-Id: If4f5845e5a0611d5fe38951dd6afe73d0a6f95bc
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
tpantelis [Tue, 10 Feb 2015 06:07:28 +0000 (01:07 -0500)]
Raft behavior logging
Added more logging in the raft behavior classes where appropriate.
Reduced logging in some places to trace or removed redundant logging to
avoid too much output when debug level is enabled.
Removed isDebugEnabled() checks in various places where not needed to
improve test line coverage.
Also I found it useful to see the behavior's state in the log messages.
So I added a logName field and method to AbstractRaftBehavior that
is printed in each log message instead of just context.getId().
Also added/modified toString() in a few RaftRPC message classes.
Change-Id: Ic4d3c93e25d5caf16319b8433d54cab69b26f5c0
Signed-off-by: tpantelis <tpanteli@brocade.com>
tpantelis [Sun, 1 Feb 2015 21:52:59 +0000 (16:52 -0500)]
Bug 2669: Use slf4j Logger instead of akka LoggingAdapter
Change-Id: I8ca8d4979448cb158f6fb2dd89124a3b4e6e39e8
Signed-off-by: tpantelis <tpanteli@brocade.com>
Moiz Raja [Tue, 10 Feb 2015 01:43:11 +0000 (01:43 +0000)]
Merge "Add signature marker and version to NormalizedNode streaming"
Kamal Rameshan [Thu, 29 Jan 2015 19:44:30 +0000 (11:44 -0800)]
Bug-2590: Clustering : Minimize usage of in-memory journal
In order to minimize the memory usage of the in-memory journal, we can remove the entries from the Leader's journal
once it has been successfully replicated to ALL its followers.
This does not intefere with snapshots, as we capture snapshots on demand.
The followers follow the leader in cleaning the in-memory journal, there by ensuring that all the journals have more or less same entries.
This is done by the leader passing its replicatedToAllIndex as part of the AppendEntries.
Change-Id: I579a1f90d3c4e5d6be4ce699072688788b07bd48
Signed-off-by: Kamal Rameshan <kramesha@cisco.com>
Tom Pantelis [Wed, 4 Feb 2015 16:11:01 +0000 (16:11 +0000)]
Merge "BUG 2667 : Handle null value type"
Moiz Raja [Tue, 3 Feb 2015 21:13:59 +0000 (13:13 -0800)]
BUG 2667 : Handle null value type
Modified the code to handle null types in leaf and leafset entries since
they are allowed. This should help avoid atleast some of the issues seen
by GBP.
Change-Id: Id24e03738e9b5490c8221fbf31ec0734c58655bb
Signed-off-by: Moiz Raja <moraja@cisco.com>
tpantelis [Mon, 2 Feb 2015 08:42:37 +0000 (03:42 -0500)]
Add signature marker and version to NormalizedNode streaming
For backwards compatibility, in some message classes, when
de-serializing, we first try the new NormalizedNode streaming and if
that fails we try the pre-Lithium protobuff de-serialization. However,
we're relying on an IOException from the NormalizedNode streaming or it
returning null which may not be reliable. In addition if protobuff fails
as well we can't tell if it's a bad protobuff or streamed message and we
squash the streaming exception. We don't want to masking streaming failures
as that's what will be used going forward.
To alleviate this, NormalizedNodeOutputStreamReader now writes an initial byte
as a signature marker to identify it as a valid stream.
NormalizedNodeInputStreamReader reads it, and if invalid, throws an
exception. This is caught by SerializationUtils as an indication to try
the legacy protobuff de-serialization.
Also, I added a version number to the output stream so we can handle
future changes for backwards compatibility.
Change-Id: I19779aa83c33eadc6bf83adfe6aae0b9a27cdfae
Signed-off-by: tpantelis <tpanteli@brocade.com>
tpantelis [Wed, 21 Jan 2015 21:18:17 +0000 (16:18 -0500)]
Bug2268: Deprecate legacy Payload classes
Mark CompositeModificationByteStringPayload and
CompositeModificationPayload as deprecated.
Change-Id: I788baab09770d305c9fde9b4988fad9e58663ded
Signed-off-by: tpantelis <tpanteli@brocade.com>
tpantelis [Wed, 21 Jan 2015 19:45:42 +0000 (14:45 -0500)]
Bug 2268: Use streaming for Modification payload
Changed the *Modification classes to Externalizable and to use the
NormalizedNode streaming classes.
Added a new Payload implementation, ModificationPayload, that serializes the
Modification to a byte[].
Added ThreadLocals to SerializationUtils to reuse stream Reader/Writer
instances for efficiency for callers that serialize/deserialize multiple
objects.
Change-Id: Ib85af035d31027ffe4e2ddd5bcd49c1df1c6a42a
Signed-off-by: tpantelis <tpanteli@brocade.com>
Robert Varga [Mon, 26 Jan 2015 18:09:53 +0000 (19:09 +0100)]
Add serialVersionUUID fields
Fix eclipse warnings by generating an explicit field.
Change-Id: Ice06a8ba6a2c59085998a725378d0ddd54cc032b
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Mon, 26 Jan 2015 16:22:34 +0000 (17:22 +0100)]
NormalizedNodeOutputStreamWriter should forward flush()
When flush is called, we should cascade it to underlying stream, if it
is a stream. Failure to do so may cause problems with buffering.
Change-Id: I5ee32c3a0bab6aa112dc3c323ea1c4d5c4d5af5c
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Mon, 26 Jan 2015 16:13:45 +0000 (17:13 +0100)]
Cleanup PathArgumentTypes
PathArgumentTypes is a utility class, it should be final with a private
constructor. Also make sure the internal map is truly constant.
Change-Id: I1cbbcac5c86daa64fc1fb79a7282fdd29b6566d7
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Mon, 26 Jan 2015 16:10:44 +0000 (17:10 +0100)]
NodeTypes is a utility class
Utility classes need to be final and have a private constructor.
Change-Id: I4f7ad749415a068be324bfe23c79110b96c4ed10
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Mon, 26 Jan 2015 16:00:59 +0000 (17:00 +0100)]
Optimize MetricsReporter class
Constants should really be static, singleton instance should be static
and the inner field should never be exposed to outside world.
Change-Id: I37776b190cef6b0402f1478b22c47746d547619d
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Mon, 26 Jan 2015 15:08:14 +0000 (16:08 +0100)]
Optimize ValueSerializer
Instead of having a switch() statement, which forces a comparison of
ValueTypes, embed the serialize() method in ValueType with package
visibility.
Change-Id: I1cf4aa998cc97dc7d920570744094409aa4a7f29
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Mon, 26 Jan 2015 14:54:23 +0000 (15:54 +0100)]
Optimize ValueType class lookups
Instead of using a mutable HashMap, use an ImmutableMap, which has much
better lookup performance.
Change-Id: Ia44ef5243abce021bdbd8afc930e5f5fc9529724
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Mon, 26 Jan 2015 14:31:19 +0000 (15:31 +0100)]
Optimize AugmentationIdentifierGenerator.getPathArguments()
Instead of using a Regex-based splitting, instantiate a Splitter, which
is much faster.
Change-Id: I67c3cd1c9054f675b2543cb8ae62c7037f4edf19
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Mon, 26 Jan 2015 14:21:58 +0000 (15:21 +0100)]
Optimize PathUtils.toString()
- check for empty iterator and return empty string
- check iterator.hasNext() only once per iteration
- concatenate a single char instead of a string
Change-Id: If0769462d74a7df23373d12db5843fd2a217d5a9
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Mon, 26 Jan 2015 14:07:13 +0000 (15:07 +0100)]
Optimize PathUtils.toYangInstanceIdentifier()
Instead of using String-bases split, use a guava splitter.
Change-Id: I6eb184d5e3a3ece93588267ba231a42b90d6bb9d
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Mon, 26 Jan 2015 14:00:58 +0000 (15:00 +0100)]
Make sure QNameFactory cache is constant
The cache is constant, there is no reason it should be non-final.
Change-Id: I663352473e6a9e6021c3cee56ddf0336e5f8e2ac
Signed-off-by: Robert Varga <rovarga@cisco.com>
Moiz Raja [Mon, 26 Jan 2015 03:57:54 +0000 (03:57 +0000)]
Merge "Bug 2265: Use new NormalizedNode streaming in messages"
tpantelis [Sun, 18 Jan 2015 19:29:11 +0000 (14:29 -0500)]
More unit test code coverage for NormalizedNodeStreamReader/Writer
Change-Id: Id93186bb8de8dd7fadb4a53679f964697bd45e3c
Signed-off-by: tpantelis <tpanteli@brocade.com>
tpantelis [Mon, 19 Jan 2015 03:21:46 +0000 (22:21 -0500)]
Bug 2265: Use new NormalizedNode streaming in messages
Utilized the new NormalizedNode streaming classes for the WriteData,
MergeData, ReadDataReply and DataChanged messages.
One solution was to add a bytes field to the protobuff messages and
make the previous fields optional. For backwards compatibility, in
the wrapper message's fromSerializable method, check whether or not
the protobuff message has the bytes field and act accordingly.
While this works, it results in an undesirable inefficiency.
Protobuff translates the bytes field to a ByteString type. So when
streaming, we need to create a ByteArrayOutputStream and pass that to
the NormalizedNode stream writer. Then call
ByteString.copyFrom(bos.toByteArray) to get the resulting ByteString.
However this results in 2 copies of the serialized byte[]. The
byte[] cannot be passed to ByteString as is as it always copies it to
maintain immutability. I looked into subclassing ByteString and
lazily streaming the data on demand but the ByteString ctor is
package scoped so they don’t allow subclassing.
So I went with an approach to make each message Externalizable
instead of using protobuff. The classes writes
the version number to enable us to handle compatibility in the future.
So in this manner, we can get the efficient direct streaming we
want and easily handle backwards and forwards compatibility.
I added a VersionedSerializableMessage interface whose
toSerializable method takes a version number. The version # is passed
from the remote version # obtained from the CreateTransactionReply.
This allows the message classes to handle backwards compatibility. So
if the version is Helium-1 or less, send the protobuff message
otherwise send the Externalizable instance.
In the fromSerializable method, it checks if the passed Object is an
instance of the Externalizable class or the protbuff message type.
Change-Id: I5ebb968e70ac8ff92c29183c52e6c3fe5362ae34
Signed-off-by: tpantelis <tpanteli@brocade.com>
tpantelis [Wed, 12 Nov 2014 22:09:15 +0000 (17:09 -0500)]
Bug 2327: Handle binary data in NormalizedNode streaming
Also made optimization improvements to reuse primitive (using valueOf) and coded String
values (using intern) when read from the stream.
Also added a reusable StringBuilder instance for building qnames. After
use, the StringBuilder is cleared via the delete method. This
effectively resets the char count to 0. Previously, the
code used string concatenation which the compiler will translate to use
an imlicit StringBuilder. These changes avoid the implicit creation of a
StringBuilder instance each time which should reduce object churn.
Change-Id: Ic9c745d97d1b5eed2dd24bc5d252d05ac1355cbb
Signed-off-by: tpantelis <tpanteli@brocade.com>
Tom Pantelis [Tue, 6 Jan 2015 15:09:20 +0000 (15:09 +0000)]
Merge "Fix Akka exception: cannot use non-static local Creator to create actors"
Robert Varga [Tue, 16 Dec 2014 12:41:26 +0000 (13:41 +0100)]
BUG-1382: do not instantiate prefixed QNames
Prefix-aware QName constructor is going away, do not use it. Also fix
all references to QName.getPrefix().
Change-Id: Ife6567a269c2db16019ae97a6eace74a19ac3b23
Signed-off-by: Robert Varga <rovarga@cisco.com>
Gary Wu [Fri, 19 Dec 2014 00:08:58 +0000 (16:08 -0800)]
Fix Akka exception: cannot use non-static local Creator to create actors
Fix Akka exception "cannot use non-static local Creator to create
actors; make it static or top-level" running JUnit tests in Eclipse.
Allows Eclipse JUnit tests to complete in:
sal-akka-raft
sal-clustering-common
sal-distributed-datastore
sal-remoterpc-connector
Change-Id: I64b83c12ed44773bbe7dee5666872209f3346b15
Signed-off-by: Gary Wu <gary.wu@gmail.com>
Moiz Raja [Wed, 3 Dec 2014 17:58:35 +0000 (09:58 -0800)]
BUG 2464 : Shard dataSize does not seem to correspond to actual memory usage
The dataSize that is reported is the "serialized" size of the payload. Since the replicated
log actually contains the CompositeModification object (which may hold on to a lot more memory)
the serialized size is not neccessarily the same as the object size.
To make the data size correspond to memory usage and to actually reduce memory usage this patch
creates a new payload class called CompositeModificationByteStringPayload which only stores the
ByteString which is an order of magnitude smaller. Custom serialization ensures that this object
is written and read correctly.
This patch is backward compatible in that a replicated log containing a CompositeModificationPayload
will be read correctly but is not forward compatible in that if a new controller instance were to send
a CompositeModificationPayload to an older instance it would not work.
To ensure that we do not need to immediately require a conversion from ByteString to PersistentMessages.CompositeModification we maintain a SoftReference to CompositeModification.
Change-Id: I32c921dea2d39ed689aa2fb6f68eb8528be920d0
Signed-off-by: Moiz Raja <moraja@cisco.com>
Moiz Raja [Wed, 26 Nov 2014 17:07:40 +0000 (09:07 -0800)]
BUG 2437 - Enable snapshotting based on size of data in the in-memory journal
- Changed RaftActor to snapshot based on the transaction count or the size of the
data in the in-memory journal whichever comes earlier
- The size of data that is used is the rough (not-accurate) size of the Payload
in the Replicated log entry
- In ShardStats exposed another property which is the data size of the in-memory
journal
- The snapshot data threshold percentage is configurable using the config sub-system and is
set to a default of 12%. The reason for setting it at 12% by default is because we have
a total of 8 default shards out of the box. I could have set this to 16% as toaster is not
a "real" data shard.
- The snapshot data threshold is calculated as a percentage of the Runtime.totalMemory()
which is the total memory the jvm considers available for object allocation. From testing
it appears that the total memory is what would appear in jconsole as the committed memory.
I have not added any unit testing for this - but tested this using the scenario described in
bug 2437 and it seems to work pretty well. The deployment used only 2G of memory and worked
fine for a 7 switch topology and I observed that it had not run out of memory after more than
2 hours.
Change-Id: I09ec0827c0411c42a9224bb6d159d5590c22e20b
Signed-off-by: Moiz Raja <moraja@cisco.com>
Moiz Raja [Tue, 25 Nov 2014 05:22:34 +0000 (21:22 -0800)]
BUG 2371 : Leader should reset it's snapshot tracking when follower is restarted
This patch adds a new protocol to InstallSnapshot. It the InstallSnapshotReply returns
a failure and the chunkIndex is -1 then the Leader will reset the FollowerSnapshot so
that when the next heartbeat occurs the Leader would start sending chunks from the beginning.
Change-Id: I0d5f0a4230209856ecf9bcef46220ae348f52b5d
Signed-off-by: Moiz Raja <moraja@cisco.com>
Kamal Rameshan [Tue, 18 Nov 2014 23:26:51 +0000 (15:26 -0800)]
Bug-2397:Provide a mechanism for stakeholders to get notifications on Raft state change
A notifier actor is spawned from the RaftActor inherited implementation, in our case Shard or ExampleActor .
Its injected into the RaftActor.RaftActor notifies the notifier with the role changes. The Notification message is local to Shard or Example.
The idea is for any implementation to create a notifier, inject it and issue a notification from that notifier on a role change.
A sample example notifier, listener and notification is provided to show how a listener can register with the notifier and get notifications form the notifier.
Notifier and Notifications are assembled in commons, to be shared along with other apps who might need similar logic. It can be override by specific implementations.
Has been tested with the TestDriver, with separate actorsystems for listner and notifier
Tests have been added.
Change-Id: I23f16d4e76bb7dae640c544df282293274d9a1cb
Signed-off-by: Kamal Rameshan <kramesha@cisco.com>
tpantelis [Thu, 30 Oct 2014 12:16:05 +0000 (08:16 -0400)]
Bug 2267: Reuse leaf and leaf set entry builders in NormalizedNodeInputStreamReader
Builders.leafBuilder() and Builders.leafSetEntryBuilder() can be
re-used. Added class members to lazy-create a reusable an instance of each.
Also fixed a bug related to a null revision field in QName.
Change-Id: Ief41b6c23d9f41dc0d281786e5143127ef88ca4d
Signed-off-by: tpantelis <tpanteli@brocade.com>
Robert Varga [Fri, 7 Nov 2014 17:45:21 +0000 (18:45 +0100)]
Fix raw references to Iterator
Adds type declarations to fix eclipse warnings.
Change-Id: I33c9303bda2d5dd42632de2ec191e294d496e09b
Signed-off-by: Robert Varga <rovarga@cisco.com>
Moiz Raja [Wed, 12 Nov 2014 21:10:09 +0000 (13:10 -0800)]
BUG 2353 : Handle binary, bits and instanceidentifier types in NodeIdentifiers
This fix properly serializes and deserializes NodeIdentifier attributes of the types
- binary (byte[])
- yanginstanceidentifier
- bits (set)
Change-Id: I612d40f9730c939be0594496c26370db96ea6449
Signed-off-by: Moiz Raja <moraja@cisco.com>
Tony Tkacik [Mon, 10 Nov 2014 10:46:22 +0000 (10:46 +0000)]
Merge "Fix raw use of Gauge"
Tony Tkacik [Mon, 10 Nov 2014 10:45:00 +0000 (10:45 +0000)]
Merge "Add serialVersionUID to Serializable classes"
Tony Tkacik [Mon, 10 Nov 2014 08:55:47 +0000 (08:55 +0000)]
Merge "Fix a non-generic reference to DataContainerNode"
Tony Tkacik [Mon, 10 Nov 2014 08:55:42 +0000 (08:55 +0000)]
Merge "Fix non-generic references to NormalizedNode"
Tony Tkacik [Mon, 10 Nov 2014 08:55:14 +0000 (08:55 +0000)]
Merge changes I0fe4b78d,I3d3bc71b
* changes:
Fix non-generic reference to org.opendaylight.yangtools.yang.data.api.Node
Fix non-generic references to java.util.Map
Robert Varga [Fri, 7 Nov 2014 18:14:38 +0000 (19:14 +0100)]
Fix raw use of Gauge
It is a generic type, so add type declarations to fix warnings.
Change-Id: I228629392261c22ec6a9037795aeb5bdbccc2dfe
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Sat, 8 Nov 2014 16:08:44 +0000 (16:08 +0000)]
Merge changes I9865d0cd,Ic71d525f,Ib8faba91,Ia10e5ec9,I35591747,If456a131,I9f8709cc
* changes:
Fix non-generic references to List
Hide XSQLBluePrintRelation.addToResult()
Fix non-generic references to Set
Fix HashMap references
Fix raw references to java.lang.Class
Fix raw references to NotificationListener
Fix non-generic references to HashSet
Robert Varga [Fri, 7 Nov 2014 17:39:30 +0000 (18:39 +0100)]
Fix a non-generic reference to DataContainerNode
Just add a wildcards, as it's only used in a cast.
Change-Id: I0be921b5e63dcc3d0fa005a54c8a55dcfbffa866
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Fri, 7 Nov 2014 17:38:43 +0000 (18:38 +0100)]
Fix non-generic references to NormalizedNode
Adds wildcard type arguments to get rid of eclipse warnings.
Change-Id: I16514de7e82b6cabdc9fc17cc76dcb0cbdbe76ce
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Fri, 7 Nov 2014 17:31:55 +0000 (18:31 +0100)]
Fix non-generic reference to org.opendaylight.yangtools.yang.data.api.Node
Adds the proper wildcard to suppress warnings.
Change-Id: I0fe4b78d35fe16a068f10cc23393a27080178f69
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Fri, 7 Nov 2014 17:30:09 +0000 (18:30 +0100)]
Fix non-generic references to java.util.Map
Adds proper arguments. Also eliminates unneeded casts to Map.Entry,
caused by unnecessary loss of type.
Change-Id: I3d3bc71b88a404b02029d836a3d02d37e304c39e
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Fri, 7 Nov 2014 18:16:12 +0000 (19:16 +0100)]
Access static methods via class
Invocation is slightly faster and fixes eclipse warnings.
Change-Id: I73730f7903aa8f25786625aa4903dc66d4f61e09
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Fri, 7 Nov 2014 19:50:32 +0000 (20:50 +0100)]
Add serialVersionUID to Serializable classes
Each serializable class withouth serialVersionUID produces an eclipse
warning. It also means that the class has undefined versioning and
cannot be be upgraded -- this patch fixes all such classes.
Change-Id: I57696f47b312517acd44799e10850f4887dab2e5
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Fri, 7 Nov 2014 17:07:21 +0000 (18:07 +0100)]
Fix non-generic references to Set
Adds arguments as appropriate.
Change-Id: Ib8faba91bd9fc8751014ea00f1859636e0fcda6d
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Fri, 7 Nov 2014 18:13:29 +0000 (19:13 +0100)]
Fix raw references to java.lang.Class
Fixes eclipse warnings just by adding either a wildcard, or the proper
type.
Change-Id: I35591747ae585f5af262f98c7592430d6a9268e2
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Fri, 7 Nov 2014 17:00:58 +0000 (18:00 +0100)]
Fix non-generic references to HashSet
Adds arguments and changes to use ImmutableSet.of() where that
is more straighforward.
Change-Id: I9f8709cc320ee9804eb2d83e552ec69cc99ee05a
Signed-off-by: Robert Varga <rovarga@cisco.com>
Moiz Raja [Wed, 5 Nov 2014 19:09:06 +0000 (11:09 -0800)]
BUG 2325 : Value type of byte[] not recognized by the NormalizedNodeSerializer
Change-Id: I16eab6cdbf7712624f2c1fafb5bf41107b6ae379
Signed-off-by: Moiz Raja <moraja@cisco.com>
(cherry picked from commit
819b04091a3d4d96612a1036228638a3b4e85d09)
Moiz Raja [Sun, 2 Nov 2014 16:14:03 +0000 (08:14 -0800)]
BUG 2296 : TransactionProxy should support the ability to accept a local TPC actor path
In Helium when the ShardTransaction processes a Ready message it sends back a the path of a ThreePhaseCommitCohort actor in the ReadyReply. This path is actually a local actor path, this local actor path is then converted into a remote path by the TransactionProxy.
The fix for Bug 1607 breaks this capability which is required to support forward compatibility in a cluster where a transaction request originates in a node that has been upgraded to Helium-1 and the actual transaction is happening on a node which has not yet been upgraded to Helium-1.
Change-Id: I857384bdd61b3492ea270dcf04d14883811c37c2
Signed-off-by: Moiz Raja <moraja@cisco.com>
tpantelis [Thu, 30 Oct 2014 11:30:32 +0000 (07:30 -0400)]
Bug 2294: Handle Shard backwards compatibility
Implemented as outlined in Bug 2294.
Change-Id: I14aa8ef5f320f9d165492396ece4ea63cce9b0c3
Signed-off-by: tpantelis <tpanteli@brocade.com>
Moiz Raja [Fri, 17 Oct 2014 23:42:41 +0000 (16:42 -0700)]
BUG 2134 : Make persistence configurable at the datastore level
- Added a peristent flag in the config sub-system
- If persistent in not true then we ignore recovery messages and not use the
akka persistence apis for persisting anything
- The unit tests
- assume that persistence is on by default (which it is)
- test that if recovery is applicable only then the ShardManager and RaftActor process the recovoery messages.
- test that when persisting the data-persistence API is used in the appropriate places (see RaftActorTest/ShardManagerTest)
Change-Id: I19913bcd32e609ccde6ad8e35209788315504426
Signed-off-by: Moiz Raja <moraja@cisco.com>
Moiz Raja [Wed, 29 Oct 2014 09:00:27 +0000 (09:00 +0000)]
Merge "Bug 2265: Modified NormalizedNodeOutputStreamWriter to implement yangtools interface"
Moiz Raja [Wed, 29 Oct 2014 03:05:09 +0000 (03:05 +0000)]
Merge "BUG 2221 : Add metering to ShardTransaction actor"
Harman Singh [Tue, 21 Oct 2014 21:50:04 +0000 (14:50 -0700)]
Bug 2086: Adding normalized node stream reader and writer.
Normalized node and its children are written in recursive manner. Besides the leafNode, leafSetEntryNode and anyxmlNode, all other nodes must call endNode method
while writing object to data stream. This helps to recreate the object.
Recursion runs in opposite direction while reading the object.
Updated code with review comments
Change-Id: Ibb822e11fc76f52b5be78596ed979c3b97d51de8
Signed-off-by: Harman Singh <harmasin@cisco.com>
tpantelis [Mon, 27 Oct 2014 21:13:58 +0000 (17:13 -0400)]
Bug 2265: Modified NormalizedNodeOutputStreamWriter to implement yangtools interface
The NormalizedNodeOutputStreamWriter was originally written to implement
a NormalizedNodeStreamWriter interface class that was copied from
yangtools. This was done to get access to the NodeWithValue in the
leafSetEntryNode method which isn't specified in the yangtools
interface. However it turns out we don't actually need the NodeWithValue so
NormalizedNodeOutputStreamWriter was changed to implement the yangtols interface
and the copied NormalizedNodeStreamWriter interface was removed.
Change-Id: I72f0c96359e4fe96e8e183aa7afba9291c5d519d
Signed-off-by: tpantelis <tpanteli@brocade.com>
Moiz Raja [Tue, 21 Oct 2014 21:12:19 +0000 (14:12 -0700)]
BUG 1833 : Remove all unused code from sal-clustering-commons
Change-Id: I7ce05b4ee77b6151f361091b18d1a7bbd8ed408a
Signed-off-by: Moiz Raja <moraja@cisco.com>
(cherry picked from commit
4861f2406206bf208a07a703ad8d6808072c6e45)
Moiz Raja [Fri, 26 Sep 2014 17:59:17 +0000 (10:59 -0700)]
BUG 2221 : Add metering to ShardTransaction actor
Change-Id: I4cbf74f9e8979b996a30a019657177b92fbdfc18
Signed-off-by: Abhishek Kumar <abhishk2@cisco.com>
Signed-off-by: Moiz Raja <moraja@cisco.com>
Moiz Raja [Fri, 17 Oct 2014 14:56:16 +0000 (14:56 +0000)]
Merge "Bug 2038: Ensure only one concurrent 3-phase commit in Shard"
Tony Tkacik [Fri, 17 Oct 2014 12:05:06 +0000 (14:05 +0200)]
Bug 865: Fixed use of removed deprecated YANGInstanceIdentifier methods.
Some components in controller still used methods which was deprecated
before Helium and was removed after Helium was released to accomodate
API changes for 0.7.0 Yangtools. This patch migrates code to replacement
methods.
Change-Id: I146a08caefeb0d666223cf66600a4342a5b49165
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
tpantelis [Sun, 5 Oct 2014 03:05:16 +0000 (23:05 -0400)]
Bug 2038: Ensure only one concurrent 3-phase commit in Shard
Added a ShardCommitCoordinator class that ensures there's only one
concurrent 3-phase commit.
The following outlines the new commit workflow:
- On ready, the ShardTransaction creates the dom store cohort and
forwards a new ForwardedReadyTransaction message to the shard.
- The shard calls its ShardCommitCoordinator to add the cohort and
modificaton to a cached keyed by transaction ID.
- On CanCommitTransaction message, the ShardCommitCoordinator looks up and removes
the cohort entry from the cache corresponding to the transaction ID
passed via the CanCommit message. The ShardCommitCoordinator also caches
the cohort entry for the current transaction in progress. If there's no
transaction in progress, the committing transaction becomes the current
transaction and canCommit is called on the cohort. Otherwise, the cohort
entry is queued to be processed after the current tranaction completes.
- On CommitTransaction message, if the transaction ID passed via the
Commit message matches the currently cached cohort entry, the preCommit
and commit phases are performed. When complete, the ShardCommitCoordinator
dequeues the next waiting transaction cohort entry, if any, and process
it.
If a Tx is aborted and it is the current transaction, the
ShardCommitCoordinator handles it as a completed Tx.
Implemented a timeout mechanism using the akka scheduler such that if
the commit message isn't received after a period of time (default 30 s)
after the canCommit message, the transaction is aborted so that the next
transaction can proceed. This is to handle remote node or network
failures during a 3-phrase commit.
The ThreePhaseCommitCohort actor was removed along with the
ForwardedCommitTransaction.
Change-Id: Iaa5692ca45cd7635d1a06a609f4bf98bec50df14
Signed-off-by: tpantelis <tpanteli@brocade.com>
Moiz Raja [Wed, 15 Oct 2014 19:36:01 +0000 (19:36 +0000)]
Merge "Bug 1577: Gates access to Shard actor until its initialized"
Abhishek Kumar [Sat, 20 Sep 2014 08:19:11 +0000 (01:19 -0700)]
Bug 1577: Gates access to Shard actor until its initialized
1. Shard manager creates Shard and mark them un-initialized.
Shard completes recovery and onRecoveryComplete, sends a
message to Shard manager to mark it initialized.
If a request for Shard comes to Shard manager and the
shard is not initialized, it sends ActorNotInitialized
message.
2. Normalizes and refactors ActorContext.
3. Adds AbstractUntypedPersistentActorWithMetering to meter
ShardManager.
Change-Id: Ibf15a2ef56422bda53067039d2271a719b6b2ce3
Signed-off-by: Abhishek Kumar <abhishk2@cisco.com>
tpantelis [Thu, 18 Sep 2014 21:35:53 +0000 (17:35 -0400)]
Bug 2003: CDS serialization improvements
In NormalizedNodeToNodeCodec#encode, significant time was spent
serializing the YangInstanceIdentifier path via PathUtils even though it
wasn't actually needed - the decode method didn't decode it.
This might have been used by WriteModification and MergeModification
originally however they currently serialized/deserialize their
YangInstanceIdentifier path separately from the NormalizedNode via
InstanceIdentifierUtils. It turns out this takes significant time as
well as it's implemented similarly as PathUtils.
So I ended up using NormalizedNodeToNodeCodec to encode/decode the
YangInstanceIdentifier along with the NormalizedNode but changed
InstanceIdentifierUtils to utilize the new PathArgumentSerializer
and the NormalizedNodeSerializer's special QName encoding.
With serializing a 5K batch of WriteModifications with flow data, the
time went down from ~350 ms to ~150 ms. Deserialization was also
improved.
Other smaller optimizations in NormalizedNodeSerializer,
NormalizedNodeType, PathArgumentSerializer and PathArgumentType chopped
another 20-30 ms off the time.
I also changed InstanceIdentifierUtils to serialize/deserialize via the
new PathArgumentSerializer and the NormalizedNodeSerializer's special QName
encoding by default, even when the ID isn't encoded as part of a
NormalizeNode. This seems reasonable to me as a standalone IID will
likely have repeated namespaces and revisions plus we get savings by not
serializing each path arg class name.
Removed the deprecated InstanceIdentifierUtils class in
sal-distributed-datastore bundle.
Change-Id: Iaa29daeaececf4b93065f4d46d0c2796c4d8188f
Signed-off-by: tpantelis <tpanteli@brocade.com>
tpantelis [Sun, 31 Aug 2014 15:15:18 +0000 (11:15 -0400)]
Bug 1831 Batch messages on journal recovery
Added journal log recovery batching support in RaftActor along with
additonal abstract methods for granular recovery control.
It turns out that batching helps a little but the real performance hog
was deserialization. There was a couple inefficient PreConditions in the
NormalizedNodeSerializer (unwanted String concats in the fast path) that
accounted for significant performance degradation. I also made a few
other minor performance enhancements.
Although deserialization is much better with the fixes, I also
implemented some parallelization during shard recovery. I added a
ShardRecoveryCoordinator class that parallelizes deserialization
of journal log enry batches and snapshots for faster recovery time.
The resulting transactions are still committed to the data store in the
order the corresponding snapshot or log batch are received to preserve
data store integrity.
The journal recovery log batch size is configurable vai the config XML.
I also made the shard heartbeat interval and shard snapshot batch count
configurable.
`
Change-Id: I52ef1690bfb6cc486c329ee60f77c52720c24469
Signed-off-by: tpantelis <tpanteli@brocade.com>
Moiz Raja [Thu, 18 Sep 2014 17:54:47 +0000 (10:54 -0700)]
BUG 1815 - Do not allow Shards to be created till an appropriate schema context is available
The fix works like so,
- ShardManager maintains a list of all the modules that it ever knew about
- ShardManager persists the known modules to disk using persistence
- When ShardManager recovers it reads back the knownModules from persistence
- As ShardManager gets new SchemaContext's it checks whether the modules in
the new SchemaContext are a superset of the knownModules. If they are then
ShardManager persists it and let's the Shards know about the new SchemaContext
otherwise the new SchemaContext is rejected and a message is logged
Also reduced the log level of some log messages in RaftActor from info to debug
it was too verbose
Change-Id: If388f690114c58e6a8df30f34ddac32a99f255e5
Signed-off-by: Moiz Raja <moraja@cisco.com>
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>
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>
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>
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>
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>
Ed Warnicke [Thu, 4 Sep 2014 22:53:39 +0000 (22:53 +0000)]
Merge "BUG 1595 - Clustering : NPE on startup"
tpantelis [Mon, 25 Aug 2014 00:29:58 +0000 (20:29 -0400)]
Bug 1637: Change Rpc actor calls to async
Changed RemoteRpcImplementation and RpcBroker to use async calls and
modified/created unit tests.
Added an RpcErrorsException to transfer RpcError info on failure. This
is now used in lieu of ErrorResponse to communicate failures.
Change-Id: Ib0bbda1867caff9b6c584b9b8a9b336f8acf53d7
Signed-off-by: tpantelis <tpanteli@brocade.com>
Moiz Raja [Fri, 29 Aug 2014 22:58:44 +0000 (15:58 -0700)]
BUG 1595 - Clustering : NPE on startup
This seemed to be happening because of recovery where the topology manager
was trying to add something into the datastore which was already present in
the journal.
The fix was to add a timestamp to each modification so that they do not
appear to be the same even if their content was exactly the same.
Change-Id: I2d5c98bd87ded7c8b64b8cebf757bfa073327061
Signed-off-by: Moiz Raja <moraja@cisco.com>
Abhishek Kumar [Fri, 22 Aug 2014 21:18:19 +0000 (14:18 -0700)]
Changed key actors to use bounded mailbox
1. Changed key actors in clustering components to use
bounded mailbox.
2. Implementation of Bounded mailbox queue changed to
use deque as its required by Shard Actors.
3. Cleanup of hard coded values.
Change-Id: I9fb87e1857f2aa9fee0819c4dff63ca3c967ec60
Signed-off-by: Abhishek Kumar <abhishk2@cisco.com>
Tom Pantelis [Fri, 29 Aug 2014 18:14:59 +0000 (18:14 +0000)]
Merge "Optimized version of NormalizedNode Serialization"
Basheeruddin Ahmed [Wed, 27 Aug 2014 23:36:00 +0000 (16:36 -0700)]
Moving protobuff files to sal-clustering-commons
Change-Id: I299886a22aa250f4a35c8c35385c89b5c58e297d
Signed-off-by: Basheeruddin Ahmed <syedbahm@cisco.com>
Moiz Raja [Tue, 26 Aug 2014 02:04:30 +0000 (19:04 -0700)]
Optimized version of NormalizedNode Serialization
This commit contains the following,
- Conversion of NormalizedNode to Protocol Buffer using simple tree traversal
- Encoding of QNames and other values to small sized codes to reduce the size of the protobuf message
- Also we now do not use SchemaContext for decoding a NormalizedNode
In addition to these changes I have snuck in an unrelated change to the pom files
to get the appropriate jacoco settings in it.
Change-Id: I6ab48c9f53cf76d6d0c865cf6e5522ff27a30e3f
Signed-off-by: Moiz Raja <moraja@cisco.com>
Ed Warnicke [Mon, 25 Aug 2014 09:07:28 +0000 (09:07 +0000)]
Merge "BUG 1597 - Do not use toString as serialized version of YangInstanceIdentifier/PathArgument"
Moiz Raja [Mon, 11 Aug 2014 22:44:56 +0000 (15:44 -0700)]
Keep a cache of QName
QName creation is expensive so keep of cache of 10,000 QNames around so that
we can lookup QNames that were previously created
Change-Id: I04e19bbe733a9da46b999e517e2eefdbb88d1259
Signed-off-by: Moiz Raja <moraja@cisco.com>
Moiz Raja [Sat, 23 Aug 2014 10:34:43 +0000 (03:34 -0700)]
BUG 1597 - Do not use toString as serialized version of YangInstanceIdentifier/PathArgument
The code has been modified to stop interpreting YangInstanceIdentifier.toString
and PathArgument.toString as a serialized versions of those objects. The toString
implementations of those objects has now been moved into PathUtils.
- NormalizedNodeGetter and NormalizedNodeToNodeCodecTest have been modified to use
PathUtils.toString instead of YangInstanceIdentifier.toString or PathArgument.toString
- Added tests to cover all the utilities in PathUtils
Change-Id: I1ed2c452e15a45229c36532d59db7fa1a77d283d
Signed-off-by: Moiz Raja <moraja@cisco.com>
Moiz Raja [Tue, 19 Aug 2014 16:54:17 +0000 (16:54 +0000)]
Merge "Custom mailbox that is bounded and instrumented."
Abhishek Kumar [Fri, 15 Aug 2014 06:15:28 +0000 (23:15 -0700)]
Custom mailbox that is bounded and instrumented.
This is for use with Akka actors. It enables monitoring
of actor's mailbox size via JMX.
Change-Id: Ic1e478e4411f53ff0239d316a1ca02eaa80360ed
Signed-off-by: Abhishek Kumar <abhishk2@cisco.com>
Harman Singh [Sat, 16 Aug 2014 00:50:58 +0000 (17:50 -0700)]
Moving common code out of remote rpc to clustering common bundle
Change-Id: Iad469f809ac55b2d873ff4d48e912ad66184c68d
Signed-off-by: Harman Singh <harmasin@cisco.com>
Basheeruddin Ahmed [Wed, 13 Aug 2014 23:35:27 +0000 (16:35 -0700)]
Move the CompositeModificatoinPayload message to proper
package
The package of protobuff generated code is
excluded from sonar testing
Change-Id: I4eeae429febe32a8a347c319f6dec60cd0df5946
Signed-off-by: Basheeruddin Ahmed <syedbahm@cisco.com>
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>