Skip to content

Commit 9eb24b9

Browse files
authored
Merge branch 'main' into script_sort_support_parallel_collection
2 parents fd0e227 + 74d61a4 commit 9eb24b9

File tree

155 files changed

+4695
-1003
lines changed

Some content is hidden

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

155 files changed

+4695
-1003
lines changed

benchmarks/src/main/java/org/elasticsearch/benchmark/vector/DistanceFunctionBenchmark.java

Lines changed: 132 additions & 408 deletions
Large diffs are not rendered by default.

build-tools/src/main/java/org/elasticsearch/gradle/testclusters/ElasticsearchNode.java

Lines changed: 39 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,14 @@
6161
import java.io.UncheckedIOException;
6262
import java.net.URL;
6363
import java.nio.charset.StandardCharsets;
64+
import java.nio.file.FileVisitResult;
6465
import java.nio.file.Files;
6566
import java.nio.file.NoSuchFileException;
6667
import java.nio.file.Path;
68+
import java.nio.file.SimpleFileVisitor;
6769
import java.nio.file.StandardCopyOption;
6870
import java.nio.file.StandardOpenOption;
71+
import java.nio.file.attribute.BasicFileAttributes;
6972
import java.time.Instant;
7073
import java.util.ArrayList;
7174
import java.util.Arrays;
@@ -1295,40 +1298,47 @@ private void syncWithCopy(Path sourceRoot, Path destinationRoot) {
12951298

12961299
private void sync(Path sourceRoot, Path destinationRoot, BiConsumer<Path, Path> syncMethod) {
12971300
assert Files.exists(destinationRoot) == false;
1298-
try (Stream<Path> stream = Files.walk(sourceRoot)) {
1299-
stream.forEach(source -> {
1300-
Path relativeDestination = sourceRoot.relativize(source);
1301-
if (relativeDestination.getNameCount() <= 1) {
1302-
return;
1303-
}
1304-
// Throw away the first name as the archives have everything in a single top level folder we are not interested in
1305-
relativeDestination = relativeDestination.subpath(1, relativeDestination.getNameCount());
1306-
1307-
Path destination = destinationRoot.resolve(relativeDestination);
1308-
if (Files.isDirectory(source)) {
1309-
try {
1310-
Files.createDirectories(destination);
1311-
} catch (IOException e) {
1312-
throw new UncheckedIOException("Can't create directory " + destination.getParent(), e);
1301+
try {
1302+
Files.walkFileTree(sourceRoot, new SimpleFileVisitor<>() {
1303+
@Override
1304+
public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {
1305+
Path relativeDestination = sourceRoot.relativize(dir);
1306+
if (relativeDestination.getNameCount() <= 1) {
1307+
return FileVisitResult.CONTINUE;
13131308
}
1314-
} else {
1315-
try {
1316-
Files.createDirectories(destination.getParent());
1317-
} catch (IOException e) {
1318-
throw new UncheckedIOException("Can't create directory " + destination.getParent(), e);
1309+
// Throw away the first name as the archives have everything in a single top level folder we are not interested in
1310+
relativeDestination = relativeDestination.subpath(1, relativeDestination.getNameCount());
1311+
Path destination = destinationRoot.resolve(relativeDestination);
1312+
Files.createDirectories(destination);
1313+
return FileVisitResult.CONTINUE;
1314+
}
1315+
1316+
@Override
1317+
public FileVisitResult visitFile(Path source, BasicFileAttributes attrs) throws IOException {
1318+
Path relativeDestination = sourceRoot.relativize(source);
1319+
if (relativeDestination.getNameCount() <= 1) {
1320+
return FileVisitResult.CONTINUE;
13191321
}
1322+
// Throw away the first name as the archives have everything in a single top level folder we are not interested in
1323+
relativeDestination = relativeDestination.subpath(1, relativeDestination.getNameCount());
1324+
Path destination = destinationRoot.resolve(relativeDestination);
1325+
Files.createDirectories(destination.getParent());
13201326
syncMethod.accept(destination, source);
1327+
return FileVisitResult.CONTINUE;
13211328
}
1322-
});
1323-
} catch (UncheckedIOException e) {
1324-
if (e.getCause() instanceof NoSuchFileException cause) {
1325-
// Ignore these files that are sometimes left behind by the JVM
1326-
if (cause.getFile() == null || cause.getFile().contains(".attach_pid") == false) {
1327-
throw new UncheckedIOException(cause);
1329+
1330+
@Override
1331+
public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {
1332+
if (exc instanceof NoSuchFileException noFileException) {
1333+
// Ignore these files that are sometimes left behind by the JVM
1334+
if (noFileException.getFile() != null && noFileException.getFile().contains(".attach_pid")) {
1335+
LOGGER.info("Ignoring file left behind by JVM: {}", noFileException.getFile());
1336+
return FileVisitResult.CONTINUE;
1337+
}
1338+
}
1339+
throw exc;
13281340
}
1329-
} else {
1330-
throw e;
1331-
}
1341+
});
13321342
} catch (IOException e) {
13331343
throw new UncheckedIOException("Can't walk source " + sourceRoot, e);
13341344
}

docs/changelog/122218.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 122218
2+
summary: Integrate with `DeepSeek` API
3+
area: Machine Learning
4+
type: enhancement
5+
issues: []

docs/changelog/122823.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 122823
2+
summary: Prevent Query Rule Creation with Invalid Numeric Match Criteria
3+
area: Relevance
4+
type: bug
5+
issues: []

docs/changelog/122891.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 122891
2+
summary: Pragma to load from stored fields
3+
area: ES|QL
4+
type: enhancement
5+
issues: []

docs/changelog/123852.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 123852
2+
summary: Retry when the server can't be resolved (Google Cloud Storage)
3+
area: Snapshot/Restore
4+
type: enhancement
5+
issues: []

docs/changelog/124025.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 124025
2+
summary: "[Inference API] Propagate product use case http header to EIS"
3+
area: Machine Learning
4+
type: enhancement
5+
issues: []

docs/changelog/124604.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 124604
2+
summary: Fix geoip databases index access after system feature migration (take 3)
3+
area: Ingest Node
4+
type: bug
5+
issues: []

docs/changelog/124638.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 124638
2+
summary: Provide model size statistics as soon as an anomaly detection job is opened
3+
area: Machine Learning
4+
type: bug
5+
issues:
6+
- 121168

docs/changelog/124662.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 124662
2+
summary: Let MLTQuery throw IAE when no analyzer is set
3+
area: Search
4+
type: bug
5+
issues:
6+
- 124562

0 commit comments

Comments
 (0)