Browse Source

Remove xpack actions for vector field (#75017)

We have already decided not to have xpack usage for field mappers
(see #53076). As mappings stats of all fields is already tracked
in cluster stats.
Moreover xpack usage for vector field is a quite expensive operation
(see #74974).

This removes xpack actions for vector field.
Mayya Sharipova 4 years ago
parent
commit
23781bb555

+ 2 - 2
build.gradle

@@ -144,9 +144,9 @@ tasks.register("verifyVersions") {
  * after the backport of the backcompat code is complete.
  */
 
-boolean bwc_tests_enabled = true
+boolean bwc_tests_enabled = false
 // place a PR link here when committing bwc changes:
-String bwc_tests_disabled_issue = ""
+String bwc_tests_disabled_issue = "https://github.com/elastic/elasticsearch/pull/75017"
 /*
  * FIPS 140-2 behavior was fixed in 7.11.0. Before that there is no way to run elasticsearch in a
  * JVM that is properly configured to be in fips mode with BCFIPS. For now we need to disable

+ 0 - 4
docs/reference/rest-api/info.asciidoc

@@ -142,10 +142,6 @@ Example response:
          "available" : true,
          "enabled" : true
       },
-      "vectors" : {
-         "available" : true,
-         "enabled" : true
-      },
       "voting_only" : {
          "available" : true,
          "enabled" : true

+ 0 - 6
docs/reference/rest-api/usage.asciidoc

@@ -272,12 +272,6 @@ GET /_xpack/usage
     "available" : true,
     "enabled" : true
   },
-  "vectors" : {
-    "available" : true,
-    "enabled" : true,
-    "dense_vector_fields_count" : 0,
-    "dense_vector_dims_avg_count" : 0
-  },
   "voting_only" : {
     "available" : true,
     "enabled" : true

+ 0 - 3
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackClientPlugin.java

@@ -218,7 +218,6 @@ import org.elasticsearch.xpack.core.transform.transforms.TimeRetentionPolicyConf
 import org.elasticsearch.xpack.core.transform.transforms.TimeSyncConfig;
 import org.elasticsearch.xpack.core.transform.transforms.TransformState;
 import org.elasticsearch.xpack.core.transform.transforms.TransformTaskParams;
-import org.elasticsearch.xpack.core.vectors.VectorsFeatureSetUsage;
 import org.elasticsearch.xpack.core.votingonly.VotingOnlyNodeFeatureSetUsage;
 import org.elasticsearch.xpack.core.watcher.WatcherFeatureSetUsage;
 import org.elasticsearch.xpack.core.watcher.WatcherMetadata;
@@ -516,8 +515,6 @@ public class XPackClientPlugin extends Plugin implements ActionPlugin, NetworkPl
                 TransformField.TIME.getPreferredName(),
                 TimeRetentionPolicyConfig::new
             ),
-            // Vectors
-            new NamedWriteableRegistry.Entry(XPackFeatureSet.Usage.class, XPackField.VECTORS, VectorsFeatureSetUsage::new),
             // Voting Only Node
             new NamedWriteableRegistry.Entry(XPackFeatureSet.Usage.class, XPackField.VOTING_ONLY, VotingOnlyNodeFeatureSetUsage::new),
             // Frozen indices

+ 1 - 0
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackField.java

@@ -48,6 +48,7 @@ public final class XPackField {
      */
     @Deprecated
     public static final String FLATTENED = "flattened";
+    @Deprecated
     /** Name constant for the vectors feature. */
     public static final String VECTORS = "vectors";
     /** Name constant for the voting-only-node feature. */

+ 1 - 2
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/action/XPackInfoFeatureAction.java

@@ -38,7 +38,6 @@ public class XPackInfoFeatureAction extends ActionType<XPackInfoFeatureResponse>
     public static final XPackInfoFeatureAction SNAPSHOT_LIFECYCLE = new XPackInfoFeatureAction(XPackField.SNAPSHOT_LIFECYCLE);
     public static final XPackInfoFeatureAction CCR = new XPackInfoFeatureAction(XPackField.CCR);
     public static final XPackInfoFeatureAction TRANSFORM = new XPackInfoFeatureAction(XPackField.TRANSFORM);
-    public static final XPackInfoFeatureAction VECTORS = new XPackInfoFeatureAction(XPackField.VECTORS);
     public static final XPackInfoFeatureAction VOTING_ONLY = new XPackInfoFeatureAction(XPackField.VOTING_ONLY);
     public static final XPackInfoFeatureAction FROZEN_INDICES = new XPackInfoFeatureAction(XPackField.FROZEN_INDICES);
     public static final XPackInfoFeatureAction SPATIAL = new XPackInfoFeatureAction(XPackField.SPATIAL);
@@ -54,7 +53,7 @@ public class XPackInfoFeatureAction extends ActionType<XPackInfoFeatureResponse>
         final List<XPackInfoFeatureAction> actions = new ArrayList<>();
         actions.addAll(Arrays.asList(
             SECURITY, MONITORING, WATCHER, GRAPH, MACHINE_LEARNING, LOGSTASH, EQL, SQL, ROLLUP, INDEX_LIFECYCLE, SNAPSHOT_LIFECYCLE, CCR,
-            TRANSFORM, VECTORS, VOTING_ONLY, FROZEN_INDICES, SPATIAL, ANALYTICS, ENRICH, DATA_STREAMS, SEARCHABLE_SNAPSHOTS, DATA_TIERS,
+            TRANSFORM, VOTING_ONLY, FROZEN_INDICES, SPATIAL, ANALYTICS, ENRICH, DATA_STREAMS, SEARCHABLE_SNAPSHOTS, DATA_TIERS,
             AGGREGATE_METRIC
         ));
         ALL = Collections.unmodifiableList(actions);

+ 0 - 2
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/action/XPackUsageFeatureAction.java

@@ -35,7 +35,6 @@ public class XPackUsageFeatureAction extends ActionType<XPackUsageFeatureRespons
     public static final XPackUsageFeatureAction SNAPSHOT_LIFECYCLE = new XPackUsageFeatureAction(XPackField.SNAPSHOT_LIFECYCLE);
     public static final XPackUsageFeatureAction CCR = new XPackUsageFeatureAction(XPackField.CCR);
     public static final XPackUsageFeatureAction TRANSFORM = new XPackUsageFeatureAction(XPackField.TRANSFORM);
-    public static final XPackUsageFeatureAction VECTORS = new XPackUsageFeatureAction(XPackField.VECTORS);
     public static final XPackUsageFeatureAction VOTING_ONLY = new XPackUsageFeatureAction(XPackField.VOTING_ONLY);
     public static final XPackUsageFeatureAction FROZEN_INDICES = new XPackUsageFeatureAction(XPackField.FROZEN_INDICES);
     public static final XPackUsageFeatureAction SPATIAL = new XPackUsageFeatureAction(XPackField.SPATIAL);
@@ -66,7 +65,6 @@ public class XPackUsageFeatureAction extends ActionType<XPackUsageFeatureRespons
         SPATIAL,
         SQL,
         TRANSFORM,
-        VECTORS,
         VOTING_ONLY,
         WATCHER
     );

+ 0 - 85
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/vectors/VectorsFeatureSetUsage.java

@@ -1,85 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0; you may not use this file except in compliance with the Elastic License
- * 2.0.
- */
-
-package org.elasticsearch.xpack.core.vectors;
-
-import org.elasticsearch.Version;
-import org.elasticsearch.common.io.stream.StreamInput;
-import org.elasticsearch.common.io.stream.StreamOutput;
-import org.elasticsearch.common.xcontent.XContentBuilder;
-import org.elasticsearch.xpack.core.XPackFeatureSet;
-import org.elasticsearch.xpack.core.XPackField;
-
-import java.io.IOException;
-import java.util.Objects;
-
-public class VectorsFeatureSetUsage extends XPackFeatureSet.Usage {
-
-    private final int numDenseVectorFields;
-    private final int avgDenseVectorDims;
-
-    public VectorsFeatureSetUsage(StreamInput input) throws IOException {
-        super(input);
-        numDenseVectorFields = input.readVInt();
-        // Older versions recorded the number of sparse vector fields.
-        if (input.getVersion().before(Version.V_8_0_0)) {
-            input.readVInt();
-        }
-        avgDenseVectorDims = input.readVInt();
-    }
-
-    @Override
-    public void writeTo(StreamOutput out) throws IOException {
-        super.writeTo(out);
-        out.writeVInt(numDenseVectorFields);
-        // Older versions recorded the number of sparse vector fields.
-        if (out.getVersion().before(Version.V_8_0_0)) {
-            out.writeVInt(0);
-        }
-        out.writeVInt(avgDenseVectorDims);
-    }
-
-    @Override
-    public Version getMinimalSupportedVersion() {
-        return Version.V_7_3_0;
-    }
-
-    public VectorsFeatureSetUsage(boolean available, int numDenseVectorFields, int avgDenseVectorDims) {
-        super(XPackField.VECTORS, available, true);
-        this.numDenseVectorFields = numDenseVectorFields;
-        this.avgDenseVectorDims = avgDenseVectorDims;
-    }
-
-
-    @Override
-    protected void innerXContent(XContentBuilder builder, Params params) throws IOException {
-        super.innerXContent(builder, params);
-        builder.field("dense_vector_fields_count", numDenseVectorFields);
-        builder.field("dense_vector_dims_avg_count", avgDenseVectorDims);
-    }
-
-    public int numDenseVectorFields() {
-        return numDenseVectorFields;
-    }
-
-    public int avgDenseVectorDims() {
-        return avgDenseVectorDims;
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(available, enabled, numDenseVectorFields, avgDenseVectorDims);
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (obj instanceof VectorsFeatureSetUsage == false) return false;
-        VectorsFeatureSetUsage other = (VectorsFeatureSetUsage) obj;
-        return available == other.available && enabled == other.enabled && numDenseVectorFields == other.numDenseVectorFields
-            && avgDenseVectorDims == other.avgDenseVectorDims;
-    }
-}

+ 0 - 48
x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/vectors/VectorsFeatureSetUsageTests.java

@@ -1,48 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0; you may not use this file except in compliance with the Elastic License
- * 2.0.
- */
-package org.elasticsearch.xpack.core.vectors;
-
-import org.elasticsearch.common.io.stream.Writeable;
-import org.elasticsearch.test.AbstractWireSerializingTestCase;
-
-import java.io.IOException;
-
-public class VectorsFeatureSetUsageTests extends AbstractWireSerializingTestCase<VectorsFeatureSetUsage> {
-
-    @Override
-    protected VectorsFeatureSetUsage createTestInstance() {
-        boolean available = randomBoolean();
-        boolean enabled = randomBoolean();
-        if (available && enabled) {
-            return new VectorsFeatureSetUsage(available, randomIntBetween(0, 100000), randomIntBetween(0, 1024));
-        } else {
-            return new VectorsFeatureSetUsage(available, 0, 0);
-        }
-    }
-
-    @Override
-    protected VectorsFeatureSetUsage mutateInstance(VectorsFeatureSetUsage instance) throws IOException {
-        boolean available = instance.available();
-        boolean enabled = instance.enabled();
-        int numDenseVectorFields = instance.numDenseVectorFields();
-        int avgDenseVectorDims = instance.avgDenseVectorDims();
-
-        if (available == false || enabled == false) {
-            available = true;
-            enabled = true;
-        }
-        numDenseVectorFields = randomValueOtherThan(numDenseVectorFields, () -> randomIntBetween(0, 100000));
-        avgDenseVectorDims = randomValueOtherThan(avgDenseVectorDims, () -> randomIntBetween(0, 1024));
-        return new VectorsFeatureSetUsage(available, numDenseVectorFields, avgDenseVectorDims);
-    }
-
-    @Override
-    protected Writeable.Reader<VectorsFeatureSetUsage> instanceReader() {
-        return VectorsFeatureSetUsage::new;
-    }
-
-}

+ 0 - 2
x-pack/plugin/security/qa/operator-privileges-tests/src/javaRestTest/java/org/elasticsearch/xpack/security/operator/Constants.java

@@ -277,7 +277,6 @@ public class Constants {
         "cluster:monitor/xpack/info/spatial",
         "cluster:monitor/xpack/info/sql",
         "cluster:monitor/xpack/info/transform",
-        "cluster:monitor/xpack/info/vectors",
         "cluster:monitor/xpack/info/voting_only",
         "cluster:monitor/xpack/info/watcher",
         "cluster:monitor/xpack/license/get",
@@ -331,7 +330,6 @@ public class Constants {
         "cluster:monitor/xpack/usage/spatial",
         "cluster:monitor/xpack/usage/sql",
         "cluster:monitor/xpack/usage/transform",
-        "cluster:monitor/xpack/usage/vectors",
         "cluster:monitor/xpack/usage/voting_only",
         "cluster:monitor/xpack/usage/watcher",
         "cluster:monitor/xpack/watcher/stats/dist",

+ 0 - 42
x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/vectors/50_vector_stats.yml

@@ -1,42 +0,0 @@
-setup:
-  - skip:
-      features: headers
-      version: " - 7.3.99"
-      reason: "vector stats was added from 7.4"
-
----
-"Usage stats on vector fields":
-  - do: {xpack.usage: {}}
-  - match: { vectors.available: true }
-  - match: { vectors.enabled: true }
-  - match: { vectors.dense_vector_fields_count: 0 }
-  - match: { vectors.dense_vector_dims_avg_count: 0 }
-
-  - do:
-      indices.create:
-        index: test-index1
-        body:
-          mappings:
-            properties:
-              my_dense_vector1:
-                type: dense_vector
-                dims: 10
-              my_dense_vector2:
-                type: dense_vector
-                dims: 30
-
-  - do:
-      indices.create:
-        index: test-index2
-        body:
-          mappings:
-            properties:
-              my_dense_vector3:
-                type: dense_vector
-                dims: 20
-
-  - do: {xpack.usage: {}}
-  - match: { vectors.available: true }
-  - match: { vectors.enabled: true }
-  - match: { vectors.dense_vector_fields_count: 3 }
-  - match: { vectors.dense_vector_dims_avg_count: 20 }

+ 1 - 15
x-pack/plugin/vectors/src/main/java/org/elasticsearch/xpack/vectors/Vectors.java

@@ -7,34 +7,20 @@
 
 package org.elasticsearch.xpack.vectors;
 
-import org.elasticsearch.action.ActionRequest;
-import org.elasticsearch.action.ActionResponse;
 import org.elasticsearch.index.mapper.Mapper;
-import org.elasticsearch.plugins.ActionPlugin;
 import org.elasticsearch.plugins.MapperPlugin;
 import org.elasticsearch.plugins.Plugin;
-import org.elasticsearch.xpack.core.action.XPackInfoFeatureAction;
-import org.elasticsearch.xpack.core.action.XPackUsageFeatureAction;
 import org.elasticsearch.xpack.vectors.mapper.DenseVectorFieldMapper;
 import org.elasticsearch.xpack.vectors.mapper.SparseVectorFieldMapper;
 
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.LinkedHashMap;
-import java.util.List;
 import java.util.Map;
 
-public class Vectors extends Plugin implements MapperPlugin, ActionPlugin {
+public class Vectors extends Plugin implements MapperPlugin {
 
     public Vectors() { }
 
-    @Override
-    public List<ActionPlugin.ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
-        return Arrays.asList(
-            new ActionPlugin.ActionHandler<>(XPackUsageFeatureAction.VECTORS, VectorsUsageTransportAction.class),
-            new ActionPlugin.ActionHandler<>(XPackInfoFeatureAction.VECTORS, VectorsInfoTransportAction.class));
-    }
-
     @Override
     public Map<String, Mapper.TypeParser> getMappers() {
         Map<String, Mapper.TypeParser> mappers = new LinkedHashMap<>();

+ 0 - 38
x-pack/plugin/vectors/src/main/java/org/elasticsearch/xpack/vectors/VectorsInfoTransportAction.java

@@ -1,38 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0; you may not use this file except in compliance with the Elastic License
- * 2.0.
- */
-package org.elasticsearch.xpack.vectors;
-
-import org.elasticsearch.action.support.ActionFilters;
-import org.elasticsearch.common.inject.Inject;
-import org.elasticsearch.transport.TransportService;
-import org.elasticsearch.xpack.core.XPackField;
-import org.elasticsearch.xpack.core.action.XPackInfoFeatureAction;
-import org.elasticsearch.xpack.core.action.XPackInfoFeatureTransportAction;
-
-public class VectorsInfoTransportAction extends XPackInfoFeatureTransportAction {
-
-    @Inject
-    public VectorsInfoTransportAction(TransportService transportService, ActionFilters actionFilters) {
-        super(XPackInfoFeatureAction.VECTORS.name(), transportService, actionFilters);
-    }
-
-    @Override
-    public String name() {
-        return XPackField.VECTORS;
-    }
-
-    @Override
-    public boolean available() {
-        return true;
-    }
-
-    @Override
-    public boolean enabled() {
-        return true;
-    }
-
-}

+ 0 - 77
x-pack/plugin/vectors/src/main/java/org/elasticsearch/xpack/vectors/VectorsUsageTransportAction.java

@@ -1,77 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0; you may not use this file except in compliance with the Elastic License
- * 2.0.
- */
-package org.elasticsearch.xpack.vectors;
-
-import org.elasticsearch.action.ActionListener;
-import org.elasticsearch.action.support.ActionFilters;
-import org.elasticsearch.cluster.ClusterState;
-import org.elasticsearch.cluster.metadata.IndexMetadata;
-import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
-import org.elasticsearch.cluster.metadata.MappingMetadata;
-import org.elasticsearch.cluster.service.ClusterService;
-import org.elasticsearch.common.inject.Inject;
-import org.elasticsearch.protocol.xpack.XPackUsageRequest;
-import org.elasticsearch.tasks.Task;
-import org.elasticsearch.threadpool.ThreadPool;
-import org.elasticsearch.transport.TransportService;
-import org.elasticsearch.xpack.core.action.XPackUsageFeatureAction;
-import org.elasticsearch.xpack.core.action.XPackUsageFeatureResponse;
-import org.elasticsearch.xpack.core.action.XPackUsageFeatureTransportAction;
-import org.elasticsearch.xpack.core.vectors.VectorsFeatureSetUsage;
-import org.elasticsearch.xpack.vectors.mapper.DenseVectorFieldMapper;
-import org.elasticsearch.xpack.vectors.mapper.SparseVectorFieldMapper;
-
-import java.util.Map;
-
-public class VectorsUsageTransportAction extends XPackUsageFeatureTransportAction {
-
-    @Inject
-    public VectorsUsageTransportAction(TransportService transportService, ClusterService clusterService, ThreadPool threadPool,
-                                       ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver) {
-        super(XPackUsageFeatureAction.VECTORS.name(), transportService, clusterService,
-            threadPool, actionFilters, indexNameExpressionResolver);
-    }
-
-    @Override
-    protected void masterOperation(Task task, XPackUsageRequest request, ClusterState state,
-                                   ActionListener<XPackUsageFeatureResponse> listener) {
-        int numDenseVectorFields = 0;
-        int numSparseVectorFields = 0;
-        int avgDenseVectorDims = 0;
-
-        if (state != null) {
-            for (IndexMetadata indexMetadata : state.metadata()) {
-                MappingMetadata mappingMetadata = indexMetadata.mapping();
-                if (mappingMetadata != null) {
-                    Map<String, Object> mappings = mappingMetadata.getSourceAsMap();
-                    if (mappings.containsKey("properties")) {
-                        @SuppressWarnings("unchecked") Map<String, Map<String, Object>> fieldMappings =
-                            (Map<String, Map<String, Object>>) mappings.get("properties");
-                        for (Map<String, Object> typeDefinition : fieldMappings.values()) {
-                            String fieldType = (String) typeDefinition.get("type");
-                            if (fieldType != null) {
-                                if (fieldType.equals(DenseVectorFieldMapper.CONTENT_TYPE)) {
-                                    numDenseVectorFields++;
-                                    int dims = (Integer) typeDefinition.get("dims");
-                                    avgDenseVectorDims += dims;
-                                } else if (fieldType.equals(SparseVectorFieldMapper.CONTENT_TYPE)) {
-                                    numSparseVectorFields++;
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-            if (numDenseVectorFields > 0) {
-                avgDenseVectorDims = avgDenseVectorDims / numDenseVectorFields;
-            }
-        }
-        VectorsFeatureSetUsage usage =
-            new VectorsFeatureSetUsage(true, numDenseVectorFields, avgDenseVectorDims);
-        listener.onResponse(new XPackUsageFeatureResponse(usage));
-    }
-}

+ 0 - 59
x-pack/plugin/vectors/src/test/java/org/elasticsearch/xpack/vectors/VectorsInfoTransportActionTests.java

@@ -1,59 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0; you may not use this file except in compliance with the Elastic License
- * 2.0.
- */
-package org.elasticsearch.xpack.vectors;
-
-import org.elasticsearch.action.support.ActionFilters;
-import org.elasticsearch.action.support.PlainActionFuture;
-import org.elasticsearch.common.io.stream.BytesStreamOutput;
-import org.elasticsearch.test.ESTestCase;
-import org.elasticsearch.transport.TransportService;
-import org.elasticsearch.xpack.core.XPackFeatureSet;
-import org.elasticsearch.xpack.core.action.XPackUsageFeatureResponse;
-import org.elasticsearch.xpack.core.vectors.VectorsFeatureSetUsage;
-
-import static org.hamcrest.core.Is.is;
-import static org.mockito.Mockito.mock;
-
-public class VectorsInfoTransportActionTests extends ESTestCase {
-
-    public void testAvailable() throws Exception {
-        VectorsInfoTransportAction featureSet = new VectorsInfoTransportAction(
-            mock(TransportService.class), mock(ActionFilters.class));
-        assertThat(featureSet.available(), is(true));
-
-        var usageAction = new VectorsUsageTransportAction(mock(TransportService.class), null, null,
-            mock(ActionFilters.class), null);
-        PlainActionFuture<XPackUsageFeatureResponse> future = new PlainActionFuture<>();
-        usageAction.masterOperation(null, null, null, future);
-        XPackFeatureSet.Usage usage = future.get().getUsage();
-        assertThat(usage.available(), is(true));
-
-        BytesStreamOutput out = new BytesStreamOutput();
-        usage.writeTo(out);
-        XPackFeatureSet.Usage serializedUsage = new VectorsFeatureSetUsage(out.bytes().streamInput());
-        assertThat(serializedUsage.available(), is(true));
-    }
-
-    public void testAlwaysEnabled() throws Exception {
-        VectorsInfoTransportAction featureSet = new VectorsInfoTransportAction(
-mock(TransportService.class), mock(ActionFilters.class));
-        assertThat(featureSet.enabled(), is(true));
-
-        VectorsUsageTransportAction usageAction = new VectorsUsageTransportAction(mock(TransportService.class),
-            null, null, mock(ActionFilters.class), null);
-        PlainActionFuture<XPackUsageFeatureResponse> future = new PlainActionFuture<>();
-        usageAction.masterOperation(null, null, null, future);
-        XPackFeatureSet.Usage usage = future.get().getUsage();
-        assertThat(usage.enabled(), is(true));
-
-        BytesStreamOutput out = new BytesStreamOutput();
-        usage.writeTo(out);
-        XPackFeatureSet.Usage serializedUsage = new VectorsFeatureSetUsage(out.bytes().streamInput());
-        assertThat(serializedUsage.enabled(), is(true));
-    }
-
-}