abhishekagarwal87 commented on code in PR #13172:
URL: https://github.com/apache/druid/pull/13172#discussion_r985719442
##########
indexing-service/src/main/java/org/apache/druid/indexing/overlord/TaskLockbox.java:
##########
@@ -197,17 +205,26 @@ public int compare(Pair<Task, TaskLock> left, Pair<Task,
TaskLock> right)
activeTasks.size(),
storedLocks.size() - taskLockCount
);
+
+ for (Task task : failedToReacquireLockTasks) {
+ for (TaskLock lock : taskStorage.getLocks(task.getId())) {
+ taskStorage.removeLock(task.getId(), lock);
+ }
+ taskStorage.setStatus(TaskStatus.failure(task.getId(), "Failed to
reacquire lock"));
Review Comment:
This doesn't seem the right thing to do in `TaskLockbox`. If you notice, the
`taskMaster` is used in this class to manipulate the locks and that's it.
Lockbox doesn't modify any state other than the locks. We could maybe return
the list of tasks for which we could not acquire locks to the caller. As you do
this, it will be better to return a `Result` object where we can add more info
later if needed. what do you think?
--
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]