Skip to content

Conversation

finnegancarroll
Copy link
Contributor

@finnegancarroll finnegancarroll commented Jul 28, 2025

Description

This change addresses a bug which appears when a custom preference string is included with a query while awareness attributes are present on the cluster.

In this scenario it can seem as if the custom preference string included with query is not being honored. This is due to how awareness attributes preference shards which share an attribute with the coordinating node when routing a search request. Awareness attributes take priority and the custom string preference is only applied after this step. A search request with the same custom string preference can then be routed differently depending on which node is acting as coordinator.

All other preference types exit early and ignore awareness attributes with custom string preference being the one exception that attempts to deterministically route requests within awareness attribute groups.

This change ignores awareness attributes when a custom string preference is present.

Related Issues

Resolves #18817

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.

@github-actions github-actions bot added bug Something isn't working Search Search query, autocomplete ...etc labels Jul 28, 2025
@finnegancarroll finnegancarroll marked this pull request as ready for review July 28, 2025 17:51
@finnegancarroll finnegancarroll requested a review from a team as a code owner July 28, 2025 17:51
Copy link
Contributor

❌ Gradle check result for 7b2b6f9: 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?

@finnegancarroll
Copy link
Contributor Author

Flaky - #18850

@github-project-automation github-project-automation bot moved this from Todo to Done in Performance Roadmap Jul 28, 2025
@github-project-automation github-project-automation bot moved this from Done to In Progress in Performance Roadmap Jul 28, 2025
@finnegancarroll finnegancarroll self-assigned this Jul 28, 2025
Copy link
Contributor

✅ Gradle check result for 7b2b6f9: SUCCESS

Copy link

codecov bot commented Jul 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.78%. Comparing base (3b7603e) to head (eabfc36).
⚠️ Report is 14 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #18848      +/-   ##
============================================
+ Coverage     72.67%   72.78%   +0.10%     
- Complexity    68610    68612       +2     
============================================
  Files          5577     5577              
  Lines        315375   315374       -1     
  Branches      45772    45773       +1     
============================================
+ Hits         229209   229539     +330     
+ Misses        67613    67154     -459     
- Partials      18553    18681     +128     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

❌ Gradle check result for eabfc36: 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-project-automation github-project-automation bot moved this from In Progress to Done in Performance Roadmap Jul 29, 2025
@github-project-automation github-project-automation bot moved this from Done to In Progress in Performance Roadmap Jul 29, 2025
Copy link
Contributor

❌ Gradle check result for eabfc36: 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?

@finnegancarroll
Copy link
Contributor Author

Flaky test #18872

@github-project-automation github-project-automation bot moved this from In Progress to Done in Performance Roadmap Jul 30, 2025
@github-project-automation github-project-automation bot moved this from Done to In Progress in Performance Roadmap Jul 30, 2025
Copy link
Contributor

❌ Gradle check result for eabfc36: 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?

@finnegancarroll
Copy link
Contributor Author

Same flaky test #18872.

@github-project-automation github-project-automation bot moved this from In Progress to Done in Performance Roadmap Jul 30, 2025
@github-project-automation github-project-automation bot moved this from Done to In Progress in Performance Roadmap Jul 30, 2025
Copy link
Contributor

✅ Gradle check result for eabfc36: SUCCESS

@andrross andrross merged commit 2d06037 into opensearch-project:main Aug 1, 2025
112 of 118 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Performance Roadmap Aug 1, 2025
sunqijun1 pushed a commit to sunqijun1/OpenSearch that referenced this pull request Aug 4, 2025
tandonks pushed a commit to tandonks/OpenSearch that referenced this pull request Aug 5, 2025
vinaykpud pushed a commit to vinaykpud/OpenSearch that referenced this pull request Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Search Search query, autocomplete ...etc
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[BUG] Custom string preference with awareness attributes does not produce consistent routing
2 participants