Compare member names in leader identifier and member event instead of by leader ident... 98/66698/1
authorYIN Kangqian <yin.kangqian@zte.com.cn>
Thu, 21 Dec 2017 05:44:54 +0000 (13:44 +0800)
committerYIN Kangqian <yin.kangqian@zte.com.cn>
Thu, 21 Dec 2017 05:45:08 +0000 (13:45 +0800)
commit282a8afa481508d1c749d87502c6224932c8b36a
tree91a83ae72d78b40577ecf85b77f9027007cca527
parent2d60632f7cf63712e8357a3cf3fc40d83366e5e6
Compare member names in leader identifier and member event instead of by leader identifier contains member name.

ShardManager#markMemberUnavailable/markMemberAvailable now decide whether current leader shards
are on the unavailable/available member by the leader identifier contains the member name.
This way will make a wrong decision when the member name on which leader shard reside contains
the member name which becomes unavailable/available.

New added UT ShardManagerTest#testShardAvailabilityChangeOnMemberWithNameContainedInLeaderIdUnreachable
captures this radical case. And two lines change in ShardManager will pass this UT.

Change-Id: Ib7cd02316c192aeaa8cdac14ff9ece0f872386a6
Signed-off-by: YIN Kangqian <yin.kangqian@zte.com.cn>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/shardmanager/ShardManager.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/shardmanager/ShardManagerTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/resources/application.conf

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.