From 6a2acd348a79c56bb887d430687e46b32b765e8f Mon Sep 17 00:00:00 2001 From: Nik Everett Date: Thu, 28 Jan 2016 12:34:38 -0500 Subject: [PATCH] Default wait_for_completion to true --- .../reindex/AbstractBaseReindexRestHandler.java | 2 +- .../rest-api-spec/test/reindex/10_basic.yaml | 13 ++----------- .../rest-api-spec/test/reindex/30_search.yaml | 2 -- .../rest-api-spec/test/reindex/40_versioning.yaml | 4 ---- .../rest-api-spec/test/reindex/50_routing.yaml | 2 -- .../rest-api-spec/test/reindex/60_consistency.yaml | 2 -- .../test/update-by-query/10_basic.yaml | 7 +------ .../test/update-by-query/30_new_fields.yaml | 1 - .../test/update-by-query/40_versioning.yaml | 1 - .../test/update-by-query/50_consistency.yaml | 2 -- .../rest-api-spec/test/reindex/10_script.yaml | 9 --------- .../test/update-by-query/10_script.yaml | 5 ----- 12 files changed, 4 insertions(+), 46 deletions(-) diff --git a/plugins/reindex/src/main/java/org/elasticsearch/plugin/reindex/AbstractBaseReindexRestHandler.java b/plugins/reindex/src/main/java/org/elasticsearch/plugin/reindex/AbstractBaseReindexRestHandler.java index ab4fbcc72b1..ab5121954c6 100644 --- a/plugins/reindex/src/main/java/org/elasticsearch/plugin/reindex/AbstractBaseReindexRestHandler.java +++ b/plugins/reindex/src/main/java/org/elasticsearch/plugin/reindex/AbstractBaseReindexRestHandler.java @@ -53,7 +53,7 @@ public abstract class AbstractBaseReindexRestHandler(channel)); return; } diff --git a/plugins/reindex/src/test/resources/rest-api-spec/test/reindex/10_basic.yaml b/plugins/reindex/src/test/resources/rest-api-spec/test/reindex/10_basic.yaml index 86e48ee945a..623a5b07228 100644 --- a/plugins/reindex/src/test/resources/rest-api-spec/test/reindex/10_basic.yaml +++ b/plugins/reindex/src/test/resources/rest-api-spec/test/reindex/10_basic.yaml @@ -11,7 +11,6 @@ - do: reindex: - wait_for_completion: true body: source: index: source @@ -43,7 +42,6 @@ - do: reindex: - wait_for_completion: true body: source: index: source @@ -57,7 +55,7 @@ - is_true: took --- -"wait_for_completion=true": +"wait_for_completion=false": - do: index: index: source @@ -69,6 +67,7 @@ - do: reindex: + wait_for_completion: false body: source: index: source @@ -104,7 +103,6 @@ - do: catch: conflict reindex: - wait_for_completion: true body: source: index: source @@ -144,7 +142,6 @@ - do: reindex: - wait_for_completion: true body: conflicts: proceed source: @@ -172,7 +169,6 @@ - do: reindex: - wait_for_completion: true refresh: true body: source: @@ -205,7 +201,6 @@ - do: reindex: refresh: true - wait_for_completion: true body: source: index: twitter @@ -238,7 +233,6 @@ - do: reindex: refresh: true - wait_for_completion: true body: source: index: twitter @@ -273,7 +267,6 @@ - do: reindex: refresh: true - wait_for_completion: true body: source: index: twitter @@ -308,7 +301,6 @@ - do: reindex: refresh: true - wait_for_completion: true body: source: index: [twitter, blog] @@ -356,7 +348,6 @@ - do: reindex: refresh: true - wait_for_completion: true body: size: 1 source: diff --git a/plugins/reindex/src/test/resources/rest-api-spec/test/reindex/30_search.yaml b/plugins/reindex/src/test/resources/rest-api-spec/test/reindex/30_search.yaml index b441342f2da..0cfb1355008 100644 --- a/plugins/reindex/src/test/resources/rest-api-spec/test/reindex/30_search.yaml +++ b/plugins/reindex/src/test/resources/rest-api-spec/test/reindex/30_search.yaml @@ -18,7 +18,6 @@ - do: reindex: refresh: true - wait_for_completion: true body: source: index: test @@ -53,7 +52,6 @@ - do: reindex: refresh: true - wait_for_completion: true body: size: 1 source: diff --git a/plugins/reindex/src/test/resources/rest-api-spec/test/reindex/40_versioning.yaml b/plugins/reindex/src/test/resources/rest-api-spec/test/reindex/40_versioning.yaml index fdada709095..7a06ea082aa 100644 --- a/plugins/reindex/src/test/resources/rest-api-spec/test/reindex/40_versioning.yaml +++ b/plugins/reindex/src/test/resources/rest-api-spec/test/reindex/40_versioning.yaml @@ -30,7 +30,6 @@ - do: reindex: refresh: true - wait_for_completion: true body: source: index: src @@ -76,7 +75,6 @@ - do: reindex: refresh: true - wait_for_completion: true body: conflicts: proceed source: @@ -124,7 +122,6 @@ - do: reindex: refresh: true - wait_for_completion: true body: source: index: src @@ -169,7 +166,6 @@ - do: reindex: refresh: true - wait_for_completion: true body: source: index: src diff --git a/plugins/reindex/src/test/resources/rest-api-spec/test/reindex/50_routing.yaml b/plugins/reindex/src/test/resources/rest-api-spec/test/reindex/50_routing.yaml index 06550b51c78..9a6b7245c4f 100644 --- a/plugins/reindex/src/test/resources/rest-api-spec/test/reindex/50_routing.yaml +++ b/plugins/reindex/src/test/resources/rest-api-spec/test/reindex/50_routing.yaml @@ -12,7 +12,6 @@ - do: reindex: refresh: true - wait_for_completion: true body: source: index: src @@ -43,7 +42,6 @@ - do: reindex: refresh: true - wait_for_completion: true body: source: index: src diff --git a/plugins/reindex/src/test/resources/rest-api-spec/test/reindex/60_consistency.yaml b/plugins/reindex/src/test/resources/rest-api-spec/test/reindex/60_consistency.yaml index b60b7e957ad..323e51b1149 100644 --- a/plugins/reindex/src/test/resources/rest-api-spec/test/reindex/60_consistency.yaml +++ b/plugins/reindex/src/test/resources/rest-api-spec/test/reindex/60_consistency.yaml @@ -23,7 +23,6 @@ catch: unavailable reindex: timeout: 1s - wait_for_completion: true body: source: index: src @@ -35,7 +34,6 @@ - do: reindex: consistency: one - wait_for_completion: true body: source: index: src diff --git a/plugins/reindex/src/test/resources/rest-api-spec/test/update-by-query/10_basic.yaml b/plugins/reindex/src/test/resources/rest-api-spec/test/update-by-query/10_basic.yaml index 13808dfdd2e..5674932f6ed 100644 --- a/plugins/reindex/src/test/resources/rest-api-spec/test/update-by-query/10_basic.yaml +++ b/plugins/reindex/src/test/resources/rest-api-spec/test/update-by-query/10_basic.yaml @@ -12,7 +12,6 @@ - do: update-by-query: index: test - wait_for_completion: true - match: {updated: 1} - match: {version_conflicts: 0} - match: {batches: 1} @@ -34,6 +33,7 @@ - do: update-by-query: + wait_for_completion: false index: test - is_true: task.node - is_true: task.id @@ -72,7 +72,6 @@ catch: conflict update-by-query: index: test - wait_for_completion: true - match: {updated: 0} - match: {version_conflicts: 1} - match: {batches: 1} @@ -113,7 +112,6 @@ update-by-query: index: test conflicts: proceed - wait_for_completion: true - match: {updated: 0} - match: {version_conflicts: 1} - match: {batches: 1} @@ -141,7 +139,6 @@ - do: update-by-query: index: twitter - wait_for_completion: true body: query: match: @@ -172,7 +169,6 @@ - do: update-by-query: index: twitter - wait_for_completion: true size: 1 - match: {updated: 1} - match: {version_conflicts: 0} @@ -213,5 +209,4 @@ update-by-query: index: test scroll_size: 1 - wait_for_completion: true - match: {batches: 3} diff --git a/plugins/reindex/src/test/resources/rest-api-spec/test/update-by-query/30_new_fields.yaml b/plugins/reindex/src/test/resources/rest-api-spec/test/update-by-query/30_new_fields.yaml index f47f3417061..269450b3dba 100644 --- a/plugins/reindex/src/test/resources/rest-api-spec/test/update-by-query/30_new_fields.yaml +++ b/plugins/reindex/src/test/resources/rest-api-spec/test/update-by-query/30_new_fields.yaml @@ -45,7 +45,6 @@ - do: update-by-query: index: test - wait_for_completion: true - do: indices.refresh: {} diff --git a/plugins/reindex/src/test/resources/rest-api-spec/test/update-by-query/40_versioning.yaml b/plugins/reindex/src/test/resources/rest-api-spec/test/update-by-query/40_versioning.yaml index 7bbe627d261..24cbef1a25c 100644 --- a/plugins/reindex/src/test/resources/rest-api-spec/test/update-by-query/40_versioning.yaml +++ b/plugins/reindex/src/test/resources/rest-api-spec/test/update-by-query/40_versioning.yaml @@ -12,7 +12,6 @@ - do: update-by-query: index: test - wait_for_completion: true - match: {updated: 1} - match: {version_conflicts: 0} diff --git a/plugins/reindex/src/test/resources/rest-api-spec/test/update-by-query/50_consistency.yaml b/plugins/reindex/src/test/resources/rest-api-spec/test/update-by-query/50_consistency.yaml index fa29206633a..dc8e3dcb33e 100644 --- a/plugins/reindex/src/test/resources/rest-api-spec/test/update-by-query/50_consistency.yaml +++ b/plugins/reindex/src/test/resources/rest-api-spec/test/update-by-query/50_consistency.yaml @@ -24,7 +24,6 @@ update-by-query: index: test timeout: 1s - wait_for_completion: true - match: failures.0.cause.reason: /Not.enough.active.copies.to.meet.write.consistency.of.\[QUORUM\].\(have.1,.needed.4\)..Timeout\:.\[1s\],.request:.\[BulkShardRequest.to.\[test\].containing.\[1\].requests\]/ @@ -32,7 +31,6 @@ update-by-query: index: test consistency: one - wait_for_completion: true - match: {failures: []} - match: {updated: 1} - match: {version_conflicts: 0} diff --git a/qa/smoke-test-reindex-with-groovy/src/test/resources/rest-api-spec/test/reindex/10_script.yaml b/qa/smoke-test-reindex-with-groovy/src/test/resources/rest-api-spec/test/reindex/10_script.yaml index 903a4efde78..d37a94deea7 100644 --- a/qa/smoke-test-reindex-with-groovy/src/test/resources/rest-api-spec/test/reindex/10_script.yaml +++ b/qa/smoke-test-reindex-with-groovy/src/test/resources/rest-api-spec/test/reindex/10_script.yaml @@ -12,7 +12,6 @@ - do: reindex: refresh: true - wait_for_completion: true body: source: index: twitter @@ -52,7 +51,6 @@ - do: reindex: refresh: true - wait_for_completion: true body: source: index: twitter @@ -112,7 +110,6 @@ - do: reindex: refresh: true - wait_for_completion: true body: source: index: twitter @@ -156,7 +153,6 @@ - do: reindex: refresh: true - wait_for_completion: true body: source: index: twitter @@ -215,7 +211,6 @@ - do: reindex: refresh: true - wait_for_completion: true body: source: index: twitter @@ -261,7 +256,6 @@ - do: reindex: refresh: true - wait_for_completion: true body: source: index: twitter @@ -309,7 +303,6 @@ - do: reindex: - wait_for_completion: true body: source: index: twitter @@ -343,7 +336,6 @@ - do: reindex: - wait_for_completion: true refresh: true body: source: @@ -385,7 +377,6 @@ - do: reindex: refresh: true - wait_for_completion: true body: source: index: twitter diff --git a/qa/smoke-test-reindex-with-groovy/src/test/resources/rest-api-spec/test/update-by-query/10_script.yaml b/qa/smoke-test-reindex-with-groovy/src/test/resources/rest-api-spec/test/update-by-query/10_script.yaml index 96ecdf9ffa8..a5a8554615a 100644 --- a/qa/smoke-test-reindex-with-groovy/src/test/resources/rest-api-spec/test/update-by-query/10_script.yaml +++ b/qa/smoke-test-reindex-with-groovy/src/test/resources/rest-api-spec/test/update-by-query/10_script.yaml @@ -13,7 +13,6 @@ update-by-query: index: twitter refresh: true - wait_for_completion: true body: script: inline: ctx._source.user = "not" + ctx._source.user @@ -50,7 +49,6 @@ update-by-query: refresh: true index: twitter - wait_for_completion: true body: script: inline: if (ctx._source.user == "kimchy") {ctx._source.user = "not" + ctx._source.user} else {ctx.op = "noop"} @@ -96,7 +94,6 @@ update-by-query: refresh: true index: twitter - wait_for_completion: true body: script: inline: ctx.op = "noop" @@ -119,7 +116,6 @@ catch: /Invalid fields added to ctx \[junk\]/ update-by-query: index: twitter - wait_for_completion: true body: script: inline: ctx.junk = "stuff" @@ -139,7 +135,6 @@ catch: /Modifying \[_id\] not allowed/ update-by-query: index: twitter - wait_for_completion: true body: script: inline: ctx._id = "stuff"