[ML] Refresh index after delete (elastic/x-pack-elasticsearch#1675)
Original commit: elastic/x-pack-elasticsearch@fbbcd0343e
This commit is contained in:
parent
d64bea14dc
commit
02a241bdf5
|
@ -114,6 +114,7 @@ public class JobStorageDeletionTask extends Task {
|
|||
searchRequest.source(new SearchSourceBuilder().query(query));
|
||||
searchRequest.indicesOptions(JobProvider.addIgnoreUnavailable(IndicesOptions.lenientExpandOpen()));
|
||||
request.setAbortOnVersionConflict(false);
|
||||
request.setRefresh(true);
|
||||
|
||||
client.execute(DeleteByQueryAction.INSTANCE, request, ActionListener.wrap(
|
||||
response -> finishedHandler.onResponse(true),
|
||||
|
@ -149,6 +150,7 @@ public class JobStorageDeletionTask extends Task {
|
|||
searchRequest.source(new SearchSourceBuilder().query(query));
|
||||
searchRequest.indicesOptions(JobProvider.addIgnoreUnavailable(IndicesOptions.lenientExpandOpen()));
|
||||
request.setAbortOnVersionConflict(false);
|
||||
request.setRefresh(true);
|
||||
|
||||
client.execute(DeleteByQueryAction.INSTANCE, request, ActionListener.wrap(
|
||||
response -> {
|
||||
|
|
|
@ -180,9 +180,6 @@
|
|||
index: ".ml-anomalies-shared"
|
||||
- is_true: ''
|
||||
|
||||
- do:
|
||||
indices.refresh: {}
|
||||
|
||||
- do:
|
||||
count:
|
||||
index: .ml-state
|
||||
|
@ -249,9 +246,6 @@
|
|||
index: ".ml-anomalies-index-layout-job2"
|
||||
- is_false: ''
|
||||
|
||||
- do:
|
||||
indices.refresh: {}
|
||||
|
||||
- do:
|
||||
count:
|
||||
type: doc
|
||||
|
@ -379,9 +373,6 @@
|
|||
index: "foo"
|
||||
- is_true: ''
|
||||
|
||||
- do:
|
||||
indices.refresh: {}
|
||||
|
||||
- do:
|
||||
count:
|
||||
index: .ml-state
|
||||
|
@ -392,6 +383,9 @@
|
|||
index: .ml-anomalies-shared
|
||||
- match: {count: 0}
|
||||
|
||||
- do:
|
||||
indices.refresh: {}
|
||||
|
||||
- do:
|
||||
count:
|
||||
index: foo
|
||||
|
@ -436,9 +430,6 @@
|
|||
job_id: "index-layout-quantiles-job"
|
||||
- match: { acknowledged: true }
|
||||
|
||||
- do:
|
||||
indices.refresh: {}
|
||||
|
||||
- do:
|
||||
count:
|
||||
index: .ml-state
|
||||
|
@ -509,17 +500,11 @@
|
|||
body:
|
||||
state: more-new-categorizer-state
|
||||
|
||||
- do:
|
||||
indices.refresh: {}
|
||||
|
||||
- do:
|
||||
xpack.ml.delete_job:
|
||||
job_id: "index-layout-state-job"
|
||||
- match: { acknowledged: true }
|
||||
|
||||
- do:
|
||||
indices.refresh: {}
|
||||
|
||||
- do:
|
||||
count:
|
||||
index: .ml-anomalies-shared
|
||||
|
|
Loading…
Reference in New Issue