Skip to content

Commit 83875f4

Browse files
committed
Don't calculate auto sharding for failure store
1 parent 43a9e6f commit 83875f4

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
@@ -276,7 +276,8 @@ protected void masterOperation(
276276

277277
AutoShardingResult rolloverAutoSharding = null;
278278
final IndexAbstraction indexAbstraction = projectMetadata.getIndicesLookup().get(resolvedRolloverTarget.resource());
279-
if (indexAbstraction.getType().equals(IndexAbstraction.Type.DATA_STREAM)) {
279+
// Failure stores currently don't support auto sharding yet.
280+
if (indexAbstraction.getType().equals(IndexAbstraction.Type.DATA_STREAM) && targetFailureStore == false) {
280281
DataStream dataStream = (DataStream) indexAbstraction;
281282
IndexStats indexStats = statsResponse != null ? statsResponse.getIndex(dataStream.getWriteIndex().getName()) : null;
282283
rolloverAutoSharding = dataStreamAutoShardingService.calculate(projectState, dataStream, indexStats);

0 commit comments

Comments
 (0)