Skip to content

[2.0] fix: guard ranking script_score against zero-match segments (Lucene 10 NPE) - #33317

Merged
mohityadav766 merged 2 commits into
2.0from
backport/2.0/pr-33292
Sep 15, 2026
Merged

mohityadav766 merged 2 commits into
2.0from
backport/2.0/pr-33292

Conversation

@gh-bot-collate

Copy link
Copy Markdown

Automated backport of #33292 to 2.0.

Source PR #33292
Author @zhang-arvin
Merge commit 38cbdf9f7878bda711e7f763b0261c3fca46ef08
Method Clean cherry-pick — identical to the commit on main.

Opened from openmetadata-collate, which holds the credentials needed to open a PR here. It merges itself once every check passes — no review needed. If a check fails it stays open and the author of #33292 is asked to look.

resolver run

…0 NPE) (#33292)

On Lucene 10 (OpenSearch 3.x), a script_score whose inner query matches
zero documents on a segment returns a null sub-scorer, which
DisjunctionMaxScorer/DisiWrapper rejects with a NullPointerException.
Wrapped in dis_max with allow_partial_search_results=true, the failing
shard is silently dropped and search returns 0 results even though the
matching document exists (#33167).

Wrap the inner query in a single-clause bool[should, minimumShouldMatch=1]
so a zero-match segment yields a well-defined empty iterator instead of
null. Scoring is unchanged: a single-clause bool with no must/filter
scores exactly its clause.

Co-authored-by: Sriharsha Chintalapani <[email protected]>
(cherry picked from commit 38cbdf9)
@github-actions

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@github-actions

github-actions Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit 9270a8500f063677eefdd895a0a8b9f3156c520c in Playwright run 34973878623, attempt 1.

✅ 618 passed · ❌ 0 failed · 🟡 1 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky

Performance

Blocking targets: ✅ met · Optimization targets: 🟡 in progress

Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting.

🕒 Full workflow signal wall (to summary) 49m 47s

⏱️ Max setup 3m 50s · max shard execution 13m 52s · max shard-job elapsed before upload 17m 41s · reporting 5s

🌐 173.00 requests/attempt · 1.55 app boots/UI scenario · 10.70% common-shard skew

Optimization targets still in progress:

  • Application boot ratio was 1.55 per UI scenario (965 boots / 623 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 128 0 0 0 0 0
🟡 Shard chromium-02 136 0 1 0 0 0
✅ Shard chromium-03 129 0 0 0 0 0
✅ Shard chromium-04 145 0 0 0 0 0
✅ Shard global-state-01 10 0 0 0 0 0
✅ Shard ingestion-01 1 0 0 0 0 0
✅ Shard reindex-01 28 0 0 0 0 0
✅ Shard search-01 12 0 0 0 0 0
✅ Shard search-rbac-01 29 0 0 0 0 0
🟡 1 flaky test(s) (passed on retry)
  • Pages/ExplorePageRightPanel_KnowledgeCenter.spec.ts › Should remove user owner for knowledgeCenter (shard chromium-02, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@mohityadav766 mohityadav766 self-assigned this Sep 15, 2026
@mohityadav766 mohityadav766 added the safe to test Add this label to run secure Github workflows on PRs label Sep 15, 2026

This branch was previously deployed

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

Labels

safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants