Skip to content

Choose the best performing node when writing with append only index#20065

Merged
andrross merged 22 commits intoopensearch-project:mainfrom
kkewwei:write_adapt_select
Feb 14, 2026
Merged

Choose the best performing node when writing with append only index#20065
andrross merged 22 commits intoopensearch-project:mainfrom
kkewwei:write_adapt_select

Conversation

@kkewwei
Copy link
Copy Markdown
Contributor

@kkewwei kkewwei commented Nov 21, 2025

Description

We will use the following settings to enable adaptive shard selection in automatic routing for bulk.

PUT index1
{
    "settings": {
        "index.append_only.enabled": "true",
        "index.bulk.adaptive_shard_selection.enabled": "true"
    }
}

OR

For append_only index:

PUT index1/_settings
{
    "settings": {
        "index.bulk.adaptive_shard_selection.enabled": "true"
    }
}

Related Issues

Resolves #18307 #18306 #9219

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Summary by CodeRabbit

  • New Features

    • Adaptive shard selection for append‑only indices to prefer higher‑performing nodes for bulk writes
    • New index setting to enable/disable adaptive shard selection (default: disabled)
    • Bulk responses include per‑node metrics (service‑time EWMA and queue size)
  • Bug Fixes

    • Validation prevents enabling adaptive selection on non‑append‑only indices
    • Bulk operations return validation errors when constraints are violated
  • Tests / Documentation

    • Added REST test scenario and changelog entry with version gate and error cases

✏️ Tip: You can customize this high-level summary in your review settings.

@kkewwei kkewwei requested a review from a team as a code owner November 21, 2025 03:34
@github-actions github-actions bot added Indexing Indexing, Bulk Indexing and anything related to indexing Indexing:Performance Meta Meta issue, not directly linked to a PR labels Nov 21, 2025
@kkewwei
Copy link
Copy Markdown
Contributor Author

kkewwei commented Nov 21, 2025

@reta @gaobinlong Would you mind have a look in your spare time?

@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for bc2e09f: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for f891d9b: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for cbe9bb1: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for de7ac01: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for de7ac01: null

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@kkewwei kkewwei closed this Nov 21, 2025
@kkewwei kkewwei reopened this Nov 21, 2025
@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for de7ac01: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for bf5e1fa: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for bf5e1fa: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Copy Markdown
Contributor

✅ Gradle check result for cb5e5d3: SUCCESS

@kkewwei
Copy link
Copy Markdown
Contributor Author

kkewwei commented Feb 14, 2026

@gaobinlong @andrross Thanks for your reviews! I’ll merge this PR in two days. Feel free to feedback if you have any concerns.

@andrross andrross merged commit db0a16d into opensearch-project:main Feb 14, 2026
38 of 43 checks passed
@andrross
Copy link
Copy Markdown
Member

@gaobinlong @andrross Thanks for your reviews! I’ll merge this PR in two days. Feel free to feedback if you have any concerns.

Thanks @kkewwei, I just merged it!

This was referenced Feb 18, 2026
tanyabti pushed a commit to tanyabti/OpenSearch that referenced this pull request Feb 24, 2026
…pensearch-project#20065)

Signed-off-by: kkewwei <kkewwei@163.com>
Signed-off-by: kkewwei <kewei.11@bytedance.com>
Signed-off-by: Andrew Ross <andrross@amazon.com>
Co-authored-by: Andrew Ross <andrross@amazon.com>
tanyabti pushed a commit to tanyabti/OpenSearch that referenced this pull request Feb 24, 2026
…pensearch-project#20065)

Signed-off-by: kkewwei <kkewwei@163.com>
Signed-off-by: kkewwei <kewei.11@bytedance.com>
Signed-off-by: Andrew Ross <andrross@amazon.com>
Co-authored-by: Andrew Ross <andrross@amazon.com>
@kkewwei kkewwei deleted the write_adapt_select branch March 19, 2026 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Indexing:Performance Indexing Indexing, Bulk Indexing and anything related to indexing Meta Meta issue, not directly linked to a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[META] Automatic routing for bulk

3 participants