Skip to content

Commit a1de1cf

Browse files
committed
Reduce inactive sink interval in VectorSimilarityFunctionsIT
1 parent a857290 commit a1de1cf

File tree

2 files changed

+21
-12
lines changed

2 files changed

+21
-12
lines changed

muted-tests.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -413,15 +413,6 @@ tests:
413413
- class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT
414414
method: test {p0=search/110_field_collapsing/field collapsing, inner_hits and maxConcurrentGroupRequests}
415415
issue: https://github.com/elastic/elasticsearch/issues/131348
416-
- class: org.elasticsearch.xpack.esql.vector.VectorSimilarityFunctionsIT
417-
method: testSimilarityBetweenConstantVectors {functionName=v_cosine similarityFunction=COSINE}
418-
issue: https://github.com/elastic/elasticsearch/issues/131361
419-
- class: org.elasticsearch.xpack.esql.vector.VectorSimilarityFunctionsIT
420-
method: testDifferentDimensions {functionName=v_cosine similarityFunction=COSINE}
421-
issue: https://github.com/elastic/elasticsearch/issues/131362
422-
- class: org.elasticsearch.xpack.esql.vector.VectorSimilarityFunctionsIT
423-
method: testSimilarityBetweenConstantVectorAndField {functionName=v_cosine similarityFunction=COSINE}
424-
issue: https://github.com/elastic/elasticsearch/issues/131363
425416
- class: org.elasticsearch.xpack.test.rest.XPackRestIT
426417
method: test {p0=ml/delete_expired_data/Test delete expired data with body parameters}
427418
issue: https://github.com/elastic/elasticsearch/issues/131364
@@ -488,9 +479,6 @@ tests:
488479
- class: org.elasticsearch.index.mapper.vectors.DenseVectorFieldMapperTests
489480
method: testUpdates
490481
issue: https://github.com/elastic/elasticsearch/issues/131795
491-
- class: org.elasticsearch.xpack.esql.vector.VectorSimilarityFunctionsIT
492-
method: testDifferentDimensions {functionName=v_dot_product similarityFunction=DOT_PRODUCT}
493-
issue: https://github.com/elastic/elasticsearch/issues/131845
494482
- class: org.elasticsearch.xpack.restart.FullClusterRestartIT
495483
method: testWatcherWithApiKey {cluster=UPGRADED}
496484
issue: https://github.com/elastic/elasticsearch/issues/131964

x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/vector/VectorSimilarityFunctionsIT.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
import org.elasticsearch.action.index.IndexRequestBuilder;
1515
import org.elasticsearch.cluster.metadata.IndexMetadata;
1616
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;
1721
import org.elasticsearch.xcontent.XContentBuilder;
1822
import org.elasticsearch.xcontent.XContentFactory;
1923
import org.elasticsearch.xpack.esql.EsqlClientException;
@@ -28,6 +32,7 @@
2832
import java.io.IOException;
2933
import java.util.ArrayList;
3034
import java.util.Arrays;
35+
import java.util.Collection;
3136
import java.util.List;
3237
import java.util.Locale;
3338

@@ -55,6 +60,22 @@ public static Iterable<Object[]> parameters() throws Exception {
5560
return params;
5661
}
5762

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+
5879
private final String functionName;
5980
private final SimilarityEvaluatorFunction similarityFunction;
6081
private int numDims;

0 commit comments

Comments
 (0)