Bug 2055: Handle shard not initialized resiliently 94/11994/9
authortpantelis <tpanteli@brocade.com>
Sat, 4 Oct 2014 06:37:00 +0000 (02:37 -0400)
committertpantelis <tpanteli@brocade.com>
Sun, 12 Oct 2014 10:10:18 +0000 (06:10 -0400)
Added a flag to the FindLocalShard and FindPrimaryShard messages to
specify whether or not to wait for he shard to be initialized.

Modified FindLocalShard and FindPrimaryShard message handling in the
ShardManager to wait for the shard to be initialized before replying if
the flag is set in the message. This is done async by caching the
response info in the ShardInformation and sending the response when the
ActorInitialized message for the shard is received.

Modified DistributedDataStore#registerChangeListener to always create a
DataChangeListenerRegistrationProxy and moved the code that performs the
findLocalShard and RegisterChangeListener operations into
DataChangeListenerRegistrationProxy. In DataChangeListenerRegistrationProxy,
the findLocalShard operation is done async (with a long time out). On success,
the RegisterChangeListener message is sent.

Added change listener test to DistributedDataStoreIntegrationTest and
removed the DistributedDataStoreTest since most of the tests tested
registration and the bulk of that logic is now in
DataChangeListenerRegistrationProxy with associated tests. The rest of
the tests in DistributedDataStoreTest are covered by
DistributedDataStoreIntegrationTest.

Change-Id: I9f0d412801110c97eb48ecc4d0fd77ee081a7e81
Signed-off-by: tpantelis <tpanteli@brocade.com>

No differences found