Skip to content

[Test] Tests sequence number pruning after merge for standard indices#143690

Merged
tlrx merged 16 commits intoelastic:mainfrom
tlrx:2026/03/05-prune-seq-no-it
Mar 9, 2026
Merged

[Test] Tests sequence number pruning after merge for standard indices#143690
tlrx merged 16 commits intoelastic:mainfrom
tlrx:2026/03/05-prune-seq-no-it

Conversation

@tlrx
Copy link
Copy Markdown
Member

@tlrx tlrx commented Mar 5, 2026

This commit adds an integration test for checking that sequence number are correctly pruned after segments are merged (in the test, force-merged) and triggers a peer-recovery afterwards.

Relates #143583

@tlrx tlrx added >test Issues or PRs that are addressing/adding tests :Distributed/Engine Anything around managing Lucene and the Translog in an open shard. v9.4.0 labels Mar 5, 2026
@tlrx tlrx requested review from fcofdez and romseygeek March 5, 2026 20:14
@tlrx tlrx marked this pull request as ready for review March 5, 2026 20:14
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

@elasticsearchmachine elasticsearchmachine added the Team:Distributed Meta label for distributed team. label Mar 5, 2026
Copy link
Copy Markdown
Contributor

@romseygeek romseygeek left a comment

Choose a reason for hiding this comment

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

LGTM

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

);

// waits for retention leases to advance past all docs
assertBusy(() -> {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe we need to add a test where we create a retention lease to ensure that we do not remove sequence numbers from the retention lease seq_no onwards? It could be in a follow up 👍

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.

Makes perfect sense, I'll do it in a follow up.

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.

I opened #143825

@tlrx tlrx merged commit 8f1145d into elastic:main Mar 9, 2026
36 checks passed
@tlrx tlrx deleted the 2026/03/05-prune-seq-no-it branch March 9, 2026 09:33
tlrx added a commit to tlrx/elasticsearch that referenced this pull request Mar 9, 2026
tlrx added a commit that referenced this pull request Mar 10, 2026
…#143825)

This commit adds a test in SeqNoPruningIT to ensure that sequence 
numbers are NOT pruned for operations that are still retained by a lease.

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

Labels

:Distributed/Engine Anything around managing Lucene and the Translog in an open shard. Team:Distributed Meta label for distributed team. >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