Skip to content

Conversation

@opensearch-trigger-bot
Copy link
Contributor

Backport 36acc7b from #1615.

…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]>
(cherry picked from commit 36acc7b)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@codecov
Copy link

codecov bot commented Dec 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.45%. Comparing base (71bb85d) to head (d119baa).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##                3.3    #1625      +/-   ##
============================================
+ Coverage     81.44%   81.45%   +0.01%     
- Complexity     6135     6142       +7     
============================================
  Files           542      542              
  Lines         24898    24894       -4     
  Branches       2540     2540              
============================================
  Hits          20278    20278              
- Misses         3353     3354       +1     
+ Partials       1267     1262       -5     
Flag Coverage Δ
plugin 81.45% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...opensearch/timeseries/indices/IndexManagement.java 72.98% <100.00%> (-0.16%) ⬇️

... and 11 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant