Skip to content

Commit

Permalink
Fixed bugs
Browse files Browse the repository at this point in the history
1. updating shard routing in batches in accordance with previous behaviour
2. Closing of AsyncShardFetch in cleanCaches()
3. Updated in getNumberOfInflightFetches for batch maps
4. Renamed variable names

Signed-off-by: Gaurav Chandani <[email protected]>
  • Loading branch information
Gaurav614 committed Sep 6, 2023
1 parent f4b32b2 commit b9407cc
Show file tree
Hide file tree
Showing 6 changed files with 168 additions and 106 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ private void allocateExistingUnassignedShards(RoutingAllocation allocation) {
}
}
}

private void disassociateDeadNodes(RoutingAllocation allocation) {
for (Iterator<RoutingNode> it = allocation.routingNodes().mutableIterator(); it.hasNext();) {
RoutingNode node = it.next();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void allocateUnassigned(
UnassignedAllocationHandler unassignedAllocationHandler
);

default void allocateUnassignedBatch(RoutingAllocation allocation, boolean primary){
default void allocateUnassignedBatch(RoutingAllocation allocation, boolean primary) {
RoutingNodes.UnassignedShards.UnassignedIterator iterator = allocation.routingNodes().unassigned().iterator();
while (iterator.hasNext()) {
ShardRouting shardRouting = iterator.next();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ public void allocateUnassigned(
}
}

public void allocateUnassignedBatch(String batchId, RoutingAllocation allocation){
}
public void allocateUnassignedBatch(String batchId, RoutingAllocation allocation) {}

protected long getExpectedShardSize(ShardRouting shardRouting, RoutingAllocation allocation) {
if (shardRouting.primary()) {
Expand Down
Loading

0 comments on commit b9407cc

Please sign in to comment.