Search in sources :

Example 21 with ClusterBlock

use of org.opensearch.cluster.block.ClusterBlock in project OpenSearch by opensearch-project.

the class MetadataIndexStateService method addIndexBlock.

/**
 * Adds an index block based on the given request, and notifies the listener upon completion.
 * Adding blocks is done in three steps:
 * - First, a temporary UUID-based block is added to the index
 *   (see {@link #addIndexBlock(Index[], ClusterState, APIBlock)}.
 * - Second, shards are checked to have properly applied the UUID-based block.
 *   (see {@link WaitForBlocksApplied}).
 * - Third, the temporary UUID-based block is turned into a full block
 *   (see {@link #finalizeBlock(ClusterState, Map, Map, APIBlock)}.
 * Using this three-step process ensures non-interference by other operations in case where
 * we notify successful completion here.
 */
public void addIndexBlock(AddIndexBlockClusterStateUpdateRequest request, ActionListener<AddIndexBlockResponse> listener) {
    final Index[] concreteIndices = request.indices();
    if (concreteIndices == null || concreteIndices.length == 0) {
        throw new IllegalArgumentException("Index name is required");
    }
    List<String> writeIndices = new ArrayList<>();
    SortedMap<String, IndexAbstraction> lookup = clusterService.state().metadata().getIndicesLookup();
    for (Index index : concreteIndices) {
        IndexAbstraction ia = lookup.get(index.getName());
        if (ia != null && ia.getParentDataStream() != null && ia.getParentDataStream().getWriteIndex().getIndex().equals(index)) {
            writeIndices.add(index.getName());
        }
    }
    if (writeIndices.size() > 0) {
        throw new IllegalArgumentException("cannot add a block to the following data stream write indices [" + Strings.collectionToCommaDelimitedString(writeIndices) + "]");
    }
    clusterService.submitStateUpdateTask("add-index-block-[" + request.getBlock().name + "]-" + Arrays.toString(concreteIndices), new ClusterStateUpdateTask(Priority.URGENT) {

        private Map<Index, ClusterBlock> blockedIndices;

        @Override
        public ClusterState execute(final ClusterState currentState) {
            final Tuple<ClusterState, Map<Index, ClusterBlock>> tup = addIndexBlock(concreteIndices, currentState, request.getBlock());
            blockedIndices = tup.v2();
            return tup.v1();
        }

        @Override
        public void clusterStateProcessed(final String source, final ClusterState oldState, final ClusterState newState) {
            if (oldState == newState) {
                assert blockedIndices.isEmpty() : "List of blocked indices is not empty but cluster state wasn't changed";
                listener.onResponse(new AddIndexBlockResponse(true, false, Collections.emptyList()));
            } else {
                assert blockedIndices.isEmpty() == false : "List of blocked indices is empty but cluster state was changed";
                threadPool.executor(ThreadPool.Names.MANAGEMENT).execute(new WaitForBlocksApplied(blockedIndices, request, ActionListener.wrap(verifyResults -> clusterService.submitStateUpdateTask("finalize-index-block-[" + request.getBlock().name + "]-[" + blockedIndices.keySet().stream().map(Index::getName).collect(Collectors.joining(", ")) + "]", new ClusterStateUpdateTask(Priority.URGENT) {

                    private final List<AddBlockResult> indices = new ArrayList<>();

                    @Override
                    public ClusterState execute(final ClusterState currentState) throws Exception {
                        Tuple<ClusterState, Collection<AddBlockResult>> addBlockResult = finalizeBlock(currentState, blockedIndices, verifyResults, request.getBlock());
                        assert verifyResults.size() == addBlockResult.v2().size();
                        indices.addAll(addBlockResult.v2());
                        return addBlockResult.v1();
                    }

                    @Override
                    public void onFailure(final String source, final Exception e) {
                        listener.onFailure(e);
                    }

                    @Override
                    public void clusterStateProcessed(final String source, final ClusterState oldState, final ClusterState newState) {
                        final boolean acknowledged = indices.stream().noneMatch(AddBlockResult::hasFailures);
                        listener.onResponse(new AddIndexBlockResponse(acknowledged, acknowledged, indices));
                    }
                }), listener::onFailure)));
            }
        }

        @Override
        public void onFailure(final String source, final Exception e) {
            listener.onFailure(e);
        }

        @Override
        public TimeValue timeout() {
            return request.masterNodeTimeout();
        }
    });
}
Also used : Arrays(java.util.Arrays) CountDown(org.opensearch.common.util.concurrent.CountDown) NotifyOnceListener(org.opensearch.action.NotifyOnceListener) AllocationService(org.opensearch.cluster.routing.allocation.AllocationService) Version(org.opensearch.Version) OpenSearchException(org.opensearch.OpenSearchException) SnapshotsService(org.opensearch.snapshots.SnapshotsService) Strings(org.opensearch.common.Strings) CloseIndexResponse(org.opensearch.action.admin.indices.close.CloseIndexResponse) ConcurrentCollections(org.opensearch.common.util.concurrent.ConcurrentCollections) ClusterBlock(org.opensearch.cluster.block.ClusterBlock) Collections.singleton(java.util.Collections.singleton) TransportVerifyShardIndexBlockAction(org.opensearch.action.admin.indices.readonly.TransportVerifyShardIndexBlockAction) Map(java.util.Map) Inject(org.opensearch.common.inject.Inject) AddBlockShardResult(org.opensearch.action.admin.indices.readonly.AddIndexBlockResponse.AddBlockShardResult) ActionListener(org.opensearch.action.ActionListener) EnumSet(java.util.EnumSet) IndexShardRoutingTable(org.opensearch.cluster.routing.IndexShardRoutingTable) TimeValue(org.opensearch.common.unit.TimeValue) ImmutableOpenIntMap(org.opensearch.common.collect.ImmutableOpenIntMap) Index(org.opensearch.index.Index) Collection(java.util.Collection) IndicesService(org.opensearch.indices.IndicesService) SnapshotInProgressException(org.opensearch.snapshots.SnapshotInProgressException) Set(java.util.Set) Settings(org.opensearch.common.settings.Settings) RestStatus(org.opensearch.rest.RestStatus) ShardResult(org.opensearch.action.admin.indices.close.CloseIndexResponse.ShardResult) Collectors(java.util.stream.Collectors) Tuple(org.opensearch.common.collect.Tuple) List(java.util.List) Logger(org.apache.logging.log4j.Logger) ClusterStateUpdateTask(org.opensearch.cluster.ClusterStateUpdateTask) IndexResult(org.opensearch.action.admin.indices.close.CloseIndexResponse.IndexResult) ReplicationResponse(org.opensearch.action.support.replication.ReplicationResponse) AddIndexBlockClusterStateUpdateRequest(org.opensearch.action.admin.indices.readonly.AddIndexBlockClusterStateUpdateRequest) ClusterStateUpdateResponse(org.opensearch.cluster.ack.ClusterStateUpdateResponse) SortedMap(java.util.SortedMap) IntObjectCursor(com.carrotsearch.hppc.cursors.IntObjectCursor) APIBlock(org.opensearch.cluster.metadata.IndexMetadata.APIBlock) ActionRunnable(org.opensearch.action.ActionRunnable) ThreadPool(org.opensearch.threadpool.ThreadPool) Priority(org.opensearch.common.Priority) HashMap(java.util.HashMap) ParameterizedMessage(org.apache.logging.log4j.message.ParameterizedMessage) TransportVerifyShardBeforeCloseAction(org.opensearch.action.admin.indices.close.TransportVerifyShardBeforeCloseAction) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) IndexRoutingTable(org.opensearch.cluster.routing.IndexRoutingTable) CloseIndexClusterStateUpdateRequest(org.opensearch.action.admin.indices.close.CloseIndexClusterStateUpdateRequest) ClusterState(org.opensearch.cluster.ClusterState) AddIndexBlockResponse(org.opensearch.action.admin.indices.readonly.AddIndexBlockResponse) LegacyESVersion(org.opensearch.LegacyESVersion) RestoreService(org.opensearch.snapshots.RestoreService) AckedClusterStateUpdateTask(org.opensearch.cluster.AckedClusterStateUpdateTask) UUIDs(org.opensearch.common.UUIDs) ClusterBlocks(org.opensearch.cluster.block.ClusterBlocks) Setting(org.opensearch.common.settings.Setting) ShardLimitValidator(org.opensearch.indices.ShardLimitValidator) ClusterBlockLevel(org.opensearch.cluster.block.ClusterBlockLevel) IndexNotFoundException(org.opensearch.index.IndexNotFoundException) TaskId(org.opensearch.tasks.TaskId) ShardId(org.opensearch.index.shard.ShardId) Consumer(java.util.function.Consumer) AtomicArray(org.opensearch.common.util.concurrent.AtomicArray) AddBlockResult(org.opensearch.action.admin.indices.readonly.AddIndexBlockResponse.AddBlockResult) ActiveShardsObserver(org.opensearch.action.support.ActiveShardsObserver) ClusterService(org.opensearch.cluster.service.ClusterService) RoutingTable(org.opensearch.cluster.routing.RoutingTable) Collections.unmodifiableMap(java.util.Collections.unmodifiableMap) OpenIndexClusterStateUpdateResponse(org.opensearch.cluster.ack.OpenIndexClusterStateUpdateResponse) OpenIndexClusterStateUpdateRequest(org.opensearch.action.admin.indices.open.OpenIndexClusterStateUpdateRequest) LogManager(org.apache.logging.log4j.LogManager) Collections(java.util.Collections) ClusterState(org.opensearch.cluster.ClusterState) ArrayList(java.util.ArrayList) ClusterStateUpdateTask(org.opensearch.cluster.ClusterStateUpdateTask) AckedClusterStateUpdateTask(org.opensearch.cluster.AckedClusterStateUpdateTask) Index(org.opensearch.index.Index) AddBlockResult(org.opensearch.action.admin.indices.readonly.AddIndexBlockResponse.AddBlockResult) OpenSearchException(org.opensearch.OpenSearchException) SnapshotInProgressException(org.opensearch.snapshots.SnapshotInProgressException) IndexNotFoundException(org.opensearch.index.IndexNotFoundException) ClusterBlock(org.opensearch.cluster.block.ClusterBlock) AddIndexBlockResponse(org.opensearch.action.admin.indices.readonly.AddIndexBlockResponse) Tuple(org.opensearch.common.collect.Tuple) TimeValue(org.opensearch.common.unit.TimeValue)

Example 22 with ClusterBlock

use of org.opensearch.cluster.block.ClusterBlock in project OpenSearch by opensearch-project.

the class MetadataIndexStateService method addIndexClosedBlocks.

/**
 * Step 1 - Start closing indices by adding a write block
 *
 * This step builds the list of indices to close (the ones explicitly requested that are not in CLOSE state) and adds a unique cluster
 * block (or reuses an existing one) to every index to close in the cluster state. After the cluster state is published, the shards
 * should start to reject writing operations and we can proceed with step 2.
 */
static ClusterState addIndexClosedBlocks(final Index[] indices, final Map<Index, ClusterBlock> blockedIndices, final ClusterState currentState) {
    final Metadata.Builder metadata = Metadata.builder(currentState.metadata());
    final Set<Index> indicesToClose = new HashSet<>();
    for (Index index : indices) {
        final IndexMetadata indexMetadata = metadata.getSafe(index);
        if (indexMetadata.getState() != IndexMetadata.State.CLOSE) {
            indicesToClose.add(index);
        } else {
            logger.debug("index {} is already closed, ignoring", index);
            assert currentState.blocks().hasIndexBlock(index.getName(), INDEX_CLOSED_BLOCK);
        }
    }
    if (indicesToClose.isEmpty()) {
        return currentState;
    }
    // Check if index closing conflicts with any running restores
    Set<Index> restoringIndices = RestoreService.restoringIndices(currentState, indicesToClose);
    if (restoringIndices.isEmpty() == false) {
        throw new IllegalArgumentException("Cannot close indices that are being restored: " + restoringIndices);
    }
    // Check if index closing conflicts with any running snapshots
    Set<Index> snapshottingIndices = SnapshotsService.snapshottingIndices(currentState, indicesToClose);
    if (snapshottingIndices.isEmpty() == false) {
        throw new SnapshotInProgressException("Cannot close indices that are being snapshotted: " + snapshottingIndices + ". Try again after snapshot finishes or cancel the currently running snapshot.");
    }
    final ClusterBlocks.Builder blocks = ClusterBlocks.builder().blocks(currentState.blocks());
    final RoutingTable.Builder routingTable = RoutingTable.builder(currentState.routingTable());
    for (Index index : indicesToClose) {
        ClusterBlock indexBlock = null;
        final Set<ClusterBlock> clusterBlocks = currentState.blocks().indices().get(index.getName());
        if (clusterBlocks != null) {
            for (ClusterBlock clusterBlock : clusterBlocks) {
                if (clusterBlock.id() == INDEX_CLOSED_BLOCK_ID) {
                    // Reuse the existing index closed block
                    indexBlock = clusterBlock;
                    break;
                }
            }
        }
        if (indexBlock == null) {
            // Create a new index closed block
            indexBlock = createIndexClosingBlock();
        }
        assert Strings.hasLength(indexBlock.uuid()) : "Closing block should have a UUID";
        blocks.addIndexBlock(index.getName(), indexBlock);
        blockedIndices.put(index, indexBlock);
    }
    logger.info(() -> new ParameterizedMessage("closing indices {}", blockedIndices.keySet().stream().map(Object::toString).collect(Collectors.joining(","))));
    return ClusterState.builder(currentState).blocks(blocks).metadata(metadata).routingTable(routingTable.build()).build();
}
Also used : ClusterBlocks(org.opensearch.cluster.block.ClusterBlocks) Index(org.opensearch.index.Index) ClusterBlock(org.opensearch.cluster.block.ClusterBlock) IndexShardRoutingTable(org.opensearch.cluster.routing.IndexShardRoutingTable) IndexRoutingTable(org.opensearch.cluster.routing.IndexRoutingTable) RoutingTable(org.opensearch.cluster.routing.RoutingTable) ParameterizedMessage(org.apache.logging.log4j.message.ParameterizedMessage) SnapshotInProgressException(org.opensearch.snapshots.SnapshotInProgressException) HashSet(java.util.HashSet)

Example 23 with ClusterBlock

use of org.opensearch.cluster.block.ClusterBlock in project OpenSearch by opensearch-project.

the class MetadataIndexStateService method addIndexBlock.

/**
 * Updates the cluster state for the given indices with the given index block,
 * and also returns the updated indices (and their blocks) in a map.
 * @param indices The indices to add blocks to if needed
 * @param currentState The current cluster state
 * @param block The type of block to add
 * @return a tuple of the updated cluster state, as well as the blocks that got added
 */
static Tuple<ClusterState, Map<Index, ClusterBlock>> addIndexBlock(final Index[] indices, final ClusterState currentState, final APIBlock block) {
    final Metadata.Builder metadata = Metadata.builder(currentState.metadata());
    final Set<Index> indicesToAddBlock = new HashSet<>();
    for (Index index : indices) {
        // to check if index exists
        metadata.getSafe(index);
        if (currentState.blocks().hasIndexBlock(index.getName(), block.block)) {
            logger.debug("index {} already has block {}, ignoring", index, block.block);
        } else {
            indicesToAddBlock.add(index);
        }
    }
    if (indicesToAddBlock.isEmpty()) {
        return Tuple.tuple(currentState, Collections.emptyMap());
    }
    final ClusterBlocks.Builder blocks = ClusterBlocks.builder().blocks(currentState.blocks());
    final RoutingTable.Builder routingTable = RoutingTable.builder(currentState.routingTable());
    final Map<Index, ClusterBlock> blockedIndices = new HashMap<>();
    for (Index index : indicesToAddBlock) {
        ClusterBlock indexBlock = null;
        final Set<ClusterBlock> clusterBlocks = currentState.blocks().indices().get(index.getName());
        if (clusterBlocks != null) {
            for (ClusterBlock clusterBlock : clusterBlocks) {
                if (clusterBlock.id() == block.block.id()) {
                    // Reuse the existing UUID-based block
                    indexBlock = clusterBlock;
                    break;
                }
            }
        }
        if (indexBlock == null) {
            // Create a new UUID-based block
            indexBlock = createUUIDBasedBlock(block.block);
        }
        assert Strings.hasLength(indexBlock.uuid()) : "Block should have a UUID";
        blocks.addIndexBlock(index.getName(), indexBlock);
        blockedIndices.put(index, indexBlock);
        // update index settings as well to match the block
        final IndexMetadata indexMetadata = metadata.getSafe(index);
        if (block.setting().get(indexMetadata.getSettings()) == false) {
            final Settings updatedSettings = Settings.builder().put(indexMetadata.getSettings()).put(block.settingName(), true).build();
            metadata.put(IndexMetadata.builder(indexMetadata).settings(updatedSettings).settingsVersion(indexMetadata.getSettingsVersion() + 1));
        }
    }
    logger.info("adding block {} to indices {}", block.name, blockedIndices.keySet().stream().map(Object::toString).collect(Collectors.toList()));
    return Tuple.tuple(ClusterState.builder(currentState).blocks(blocks).metadata(metadata).routingTable(routingTable.build()).build(), blockedIndices);
}
Also used : ClusterBlocks(org.opensearch.cluster.block.ClusterBlocks) HashMap(java.util.HashMap) Index(org.opensearch.index.Index) ClusterBlock(org.opensearch.cluster.block.ClusterBlock) IndexShardRoutingTable(org.opensearch.cluster.routing.IndexShardRoutingTable) IndexRoutingTable(org.opensearch.cluster.routing.IndexRoutingTable) RoutingTable(org.opensearch.cluster.routing.RoutingTable) Settings(org.opensearch.common.settings.Settings) HashSet(java.util.HashSet)

Example 24 with ClusterBlock

use of org.opensearch.cluster.block.ClusterBlock in project OpenSearch by opensearch-project.

the class TransportReplicationActionTests method testIsRetryableClusterBlockException.

public void testIsRetryableClusterBlockException() {
    final TestAction action = new TestAction(Settings.EMPTY, "internal:testIsRetryableClusterBlockException", transportService, clusterService, shardStateAction, threadPool);
    assertFalse(action.isRetryableClusterBlockException(randomRetryPrimaryException(new ShardId("index", "_na_", 0))));
    final boolean retryable = randomBoolean();
    ClusterBlock randomBlock = new ClusterBlock(randomIntBetween(1, 16), "test", retryable, randomBoolean(), randomBoolean(), randomFrom(RestStatus.values()), EnumSet.of(randomFrom(ClusterBlockLevel.values())));
    assertEquals(retryable, action.isRetryableClusterBlockException(new ClusterBlockException(singleton(randomBlock))));
}
Also used : ShardId(org.opensearch.index.shard.ShardId) ClusterBlock(org.opensearch.cluster.block.ClusterBlock) ClusterBlockException(org.opensearch.cluster.block.ClusterBlockException)

Example 25 with ClusterBlock

use of org.opensearch.cluster.block.ClusterBlock in project OpenSearch by opensearch-project.

the class TransportReplicationActionTests method testBlocksInReroutePhase.

public void testBlocksInReroutePhase() {
    final ClusterBlock nonRetryableBlock = new ClusterBlock(1, "non retryable", false, true, false, RestStatus.SERVICE_UNAVAILABLE, ClusterBlockLevel.ALL);
    final ClusterBlock retryableBlock = new ClusterBlock(1, "retryable", true, true, false, RestStatus.SERVICE_UNAVAILABLE, ClusterBlockLevel.ALL);
    final boolean globalBlock = randomBoolean();
    final TestAction action = new TestAction(Settings.EMPTY, "internal:testActionWithBlocks", transportService, clusterService, shardStateAction, threadPool) {

        @Override
        protected ClusterBlockLevel globalBlockLevel() {
            return globalBlock ? ClusterBlockLevel.WRITE : null;
        }

        @Override
        public ClusterBlockLevel indexBlockLevel() {
            return globalBlock == false ? ClusterBlockLevel.WRITE : null;
        }
    };
    setState(clusterService, ClusterStateCreationUtils.stateWithActivePrimary("index", true, 0));
    ShardId shardId = new ShardId(clusterService.state().metadata().index("index").getIndex(), 0);
    {
        setStateWithBlock(clusterService, nonRetryableBlock, globalBlock);
        Request request = new Request(shardId);
        PlainActionFuture<TestResponse> listener = new PlainActionFuture<>();
        ReplicationTask task = maybeTask();
        TestAction.ReroutePhase reroutePhase = action.new ReroutePhase(task, request, listener);
        reroutePhase.run();
        ClusterBlockException exception = assertListenerThrows("primary action should fail operation", listener, ClusterBlockException.class);
        assertThat(((ClusterBlockException) exception.unwrapCause()).blocks().iterator().next(), is(nonRetryableBlock));
        assertPhase(task, "failed");
    }
    {
        setStateWithBlock(clusterService, retryableBlock, globalBlock);
        Request requestWithTimeout = (globalBlock ? new Request(shardId) : new Request(shardId)).timeout("5ms");
        PlainActionFuture<TestResponse> listener = new PlainActionFuture<>();
        ReplicationTask task = maybeTask();
        TestAction.ReroutePhase reroutePhase = action.new ReroutePhase(task, requestWithTimeout, listener);
        reroutePhase.run();
        ClusterBlockException exception = assertListenerThrows("failed to timeout on retryable block", listener, ClusterBlockException.class);
        assertThat(((ClusterBlockException) exception.unwrapCause()).blocks().iterator().next(), is(retryableBlock));
        assertPhase(task, "failed");
        assertTrue(requestWithTimeout.isRetrySet.get());
    }
    {
        setStateWithBlock(clusterService, retryableBlock, globalBlock);
        Request request = new Request(shardId);
        PlainActionFuture<TestResponse> listener = new PlainActionFuture<>();
        ReplicationTask task = maybeTask();
        TestAction.ReroutePhase reroutePhase = action.new ReroutePhase(task, request, listener);
        reroutePhase.run();
        assertFalse("primary phase should wait on retryable block", listener.isDone());
        assertPhase(task, "waiting_for_retry");
        assertTrue(request.isRetrySet.get());
        setStateWithBlock(clusterService, nonRetryableBlock, globalBlock);
        ClusterBlockException exception = assertListenerThrows("primary phase should fail operation when moving from a retryable " + "block to a non-retryable one", listener, ClusterBlockException.class);
        assertThat(((ClusterBlockException) exception.unwrapCause()).blocks().iterator().next(), is(nonRetryableBlock));
        assertIndexShardUninitialized();
    }
    {
        Request requestWithTimeout = new Request(new ShardId("unknown", "_na_", 0)).index("unknown").timeout("5ms");
        PlainActionFuture<TestResponse> listener = new PlainActionFuture<>();
        ReplicationTask task = maybeTask();
        TestAction testActionWithNoBlocks = new TestAction(Settings.EMPTY, "internal:testActionWithNoBlocks", transportService, clusterService, shardStateAction, threadPool);
        TestAction.ReroutePhase reroutePhase = testActionWithNoBlocks.new ReroutePhase(task, requestWithTimeout, listener);
        reroutePhase.run();
        assertListenerThrows("should fail with an IndexNotFoundException when no blocks", listener, IndexNotFoundException.class);
    }
}
Also used : ClusterBlock(org.opensearch.cluster.block.ClusterBlock) ShardId(org.opensearch.index.shard.ShardId) PlainActionFuture(org.opensearch.action.support.PlainActionFuture) CreateIndexRequest(org.opensearch.action.admin.indices.create.CreateIndexRequest) CloseIndexRequest(org.opensearch.action.admin.indices.close.CloseIndexRequest) TransportRequest(org.opensearch.transport.TransportRequest) IndexNotFoundException(org.opensearch.index.IndexNotFoundException) ClusterBlockException(org.opensearch.cluster.block.ClusterBlockException)

Aggregations

ClusterBlock (org.opensearch.cluster.block.ClusterBlock)31 ClusterState (org.opensearch.cluster.ClusterState)19 ClusterBlocks (org.opensearch.cluster.block.ClusterBlocks)18 HashSet (java.util.HashSet)15 Index (org.opensearch.index.Index)14 HashMap (java.util.HashMap)12 PlainActionFuture (org.opensearch.action.support.PlainActionFuture)11 IndexShardRoutingTable (org.opensearch.cluster.routing.IndexShardRoutingTable)11 Settings (org.opensearch.common.settings.Settings)11 ClusterName (org.opensearch.cluster.ClusterName)10 ClusterService (org.opensearch.cluster.service.ClusterService)10 Set (java.util.Set)9 IndexResult (org.opensearch.action.admin.indices.close.CloseIndexResponse.IndexResult)9 ClusterBlockException (org.opensearch.cluster.block.ClusterBlockException)9 IndexRoutingTable (org.opensearch.cluster.routing.IndexRoutingTable)9 ShardId (org.opensearch.index.shard.ShardId)9 RoutingTable (org.opensearch.cluster.routing.RoutingTable)8 IndexNotFoundException (org.opensearch.index.IndexNotFoundException)8 List (java.util.List)7 ShardRouting (org.opensearch.cluster.routing.ShardRouting)7