Bug 3020: Use leader version in LeaderStateChanged 03/21603/5
authorTom Pantelis <tpanteli@brocade.com>
Tue, 2 Jun 2015 01:30:59 +0000 (21:30 -0400)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 10 Jun 2015 02:09:40 +0000 (02:09 +0000)
Modified the ShardManager to store the leader's version obtained from the
LeaderStateChanged message in the ShardInformation and propagate to the
RemotePrimaryShardFound message in response to FindPrimary.

ActorContext#findPrimaryShardAsync sets the leader's version in the
PrimaryShardInfo based on the FindPrimary response. If the response is
LocalPrimaryShardFound, it sets it to CURRENT_VERSION, otherwise it sets
it from the RemotePrimaryShardFound response.

RemoteTransactionContextSupport#setPrimaryShard checks the leader's
version to determine if it can utilize the direct tx modification
preparation on the shard actor.

Change-Id: I1defe03dea27dfb652cdc1e0a02fa70c6e454035
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>

No differences found