Repository navigation
[Backport 3.9] Fix UnsupportedOperationException merging an empty object with a populated sibling index (#5791) - #5864
Merged
ahkcs merged 1 commit intoOct 12, 2026
Conversation
…lated sibling (opensearch-project#5791) cloneDeep() only allocated a mutable properties map when the source object had properties; for an empty object it left copy.properties as the class-default ImmutableMap.of(). When a wildcard describe merges two indices whose only difference is one carrying a leaf under an otherwise-empty object path, and the empty side is merged first, MergeRuleHelper's in-place put of the sibling's leaf lands on that immutable map and throws UnsupportedOperationException. Always give the copy a mutable LinkedHashMap so the deep merge can add fields regardless of whether the object started empty. The crash only reproduces when the empty-object index sorts first in the unordered map getIndexMappings returns, so the added regression test pins that iteration order to reproduce deterministically. Signed-off-by: Kai Huang <[email protected]> (cherry picked from commit d7af0dc) Signed-off-by: Kai Huang <[email protected]>
ahkcs
requested review from
LantaoJin,
RyanL1997,
Swiddis,
acarbonetto,
anirudha,
dai-chen,
joshuali925,
mengweieric,
noCharger,
penghuo,
ps48,
qianheng-aws,
songkant-aws,
vamsimanohar,
ykmr1224 and
yuancu
as code owners
October 12, 2026 21:15
Contributor
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Swiddis
approved these changes
Oct 12, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project check has failed because the head coverage (62.86%) 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 #5864 +/- ##
============================================
- Coverage 62.86% 62.86% -0.01%
+ Complexity 8782 8781 -1
============================================
Files 938 938
Lines 40145 40144 -1
Branches 4519 4518 -1
============================================
- Hits 25238 25237 -1
Misses 14106 14106
Partials 801 801
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
joshuali925
pushed a commit
to opensearch-project/observability-stack
that referenced
this pull request
Oct 15, 2026
…indices (#482) OpenSearch 3.9.0 ships opensearch-project/sql#5657, which made wildcard PPL/SQL queries throw UnsupportedOperationException when one index maps an empty object and a sibling index maps a leaf under the same path. After the first rollover of otel-v1-apm-span, events.attributes is an empty object in the new index, so every query on otel-v1-apm-span-* can fail, including Agent Traces. The fix (opensearch-project/sql#5791) was backported to 3.9 in opensearch-project/sql#5864 and is in the 3.9.1 staging image. OpenSearch Dashboards stays on 3.9.0. Signed-off-by: Kyle Hounslow <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Backport of #5791 to
3.9. Clean cherry-pick, matchesmain.Verified on this branch:
spotlessCheck, unit tests forcommon,core,ppl,opensearchandopensearch-sql-plugin, and:integ-test:compileTestJava.Related Issues
Backport of #5791
Check List
--signoff.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.