Skip to content

Commit d3c0dbb

Browse files
Merge branch 'main' into per-project-s3-clients
2 parents 9ab977b + b2e9eb2 commit d3c0dbb

File tree

41 files changed

+828
-245
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+828
-245
lines changed

benchmarks/src/main/java/org/elasticsearch/benchmark/compute/operator/EvalBenchmark.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@
4848
import org.elasticsearch.xpack.esql.expression.function.scalar.math.RoundTo;
4949
import org.elasticsearch.xpack.esql.expression.function.scalar.multivalue.MvMin;
5050
import org.elasticsearch.xpack.esql.expression.function.scalar.nulls.Coalesce;
51-
import org.elasticsearch.xpack.esql.expression.function.scalar.string.RLike;
5251
import org.elasticsearch.xpack.esql.expression.function.scalar.string.ToLower;
5352
import org.elasticsearch.xpack.esql.expression.function.scalar.string.ToUpper;
53+
import org.elasticsearch.xpack.esql.expression.function.scalar.string.regex.RLike;
5454
import org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic.Add;
5555
import org.elasticsearch.xpack.esql.expression.predicate.operator.comparison.Equals;
5656
import org.elasticsearch.xpack.esql.expression.predicate.operator.comparison.LessThan;

build-tools-internal/gradle/wrapper/gradle-wrapper.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionSha256Sum=efe9a3d147d948d7528a9887fa35abcf24ca1a43ad06439996490f77569b02d1
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip
3+
distributionSha256Sum=d7042b3c11565c192041fc8c4703f541b888286404b4f267138c1d094d8ecdca
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-all.zip
55
networkTimeout=10000
66
validateDistributionUrl=true
77
zipStoreBase=GRADLE_USER_HOME
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.14
1+
8.14.1

docs/changelog/128273.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 128273
2+
summary: Improve get-snapshots message for unreadable repository
3+
area: Snapshot/Restore
4+
type: enhancement
5+
issues: []

docs/changelog/128393.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 128393
2+
summary: Pushdown constructs doing case-insensitive regexes
3+
area: ES|QL
4+
type: enhancement
5+
issues:
6+
- 127479

gradle/wrapper/gradle-wrapper.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionSha256Sum=efe9a3d147d948d7528a9887fa35abcf24ca1a43ad06439996490f77569b02d1
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip
3+
distributionSha256Sum=d7042b3c11565c192041fc8c4703f541b888286404b4f267138c1d094d8ecdca
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-all.zip
55
networkTimeout=10000
66
validateDistributionUrl=true
77
zipStoreBase=GRADLE_USER_HOME

plugins/examples/gradle/wrapper/gradle-wrapper.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionSha256Sum=efe9a3d147d948d7528a9887fa35abcf24ca1a43ad06439996490f77569b02d1
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip
3+
distributionSha256Sum=d7042b3c11565c192041fc8c4703f541b888286404b4f267138c1d094d8ecdca
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-all.zip
55
networkTimeout=10000
66
validateDistributionUrl=true
77
zipStoreBase=GRADLE_USER_HOME

server/src/internalClusterTest/java/org/elasticsearch/snapshots/GetSnapshotsIT.java

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@
4040
import org.elasticsearch.core.Predicates;
4141
import org.elasticsearch.repositories.RepositoriesService;
4242
import org.elasticsearch.repositories.RepositoryData;
43+
import org.elasticsearch.repositories.RepositoryException;
4344
import org.elasticsearch.repositories.RepositoryMissingException;
45+
import org.elasticsearch.repositories.blobstore.BlobStoreRepository;
4446
import org.elasticsearch.repositories.fs.FsRepository;
4547
import org.elasticsearch.search.sort.SortOrder;
4648
import org.elasticsearch.test.ESTestCase;
@@ -633,6 +635,48 @@ public void testRetrievingSnapshotsWhenRepositoryIsMissing() throws Exception {
633635
expectThrows(RepositoryMissingException.class, multiRepoFuture::actionGet);
634636
}
635637

638+
public void testRetrievingSnapshotsWhenRepositoryIsUnreadable() throws Exception {
639+
final String repoName = randomIdentifier();
640+
final Path repoPath = randomRepoPath();
641+
createRepository(
642+
repoName,
643+
"fs",
644+
Settings.builder().put("location", repoPath).put(BlobStoreRepository.CACHE_REPOSITORY_DATA.getKey(), false)
645+
);
646+
createNSnapshots(repoName, randomIntBetween(1, 3));
647+
648+
try {
649+
try (var directoryStream = Files.newDirectoryStream(repoPath)) {
650+
for (final var directoryEntry : directoryStream) {
651+
if (Files.isRegularFile(directoryEntry) && directoryEntry.getFileName().toString().startsWith("index-")) {
652+
Files.writeString(directoryEntry, "invalid");
653+
}
654+
}
655+
}
656+
657+
final var repositoryException = safeAwaitAndUnwrapFailure(
658+
RepositoryException.class,
659+
GetSnapshotsResponse.class,
660+
l -> clusterAdmin().prepareGetSnapshots(TEST_REQUEST_TIMEOUT, repoName)
661+
.setSort(SnapshotSortKey.NAME)
662+
.setIgnoreUnavailable(randomBoolean())
663+
.execute(l)
664+
);
665+
assertEquals(
666+
Strings.format("[%s] cannot retrieve snapshots list from this repository", repoName),
667+
repositoryException.getMessage()
668+
);
669+
assertEquals(
670+
Strings.format("[%s] Unexpected exception when loading repository data", repoName),
671+
repositoryException.getCause().getMessage()
672+
);
673+
} finally {
674+
safeAwait(
675+
l -> clusterAdmin().prepareDeleteRepository(TEST_REQUEST_TIMEOUT, TEST_REQUEST_TIMEOUT, repoName).execute(l.map(v -> null))
676+
);
677+
}
678+
}
679+
636680
// Create a snapshot that is guaranteed to have a unique start time and duration for tests around ordering by either.
637681
// Don't use this with more than 3 snapshots on platforms with low-resolution clocks as the durations could always collide there
638682
// causing an infinite loop

server/src/main/java/org/elasticsearch/TransportVersions.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ static TransportVersion def(int id) {
272272
public static final TransportVersion ML_INFERENCE_VERTEXAI_CHATCOMPLETION_ADDED = def(9_083_0_00);
273273
public static final TransportVersion INFERENCE_CUSTOM_SERVICE_ADDED = def(9_084_0_00);
274274
public static final TransportVersion ESQL_LIMIT_ROW_SIZE = def(9_085_0_00);
275+
public static final TransportVersion ESQL_REGEX_MATCH_WITH_CASE_INSENSITIVITY = def(9_086_0_00);
275276

276277
/*
277278
* STOP! READ THIS FIRST! No, really,

server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/get/TransportGetSnapshotsAction.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
import org.elasticsearch.repositories.RepositoriesService;
3939
import org.elasticsearch.repositories.Repository;
4040
import org.elasticsearch.repositories.RepositoryData;
41+
import org.elasticsearch.repositories.RepositoryException;
4142
import org.elasticsearch.repositories.RepositoryMissingException;
4243
import org.elasticsearch.repositories.ResolvedRepositories;
4344
import org.elasticsearch.search.sort.SortOrder;
@@ -285,7 +286,20 @@ private void populateResults(ActionListener<Void> listener) {
285286
),
286287
repositoryName -> asyncRepositoryContentsListener -> SubscribableListener
287288

288-
.<RepositoryData>newForked(l -> maybeGetRepositoryData(repositoryName, l))
289+
.<RepositoryData>newForked(
290+
l -> maybeGetRepositoryData(
291+
repositoryName,
292+
l.delegateResponse(
293+
(ll, e) -> ll.onFailure(
294+
new RepositoryException(
295+
repositoryName,
296+
"cannot retrieve snapshots list from this repository",
297+
e
298+
)
299+
)
300+
)
301+
)
302+
)
289303
.andThenApply(repositoryData -> {
290304
assert ThreadPool.assertCurrentThreadPool(ThreadPool.Names.MANAGEMENT);
291305
cancellableTask.ensureNotCancelled();

0 commit comments

Comments
 (0)