Skip to content

Commit

Permalink
Merge branch 'main' into source-mem-accounting
Browse files Browse the repository at this point in the history
  • Loading branch information
andreidan authored Feb 21, 2025
2 parents 83e37e6 + 18d20c3 commit a8cf2c5
Show file tree
Hide file tree
Showing 237 changed files with 17,806 additions and 3,654 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,7 @@ if (providers.systemProperty('idea.active').getOrNull() == 'true') {
tasks.register('buildDependencyArtifacts') {
group = 'ide'
description = 'Builds artifacts needed as dependency for IDE modules'
dependsOn([':plugins:repository-hdfs:hadoop-client-api:jar',
':x-pack:plugin:esql:compute:ann:jar',
dependsOn([':x-pack:plugin:esql:compute:ann:jar',
':x-pack:plugin:esql:compute:gen:jar',
':server:generateModulesList',
':server:generatePluginsList',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
import java.util.regex.Pattern;

import static java.util.Map.entry;
import static org.objectweb.asm.ClassWriter.COMPUTE_FRAMES;
import static org.objectweb.asm.ClassWriter.COMPUTE_MAXS;

@CacheableTransform
public abstract class HdfsClassPatcher implements TransformAction<HdfsClassPatcher.Parameters> {
Expand Down Expand Up @@ -128,7 +130,7 @@ private static void patchJar(File inputFile, File outputFile, Map<String, Functi
byte[] classToPatch = jarFile.getInputStream(entry).readAllBytes();

ClassReader classReader = new ClassReader(classToPatch);
ClassWriter classWriter = new ClassWriter(classReader, 0);
ClassWriter classWriter = new ClassWriter(classReader, COMPUTE_FRAMES | COMPUTE_MAXS);
classReader.accept(classPatcher.apply(classWriter), 0);

jos.write(classWriter.toByteArray());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import org.elasticsearch.core.Tuple;
import org.elasticsearch.env.Environment;
import org.elasticsearch.env.TestEnvironment;
import org.elasticsearch.jdk.RuntimeVersionFeature;
import org.elasticsearch.plugin.scanner.NamedComponentScanner;
import org.elasticsearch.plugins.Platforms;
import org.elasticsearch.plugins.PluginDescriptor;
Expand Down Expand Up @@ -891,6 +892,7 @@ public void testInstallMisspelledOfficialPlugins() {
}

public void testBatchFlag() throws Exception {
assumeTrue("security policy validation only available with SecurityManager", RuntimeVersionFeature.isSecurityManagerAvailable());
installPlugin(true);
assertThat(terminal.getErrorOutput(), containsString("WARNING: plugin requires additional permissions"));
assertThat(terminal.getOutput(), containsString("-> Downloading"));
Expand Down Expand Up @@ -1529,6 +1531,7 @@ private void assertPolicyConfirmation(Tuple<Path, Environment> pathEnvironmentTu
}

public void testPolicyConfirmation() throws Exception {
assumeTrue("security policy parsing only available with SecurityManager", RuntimeVersionFeature.isSecurityManagerAvailable());
writePluginSecurityPolicy(pluginDir, "getClassLoader", "setFactory");
InstallablePlugin pluginZip = createPluginZip("fake", pluginDir);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@

import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.util.concurrent.EsExecutors;
import org.elasticsearch.core.IOUtils;
import org.elasticsearch.core.Strings;
import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.ESTestCase.WithoutSecurityManager;
import org.junit.AfterClass;
import org.junit.BeforeClass;

import java.io.BufferedReader;
import java.io.IOException;
Expand Down Expand Up @@ -44,6 +47,19 @@ public class JvmOptionsParserTests extends ESTestCase {

private static final Map<String, String> TEST_SYSPROPS = Map.of("os.name", "Linux", "os.arch", "aarch64");

private static final Path ENTITLEMENTS_LIB_DIR = Path.of("lib", "entitlement-bridge");

@BeforeClass
public static void beforeClass() throws IOException {
Files.createDirectories(ENTITLEMENTS_LIB_DIR);
Files.createTempFile(ENTITLEMENTS_LIB_DIR, "mock-entitlements-bridge", ".jar");
}

@AfterClass
public static void afterClass() throws IOException {
IOUtils.rm(Path.of("lib"));
}

public void testSubstitution() {
final List<String> jvmOptions = JvmOptionsParser.substitutePlaceholders(
List.of("-Djava.io.tmpdir=${ES_TMPDIR}"),
Expand Down
2 changes: 1 addition & 1 deletion docs/changelog/112903.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ breaking:
`single-node`.
impact: >-
Remove any value for `discovery.type` from your `elasticsearch.yml`
configuration file.
configuration file except for `multi-node` and `single-node`.
notable: false
5 changes: 5 additions & 0 deletions docs/changelog/113757.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 113757
summary: Store arrays offsets for keyword fields natively with synthetic source instead of falling back to ignored source.
area: Mapping
type: enhancement
issues: []
5 changes: 5 additions & 0 deletions docs/changelog/119995.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 119995
summary: "apm-data: Use representative count as event.success_count if available"
area: Ingest Node
type: bug
issues: []
5 changes: 5 additions & 0 deletions docs/changelog/121948.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 121948
summary: Add initial grammar and changes for FORK
area: ES|QL
type: feature
issues: []
5 changes: 5 additions & 0 deletions docs/changelog/122134.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 122134
summary: Adding integration for VoyageAI embeddings and rerank models
area: Machine Learning
type: enhancement
issues: []
5 changes: 5 additions & 0 deletions docs/changelog/122293.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 122293
summary: Add enterprise license check to inference action for semantic text fields
area: Machine Learning
type: bug
issues: []
6 changes: 6 additions & 0 deletions docs/changelog/122586.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pr: 122586
summary: "ESQL: Fix inconsistent results in using scaled_float field"
area: ES|QL
type: bug
issues:
- 122547
6 changes: 6 additions & 0 deletions docs/changelog/122601.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pr: 122601
summary: Implicit numeric casting for CASE/GREATEST/LEAST
area: ES|QL
type: bug
issues:
- 121890
5 changes: 5 additions & 0 deletions docs/changelog/122660.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 122660
summary: Render `aggregate_metric_double`
area: "ES|QL"
type: enhancement
issues: []
5 changes: 5 additions & 0 deletions docs/changelog/122708.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 122708
summary: Support partial results in CCS in ES|QL
area: ES|QL
type: enhancement
issues: []
6 changes: 6 additions & 0 deletions docs/changelog/122905.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pr: 122905
summary: Updating `TransportRolloverAction.checkBlock` so that non-write-index blocks
do not prevent data stream rollover
area: Data streams
type: bug
issues: []
6 changes: 6 additions & 0 deletions docs/changelog/123005.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pr: 123005
summary: Use min node version to guard injecting settings in logs provider
area: Logs
type: bug
issues:
- 122950
7 changes: 4 additions & 3 deletions docs/reference/migration/apis/data-stream-reindex.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ from the original backing indices are copied to the resulting backing indices.
This api runs in the background because reindexing all indices in a large data stream
is expected to take a large amount of time and resources. The endpoint will return immediately and a persistent
task will be created to run in the background. The current status of the task can be checked with
the <<data-stream-reindex-status-api,reindex status API>>. This status will be available for 24 hours after the task completes, whether
it finished successfully or failed. If the status is still available for a task, the task must be cancelled before it can be re-run.
A running or recently completed data stream reindex task can be cancelled using the <<data-stream-reindex-cancel-api,reindex cancel API>>.
the <<data-stream-reindex-status-api,reindex status API>>. This status will be available for 24 hours after the task
completes, whether it finished successfully or failed. However, only the last status is retained so re-running a reindex
will overwrite the previous status for that data stream. A running or recently completed data stream reindex task can be
cancelled using the <<data-stream-reindex-cancel-api,reindex cancel API>>.

///////////////////////////////////////////////////////////
[source,console]
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/migration/migrate_9_0.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Remove `xpack.searchable.snapshot.allocate_on_rolling_restart` from your setting
Earlier versions of {es} had a `discovery.type` setting which permitted values that referred to legacy discovery types. From v9.0.0 onwards, the only supported values for this setting are `multi-node` (the default) and `single-node`.
*Impact* +
Remove any value for `discovery.type` from your `elasticsearch.yml` configuration file.
Remove any value for `discovery.type` from your `elasticsearch.yml` configuration file except for `multi-node` and `single-node`.
====

[discrete]
Expand Down
Loading

0 comments on commit a8cf2c5

Please sign in to comment.