Commit 3fdfe51
ES|QL CCS uses skip_unavailable setting for handling disconnected remote clusters (elastic#115266)
As part of ES|QL planning of a cross-cluster search, a field-caps call is done to each cluster and,
if an ENRICH command is present, the enrich policy-resolve API is called on each remote. If a
remote cluster cannot be connected to in these calls, the outcome depends on the
skip_unavailable setting.
For skip_unavailable=false clusters, the error is fatal and the error will immediately be propagated
back to the client with a top level error message with a 500 HTTP status response code.
For skip_unavailable=true clusters, the error is not fatal. The error will be trapped, recorded in the
EsqlExecutionInfo object for the query, marking the cluster as SKIPPED. If the user requested
CCS metadata to be included, the cluster status and connection failure will be present in the
_clusters/details section of the response.
If no clusters can be contacted, if they are all marked as skip_unavailable=true, no error will be
returned. Instead a 200 HTTP status will be returned with no column and no values. If the
include_ccs_metadata: true setting was included on the query, the errors will listed in the
_clusters metadata section. (Note: this is also how the _search endpoint works for CCS.)
Partially addresses elastic#1145311 parent 2f75377 commit 3fdfe51
File tree
17 files changed
+1819
-144
lines changed- docs/changelog
- server/src/main/java/org/elasticsearch
- x-pack/plugin
- esql/src
- internalClusterTest/java/org/elasticsearch/xpack/esql/action
- main/java/org/elasticsearch/xpack/esql
- action
- analysis
- enrich
- index
- session
- test/java/org/elasticsearch/xpack/esql
- action
- plugin
- session
- security/qa/multi-cluster/src/javaRestTest/java/org/elasticsearch/xpack/remotecluster
17 files changed
+1819
-144
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
| 188 | + | |
188 | 189 | | |
189 | 190 | | |
190 | 191 | | |
| |||
Lines changed: 690 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 525 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
246 | 247 | | |
247 | 248 | | |
248 | 249 | | |
249 | | - | |
| 250 | + | |
| 251 | + | |
250 | 252 | | |
251 | 253 | | |
252 | 254 | | |
| |||
499 | 501 | | |
500 | 502 | | |
501 | 503 | | |
502 | | - | |
| 504 | + | |
503 | 505 | | |
504 | 506 | | |
505 | 507 | | |
| |||
803 | 805 | | |
804 | 806 | | |
805 | 807 | | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
806 | 816 | | |
807 | 817 | | |
808 | 818 | | |
| |||
Lines changed: 38 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
281 | 282 | | |
282 | 283 | | |
283 | 284 | | |
| 285 | + | |
284 | 286 | | |
285 | 287 | | |
286 | 288 | | |
| |||
300 | 302 | | |
301 | 303 | | |
302 | 304 | | |
303 | | - | |
| 305 | + | |
304 | 306 | | |
305 | 307 | | |
306 | 308 | | |
| |||
312 | 314 | | |
313 | 315 | | |
314 | 316 | | |
315 | | - | |
| 317 | + | |
316 | 318 | | |
317 | 319 | | |
318 | 320 | | |
| |||
324 | 326 | | |
325 | 327 | | |
326 | 328 | | |
327 | | - | |
| 329 | + | |
328 | 330 | | |
329 | 331 | | |
330 | 332 | | |
| |||
336 | 338 | | |
337 | 339 | | |
338 | 340 | | |
| 341 | + | |
339 | 342 | | |
340 | 343 | | |
341 | 344 | | |
| |||
349 | 352 | | |
350 | 353 | | |
351 | 354 | | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
352 | 360 | | |
353 | 361 | | |
354 | 362 | | |
| |||
362 | 370 | | |
363 | 371 | | |
364 | 372 | | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
365 | 378 | | |
366 | 379 | | |
367 | 380 | | |
| |||
375 | 388 | | |
376 | 389 | | |
377 | 390 | | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
378 | 394 | | |
379 | 395 | | |
380 | 396 | | |
| |||
387 | 403 | | |
388 | 404 | | |
389 | 405 | | |
390 | | - | |
391 | 406 | | |
392 | 407 | | |
393 | 408 | | |
394 | 409 | | |
395 | 410 | | |
| 411 | + | |
396 | 412 | | |
397 | 413 | | |
398 | 414 | | |
| |||
408 | 424 | | |
409 | 425 | | |
410 | 426 | | |
411 | | - | |
| 427 | + | |
412 | 428 | | |
413 | 429 | | |
414 | 430 | | |
415 | 431 | | |
416 | 432 | | |
417 | 433 | | |
| 434 | + | |
418 | 435 | | |
419 | 436 | | |
420 | 437 | | |
421 | 438 | | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | 439 | | |
428 | 440 | | |
429 | 441 | | |
| |||
449 | 461 | | |
450 | 462 | | |
451 | 463 | | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
452 | 469 | | |
453 | 470 | | |
454 | 471 | | |
| |||
466 | 483 | | |
467 | 484 | | |
468 | 485 | | |
469 | | - | |
470 | 486 | | |
471 | 487 | | |
472 | 488 | | |
| |||
483 | 499 | | |
484 | 500 | | |
485 | 501 | | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
486 | 509 | | |
487 | 510 | | |
488 | 511 | | |
| |||
529 | 552 | | |
530 | 553 | | |
531 | 554 | | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
532 | 559 | | |
533 | 560 | | |
534 | 561 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
54 | 63 | | |
55 | 64 | | |
56 | 65 | | |
| |||
Lines changed: 60 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| 54 | + | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| |||
113 | 115 | | |
114 | 116 | | |
115 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
116 | 132 | | |
117 | 133 | | |
118 | 134 | | |
119 | 135 | | |
120 | | - | |
| 136 | + | |
121 | 137 | | |
| 138 | + | |
122 | 139 | | |
123 | 140 | | |
124 | 141 | | |
| |||
149 | 166 | | |
150 | 167 | | |
151 | 168 | | |
152 | | - | |
153 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
154 | 173 | | |
155 | 174 | | |
156 | 175 | | |
157 | 176 | | |
158 | 177 | | |
| 178 | + | |
159 | 179 | | |
160 | 180 | | |
161 | 181 | | |
| |||
261 | 281 | | |
262 | 282 | | |
263 | 283 | | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
268 | 288 | | |
269 | 289 | | |
270 | 290 | | |
271 | 291 | | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
280 | 312 | | |
281 | 313 | | |
282 | 314 | | |
| |||
323 | 355 | | |
324 | 356 | | |
325 | 357 | | |
| 358 | + | |
| 359 | + | |
326 | 360 | | |
327 | 361 | | |
328 | 362 | | |
329 | 363 | | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
330 | 375 | | |
331 | 376 | | |
332 | 377 | | |
333 | 378 | | |
334 | 379 | | |
335 | 380 | | |
| 381 | + | |
336 | 382 | | |
337 | 383 | | |
338 | 384 | | |
| |||
0 commit comments