Skip to content

[Backport 3.9] Remove the opt-in partial-result mode for mapping conflicts (#5814) - #5865

Merged
ahkcs merged 1 commit into
opensearch-project:3.9from
ahkcs:backport/backport-5814-to-3.9
Oct 12, 2026
Merged

ahkcs merged 1 commit into
opensearch-project:3.9from
ahkcs:backport/backport-5814-to-3.9

Conversation

@ahkcs

@ahkcs ahkcs commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Backport of #5814 to 3.9. 3.9 has the partial-result mode from #5657, so this removes it the same way it was removed on main.

The only conflict was a modify/delete on CalcitePartialResultOnMappingConflictIT.java. #5814 deletes it, and 3.9 has an older copy without the #5779 changes. I resolved it by deleting the file. After rebasing onto 3.9 with #5862 merged, docs/user/admin/settings.rst also conflicted: #5862 added the deserialization-settings section right after the partial-result section this PR removes. I kept the deserialization section and dropped the partial-result one, so the section list now matches main. Everything else cherry-picks cleanly.

Verified on this branch: spotlessCheck, unit tests for common, core, ppl, opensearch and opensearch-sql-plugin, and :integ-test:compileTestJava.

Related Issues

Backport of #5814

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • Commits are signed per the DCO using --signoff.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ahkcs ahkcs added the maintenance Improves code quality, but not the product label Oct 12, 2026
@ahkcs ahkcs added the maintenance Improves code quality, but not the product label Oct 12, 2026
@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

PR Reviewer Guide 🔍

(Review updated until commit 56d9009)

Here are some key observations to aid the review process:

🧪 No relevant tests
🔒 No security concerns identified
✅ No TODO sections
🔀 No multiple PR themes
⚡ No major issues detected

@codecov

codecov Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.93%. Comparing base (7a6ef35) to head (56d9009).
⚠️ Report is 1 commits behind head on 3.9.

Files with missing lines Patch % Lines
...org/opensearch/sql/calcite/CalcitePlanContext.java 0.00% 2 Missing ⚠️

❌ Your project check has failed because the head coverage (62.93%) is below the target coverage (99.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff              @@
##                3.9    #5865      +/-   ##
============================================
+ Coverage     62.89%   62.93%   +0.04%     
+ Complexity     8819     8798      -21     
============================================
  Files           939      938       -1     
  Lines         40235    40092     -143     
  Branches       4531     4507      -24     
============================================
- Hits          25304    25232      -72     
+ Misses        14125    14055      -70     
+ Partials        806      805       -1     
Flag Coverage Δ
sql-engine 62.93% <0.00%> (+0.04%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…ch-project#5814)

* Remove the opt-in partial-result mode for mapping conflicts

The mode (opensearch-project#5657) narrowed an aggregation to the index subset where the group
field is aggregatable and labelled the result with a warning. It is being dropped:
returning a knowingly incomplete answer to make a query faster is the wrong
default to offer, and gating it on a cluster setting, a per-request flag and a
response-format check made three moving parts that each had to survive the
security plugin's transport-to-worker handoff (opensearch-project#5739, opensearch-project#5743, opensearch-project#5758).

Removed: PartialResultAggregatePushdown and its hook in CalciteLogicalIndexScan,
plugins.query.partial_result.on_mapping_conflict.enabled, the per-request
partial_result field, and the warnings-supported format gate that existed only to
protect this feature. A conflicted aggregation once again returns the complete
result over every index, which since opensearch-project#5646 pushes down as a _source script
rather than failing.

Kept whole: the warnings channel it introduced -- Warning, QueryResponse.warnings,
CalcitePlanContext.addWarning/drainWarnings, and the SimpleJsonResponseFormatter
plumbing. Nothing produces a warning after this commit; opensearch-project#5807 is the next
producer, reporting a search that covered only some of its shards.

Note for reviewers: dropping partial_result from TransportPPLQueryRequest changes
that request's wire format. The class version-gates nothing and the field was
appended the same way in 3.9, so this is symmetric with how it arrived, but it
does mean a mixed 3.9/3.10 cluster must not route PPL across versions.

Signed-off-by: Kai Huang <[email protected]>

* Drop the per-index mapping retention the feature needed

getIndexMappings() on OpenSearchIndex and lastIndexMappings on the describe
request existed only so the partitioner could see which index mapped a field
which way. Nothing reads them now.

The deep copy before merging stays: MergeRuleHelper rewrites the accumulated
type's properties in place, so a fetched mapping would otherwise stop describing
its own index. Its test now asserts that on the fetched mappings directly rather
than through the removed accessor.

Signed-off-by: Kai Huang <[email protected]>

---------

Signed-off-by: Kai Huang <[email protected]>
(cherry picked from commit 6d666ba)
Signed-off-by: Kai Huang <[email protected]>
@ahkcs
ahkcs force-pushed the backport/backport-5814-to-3.9 branch from 6a89958 to 56d9009 Compare October 12, 2026 22:05
@github-actions

Copy link
Copy Markdown
Contributor

Persistent review updated to latest commit 56d9009

@ahkcs
ahkcs merged commit 537fab0 into opensearch-project:3.9 Oct 12, 2026
40 of 44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Improves code quality, but not the product

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants