You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2021/08/02 18:51:44 UTC
[GitHub] [druid] AshishKapoor commented on a change in pull request #11477: fix issue 11476
AshishKapoor commented on a change in pull request #11477:
URL: https://github.com/apache/druid/pull/11477#discussion_r681196555
##########
File path: indexing-service/src/main/java/org/apache/druid/indexing/overlord/RemoteTaskRunner.java
##########
@@ -939,11 +939,11 @@ private boolean announceTask(
// Syncing state with Zookeeper - don't assign new tasks until the task we just assigned is actually running
// on a worker - this avoids overflowing a worker with tasks
Stopwatch timeoutStopwatch = Stopwatch.createStarted();
- while (!isWorkerRunningTask(theZkWorker, task.getId())) {
+ while (!isWorkerRunningTask(theZkWorker, task.getId()) && !completeTasks.containsKey(task.getId())) {
final long waitMs = config.getTaskAssignmentTimeout().toStandardDuration().getMillis();
statusLock.wait(waitMs);
long elapsed = timeoutStopwatch.elapsed(TimeUnit.MILLISECONDS);
- if (elapsed >= waitMs) {
+ if (elapsed >= waitMs && !completeTasks.containsKey(task.getId())) {
Review comment:
```suggestion
if (elapsed >= waitMs && !runningTasks.containsKey(task.getId())) {
```
##########
File path: indexing-service/src/main/java/org/apache/druid/indexing/overlord/RemoteTaskRunner.java
##########
@@ -939,11 +939,11 @@ private boolean announceTask(
// Syncing state with Zookeeper - don't assign new tasks until the task we just assigned is actually running
// on a worker - this avoids overflowing a worker with tasks
Stopwatch timeoutStopwatch = Stopwatch.createStarted();
- while (!isWorkerRunningTask(theZkWorker, task.getId())) {
+ while (!isWorkerRunningTask(theZkWorker, task.getId()) && !completeTasks.containsKey(task.getId())) {
Review comment:
```suggestion
while (!isWorkerRunningTask(theZkWorker, task.getId()) && !runningTasks.containsKey(task.getId())) {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org