Skip to content

Commit 52f1fab

Browse files
committed
refactor: remove dead DATA_STREAM_COMPATIBLE_ES_VERSION check
With CONNECTOR_V11_COMPATIBLE_ES_VERSION raised to 8.0.0, any cluster that passes the version gate trivially satisfies the old 7.9.0 data-stream floor. The branch could never fire; remove the constant and the guarded block.
1 parent 2283f4d commit 52f1fab

1 file changed

Lines changed: 0 additions & 13 deletions

File tree

src/main/java/io/confluent/connect/elasticsearch/Validator.java

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ public class Validator {
7676
private static final Logger log = LoggerFactory.getLogger(Validator.class);
7777

7878
private static final String CONNECTOR_V11_COMPATIBLE_ES_VERSION = "8.0.0";
79-
private static final String DATA_STREAM_COMPATIBLE_ES_VERSION = "7.9.0";
8079

8180
public static final String EXTERNAL_RESOURCE_CONFIG_TOGETHER_ERROR =
8281
String.format("Invalid configuration:"
@@ -459,18 +458,6 @@ private void validateVersion(ElasticsearchClient client) {
459458
// ElasticsearchException.
460459
return;
461460
}
462-
if (config.isDataStream()
463-
&& compareVersions(esVersionNumber, DATA_STREAM_COMPATIBLE_ES_VERSION) < 0) {
464-
String errorMessage = String.format(
465-
"Elasticsearch version %s is not compatible with data streams. Elasticsearch"
466-
+ "version must be at least %s.",
467-
esVersionNumber,
468-
DATA_STREAM_COMPATIBLE_ES_VERSION
469-
);
470-
addErrorMessage(CONNECTION_URL_CONFIG, errorMessage);
471-
addErrorMessage(DATA_STREAM_TYPE_CONFIG, errorMessage);
472-
addErrorMessage(DATA_STREAM_DATASET_CONFIG, errorMessage);
473-
}
474461
if (compareVersions(esVersionNumber, CONNECTOR_V11_COMPATIBLE_ES_VERSION) < 0) {
475462
String errorMessage = String.format(
476463
"Connector version %s is not compatible with Elasticsearch version %s. Elasticsearch "

0 commit comments

Comments
 (0)