Skip to content

Conversation

@albertzaharovits
Copy link
Contributor

Fixes #125236

@albertzaharovits albertzaharovits added >test Issues or PRs that are addressing/adding tests :Distributed Indexing/Engine Anything around managing Lucene and the Translog in an open shard. labels Apr 2, 2025
@albertzaharovits albertzaharovits self-assigned this Apr 2, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Distributed Indexing Meta label for Distributed Indexing team label Apr 2, 2025
@elasticsearchmachine
Copy link
Collaborator

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

Copy link
Contributor

@henningandersen henningandersen 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'd be ok with this fix, but proposed an alternative to consider.

// when the merge scheduler is closed it won't pull in any new merges from the merge source
verifyNoInteractions(mergeSource2);
// assert the merge still shows up as "running"
assertThat(threadPoolMergeScheduler.getRunningMergeTasks().keySet(), contains(oneMerge));
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we should rather just wait for the merge thread to have picked up the task - before this assert busy block? Using CyclicBarrier for instance. Then I think the original check here can work too - without the waiting for it using assert busy. I think that reads more clearly and is a bit stronger.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pushed 4131809

@albertzaharovits albertzaharovits merged commit ecaa0b1 into elastic:main Apr 3, 2025
17 checks passed
@albertzaharovits albertzaharovits deleted the fix-125236 branch April 3, 2025 08:12
andreidan pushed a commit to andreidan/elasticsearch that referenced this pull request Apr 9, 2025
albertzaharovits added a commit to albertzaharovits/elasticsearch that referenced this pull request Jun 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

3 participants