-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Fix ThreadPoolMergeExecutorServiceTests testIORateIsAdjustedForRunningMergeTasks #126058
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix ThreadPoolMergeExecutorServiceTests testIORateIsAdjustedForRunningMergeTasks #126058
Conversation
|
Pinging @elastic/es-distributed-indexing (Team:Distributed Indexing) |
|
The only test failure (https://gradle-enterprise.elastic.co/s/f7fv2rsrf2mwy) was when some merge thread was interrupted... |
henningandersen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAICS from the test run, the order of things is opposite. The assertBusy below seems to time-out, which then causes us to interrupt the threads.
I think we've not found the root cause here?
I haven't figured it out 100% what's happening here, but I've strengthen the assertions that the submitted task was indeed running or aborting before asserting the disk IO rate update on the set of all currently running merge tasks (this should rule out any interference between the loops in the test). |
|
@henningandersen Can you take another look here, please? |
henningandersen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| threadPoolMergeExecutorService.submitMergeTask(mergeTask); | ||
| long newIORate = threadPoolMergeExecutorService.getTargetIORateBytesPerSec(); | ||
| // all currently running merge tasks must be IO throttled | ||
| boolean mergeTaskSubmitted = threadPoolMergeExecutorService.submitMergeTask(mergeTask); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we assert that the runSemaphore has no permits here? I think that is an assumption.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed 5db6465
💔 Backport failed
You can use sqren/backport to manually backport by running |
…gMergeTasks (elastic#126058) Fixes elastic#125842 Relates elastic#120869
…gMergeTasks (elastic#126058) Fixes elastic#125842 Relates elastic#120869
Fixes #125842
Relates #120869