Skip to content

chore: bump local OpenSearch to 3.9.1 to fix PPL on rolled-over span indices - #482

Merged
joshuali925 merged 1 commit into
opensearch-project:mainfrom
kylehounslow:fix/opensearch-3.9.1-ppl-merge
Oct 15, 2026
Merged

joshuali925 merged 1 commit into
opensearch-project:mainfrom
kylehounslow:fix/opensearch-3.9.1-ppl-merge

Conversation

@kylehounslow

Copy link
Copy Markdown
Collaborator

Description

Bump OPENSEARCH_VERSION in .env from 3.9.0 to 3.9.1 (staging registry). OpenSearch Dashboards stays on 3.9.0.

Bug: on OpenSearch 3.9.0, PPL queries on otel-v1-apm-span-* fail with UnsupportedOperationException once the span index has rolled over. Agent Traces shows "Unknown Error" and every span query in Discover fails the same way.

Caused by: java.lang.UnsupportedOperationException
	at org.opensearch.sql.opensearch.util.MergeRules.LatestRule.mergeInto(LatestRule.java:22)
	at org.opensearch.sql.opensearch.util.MergeRules.MergeRuleHelper.merge(MergeRuleHelper.java:31)
	at org.opensearch.sql.opensearch.util.MergeRules.DeepMergeRule.mergeInto(DeepMergeRule.java:28)
	...
	at org.opensearch.sql.opensearch.request.system.OpenSearchDescribeIndexRequest.getFieldTypes(OpenSearchDescribeIndexRequest.java:123)

Root cause: each new otel-v1-apm-span-* index maps events.attributes as an empty object until a span with event attributes (for example, an exception) lands in it. When one index has it empty and a sibling has it populated, merging the mappings for a wildcard query writes into an immutable map. That regression came in with opensearch-project/sql#5657, which is in 3.9.0. The failure depends on the order the indices are merged, so it shows up after some rollovers and not others.

Fix: opensearch-project/sql#5791, backported to 3.9 in opensearch-project/sql#5864. It's in the 3.9.1 staging image (opensearch-sql-3.9.1.0.jar).

Testing

  • Minimal repro: two indices, one with an empty object and one with a leaf under the same path, 20 runs of source=repro-merge-* | fields name per index order.
    • 3.9.0: 0/20 failures in one order, 20/20 in the other.
    • 3.9.1: 0/20 in both orders.
  • Local stack on 3.9.0: forced rollovers of otel-v1-apm-span until source=otel-v1-apm-span-* | stats count() failed. It failed at otel-v1-apm-span-000006.
  • In-place upgrade: recreated only the opensearch service on 3.9.1 against the same data volume.
    • The same query succeeds across all 6 span indices.
    • Ingestion continued and OpenSearch Dashboards status is green.
    • Agent Traces lists and opens traces.

Not affected: the Helm chart (OpenSearch chart 3.5.0) and the AWS installer (OpenSearch_3.5), since both predate opensearch-project/sql#5657.

3.9.1 is a staging tag, like 3.9.0 in #453. Switch OPENSEARCH_DOCKER_REPO back to opensearchproject once 3.9.1 is released.

Issues Resolved

None filed.

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.

…indices

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]>
@kylehounslow
kylehounslow marked this pull request as ready for review October 15, 2026 04:30
@joshuali925
joshuali925 merged commit 840591b into opensearch-project:main Oct 15, 2026
4 checks passed
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.

3 participants