kfaraz commented on code in PR #18715:
URL: https://github.com/apache/druid/pull/18715#discussion_r2503801645


##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java:
##########
@@ -608,13 +608,22 @@ private void changeTaskCountInIOConfig(int 
desiredActiveTaskCount)
     }
   }
 
+  /**
+   * Clears allocation information including active task groups, partition 
groups, partition offsets, and partition IDs.
+   * <p>
+   * Note: Does not clear {@link #pendingCompletionTaskGroups} so that the 
supervisor remembers that these
+   * tasks are publishing and auto-scaler does not repeatedly attempt a scale 
down until these tasks
+   * complete. If this is cleared, the next {@link #discoverTasks()} might add 
these tasks to
+   * {@link #activelyReadingTaskGroups}.
+   */
   private void clearAllocationInfo()
   {
     activelyReadingTaskGroups.clear();
     partitionGroups.clear();
     partitionOffsets.clear();
 
-    pendingCompletionTaskGroups.clear();
+    // Note: We intentionally do NOT clear pendingCompletionTaskGroups here.

Review Comment:
   Since the original line of code has already been removed, this comment seems 
out of place here. It has already been called out in the javadoc anyway.



-- 
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]

Reply via email to