Support Elasticsearch 9.x as storage#13957
Merged
Merged
Conversation
The ES client version gate capped at major == 8, so a server reporting major 9 fell through to UnsupportedOperationException and OAP refused to start against an Elasticsearch 9 cluster. ES 9 keeps the same REST surface the ES 8 path already uses (typeless document writes and composable index templates), so admit major >= 8 to that path. Add ES 9.3.0 to the module IT (ElasticSearchIT) and a new Storage ES 9.3.0 e2e case alongside the existing 8.18.8 coverage; update the storage docs and changelog.
There was a problem hiding this comment.
Pull request overview
This pull request extends SkyWalking OAP’s in-tree Elasticsearch client/version gating so the existing Elasticsearch 8.x request/codec path is also used for Elasticsearch 9.x, and expands CI/IT coverage plus docs/changelog accordingly.
Changes:
- Update
ElasticSearchVersionto treat Elasticsearch major versions>= 8as supported (reusing the existing typeless-doc + composable-template request path). - Add an Elasticsearch 9.x integration-test parameter and a new CI e2e workflow case for Elasticsearch 9.x.
- Document Elasticsearch 9.x support and add a changelog entry.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
oap-server/server-library/library-elasticsearch-client/src/test/java/org/apache/skywalking/library/elasticsearch/ElasticSearchIT.java |
Adds an Elasticsearch 9.x Testcontainers parameter to run the existing IT suite against ES 9. |
oap-server/server-library/library-elasticsearch-client/src/main/java/org/apache/skywalking/library/elasticsearch/ElasticSearchVersion.java |
Broadens the Elasticsearch version gate to allow 9.x (and later) to use the existing 8.x request/codec implementation. |
docs/en/setup/backend/storages/elasticsearch.md |
Updates the supported versions list to include Elasticsearch 9.x. |
docs/en/changes/changes.md |
Adds a changelog bullet announcing Elasticsearch 9.x storage support. |
.github/workflows/skywalking.yaml |
Adds an e2e CI matrix entry to run the ES storage case against a 9.x tag. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mrproliu
approved these changes
Jul 24, 2026
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.
Fix the issue
Adds support for running SkyWalking OAP against Elasticsearch 9.x as storage.
Why
The in-tree ES client (
library-elasticsearch-client) selects its request factory / codec per server version inElasticSearchVersion. The ceiling wasmajor == 8, so any server reporting major version 9 fell through toUnsupportedOperationException("Unsupported version")and OAP refused to start against an Elasticsearch 9 cluster.ES 9 keeps the same REST surface the ES 8 path already relies on — typeless document writes (
POST /{index}/_update/{id}) and composable index templates (PUT /_index_template/{name}) — so no new factory or codec is needed; the version gate just needs to admit major >= 8. This mirrors how OpenSearch is already handled version-agnostically.What changed
ElasticSearchVersion:if (major == 8)→if (major >= 8)for the ElasticSearch distribution (8.x, 9.x and later use the existing typeless-doc + composable-template path).ElasticSearchIT: add anElasticSearch 9.3.0parameter (all IT methods run against a real ES 9 container).skywalking.yaml: add aStorage ES 9.3.0e2e case alongside the existing8.18.8.Verified locally against a real
elasticsearch:9.3.0container: version detection, composable index template, typeless index/get/update/delete, and search all behave as expected.CHANGESlog.