[CONTROLLER-1647] C: prefix based shard created improperly Created: 27/Apr/17  Updated: 25/Jul/23  Resolved: 05/May/17

Status: Resolved
Project: controller
Component/s: clustering
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Peter Gubka Assignee: Jakub Morvay
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 8328

 Description   

odl: https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/distribution-karaf/0.6.0-SNAPSHOT/distribution-karaf-0.6.0-20170427.093211-5052.zip

when creating a new prefix shard with details
<input xmlns="tag:opendaylight.org,2017:controller:yang:lowlevel:control" xmlns:odl-mdsal-lowlevel-target="tag:opendaylight.org,2017:controller:yang:lowlevel:target">
<prefix>/odl-mdsal-lowlevel-target:id-ints</prefix>
<replicas>member-1</replicas><replicas>member-2</replicas><replicas>member-3</replicas>
</input>

a shard is created, but when checking a shard details via jolokia, details for
member-1-shard-id-ints!-config member-2-shard-id-ints!-config member-3-shard-id-ints!-config show, that they have no peers and each one is a leader, so there are 3 leaders, one on each node



 Comments   
Comment by Tom Pantelis [ 27/Apr/17 ]

Does this need to block the release? Are prefix shards even being used in yet in Carbon?

Tomas - can you look into this?

Comment by Jakub Morvay [ 28/Apr/17 ]

I think the root cause lies here
https://github.com/opendaylight/controller/blob/be338c9e1dab83e2a5ff21819b92b934ef32faee/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/shardmanager/ShardManager.java#L562

Peers are ignored during creation of prefix based shard, so this new shard automatically becomes leader.

I tried to play with this a little bit and change this to not to ignore peers. Locally, I can see the prefix based shards are created correctly, there is only one leader and all peers are taking part in election.

However, now there is some problem with starting DistributedShardedDOMDataTree, default shards in particular.

I cannot really tell, if this should block the release, but without this, we cannot use prefix based shards in carbon cluster.

Comment by Tom Pantelis [ 29/Apr/17 ]

Downgrading to major to keep the blocker police off my back. Prefix shard functionality was just recently added so AFAIK no app is using it at this point and thus doesn't need to block the release.

Comment by Jakub Morvay [ 04/May/17 ]

https://git.opendaylight.org/gerrit/#/c/56498/

Generated at Wed Feb 07 19:56:05 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.