|
14 | 14 | import org.elasticsearch.action.index.IndexRequestBuilder;
|
15 | 15 | import org.elasticsearch.cluster.metadata.IndexMetadata;
|
16 | 16 | import org.elasticsearch.common.settings.Settings;
|
| 17 | +import org.elasticsearch.common.util.CollectionUtils; |
| 18 | +import org.elasticsearch.compute.operator.exchange.ExchangeService; |
| 19 | +import org.elasticsearch.core.TimeValue; |
| 20 | +import org.elasticsearch.plugins.Plugin; |
17 | 21 | import org.elasticsearch.xcontent.XContentBuilder;
|
18 | 22 | import org.elasticsearch.xcontent.XContentFactory;
|
19 | 23 | import org.elasticsearch.xpack.esql.EsqlClientException;
|
|
28 | 32 | import java.io.IOException;
|
29 | 33 | import java.util.ArrayList;
|
30 | 34 | import java.util.Arrays;
|
| 35 | +import java.util.Collection; |
31 | 36 | import java.util.List;
|
32 | 37 | import java.util.Locale;
|
33 | 38 |
|
@@ -55,6 +60,22 @@ public static Iterable<Object[]> parameters() throws Exception {
|
55 | 60 | return params;
|
56 | 61 | }
|
57 | 62 |
|
| 63 | + @Override |
| 64 | + protected Settings nodeSettings(int nodeOrdinal, Settings otherSettings) { |
| 65 | + return Settings.builder() |
| 66 | + .put(super.nodeSettings(nodeOrdinal, otherSettings)) |
| 67 | + // testDifferentDimensions fails the final driver on the coordinator, leading to cancellation of the entire request. |
| 68 | + // If the exchange sink is opened on a remote node but the compute request hasn't been sent, we cannot close the exchange |
| 69 | + // sink (for now).Here, we reduce the inactive sinks interval to ensure those inactive sinks are removed quickly. |
| 70 | + .put(ExchangeService.INACTIVE_SINKS_INTERVAL_SETTING, TimeValue.timeValueMillis(between(3000, 4000))) |
| 71 | + .build(); |
| 72 | + } |
| 73 | + |
| 74 | + @Override |
| 75 | + protected Collection<Class<? extends Plugin>> nodePlugins() { |
| 76 | + return CollectionUtils.appendToCopy(super.nodePlugins(), InternalExchangePlugin.class); |
| 77 | + } |
| 78 | + |
58 | 79 | private final String functionName;
|
59 | 80 | private final SimilarityEvaluatorFunction similarityFunction;
|
60 | 81 | private int numDims;
|
|
0 commit comments