Commit 0604157
authored
Return partial failures if search was cancelled. (#64382)
In #63520, we started cancelling searches that encounter shard failures and
don't allow partial results. In this case we return an 'all shards failed'
response, since there are no successful responses.
This PR proposes to return a 'partial shards failure' instead. The reasoning:
it's misleading to claim that 'all shards failed' when we only know at least
one shard failed (and preemptively cancelled the rest).1 parent 1ce323e commit 0604157
File tree
3 files changed
+12
-12
lines changed- modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex
- server/src
- internalClusterTest/java/org/elasticsearch/search
- main/java/org/elasticsearch/action/search
3 files changed
+12
-12
lines changedLines changed: 0 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | 3 | | |
7 | 4 | | |
8 | 5 | | |
| |||
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| |||
311 | 312 | | |
312 | 313 | | |
313 | 314 | | |
314 | | - | |
| 315 | + | |
315 | 316 | | |
316 | 317 | | |
317 | 318 | | |
318 | | - | |
319 | | - | |
| 319 | + | |
| 320 | + | |
320 | 321 | | |
321 | 322 | | |
322 | 323 | | |
| |||
Lines changed: 8 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
| 317 | + | |
317 | 318 | | |
318 | 319 | | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
324 | 327 | | |
325 | 328 | | |
326 | 329 | | |
| |||
331 | 334 | | |
332 | 335 | | |
333 | 336 | | |
334 | | - | |
335 | 337 | | |
336 | 338 | | |
337 | 339 | | |
| |||
0 commit comments