Skip to content

Fix data stream retrieval in TimeSeriesDataStreamsIT#125621

Merged
nielsbauman merged 1 commit intoelastic:mainfrom
nielsbauman:fix-time-series-test
Mar 26, 2025
Merged

Fix data stream retrieval in TimeSeriesDataStreamsIT#125621
nielsbauman merged 1 commit intoelastic:mainfrom
nielsbauman:fix-time-series-test

Conversation

@nielsbauman
Copy link
Copy Markdown
Contributor

This test had the potential to fail when two consecutive GET data streams requests would hit two different nodes, where one node already had the cluster state that contained the new backing index and the other node didn't yet.

Caused by #122852

Fixes #124987

This test had the potential to fail when two consecutive GET data
streams requests would hit two different nodes, where one node already
had the cluster state that contained the new backing index and the other
node didn't yet.

Caused by elastic#122852

Fixes elastic#124987
@nielsbauman nielsbauman added >test Issues or PRs that are addressing/adding tests :StorageEngine/Data streams Data streams and their lifecycles Team:Data Management (obsolete) DO NOT USE. This team no longer exists. v9.1.0 labels Mar 25, 2025
@nielsbauman nielsbauman requested a review from gmarouli March 25, 2025 19:43
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

});
assertBusy(() -> {
final var backingIndices = getDataStreamBackingIndexNames(dataStream);
assertEquals(PhaseCompleteStep.finalStep("hot").getKey(), getStepKeyForIndex(client(), backingIndices.getFirst()));
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I originally added two assertBusys because I thought we needed the 20 second timeout. In hindsight, I don't think we actually do. This also avoids the issue with the two back-to-back GET data stream API calls.

Copy link
Copy Markdown
Contributor

@gmarouli gmarouli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@nielsbauman nielsbauman merged commit 0405fb0 into elastic:main Mar 26, 2025
17 checks passed
@nielsbauman nielsbauman deleted the fix-time-series-test branch March 26, 2025 10:34
nielsbauman added a commit to nielsbauman/elasticsearch that referenced this pull request Mar 27, 2025
This test could still fail by consecutive API calls hitting different
nodes with different versions of the cluster state.

Follow-up of elastic#125621

Relates elastic#125752 (but doesn't close it, as that issue includes two
different failures)
omricohenn pushed a commit to omricohenn/elasticsearch that referenced this pull request Mar 28, 2025
This test had the potential to fail when two consecutive GET data
streams requests would hit two different nodes, where one node already
had the cluster state that contained the new backing index and the other
node didn't yet.

Caused by elastic#122852

Fixes elastic#124987
nielsbauman added a commit that referenced this pull request Mar 31, 2025
This test could still fail by consecutive API calls hitting different
nodes with different versions of the cluster state.

Follow-up of #125621

Fixes #125752
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:StorageEngine/Data streams Data streams and their lifecycles Team:Data Management (obsolete) DO NOT USE. This team no longer exists. >test Issues or PRs that are addressing/adding tests v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] TimeSeriesDataStreamsIT testRolloverAction failing

3 participants