Skip to content

Commit 6ca5a18

Browse files
authored
Reduce inactive sink interval in VectorSimilarityFunctionsIT (#132288)
testDifferentDimensions fails the final driver on the coordinator, causing the entire request to be cancelled. If the exchange sink is opened on a remote node but the compute request hasn't been sent, we currently cannot remove the exchange sink. To address this, we reduce the inactive sinks interval to remove inactive sinks more quickly. I also considered bypassing cancellation to close or remove the exchange sink in these cases, but since it's a larger change, I decided to defer it. Closes #131361 Closes #131362 Closes #131363 Closes #131845
1 parent 4f95c6b commit 6ca5a18

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
@@ -485,9 +476,6 @@ tests:
485476
- class: org.elasticsearch.index.mapper.vectors.DenseVectorFieldMapperTests
486477
method: testUpdates
487478
issue: https://github.com/elastic/elasticsearch/issues/131795
488-
- class: org.elasticsearch.xpack.esql.vector.VectorSimilarityFunctionsIT
489-
method: testDifferentDimensions {functionName=v_dot_product similarityFunction=DOT_PRODUCT}
490-
issue: https://github.com/elastic/elasticsearch/issues/131845
491479
- class: org.elasticsearch.xpack.restart.FullClusterRestartIT
492480
method: testWatcherWithApiKey {cluster=UPGRADED}
493481
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)