jtuglu-netflix commented on code in PR #18020:
URL: https://github.com/apache/druid/pull/18020#discussion_r2097278678
##########
indexing-service/src/main/java/org/apache/druid/indexing/overlord/TaskQueue.java:
##########
@@ -531,6 +531,8 @@ public boolean add(final Task task)
// insert the task into our queue. So don't catch it.
final DateTime insertTime = DateTimes.nowUtc();
taskStorage.insert(task, TaskStatus.running(task.getId()));
+ // Note: the TaskEntry created for this task doesn't actually use the
`insertTime` timestamp, it uses a new
+ // timestamp created in the ctor. This prevents races from occurring
while syncFromStorage() is happening.
Review Comment:
I'm not sure it matters in the current state of things (given it's currently
just `add`/`syncFromStorage` and `add` ensures its clock update is done under
lock), but future changes might rely on that being true yes. Did you want to me
to add that change `taskEntry.lastUpdatedTime = DateTimes.nowUtc()`
[here](https://github.com/apache/druid/blob/62261b05ef410b717a52bec8d143b8d8d90ac99e/indexing-service/src/main/java/org/apache/druid/indexing/overlord/TaskQueue.java#L554)
in this commit?
--
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]