jtuglu-netflix commented on code in PR #18060:
URL: https://github.com/apache/druid/pull/18060#discussion_r2119025058
##########
indexing-service/src/main/java/org/apache/druid/indexing/overlord/TaskQueue.java:
##########
@@ -707,10 +701,10 @@ private void notifyStatus(final TaskEntry entry, final
TaskStatus taskStatus, St
// Save status to metadata store first, so if we crash while doing the
rest of the shutdown, our successor
// remembers that this task has completed.
try {
- //The code block is only called when a task completes,
- //and we need to check to make sure the metadata store has the correct
status stored.
+ // The code block is only called when a task completes,
+ // and we need to check to make sure the metadata store has the correct
status stored.
final Optional<TaskStatus> previousStatus =
taskStorage.getStatus(task.getId());
- if (!previousStatus.isPresent() || !previousStatus.get().isRunnable()) {
+ if (!previousStatus.isPresent() || previousStatus.get().isComplete()) {
log.makeAlert("Ignoring notification for already-complete
task").addData("task", task.getId()).emit();
Review Comment:
Not sure if this can occur now and, if it does, whether it should bail early.
--
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]