Skip to content

Commit

Permalink
Revert "[Segment Replication] Introduce primary weight factor for pri…
Browse files Browse the repository at this point in the history
…mary shards distribution (#6017) (#6161)"

This reverts commit 2e3e1ed.
  • Loading branch information
dreamer-89 committed Feb 22, 2023
1 parent 67d8765 commit f7d2e9c
Show file tree
Hide file tree
Showing 15 changed files with 24 additions and 852 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -329,23 +329,6 @@ public List<ShardRouting> shardsWithState(ShardRoutingState... states) {
return shards;
}

/**
* Determine the primary shards of an index with a specific state
* @param states set of states which should be listed
* @return a list of shards
*/
public List<ShardRouting> primaryShardsWithState(ShardRoutingState... states) {
List<ShardRouting> shards = new ArrayList<>();
for (ShardRouting shardEntry : this) {
for (ShardRoutingState state : states) {
if (shardEntry.state() == state && shardEntry.primary() == true) {
shards.add(shardEntry);
}
}
}
return shards;
}

/**
* Determine the shards of an index with a specific state
* @param index id of the index
Expand Down
Loading

0 comments on commit f7d2e9c

Please sign in to comment.