Skip to content

Commit

Permalink
Merge branch 'upstream/master' into rollup-index-improvement
Browse files Browse the repository at this point in the history
* upstream/master: (100 commits)
  Avoid duplicate _type fields in v7 compat layer (elastic#83239)
  Bump bundled JDK to 17.0.2+8 (elastic#83243)
  [DOCS] Correct header syntax (elastic#83275)
  Add unit tests for indices.recovery.max_bytes_per_sec default values (elastic#83261)
  [DOCS] Add note that write indices are not replicated (elastic#82997)
  Add notes on indexing to kNN search guide (elastic#83188)
  Fix get-snapshot-api :docs:integTest (elastic#83273)
  FilterPathBasedFilter support match fieldname with dot (elastic#83178)
  Fix compilation issues in example-plugins (elastic#83258)
  fix ClusterStateListener javadoc (elastic#83246)
  Speed up Building Indices Lookup in Metadata (elastic#83241)
  Mute whole suite for elastic#82502 (elastic#83252)
  Make PeerFinder log messages happier (elastic#83222)
  [Docs] Add supported _terms_enum field types (elastic#83244)
  Add an aggregator for IPv4 and IPv6 subnets (elastic#82410)
  [CI] Fix 70_time_series/default sort yaml test failures (elastic#83217)
  Update test-failure Issue Template to include "needs:triage" label elastic#83226
  Add an index->step cache to the PolicyStepsRegistry (elastic#82316)
  Improve support for joda datetime to java datetime transition in Painless (elastic#83099)
  Fix joda migration for week based methods in Painless (elastic#83232)
  ...

# Conflicts:
#	x-pack/plugin/rollup/src/main/java/org/elasticsearch/xpack/rollup/v2/TransportRollupAction.java
  • Loading branch information
weizijun committed Jan 31, 2022
2 parents 531263c + 87ee045 commit b996c80
Show file tree
Hide file tree
Showing 612 changed files with 14,979 additions and 4,607 deletions.
44 changes: 0 additions & 44 deletions .github/ISSUE_TEMPLATE/bug.md

This file was deleted.

70 changes: 70 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Bug
description: "Report a confirmed bug. For unconfirmed bugs please visit https://discuss.elastic.co/c/elasticsearch"
labels: [">bug", "needs:triage"]
body:
- type: markdown
attributes:
value: |
Github is reserved for bug reports and feature requests; it is
not the place for general questions. If you have a question or
an unconfirmed bug, please visit the [forums](https://discuss.elastic.co/c/elasticsearch).
Please also check your OS is [supported](https://www.elastic.co/support/matrix#show_os).
If it is not, the issue is likely to be closed.
For security vulnerabilities please only send reports to [email protected].
See https://www.elastic.co/community/security for more information.
Please fill in the following details to help us reproduce the bug:
- type: input
id: es_version
attributes:
label: Elasticsearch Version
description: The version of Elasticsearch you are running, found with `bin/elasticsearch --version`
validations:
required: true
- type: input
id: plugins
attributes:
label: Installed Plugins
description: Comma separated list of plugins that you have installed
validations:
required: false
- type: input
id: java_version
attributes:
label: Java Version
description: The version of Java Elasticsearch is running with, found with `java -version`
value: _bundled_
validations:
required: true
- type: input
id: os_version
attributes:
label: OS Version
description: The version of your operating system, found with `uname -a` of on unix-like system
validations:
required: true
- type: textarea
id: problem
attributes:
label: Problem Description
description: A description of the problem including expected versus actual behavior
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to Reproduce
description: |
A minimal but complete recreation of the problem including (e.g.) index
creation, mappings, settings, query etc. The easier you make for us to
reproduce it, the more likely that somebody will take the time to look at it.
validations:
required: true
- type: textarea
id: logs
attributes:
label: Logs (if relevant)
description: Any log relevant log messages or snippets
validations:
required: false
21 changes: 0 additions & 21 deletions .github/ISSUE_TEMPLATE/feature-request.md

This file was deleted.

19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Feature Request
description: Request a new feature we haven't thought of
labels: [">enhancement", "needs:triage"]
body:
- type: markdown
attributes:
value: |
Please first search existing issues for the feature you are requesting;
it may already exist, even as a closed issue.
- type: textarea
id: description
attributes:
label: Description
description: |
Please give us as much context as possible about the feature. For example,
you could include a story about a time when you wanted to use the feature,
and also tell us what you had to do instead. The last part is helpful
because it gives us an idea of how much harder your life is without the
feature.
28 changes: 0 additions & 28 deletions .github/ISSUE_TEMPLATE/test-failure.md

This file was deleted.

52 changes: 52 additions & 0 deletions .github/ISSUE_TEMPLATE/test-failure.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Test Failure
description: A test failure in CI
labels: [">test-failure","needs:triage"]
body:
- type: markdown
attributes:
value: Please fill out the following information, and ensure you have attempted to reproduce locally
- type: input
id: link
attributes:
label: CI Link
description: A link to a Gradle buildscan (preferred) or Jenkins job with the failure
validations:
required: true
- type: input
id: repro_line
attributes:
label: Repro line
description: The reproduce line from the build output
validations:
required: true
- type: dropdown
id: reproducible
attributes:
label: Does it reproduce?
options:
- "Yes"
- "No"
- "Didn't try"
validations:
required: true
- type: input
id: branches
attributes:
label: Applicable branches
description: Branch names this failure has occurred on
validations:
required: true
- type: input
id: history
attributes:
label: Failure history
description: Link to build stats and possible indication of when this started failing and how often
validations:
required: false
- type: textarea
id: excerpt
attributes:
label: Failure excerpt
description: The error or exception that occurs
validations:
required: true
2 changes: 1 addition & 1 deletion TESTING.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ version 5.3.2 run:
./gradlew v5.3.2#bwcTest
-------------------------------------------------

Use -Dtest.class and -Dtests.method to run a specific bwcTest test.
Use -Dtests.class and -Dtests.method to run a specific bwcTest test.
For example to run a specific tests from the x-pack rolling upgrade from 7.7.0:
-------------------------------------------------
./gradlew :x-pack:qa:rolling-upgrade:v7.7.0#bwcTest \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
import org.elasticsearch.index.fielddata.IndexFieldData;
import org.elasticsearch.index.fielddata.IndexFieldDataCache;
import org.elasticsearch.index.mapper.MappedFieldType;
import org.elasticsearch.index.mapper.NestedLookup;
import org.elasticsearch.index.mapper.NumberFieldMapper;
import org.elasticsearch.index.mapper.NumberFieldMapper.NumberType;
import org.elasticsearch.index.mapper.ObjectMapper;
import org.elasticsearch.index.query.QueryBuilder;
import org.elasticsearch.index.query.support.NestedScope;
import org.elasticsearch.indices.breaker.CircuitBreakerService;
Expand Down Expand Up @@ -277,7 +277,7 @@ public Optional<SortAndFormats> buildSort(List<SortBuilder<?>> sortBuilders) thr
}

@Override
public ObjectMapper getObjectMapper(String path) {
public NestedLookup nestedLookup() {
throw new UnsupportedOperationException();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public void setup() throws IOException {
);
includesSet = Set.of(fetchContext.includes());
excludesSet = Set.of(fetchContext.excludes());
parserConfig = XContentParserConfiguration.EMPTY.withFiltering(includesSet, excludesSet);
parserConfig = XContentParserConfiguration.EMPTY.withFiltering(includesSet, excludesSet, false);
}

private BytesReference read300BytesExample() throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public class FilterContentBenchmark {
private BytesReference source;
private XContentParserConfiguration parserConfig;
private Set<String> filters;
private XContentParserConfiguration parserConfigMatchDotsInFieldNames;

@Setup
public void setup() throws IOException {
Expand All @@ -72,7 +73,8 @@ public void setup() throws IOException {
};
source = readSource(sourceFile);
filters = buildFilters();
parserConfig = buildParseConfig();
parserConfig = buildParseConfig(false);
parserConfigMatchDotsInFieldNames = buildParseConfig(true);
}

private Set<String> buildFilters() {
Expand Down Expand Up @@ -105,9 +107,14 @@ public BytesReference filterWithParserConfigCreated() throws IOException {
return filter(this.parserConfig);
}

@Benchmark
public BytesReference filterWithParserConfigCreatedMatchDotsInFieldNames() throws IOException {
return filter(this.parserConfigMatchDotsInFieldNames);
}

@Benchmark
public BytesReference filterWithNewParserConfig() throws IOException {
XContentParserConfiguration contentParserConfiguration = buildParseConfig();
XContentParserConfiguration contentParserConfiguration = buildParseConfig(false);
return filter(contentParserConfiguration);
}

Expand Down Expand Up @@ -152,7 +159,7 @@ public BytesReference filterWithBuilder() throws IOException {
}
}

private XContentParserConfiguration buildParseConfig() {
private XContentParserConfiguration buildParseConfig(boolean matchDotsInFieldNames) {
Set<String> includes;
Set<String> excludes;
if (inclusive) {
Expand All @@ -162,7 +169,7 @@ private XContentParserConfiguration buildParseConfig() {
includes = null;
excludes = filters;
}
return XContentParserConfiguration.EMPTY.withFiltering(includes, excludes);
return XContentParserConfiguration.EMPTY.withFiltering(includes, excludes, matchDotsInFieldNames);
}

private BytesReference filter(XContentParserConfiguration contentParserConfiguration) throws IOException {
Expand Down
25 changes: 16 additions & 9 deletions build-tools-internal/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -202,14 +202,9 @@ configurations {
integTestRuntimeOnly.extendsFrom(testRuntimeOnly)
}
dependencies {
constraints {
api("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:${versions.getProperty('jackson')}") {
version {
strictly "${versions.getProperty('jackson')}"
}
because 'We want to use the exact same jackson version we use in production'
}
}
components.all(JacksonAlignmentRule)
// Forcefully downgrade the jackson platform as used in production
api enforcedPlatform("com.fasterxml.jackson:jackson-bom:${versions.getProperty('jackson')}")
api localGroovy()
api gradleApi()

Expand All @@ -230,7 +225,8 @@ dependencies {
api 'de.thetaphi:forbiddenapis:3.2'
api 'com.avast.gradle:gradle-docker-compose-plugin:0.14.13'
api 'org.apache.maven:maven-model:3.6.2'
api 'com.networknt:json-schema-validator:1.0.65'
// needs to match the jackson minor version in use
api 'com.networknt:json-schema-validator:1.0.49'
api "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:${versions.getProperty('jackson')}"
api 'org.ow2.asm:asm:9.2'
api 'org.ow2.asm:asm-tree:9.2'
Expand Down Expand Up @@ -298,3 +294,14 @@ tasks.register("bootstrapPerformanceTests", Copy) {
def root = file('..')
filter(ReplaceTokens, tokens: [testGitCommit:GitInfo.gitInfo(root).revision])
}

abstract class JacksonAlignmentRule implements ComponentMetadataRule {
void execute(ComponentMetadataContext ctx) {
ctx.details.with {d ->
if (d.id.group.startsWith("com.fasterxml.jackson")) {
// declare that Jackson modules all belong to the Jackson virtual platform
belongsTo("com.fasterxml.jackson:jackson-bom:${d.id.version}")
}
}
}
}
Loading

0 comments on commit b996c80

Please sign in to comment.