{"record":{"id":"d546f9b0a69ba696","repo":"elastic/elasticsearch","slug":"delete-backing-index-is-an-unsupported-action-type","errorCode":null,"errorMessage":"delete_backing_index is an unsupported action type for this mixed version cluster","messagePattern":"delete_backing_index is an unsupported action type for this mixed version cluster","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/data-streams/src/main/java/org/elasticsearch/datastreams/rest/RestModifyDataStreamsAction.java","lineNumber":71,"sourceCode":"        try (XContentParser parser = request.contentParser()) {\n            modifyDsRequest = ModifyDataStreamsAction.Request.PARSER.parse(\n                parser,\n                actions -> new ModifyDataStreamsAction.Request(\n                    RestUtils.getMasterNodeTimeout(request),\n                    RestUtils.getAckTimeout(request),\n                    actions\n                )\n            );\n        }\n        if (modifyDsRequest.getActions() == null || modifyDsRequest.getActions().isEmpty()) {\n            throw new IllegalArgumentException(\"no data stream actions specified, at least one must be specified\");\n        }\n        boolean hasDeleteIndexAction = modifyDsRequest.getActions()\n            .stream()\n            .anyMatch(action -> action.getType() == DataStreamAction.Type.DELETE_BACKING_INDEX);\n        if (hasDeleteIndexAction) {\n            if (clusterSupportsFeature.test(DataStreamFeatures.DATA_STREAMS_MODIFY_DELETE_INDEX) == false) {\n                throw new IllegalArgumentException(\"delete_backing_index is an unsupported action type for this mixed version cluster\");\n            }\n        }\n        return channel -> client.execute(ModifyDataStreamsAction.INSTANCE, modifyDsRequest, new RestToXContentListener<>(channel));\n    }\n\n    @Override\n    public Set<String> supportedCapabilities() {\n        return Set.of(\"data_streams.modify.delete_index\");\n    }\n}\n","sourceCodeStart":53,"sourceCodeEnd":82,"githubUrl":"https://github.com/elastic/elasticsearch/blob/db6a809a667c081ca1dc7500389d26975573215f/modules/data-streams/src/main/java/org/elasticsearch/datastreams/rest/RestModifyDataStreamsAction.java#L53-L82","documentation":"IllegalArgumentException when a modify-data-stream request contains a delete_backing_index action but the cluster does not advertise the 'data_streams.modify.delete_index' capability — i.e. at least one node is on an older version during a rolling upgrade. The REST handler gates the action behind clusterSupportsFeature.","triggerScenarios":"POST _data_stream/_modify with a delete_backing_index action while mixed-version nodes exist; DataStreamFeatures.DATA_STREAMS_MODIFY_DELETE_INDEX returns false from the feature check.","commonSituations":"Mid rolling upgrade; a node hasn't been upgraded yet; snapshot restore into a mixed cluster; testing against a partially upgraded staging cluster.","solutions":["Finish the rolling upgrade so all nodes support data_streams.modify.delete_index","Remove the old-version nodes from the cluster","Temporarily drop delete_backing_index actions until the upgrade completes"],"exampleFix":"// before (mixed cluster): rejected\nPOST _data_stream/_modify {\"actions\":[{\"delete_backing_index\":{...}}]}\n// after upgrade completes: same request is accepted; or remove the action until then","handlingStrategy":"validation","validationCode":"// Check cluster capability client-side before sending delete_backing_index:\nboolean supported = clusterSupportsFeature(\"data_streams.modify.delete_index\");\nif (!supported && requestHasDelete(actions)) {\n    throw new IllegalStateException(\"delete_backing_index unsupported until upgrade completes\");\n}","typeGuard":null,"tryCatchPattern":"try { modifyDataStreams(actions); }\ncatch (IllegalArgumentException e) {\n    if (e.getMessage().contains(\"delete_backing_index\")) { /* defer action until upgrade done */ }\n    else throw e;\n}","preventionTips":["Defer delete_backing_index automations until the rolling upgrade is complete","Check the cluster's min node version before issuing the action","Queue delete requests and replay after upgrade"],"tags":["data-streams","mixed-version","upgrade","feature-gate"],"backgroundTag":null,"analyzedSha":"db6a809a667c081ca1dc7500389d26975573215f","analyzedAt":"2026-08-12T01:39:14.192Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}