浏览代码

Don't calculate auto-sharding for failure store (#128921) (#128968)

Auto-sharding is not yet implemented for the failure store, so we want
to avoid running this computation. The result of the computation is
currently not used anywhere, but it's better to be on the safe side and
avoid the computation altogether.

(cherry picked from commit 140200d367cca5b3d21db8e58202d6cf804552b5)

# Conflicts:
#	server/src/main/java/org/elasticsearch/action/admin/indices/rollover/TransportRolloverAction.java
Niels Bauman 4 月之前
父节点
当前提交
9e9d5eec39

+ 2 - 1
server/src/main/java/org/elasticsearch/action/admin/indices/rollover/TransportRolloverAction.java

@@ -269,7 +269,8 @@ public class TransportRolloverAction extends TransportMasterNodeAction<RolloverR
 
                 AutoShardingResult rolloverAutoSharding = null;
                 final IndexAbstraction indexAbstraction = clusterState.metadata().getIndicesLookup().get(resolvedRolloverTarget.resource());
-                if (indexAbstraction.getType().equals(IndexAbstraction.Type.DATA_STREAM)) {
+                // Failure stores currently don't support auto sharding yet.
+                if (indexAbstraction.getType().equals(IndexAbstraction.Type.DATA_STREAM) && targetFailureStore == false) {
                     DataStream dataStream = (DataStream) indexAbstraction;
                     final Optional<IndexStats> indexStats = Optional.ofNullable(statsResponse)
                         .map(stats -> stats.getIndex(dataStream.getWriteIndex().getName()));