Skip to content

[TEST] Add random force merges to TSDB integration tests#145024

Merged
kkrik-es merged 10 commits intoelastic:mainfrom
kkrik-es:tsdb/reduce-result-limit
Mar 27, 2026
Merged

[TEST] Add random force merges to TSDB integration tests#145024
kkrik-es merged 10 commits intoelastic:mainfrom
kkrik-es:tsdb/reduce-result-limit

Conversation

@kkrik-es
Copy link
Copy Markdown
Member

Sequence numbers get trimmed during segment merging, so this helps cover this functionallity.

Related to #136305

@kkrik-es kkrik-es self-assigned this Mar 26, 2026
@kkrik-es kkrik-es added >test Issues or PRs that are addressing/adding tests :StorageEngine/TSDB You know, for Metrics test-release Trigger CI checks against release build Team:StorageEngine labels Mar 26, 2026
@kkrik-es kkrik-es marked this pull request as ready for review March 27, 2026 08:46
@kkrik-es kkrik-es requested review from fcofdez, romseygeek and tlrx March 27, 2026 08:47
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-storage-engine (Team:StorageEngine)

Copy link
Copy Markdown
Member

@tlrx tlrx left a comment

Choose a reason for hiding this comment

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

LGTM, I left two minor comments.

assertThat(secondBackingIndex, backingIndexEqualTo(dataStreamName, 2));
indexDoc(dataStreamName);
// maybe force merge
if (true) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks like a left over?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Indeed! Trying hard to make sure this gets exercised :)

});
}

private static void forceMerge(String dataStreamName) throws IOException {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
private static void forceMerge(String dataStreamName) throws IOException {
private static void maybeForceMerge(String dataStreamName) throws IOException {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

oops will do that in a separate one..

@kkrik-es kkrik-es removed the test-release Trigger CI checks against release build label Mar 27, 2026
Copy link
Copy Markdown
Contributor

@fcofdez fcofdez left a comment

Choose a reason for hiding this comment

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

LGTM

@kkrik-es kkrik-es merged commit 7cbc508 into elastic:main Mar 27, 2026
36 checks passed
mamazzol pushed a commit to mamazzol/elasticsearch that referenced this pull request Mar 30, 2026
)

* Adjust truncation limit for TS and add documentation.

* Fix tests

* Add force merging to TSDB integration tests

* [CI] Auto commit changes from spotless

* Randomize force merge condition in TsdbIT

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
@kkrik-es kkrik-es deleted the tsdb/reduce-result-limit branch April 6, 2026 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:StorageEngine/TSDB You know, for Metrics Team:StorageEngine >test Issues or PRs that are addressing/adding tests v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants