Repository navigation
Blacklist workers if they fail for too many times - #3643
Conversation
70d1639 to
4b744ef
Compare
4b744ef to
97f0f72
Compare
|
|
||
| public Collection<ImmutableWorkerInfo> getBlackListedWorkers() | ||
| { | ||
| return ImmutableList.copyOf( |
There was a problem hiding this comment.
Collections.unmodifiableSet() should be good enough.
|
👍 on the code changes I hit "approve", but then realized we should add documentation for the new parameters. So, that should be done. |
|
|
||
| @JsonProperty | ||
| @Min(60000) | ||
| private long taskBlackListBackoffTimeMillis = 900000; |
There was a problem hiding this comment.
Can we switch this to a Period?
| ``` | ||
|
|
||
| #### Blacklisted Workers | ||
| If the workers fail tasks above a threshold, the overlord will blacklist these workers. No more than 20% of the nodes can be blacklisted. |
There was a problem hiding this comment.
Can we reference one of the config parameters here to make it a bit easier to track down the set of params on the config page (maybe even link to the config page).
c704494 to
3936f05
Compare
3936f05 to
0d7ecd2
Compare
nishantmonu51
left a comment
There was a problem hiding this comment.
left few comments,
In case user has configured autoscaling, It would also be nice to make autoscaling smarter to replace a blacklisted node, that can be done in a separate PR.
| |`druid.indexer.runner.taskShutdownLinkTimeout`|How long to wait on a shutdown request to a middle manager before timing out|PT1M| | ||
| |`druid.indexer.runner.pendingTasksRunnerNumThreads`|Number of threads to allocate pending-tasks to workers, must be at least 1.|1| | ||
| |`druid.indexer.runner.maxRetriesBeforeBlacklist`|Number of times the middle manager can fail a task, before it gets blacklisted, must be at least 1|5| | ||
| |`druid.indexer.runner.taskBlackListBackoffTime`|How long to wait before a task is whitelisted again. This value should be greater that the value set for taskBlackListCleanupPeriod.|PT15M| |
There was a problem hiding this comment.
rename this to workerBlackListBackoffTime & workerBlackListCleanupPeriod and modify docs to make it clear that we are blacklisting workers instead of tasks.
| ``` | ||
|
|
||
| #### Blacklisted Workers | ||
| If the workers fail tasks above a threshold, the overlord will blacklist these workers. No more than 20% of the nodes can be blacklisted. Blacklisted nodes will be periodically whitelisted. |
There was a problem hiding this comment.
is max percentage of blacklist workers configurable ?
If not, can we make it configurable ?
| // Clean blacklisted workers if blacklisted time has elapsed | ||
| if(System.currentTimeMillis() - zkWorker.getLastCompletedTaskTime().getMillis() > | ||
| config.getTaskBlackListBackoffTime().toStandardDuration().getMillis()){ | ||
| // White listing node |
There was a problem hiding this comment.
this should be an info level log
| |`druid.indexer.runner.taskCleanupTimeout`|How long to wait before failing a task after a middle manager is disconnected from Zookeeper.|PT15M| | ||
| |`druid.indexer.runner.taskShutdownLinkTimeout`|How long to wait on a shutdown request to a middle manager before timing out|PT1M| | ||
| |`druid.indexer.runner.pendingTasksRunnerNumThreads`|Number of threads to allocate pending-tasks to workers, must be at least 1.|1| | ||
| |`druid.indexer.runner.maxRetriesBeforeBlacklist`|Number of times the middle manager can fail a task, before it gets blacklisted, must be at least 1|5| |
There was a problem hiding this comment.
mention that only consecutive failures will be considered.
|
|
||
| // After backOffTime the nodes are whitelisted | ||
| System.out.println("Sleeping for " + timeoutPeriod.toStandardDuration().getMillis()); | ||
| Thread.sleep(2*timeoutPeriod.toStandardDuration().getMillis()); |
There was a problem hiding this comment.
minor nit : would be nice if we can avoid sleep, helps in making test more deterministic on slow machines.
|
Great comments @nishantmonu51 Niketh is on vacation, so probably won't get to these changes until he is back. |
2. Rename variable
|
@nishantmonu51 @cheddar Thanks for your comments. Made the requested changes. |
cheddar
left a comment
There was a problem hiding this comment.
I think these changes look good. It does look like you weren't able to remove the Thread.sleep from the test, it would be great if you could reply to Nishant's comment explaining why it's hard to remove that though.
| @JsonProperty | ||
| @Max(100) | ||
| @Min(0) | ||
| private int maxPercentageBlacklistWorkers = 20; |
There was a problem hiding this comment.
Might I suggest making this a double?
|
@cheddar @nishantmonu51 I wasn't able to remove the Thread.sleep, because i wanted to automatic removal of blacklisted workers once a stipulated time elapses. The thread.sleep here is very small |
|
👍 |
* Blacklist workers if they fail for too many times * Adding documentation * Changing to timeout to period and updating docs * 1. Add configurable maxPercentageBlacklistWorkers 2. Rename variable * Change maxPercentageBlacklistWorkers to double * Remove thread.sleep
Uh oh!
There was an error while loading. Please reload this page.