Skip to content

Commit d98cd31

Browse files
committed
Merge branch '6.x' into ccr-6.x
* 6.x: (41 commits) [TEST] Fix `GeoShapeQueryTests#testPointsOnly` failure Transition transport apis to use void listeners (#27440) AwaitsFix GeoShapeQueryTests#testPointsOnly #27454 Ensure nested documents have consistent version and seq_ids (#27455) Tests: Add Fedora-27 to packaging tests #26800: Fix docs rendering Move the CLI into its own subproject (#27114) Correct usage of "an" to "a" in getting started docs Avoid NPE when getting build information Remove manual tracking of registered channels (#27445) Standardize underscore requirements in parameters (#27414) Remove parameters on HandshakeResponseHandler (#27444) [GEO] fix pointsOnly bug for MULTIPOINT peanut butter hamburgers Uses TransportMasterNodeAction to update shard snapshot status (#27165) Log primary-replica resync failures Add limits for ngram and shingle settings (#27411) Enforce a minimum task execution and service time of 1 nanosecond Fix place-holder in allocation decider messages (#27436) Remove newline from log message (#27425) ...
2 parents 06cacdc + 01bac8d commit d98cd31

File tree

234 files changed

+8424
-2009
lines changed

Some content is hidden

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

234 files changed

+8424
-2009
lines changed

README.textile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,7 @@ In order to create a distribution, simply run the @gradle assemble@ command in t
208208

209209
The distribution for each project will be created under the @build/distributions@ directory in that project.
210210

211-
See the "TESTING":TESTING.asciidoc file for more information about
212-
running the Elasticsearch test suite.
211+
See the "TESTING":TESTING.asciidoc file for more information about running the Elasticsearch test suite.
213212

214213
h3. Upgrading from Elasticsearch 1.x?
215214

TESTING.asciidoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,8 @@ These are the linux flavors the Vagrantfile currently supports:
351351
* debian-9 aka stretch, the current debian stable distribution
352352
* centos-6
353353
* centos-7
354-
* fedora-25
355354
* fedora-26
355+
* fedora-27
356356
* oel-6 aka Oracle Enterprise Linux 6
357357
* oel-7 aka Oracle Enterprise Linux 7
358358
* sles-12
@@ -428,23 +428,23 @@ sudo -E bats $BATS_TESTS/*.bats
428428
You can also use Gradle to prepare the test environment and then starts a single VM:
429429

430430
-------------------------------------------------
431-
gradle vagrantFedora25#up
431+
gradle vagrantFedora27#up
432432
-------------------------------------------------
433433

434434
Or any of vagrantCentos6#up, vagrantCentos7#up, vagrantDebian8#up,
435-
vagrantFedora25#up, vagrantOel6#up, vagrantOel7#up, vagrantOpensuse13#up,
436-
vagrantSles12#up, vagrantUbuntu1404#up, vagrantUbuntu1604#up.
435+
vagrantDebian9#up, vagrantFedora26#up, vagrantFedora27#up, vagrantOel6#up, vagrantOel7#up,
436+
vagrantOpensuse42#up,vagrantSles12#up, vagrantUbuntu1404#up, vagrantUbuntu1604#up.
437437

438438
Once up, you can then connect to the VM using SSH from the elasticsearch directory:
439439

440440
-------------------------------------------------
441-
vagrant ssh fedora-25
441+
vagrant ssh fedora-27
442442
-------------------------------------------------
443443

444444
Or from another directory:
445445

446446
-------------------------------------------------
447-
VAGRANT_CWD=/path/to/elasticsearch vagrant ssh fedora-25
447+
VAGRANT_CWD=/path/to/elasticsearch vagrant ssh fedora-27
448448
-------------------------------------------------
449449

450450
Note: Starting vagrant VM outside of the elasticsearch folder requires to

Vagrantfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,14 @@ Vagrant.configure(2) do |config|
6060
config.vm.box = "elastic/oraclelinux-7-x86_64"
6161
rpm_common config
6262
end
63-
config.vm.define "fedora-25" do |config|
64-
config.vm.box = "elastic/fedora-25-x86_64"
65-
dnf_common config
66-
end
6763
config.vm.define "fedora-26" do |config|
6864
config.vm.box = "elastic/fedora-26-x86_64"
6965
dnf_common config
7066
end
67+
config.vm.define "fedora-27" do |config|
68+
config.vm.box = "elastic/fedora-27-x86_64"
69+
dnf_common config
70+
end
7171
config.vm.define "opensuse-42" do |config|
7272
config.vm.box = "elastic/opensuse-42-x86_64"
7373
opensuse_common config

build.gradle

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ List<Version> versions = []
8181
// keep track of the previous major version's last minor, so we know where wire compat begins
8282
int prevMinorIndex = -1 // index in the versions list of the last minor from the prev major
8383
int lastPrevMinor = -1 // the minor version number from the prev major we most recently seen
84+
int prevBugfixIndex = -1 // index in the versions list of the last bugfix release from the prev major
8485
for (String line : versionLines) {
8586
/* Note that this skips alphas and betas which is fine because they aren't
8687
* compatible with anything. */
@@ -97,12 +98,19 @@ for (String line : versionLines) {
9798
prevMinorIndex = versions.size() - 1
9899
lastPrevMinor = minor
99100
}
101+
if (major == prevMajor) {
102+
prevBugfixIndex = versions.size() - 1
103+
}
100104
}
101105
}
102106
if (versions.toSorted { it.id } != versions) {
103107
println "Versions: ${versions}"
104108
throw new GradleException("Versions.java contains out of order version constants")
105109
}
110+
if (prevBugfixIndex != -1) {
111+
versions[prevBugfixIndex] = new Version(
112+
versions[prevBugfixIndex].major, versions[prevBugfixIndex].minor, versions[prevBugfixIndex].bugfix, true)
113+
}
106114
if (currentVersion.bugfix == 0) {
107115
// If on a release branch, after the initial release of that branch, the bugfix version will
108116
// be bumped, and will be != 0. On master and N.x branches, we want to test against the
@@ -212,6 +220,7 @@ subprojects {
212220
"org.elasticsearch.gradle:build-tools:${version}": ':build-tools',
213221
"org.elasticsearch:rest-api-spec:${version}": ':rest-api-spec',
214222
"org.elasticsearch:elasticsearch:${version}": ':core',
223+
"org.elasticsearch:elasticsearch-cli:${version}": ':core:cli',
215224
"org.elasticsearch.client:elasticsearch-rest-client:${version}": ':client:rest',
216225
"org.elasticsearch.client:elasticsearch-rest-client-sniffer:${version}": ':client:sniffer',
217226
"org.elasticsearch.client:elasticsearch-rest-high-level-client:${version}": ':client:rest-high-level',
@@ -231,6 +240,7 @@ subprojects {
231240
"org.elasticsearch.plugin:parent-join-client:${version}": ':modules:parent-join',
232241
"org.elasticsearch.plugin:aggs-matrix-stats-client:${version}": ':modules:aggs-matrix-stats',
233242
"org.elasticsearch.plugin:percolator-client:${version}": ':modules:percolator',
243+
"org.elasticsearch.plugin:aggs-composite-client:${version}": ':modules:aggs-composite',
234244
]
235245
if (indexCompatVersions[-1].snapshot) {
236246
/* The last and second to last versions can be snapshots. Rather than use
@@ -248,6 +258,11 @@ subprojects {
248258
ext.projectSubstitutions["org.elasticsearch.distribution.rpm:elasticsearch:${indexCompatVersions[-1]}"] = ':distribution:bwc-release-snapshot'
249259
ext.projectSubstitutions["org.elasticsearch.distribution.zip:elasticsearch:${indexCompatVersions[-1]}"] = ':distribution:bwc-release-snapshot'
250260
}
261+
} else if (indexCompatVersions[-2].snapshot) {
262+
/* This is a terrible hack for the bump to 6.0.1 which will be fixed by #27397 */
263+
ext.projectSubstitutions["org.elasticsearch.distribution.deb:elasticsearch:${indexCompatVersions[-2]}"] = ':distribution:bwc-release-snapshot'
264+
ext.projectSubstitutions["org.elasticsearch.distribution.rpm:elasticsearch:${indexCompatVersions[-2]}"] = ':distribution:bwc-release-snapshot'
265+
ext.projectSubstitutions["org.elasticsearch.distribution.zip:elasticsearch:${indexCompatVersions[-2]}"] = ':distribution:bwc-release-snapshot'
251266
}
252267
project.afterEvaluate {
253268
configurations.all {

buildSrc/build.gradle

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
import java.nio.file.Files
2121

22+
import org.gradle.util.GradleVersion
23+
2224
apply plugin: 'groovy'
2325

2426
group = 'org.elasticsearch.gradle'
@@ -99,9 +101,11 @@ dependencies {
99101

100102
// Gradle 2.14+ removed ProgressLogger(-Factory) classes from the public APIs
101103
// Use logging dependency instead
104+
// Gradle 4.3.1 stopped releasing the logging jars to jcenter, just use the last available one
105+
GradleVersion logVersion = GradleVersion.current() > GradleVersion.version('4.3') ? GradleVersion.version('4.3') : GradleVersion.current()
102106

103107
dependencies {
104-
compileOnly "org.gradle:gradle-logging:${GradleVersion.current().getVersion()}"
108+
compileOnly "org.gradle:gradle-logging:${logVersion.getVersion()}"
105109
compile 'ru.vyarus:gradle-animalsniffer-plugin:1.2.0' // Gradle 2.14 requires a version > 1.0.1
106110
}
107111

buildSrc/src/main/groovy/org/elasticsearch/gradle/vagrant/VagrantTestPlugin.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ class VagrantTestPlugin implements Plugin<Project> {
1919
'centos-7',
2020
'debian-8',
2121
'debian-9',
22-
'fedora-25',
2322
'fedora-26',
23+
'fedora-27',
2424
'oel-6',
2525
'oel-7',
2626
'opensuse-42',

client/rest-high-level/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ dependencies {
3939
compile "org.elasticsearch.client:elasticsearch-rest-client:${version}"
4040
compile "org.elasticsearch.plugin:parent-join-client:${version}"
4141
compile "org.elasticsearch.plugin:aggs-matrix-stats-client:${version}"
42-
42+
compile "org.elasticsearch.plugin:aggs-composite-client:${version}"
43+
4344
testCompile "org.elasticsearch.client:test:${version}"
4445
testCompile "org.elasticsearch.test:framework:${version}"
4546
testCompile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}"

client/rest-high-level/src/main/java/org/elasticsearch/client/Request.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -191,23 +191,23 @@ static Request bulk(BulkRequest bulkRequest) throws IOException {
191191
metadata.field("_id", request.id());
192192
}
193193
if (Strings.hasLength(request.routing())) {
194-
metadata.field("_routing", request.routing());
194+
metadata.field("routing", request.routing());
195195
}
196196
if (Strings.hasLength(request.parent())) {
197-
metadata.field("_parent", request.parent());
197+
metadata.field("parent", request.parent());
198198
}
199199
if (request.version() != Versions.MATCH_ANY) {
200-
metadata.field("_version", request.version());
200+
metadata.field("version", request.version());
201201
}
202202

203203
VersionType versionType = request.versionType();
204204
if (versionType != VersionType.INTERNAL) {
205205
if (versionType == VersionType.EXTERNAL) {
206-
metadata.field("_version_type", "external");
206+
metadata.field("version_type", "external");
207207
} else if (versionType == VersionType.EXTERNAL_GTE) {
208-
metadata.field("_version_type", "external_gte");
208+
metadata.field("version_type", "external_gte");
209209
} else if (versionType == VersionType.FORCE) {
210-
metadata.field("_version_type", "force");
210+
metadata.field("version_type", "force");
211211
}
212212
}
213213

@@ -219,7 +219,7 @@ static Request bulk(BulkRequest bulkRequest) throws IOException {
219219
} else if (opType == DocWriteRequest.OpType.UPDATE) {
220220
UpdateRequest updateRequest = (UpdateRequest) request;
221221
if (updateRequest.retryOnConflict() > 0) {
222-
metadata.field("_retry_on_conflict", updateRequest.retryOnConflict());
222+
metadata.field("retry_on_conflict", updateRequest.retryOnConflict());
223223
}
224224
if (updateRequest.fetchSource() != null) {
225225
metadata.field("_source", updateRequest.fetchSource());

client/rest-high-level/src/test/java/org/elasticsearch/client/RestHighLevelClientTests.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
import org.elasticsearch.search.SearchHits;
6363
import org.elasticsearch.search.aggregations.Aggregation;
6464
import org.elasticsearch.search.aggregations.InternalAggregations;
65+
import org.elasticsearch.search.aggregations.composite.CompositeAggregationBuilder;
6566
import org.elasticsearch.search.aggregations.matrix.stats.MatrixStatsAggregationBuilder;
6667
import org.elasticsearch.search.suggest.Suggest;
6768
import org.elasticsearch.test.ESTestCase;
@@ -647,7 +648,7 @@ public void testDefaultNamedXContents() {
647648

648649
public void testProvidedNamedXContents() {
649650
List<NamedXContentRegistry.Entry> namedXContents = RestHighLevelClient.getProvidedNamedXContents();
650-
assertEquals(2, namedXContents.size());
651+
assertEquals(3, namedXContents.size());
651652
Map<Class<?>, Integer> categories = new HashMap<>();
652653
List<String> names = new ArrayList<>();
653654
for (NamedXContentRegistry.Entry namedXContent : namedXContents) {
@@ -658,9 +659,10 @@ public void testProvidedNamedXContents() {
658659
}
659660
}
660661
assertEquals(1, categories.size());
661-
assertEquals(Integer.valueOf(2), categories.get(Aggregation.class));
662+
assertEquals(Integer.valueOf(3), categories.get(Aggregation.class));
662663
assertTrue(names.contains(ChildrenAggregationBuilder.NAME));
663664
assertTrue(names.contains(MatrixStatsAggregationBuilder.NAME));
665+
assertTrue(names.contains(CompositeAggregationBuilder.NAME));
664666
}
665667

666668
private static class TrackingActionListener implements ActionListener<Integer> {

client/transport/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ dependencies {
3232
compile "org.elasticsearch.plugin:lang-mustache-client:${version}"
3333
compile "org.elasticsearch.plugin:percolator-client:${version}"
3434
compile "org.elasticsearch.plugin:parent-join-client:${version}"
35+
compile "org.elasticsearch.plugin:aggs-composite-client:${version}"
3536
testCompile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}"
3637
testCompile "junit:junit:${versions.junit}"
3738
testCompile "org.hamcrest:hamcrest-all:${versions.hamcrest}"

0 commit comments

Comments
 (0)