Commit 36acc7b
authored
fix(forecast): auto-expand replicas for default results index on 3AZ domains (#1615)
When running forecasting on a 3AZ domain with awareness attributes=3, the
forecaster failed to initialize with:
IllegalArgumentException: Validation Failed: 1: expected total copies
needs to be a multiple of total awareness attributes [3];
The default forecast results index was created with:
- number_of_shards: 1
- number_of_replicas: 1
This gives 2 total copies, which violates the 3AZ awareness requirement and
causes index creation to fail, so all forecasting results errored on 3AZ
domains.
This change updates IndexManagement.java to:
- set auto_expand_replicas to "0-2" for the default forecast results index
Single-AZ domains remain replica-free, while 3AZ domains automatically
allocate 2 replicas (3 total copies), satisfying the awareness constraint and
allowing forecasters to initialize successfully.
Test:
1. manual test
Signed-off-by: kaituo <[email protected]>1 parent a6c1916 commit 36acc7b
File tree
5 files changed
+31
-28
lines changed- .github/workflows
- src
- main/java/org/opensearch/timeseries/indices
- test/java/org/opensearch/timeseries
5 files changed
+31
-28
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | 25 | | |
32 | 26 | | |
33 | | - | |
34 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
| |||
45 | 44 | | |
46 | 45 | | |
47 | 46 | | |
48 | | - | |
49 | 47 | | |
50 | | - | |
| 48 | + | |
51 | 49 | | |
52 | | - | |
| 50 | + | |
53 | 51 | | |
54 | 52 | | |
55 | | - | |
| 53 | + | |
56 | 54 | | |
57 | 55 | | |
58 | 56 | | |
59 | 57 | | |
60 | 58 | | |
61 | | - | |
62 | | - | |
| 59 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
Lines changed: 2 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
293 | | - | |
294 | | - | |
| 293 | + | |
| 294 | + | |
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
| |||
1403 | 1403 | | |
1404 | 1404 | | |
1405 | 1405 | | |
1406 | | - | |
1407 | | - | |
1408 | | - | |
1409 | | - | |
1410 | | - | |
1411 | | - | |
1412 | | - | |
1413 | 1406 | | |
1414 | 1407 | | |
1415 | 1408 | | |
| |||
Lines changed: 16 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| |||
438 | 439 | | |
439 | 440 | | |
440 | 441 | | |
441 | | - | |
| 442 | + | |
442 | 443 | | |
443 | 444 | | |
444 | 445 | | |
| |||
450 | 451 | | |
451 | 452 | | |
452 | 453 | | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
453 | 458 | | |
454 | 459 | | |
455 | 460 | | |
456 | | - | |
| 461 | + | |
457 | 462 | | |
458 | 463 | | |
459 | 464 | | |
| |||
462 | 467 | | |
463 | 468 | | |
464 | 469 | | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
465 | 474 | | |
466 | 475 | | |
467 | 476 | | |
| |||
473 | 482 | | |
474 | 483 | | |
475 | 484 | | |
476 | | - | |
| 485 | + | |
477 | 486 | | |
478 | 487 | | |
479 | 488 | | |
| |||
483 | 492 | | |
484 | 493 | | |
485 | 494 | | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
486 | 499 | | |
487 | 500 | | |
488 | 501 | | |
0 commit comments