zhangyue19921010 commented on a change in pull request #10524:
URL: https://github.com/apache/druid/pull/10524#discussion_r531670813



##########
File path: 
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java
##########
@@ -1137,6 +1394,20 @@ public void gracefulShutdownInternal() throws 
ExecutionException, InterruptedExc
   @VisibleForTesting
   public void resetInternal(DataSourceMetadata dataSourceMetadata)
   {
+    // clear queue for kafka lags
+    if (enableDynamicAllocationTasks && queue != null) {
+      try {
+        lock.lock();
+        queue.clear();
+      }
+      catch (Exception e) {
+        log.warn(e, "Error,when clear queue in rest action");

Review comment:
       If this clear action is failed. The collection of lag points may be not 
as accurate as expected. May interfere with scale action. But this failing 
rarely happens and the  impact is acceptable. Because scale action is graceful 
and no data will lose or duplicate.




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

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