Skip to content

Commit

Permalink
Spotless Apply
Browse files Browse the repository at this point in the history
Signed-off-by: Gaurav Chandani <[email protected]>
  • Loading branch information
Gaurav614 committed Apr 15, 2024
1 parent 5edede0 commit 8153a69
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1196,7 +1196,10 @@ public void testDeleteRedIndexInBatchMode() throws Exception {
1,
Settings.builder().put(ExistingShardsAllocator.EXISTING_SHARDS_ALLOCATOR_BATCH_MODE.getKey(), true).build()
);
List<String> dataOnlyNodes = internalCluster().startDataOnlyNodes(2, Settings.builder().put(ExistingShardsAllocator.EXISTING_SHARDS_ALLOCATOR_BATCH_MODE.getKey(), true).build());
List<String> dataOnlyNodes = internalCluster().startDataOnlyNodes(
2,
Settings.builder().put(ExistingShardsAllocator.EXISTING_SHARDS_ALLOCATOR_BATCH_MODE.getKey(), true).build()
);
createIndex(
"test",
Settings.builder().put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, 2).put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, 0).build()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -643,9 +643,9 @@ private void applyStartedShards(RoutingAllocation routingAllocation, List<ShardR
: "shard started for unknown index (shard entry: " + startedShard + ")";
assert startedShard == routingNodes.getByAllocationId(startedShard.shardId(), startedShard.allocationId().getId())
: "shard routing to start does not exist in routing table, expected: "
+ startedShard
+ " but was: "
+ routingNodes.getByAllocationId(startedShard.shardId(), startedShard.allocationId().getId());
+ startedShard
+ " but was: "
+ routingNodes.getByAllocationId(startedShard.shardId(), startedShard.allocationId().getId());

routingNodes.startShard(logger, startedShard, routingAllocation.changes());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,11 @@ else if (shardRouting.primary() == primary) {
return batchesToBeAssigned;
}

private void refreshShardBatches(ConcurrentMap<String, ShardsBatch> currentBatches, Set<ShardId> batchedShardsToAssign, boolean primary) {
private void refreshShardBatches(
ConcurrentMap<String, ShardsBatch> currentBatches,
Set<ShardId> batchedShardsToAssign,
boolean primary
) {
// cleanup shard from batches if they are not present in unassigned list from allocation object. This is
// needed as AllocationService.reroute can also be called directly by API flows for example DeleteIndices.
// So, as part of calling reroute, those shards will be removed from allocation object. It'll handle the
Expand Down

0 comments on commit 8153a69

Please sign in to comment.