Skip to content

Commit

Permalink
Fixed not PR comments for documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Gaurav Chandani <[email protected]>
  • Loading branch information
Gaurav614 committed Feb 12, 2024
1 parent 6843eb2 commit aa6025a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,7 @@ private void allocateExistingUnassignedShards(RoutingAllocation allocation) {
ExistingShardsAllocator allocator = existingShardsAllocators.get(ShardsBatchGatewayAllocator.ALLOCATOR_NAME);
allocator.allocateAllUnassignedShards(allocation, true);
allocator.afterPrimariesBeforeReplicas(allocation);
// Replicas Assignment
allocator.allocateAllUnassignedShards(allocation, false);
return;
}
Expand Down Expand Up @@ -704,7 +705,7 @@ private ExistingShardsAllocator getAllocatorForShard(ShardRouting shardRouting,
final String allocatorName = ExistingShardsAllocator.EXISTING_SHARDS_ALLOCATOR_SETTING.get(
routingAllocation.metadata().getIndexSafe(shardRouting.index()).getSettings()
);
ExistingShardsAllocator existingShardsAllocator = existingShardsAllocators.get(allocatorName);
final ExistingShardsAllocator existingShardsAllocator = existingShardsAllocators.get(allocatorName);
return existingShardsAllocator != null ? existingShardsAllocator : new NotFoundAllocator(allocatorName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,10 @@ public interface ExistingShardsAllocator {
* {@link ExistingShardsAllocator#allocateAllUnassignedShards(RoutingAllocation, boolean)} method.
* The default implementation of this method is not optimized and assigns shards one by one.
*
* If enable to true then it expects all indices of the shard to use same {@link ExistingShardsAllocator}, otherwise
* Allocation Service will fallback to default implementation i.e. {@link ExistingShardsAllocator#allocateUnassigned(ShardRouting, RoutingAllocation, UnassignedAllocationHandler)}
*
* If no plugin overrides {@link ExistingShardsAllocator} then default implementation will be use for it , i.e,
* {@link ShardsBatchGatewayAllocator}. Right now even if plugin implements it, AllocationService will run the
* default implementation to enable Batch mode of assignment
* {@link ShardsBatchGatewayAllocator}.
*
* TODO: Currently its implementation is WIP for GatewayAllocator so setting enabling wont have any effect
* https://github.com/opensearch-project/OpenSearch/issues/5098
* This setting is experimental at this point.
*/
Setting<Boolean> EXISTING_SHARDS_ALLOCATOR_BATCH_MODE = Setting.boolSetting(
"cluster.allocator.existing_shards_allocator.batch_enabled",
Expand Down

0 comments on commit aa6025a

Please sign in to comment.