Skip to content

Fix search-replica routing fairness and add VSCO 3.8.0 image publish workflow - #1

Open
ossianpe wants to merge 10 commits into
mainfrom
vsco/3.8.0-search-replica-routing
Open

Fix search-replica routing fairness and add VSCO 3.8.0 image publish workflow#1
ossianpe wants to merge 10 commits into
mainfrom
vsco/3.8.0-search-replica-routing

Conversation

@ossianpe

@ossianpe ossianpe commented Aug 17, 2026

Copy link
Copy Markdown

Summary

  • Fix search-replica preference fairness in IndexShardRoutingTable.filterAndOrderShards: filter matching replicas first, then shuffle/order, so writer replicas no longer bias which search copy is preferred.
  • Add regression tests for fair split between search replicas when writable data replicas are present, and for ignoring writer replicas.
  • Add .github/workflows/vsco-publish-opensearch-image.yaml to build a non-snapshot patched :server jar, validate it against upstream tag 3.8.0, and swap it into the official multi-arch base image (avoids full recompile).
  • Harden the publish workflow: fetch the upstream 3.8.0 tag for the jar-swap safety check, build with -Dbuild.snapshot=false, and locate/verify the core jar by content rather than a hard-coded path.
  • Branch also carries cherry-picks from the 3.8.0 release line (regexp/simple_query_string DoS bounds, OTEL alignment, bundled JDK, release notes, m2 mirror).

Test plan

  • Run IndexShardRoutingTableTests (esp. search-replica fairness / writer-ignored cases)
  • Trigger vsco-publish-opensearch-image (or dry-run locally) and confirm a single non-SNAPSHOT opensearch-3.8.0.jar is found and contains IndexShardRoutingTable
  • Deploy/smoke the published image and confirm search traffic spreads across search replicas when writer replicas exist

Please note, the bulk of the files here are for getting helm operator releases working

      ___
     [◉_◉]  "I don't always review PRs,
    /|===|\   but when I do, I merge
   (_|   |_)  immediately."
      | |

Made with Cursor

opensearch-ci-bot and others added 10 commits July 24, 2026 15:34
…epth (opensearch-project#22557) (opensearch-project#22559)

Two low-privilege search-request DoS vectors:

- CVE-2026-63136 (regexp/query_string determinization OOM): max_determinized_states
  was read unbounded and passed to Lucene's RegexpQuery, so a request could set it to
  Integer.MAX_VALUE and disable Lucene's TooComplexToDeterminizeException safeguard. A
  pattern like .*a.{30} then determinizes toward ~2^30 states and exhausts the heap.

- CVE-2026-63144 (simple_query_string nested-paren StackOverflow): Lucene's
  SimpleQueryParser recurses one frame per '(' with no depth cap, so deeply nested
  parentheses overflow the JVM stack.

Both now fail fast with a 4xx instead of crashing the node. Adds regression tests
including the reported PoC payloads.


(cherry picked from commit f9cfc83)

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
Signed-off-by: opensearch-ci-bot <opensearch-infra@amazon.com>
Co-authored-by: Darshit Chanpura <dchanp@amazon.com>
…2579) (opensearch-project#22585)

(cherry picked from commit f767a7a)

Signed-off-by: Craig Perkins <craig5008@gmail.com>
Signed-off-by: opensearch-ci-bot <opensearch-infra@amazon.com>
Co-authored-by: Craig Perkins <cwperx@amazon.com>
…pensearch-project#22591) (opensearch-project#22593)

(cherry picked from commit 6056533)

Signed-off-by: Andriy Redko <drreta@gmail.com>
Signed-off-by: opensearch-ci-bot <opensearch-infra@amazon.com>
Co-authored-by: Andriy Redko <drreta@gmail.com>
…-project#22600)

(cherry picked from commit 564ce01)

Signed-off-by: Andriy Redko <drreta@gmail.com>
Signed-off-by: opensearch-ci-bot <opensearch-infra@amazon.com>
Co-authored-by: Andriy Redko <drreta@gmail.com>
…arch-project#22606)

(cherry picked from commit 46871ff)

Signed-off-by: opensearch-ci-bot <opensearch-infra@amazon.com>
…oject#22612) (opensearch-project#22621)

(cherry picked from commit 20ba4aa)

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
Signed-off-by: opensearch-ci-bot <opensearch-infra@amazon.com>
Co-authored-by: Peter Zhu <zhujiaxi@amazon.com>
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.

2 participants