Skip to content

Commit 489dc0c

Browse files
authored
Use a 9.3-exclusive version for exp. histogram (elastic#139237)
elastic#137432 added a minimum transport version to data types that are *under construction*, so that even in SNAPSHOT builds a coordinator node can decide whether other nodes or clusters are new enough to understand a data type that recently became supported in ESQL. The `EXPONENTIAL_HISTOGRAM` type is one such type that is currently under construction. elastic#137432 wrongly gave it a minimum transport version that was also backported to 9.2, even though the type is exclusive to 9.3 so far (even in SNAPSHOT builds). To keep things consistent, use a newer minimum transport version for `EXPONENTIAL_HISTOGRAM`, namely the first version after it was added which was also not backported to 9.2. (There wasn't any breakage from this because we don't have tests that do anything with `EXPONENTIAL_HISTOGRAM` in mixed 9.2/9.3 clusters/CCS to my knowledge.)
1 parent 86f6eb0 commit 489dc0c

File tree

1 file changed

+5
-4
lines changed
  • x-pack/plugin/esql-core/src/main/java/org/elasticsearch/xpack/esql/core/type

1 file changed

+5
-4
lines changed

x-pack/plugin/esql-core/src/main/java/org/elasticsearch/xpack/esql/core/type/DataType.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ public enum DataType implements Writeable {
370370
builder().esType("exponential_histogram")
371371
.estimatedSize(16 * 160)// guess 160 buckets (OTEL default for positive values only histograms) with 16 bytes per bucket
372372
.docValues()
373-
.underConstruction(DataTypesTransportVersions.RESOLVE_FIELDS_RESPONSE_USED_TV)
373+
.underConstruction(DataTypesTransportVersions.TEXT_SIMILARITY_RANK_DOC_EXPLAIN_CHUNKS_VERSION)
374374
),
375375

376376
/*
@@ -1043,10 +1043,11 @@ public static class DataTypesTransportVersions {
10431043
);
10441044

10451045
/**
1046-
* First transport version after the PR that introduced the exponential histogram data type.
1046+
* First transport version after the PR that introduced the exponential histogram data type which was NOT also backported to 9.2.
1047+
* (Exp. histogram was added as SNAPSHOT-only to 9.3.)
10471048
*/
1048-
public static final TransportVersion RESOLVE_FIELDS_RESPONSE_USED_TV = TransportVersion.fromName(
1049-
"esql_resolve_fields_response_used"
1049+
public static final TransportVersion TEXT_SIMILARITY_RANK_DOC_EXPLAIN_CHUNKS_VERSION = TransportVersion.fromName(
1050+
"text_similarity_rank_docs_explain_chunks"
10501051
);
10511052
}
10521053
}

0 commit comments

Comments
 (0)