gianm commented on code in PR #14909:
URL: https://github.com/apache/druid/pull/14909#discussion_r1307951934
##########
extensions-contrib/kubernetes-overlord-extensions/src/main/java/org/apache/druid/k8s/overlord/KubernetesTaskRunner.java:
##########
@@ -309,23 +309,23 @@ public Optional<InputStream> streamTaskReports(String
taskid) throws IOException
@Override
public List<Pair<Task, ListenableFuture<TaskStatus>>> restore()
{
- List<Pair<Task, ListenableFuture<TaskStatus>>> restoredTasks = new
ArrayList<>();
+ return ImmutableList.of();
+ }
+
+ @Override
+ @LifecycleStart
+ public void start()
+ {
for (Job job : client.getPeonJobs()) {
try {
- Task task = adapter.toTask(job);
- restoredTasks.add(Pair.of(task, joinAsync(task)));
+ joinAsync(adapter.toTask(job));
Review Comment:
Does this really fix the bug? It looks like after this change, once
`start()` completes we can be sure that `tasks` has all the right task IDs in
it, but we can't be sure that it has the most up-to-date statuses. The statuses
are still being restored asynchronously by `joinAsync`, and that could be
happening in the background after `start()` exists.
Could you please consider this, and determine if it's OK or not? If it's OK
please add a comment here explaining why, so future readers don't need to
wonder if the async restoration is OK. If it's not OK, then please update the
code to wait for the most up to date statuses to be loaded before returning
from `start()`.
--
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]