Skip to content

Commit 9e9d5ee

Browse files
authored
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 140200d) # Conflicts: # server/src/main/java/org/elasticsearch/action/admin/indices/rollover/TransportRolloverAction.java
1 parent 5fe2a6c commit 9e9d5ee

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/src/main/java/org/elasticsearch/action/admin/indices/rollover/TransportRolloverAction.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,8 @@ protected void masterOperation(
269269

270270
AutoShardingResult rolloverAutoSharding = null;
271271
final IndexAbstraction indexAbstraction = clusterState.metadata().getIndicesLookup().get(resolvedRolloverTarget.resource());
272-
if (indexAbstraction.getType().equals(IndexAbstraction.Type.DATA_STREAM)) {
272+
// Failure stores currently don't support auto sharding yet.
273+
if (indexAbstraction.getType().equals(IndexAbstraction.Type.DATA_STREAM) && targetFailureStore == false) {
273274
DataStream dataStream = (DataStream) indexAbstraction;
274275
final Optional<IndexStats> indexStats = Optional.ofNullable(statsResponse)
275276
.map(stats -> stats.getIndex(dataStream.getWriteIndex().getName()));

0 commit comments

Comments
 (0)