Skip to content

Commit c1a124c

Browse files
committed
Merge remote-tracking branch 'es/master' into ccr
* es/master: (45 commits) Adapt scroll rest test after backport. relates #27842 Move early termination based on index sort to TopDocs collector (#27666) Upgrade beats templates that we use for bwc testing. (#27929) ingest: upgraded ingest geoip's geoip2's dependencies. [TEST] logging for update by query test #27820 Add elasticsearch-nio jar for base nio classes (#27801) Use full profile on JDK 10 builds Require Gradle 4.3 Enable grok processor to support long, double and boolean (#27896) Add unreleased v6.1.2 version TEST: reduce blob size #testExecuteMultipartUpload Check index under the store metadata lock (#27768) Fixes DocStats to not report index size < -1 (#27863) Fixed test to be up to date with the new database files. Upgrade to Lucene 7.2.0. (#27910) Disable TestZenDiscovery in cloud providers integrations test Use `_refresh` to shrink the version map on inactivity (#27918) Make KeyedLock reentrant (#27920) ingest: Upgraded the geolite2 databases. [Test] Fix IndicesClientDocumentationIT (#27899) ...
2 parents 07c45b3 + c753b82 commit c1a124c

File tree

207 files changed

+9401
-4479
lines changed

Some content is hidden

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

207 files changed

+9401
-4479
lines changed

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ subprojects {
177177
"org.elasticsearch:rest-api-spec:${version}": ':rest-api-spec',
178178
"org.elasticsearch:elasticsearch:${version}": ':core',
179179
"org.elasticsearch:elasticsearch-cli:${version}": ':core:cli',
180+
"org.elasticsearch:elasticsearch-nio:${version}": ':libs:elasticsearch-nio',
180181
"org.elasticsearch.client:elasticsearch-rest-client:${version}": ':client:rest',
181182
"org.elasticsearch.client:elasticsearch-rest-client-sniffer:${version}": ':client:sniffer',
182183
"org.elasticsearch.client:elasticsearch-rest-high-level-client:${version}": ':client:rest-high-level',

buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ class BuildPlugin implements Plugin<Project> {
126126
// enforce Gradle version
127127
final GradleVersion currentGradleVersion = GradleVersion.current();
128128

129-
final GradleVersion minGradle = GradleVersion.version('3.3')
129+
final GradleVersion minGradle = GradleVersion.version('4.3')
130130
if (currentGradleVersion < minGradle) {
131131
throw new GradleException("${minGradle} or above is required to build elasticsearch")
132132
}
@@ -408,7 +408,11 @@ class BuildPlugin implements Plugin<Project> {
408408

409409
/** Adds compiler settings to the project */
410410
static void configureCompile(Project project) {
411-
project.ext.compactProfile = 'compact3'
411+
if (project.javaVersion < JavaVersion.VERSION_1_10) {
412+
project.ext.compactProfile = 'compact3'
413+
} else {
414+
project.ext.compactProfile = 'full'
415+
}
412416
project.afterEvaluate {
413417
project.tasks.withType(JavaCompile) {
414418
File gradleJavaHome = Jvm.current().javaHome
@@ -444,13 +448,6 @@ class BuildPlugin implements Plugin<Project> {
444448
// hack until gradle supports java 9's new "--release" arg
445449
assert minimumJava == JavaVersion.VERSION_1_8
446450
options.compilerArgs << '--release' << '8'
447-
if (GradleVersion.current().getBaseVersion() < GradleVersion.version("4.1")) {
448-
// this hack is not needed anymore since Gradle 4.1, see https://github.com/gradle/gradle/pull/2474
449-
doFirst {
450-
sourceCompatibility = null
451-
targetCompatibility = null
452-
}
453-
}
454451
}
455452
}
456453
}

buildSrc/version.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
elasticsearch = 7.0.0-alpha1
2-
lucene = 7.2.0-snapshot-7deca62
2+
lucene = 7.2.0
33

44
# optional dependencies
55
spatial4j = 0.6

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

Lines changed: 47 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import org.elasticsearch.action.support.ActiveShardCount;
3030
import org.elasticsearch.action.support.IndicesOptions;
3131
import org.elasticsearch.client.ESRestHighLevelClientTestCase;
32+
import org.elasticsearch.client.Response;
3233
import org.elasticsearch.client.RestHighLevelClient;
3334
import org.elasticsearch.common.settings.Settings;
3435
import org.elasticsearch.common.unit.TimeValue;
@@ -86,6 +87,32 @@ public void testDeleteIndex() throws IOException {
8687
boolean acknowledged = deleteIndexResponse.isAcknowledged(); // <1>
8788
// end::delete-index-response
8889
assertTrue(acknowledged);
90+
}
91+
92+
{
93+
// tag::delete-index-notfound
94+
try {
95+
DeleteIndexRequest request = new DeleteIndexRequest("does_not_exist");
96+
client.indices().deleteIndex(request);
97+
} catch (ElasticsearchException exception) {
98+
if (exception.status() == RestStatus.NOT_FOUND) {
99+
// <1>
100+
}
101+
}
102+
// end::delete-index-notfound
103+
}
104+
}
105+
106+
public void testDeleteIndexAsync() throws Exception {
107+
final RestHighLevelClient client = highLevelClient();
108+
109+
{
110+
CreateIndexResponse createIndexResponse = client.indices().createIndex(new CreateIndexRequest("posts"));
111+
assertTrue(createIndexResponse.isAcknowledged());
112+
}
113+
114+
{
115+
DeleteIndexRequest request = new DeleteIndexRequest("posts");
89116

90117
// tag::delete-index-execute-async
91118
client.indices().deleteIndexAsync(request, new ActionListener<DeleteIndexResponse>() {
@@ -100,19 +127,12 @@ public void onFailure(Exception e) {
100127
}
101128
});
102129
// end::delete-index-execute-async
103-
}
104130

105-
{
106-
// tag::delete-index-notfound
107-
try {
108-
DeleteIndexRequest request = new DeleteIndexRequest("does_not_exist");
109-
client.indices().deleteIndex(request);
110-
} catch (ElasticsearchException exception) {
111-
if (exception.status() == RestStatus.NOT_FOUND) {
112-
// <1>
113-
}
114-
}
115-
// end::delete-index-notfound
131+
assertBusy(() -> {
132+
// TODO Use Indices Exist API instead once it exists
133+
Response response = client.getLowLevelClient().performRequest("HEAD", "posts");
134+
assertTrue(RestStatus.NOT_FOUND.getStatus() == response.getStatusLine().getStatusCode());
135+
});
116136
}
117137
}
118138

@@ -174,6 +194,14 @@ public void testCreateIndex() throws IOException {
174194
// end::create-index-response
175195
assertTrue(acknowledged);
176196
assertTrue(shardsAcked);
197+
}
198+
}
199+
200+
public void testCreateIndexAsync() throws Exception {
201+
final RestHighLevelClient client = highLevelClient();
202+
203+
{
204+
CreateIndexRequest request = new CreateIndexRequest("twitter");
177205

178206
// tag::create-index-execute-async
179207
client.indices().createIndexAsync(request, new ActionListener<CreateIndexResponse>() {
@@ -188,6 +216,13 @@ public void onFailure(Exception e) {
188216
}
189217
});
190218
// end::create-index-execute-async
219+
220+
assertBusy(() -> {
221+
// TODO Use Indices Exist API instead once it exists
222+
Response response = client.getLowLevelClient().performRequest("HEAD", "twitter");
223+
assertTrue(RestStatus.OK.getStatus() == response.getStatusLine().getStatusCode());
224+
});
191225
}
192226
}
227+
193228
}

core/licenses/lucene-analyzers-common-7.2.0-snapshot-7deca62.jar.sha1

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
4e1b4638fb8b07befc8175880641f821af3e655a

core/licenses/lucene-backward-codecs-7.2.0-snapshot-7deca62.jar.sha1

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
35f5a26abb7fd466749fea7edfedae7897192e95

core/licenses/lucene-core-7.2.0-snapshot-7deca62.jar.sha1

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
f88107aa577ce8edc0a5cee036b485943107a552

0 commit comments

Comments
 (0)