Skip to content

Commit 140200d

Browse files
authored
Don't calculate auto-sharding for failure store (#128921)
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.
1 parent 2a322ae commit 140200d

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)