Enhance TSDB tests with synthetic ID support#143031
Merged
burqen merged 7 commits intoelastic:mainfrom Mar 5, 2026
Merged
Conversation
TsdbIT and TsdbIndexingRollingUpgradeIT now runs with and without synthetic id randomly if the cluster has support it. This change improves the test coverage for synthetic id and prepare the tests for synthetic id being enabled by default. Also removed some magic strings
Collaborator
|
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
16 tasks
fcofdez
reviewed
Mar 3, 2026
| @@ -39,16 +43,25 @@ public class TsdbIndexingRollingUpgradeIT extends AbstractLogsdbRollingUpgradeTe | |||
| """; | |||
|
|
|||
| public void testIndexing() throws Exception { | |||
| boolean hasSupport = oldClusterHasFeature(IndexFeatures.TIME_SERIES_SYNTHETIC_ID); | |||
| Boolean useSyntheticId = hasSupport ? randomBoolean() : null; | |||
Contributor
There was a problem hiding this comment.
can't we simply use and && here?
Contributor
Author
There was a problem hiding this comment.
We need to take care of the case when old nodes in the cluster lack support for synthetic id. That is the null case. I've added this clarifying comment to the test:
If cluster has support for synthetic id, randomly set index.mapping.synthetic_id to true/false
If cluster doesn't have support, don't set index.mapping.synthetic_id at all (null),
indicated by oldClusterHasFeature(IndexFeatures.TIME_SERIES_SYNTHETIC_ID)==false
…etic-id-fix-TsdbIndexingRollingUpgradeIT
burqen
added a commit
to burqen/elasticsearch
that referenced
this pull request
Mar 5, 2026
TsdbIT and TsdbIndexingRollingUpgradeIT now runs with and without synthetic id randomly if the cluster has support it. This change improves the test coverage for synthetic id and prepare the tests for synthetic id being enabled by default. Also removed some magic strings --------- Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co> Co-authored-by: Cursor
jfreden
pushed a commit
to jfreden/elasticsearch
that referenced
this pull request
Mar 5, 2026
TsdbIT and TsdbIndexingRollingUpgradeIT now runs with and without synthetic id randomly if the cluster has support it. This change improves the test coverage for synthetic id and prepare the tests for synthetic id being enabled by default. Also removed some magic strings --------- Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co> Co-authored-by: Cursor
spinscale
pushed a commit
to spinscale/elasticsearch
that referenced
this pull request
Mar 6, 2026
TsdbIT and TsdbIndexingRollingUpgradeIT now runs with and without synthetic id randomly if the cluster has support it. This change improves the test coverage for synthetic id and prepare the tests for synthetic id being enabled by default. Also removed some magic strings --------- Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co> Co-authored-by: Cursor
This was referenced Mar 6, 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.
TsdbIT and TsdbIndexingRollingUpgradeIT now runs with and without synthetic id randomly if the cluster has support it.
This change improves the test coverage for synthetic id and prepare the tests for synthetic id being enabled by default.
Also removed some magic strings
This is preparation for enabling synthetic id by default #142366