Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions qa/lucene-index-compatibility/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ buildParams.bwcVersions.withLatestReadOnlyIndexCompatible { bwcVersion ->
tasks.named("javaRestTest").configure {
systemProperty("tests.minimum.index.compatible", bwcVersion)
usesBwcDistribution(bwcVersion)
enabled = true
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
import org.elasticsearch.index.mapper.MapperService;
import org.elasticsearch.test.XContentTestUtils;
import org.elasticsearch.test.cluster.ElasticsearchCluster;
import org.elasticsearch.test.cluster.local.DefaultSettingsProvider;
import org.elasticsearch.test.cluster.local.LocalClusterConfigProvider;
import org.elasticsearch.test.cluster.local.LocalClusterSpec;
import org.elasticsearch.test.cluster.local.distribution.DistributionType;
import org.elasticsearch.test.cluster.util.Version;
import org.elasticsearch.test.rest.ESRestTestCase;
Expand Down Expand Up @@ -78,6 +80,16 @@ public abstract class AbstractIndexCompatibilityTestCase extends ESRestTestCase
.setting("xpack.security.enabled", "false")
.setting("xpack.ml.enabled", "false")
.setting("path.repo", () -> REPOSITORY_PATH.getRoot().getPath())
.settings(new DefaultSettingsProvider() {
@Override
public Map<String, String> get(LocalClusterSpec.LocalNodeSpec nodeSpec) {
var settings = super.get(nodeSpec);
if (nodeSpec.getVersion().onOrAfter(Version.fromString("9.2.0"))) {
settings.put("xpack.inference.endpoint.cache.enabled", "false");
}
return settings;
}
})
.apply(() -> clusterConfig)
.build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,15 @@ public ClearInferenceEndpointCacheAction(
);
}

@Override
protected void doExecute(Task task, Request request, ActionListener<AcknowledgedResponse> listener) {
if (inferenceEndpointRegistry.cacheEnabled() == false) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is annoying bug, I'll create an issue for this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opened #134809

ActionListener.completeWith(listener, () -> AcknowledgedResponse.TRUE);
return;
}
super.doExecute(task, request, listener);
}

@Override
protected void masterOperation(
Task task,
Expand Down