Skip to content

Commit

Permalink
Register cluster feature for yaml test bwc
Browse files Browse the repository at this point in the history
  • Loading branch information
andreidan committed Sep 23, 2024
1 parent b44f5f5 commit 7e02c8c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ setup:

---
generates a consistent id:
- requires:
cluster_features: "tsdb.ts_routing_hash_doc_value_parse_byte_ref"
reason: _tsid routing hash doc value parsing has been fixed
- do:
bulk:
refresh: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ public Set<NodeFeature> getFeatures() {
SourceFieldMapper.SYNTHETIC_SOURCE_WITH_COPY_TO_AND_DOC_VALUES_FALSE_SUPPORT,
SourceFieldMapper.SYNTHETIC_SOURCE_COPY_TO_FIX,
FlattenedFieldMapper.IGNORE_ABOVE_SUPPORT,
SourceFieldMapper.SYNTHETIC_SOURCE_COPY_TO_INSIDE_OBJECTS_FIX
SourceFieldMapper.SYNTHETIC_SOURCE_COPY_TO_INSIDE_OBJECTS_FIX,
TimeSeriesRoutingHashFieldMapper.TS_ROUTING_HASH_FIELD_PARSES_BYTES_REF
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.elasticsearch.common.Strings;
import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.util.ByteUtils;
import org.elasticsearch.features.NodeFeature;
import org.elasticsearch.index.IndexMode;
import org.elasticsearch.index.IndexVersions;
import org.elasticsearch.index.fielddata.FieldData;
Expand Down Expand Up @@ -46,6 +47,7 @@ public class TimeSeriesRoutingHashFieldMapper extends MetadataFieldMapper {
public static final TimeSeriesRoutingHashFieldMapper INSTANCE = new TimeSeriesRoutingHashFieldMapper();

public static final TypeParser PARSER = new FixedTypeParser(c -> c.getIndexSettings().getMode().timeSeriesRoutingHashFieldMapper());
static final NodeFeature TS_ROUTING_HASH_FIELD_PARSES_BYTES_REF = new NodeFeature("tsdb.ts_routing_hash_doc_value_parse_byte_ref");

static final class TimeSeriesRoutingHashFieldType extends MappedFieldType {

Expand Down

0 comments on commit 7e02c8c

Please sign in to comment.