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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]