Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,11 @@
min_age: "0s"
min_docs: 1
- match: { error.reason: "Validation Failed: 1: at least one max_* rollover condition must be set when using min_* conditions;" }

---
"Rolling over an unknown target should return 404":
- do:
catch: bad_request
indices.rollover:
alias: "non_existent"
- match: {error.reason: "rollover target [non_existent] does not exist"}
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ protected ClusterBlockException checkBlock(RolloverRequest request, ClusterState
ResolvedExpression resolvedRolloverTarget = SelectorResolver.parseExpression(request.getRolloverTarget(), request.indicesOptions());
final IndexAbstraction indexAbstraction = projectMetadata.getIndicesLookup().get(resolvedRolloverTarget.resource());
final String[] indicesToCheck;
if (indexAbstraction.getType().equals(IndexAbstraction.Type.DATA_STREAM)) {
if (indexAbstraction != null && indexAbstraction.getType().equals(IndexAbstraction.Type.DATA_STREAM)) {
DataStream dataStream = (DataStream) indexAbstraction;
boolean targetFailureStore = resolvedRolloverTarget.selector() != null
&& resolvedRolloverTarget.selector().shouldIncludeFailures();
Expand Down