You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "findingrish (via GitHub)" <gi...@apache.org> on 2023/05/24 15:22:45 UTC

[GitHub] [druid] findingrish commented on a diff in pull request #14192: Add logging for task stop operations

findingrish commented on code in PR #14192:
URL: https://github.com/apache/druid/pull/14192#discussion_r1204379884


##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskClientAsyncImpl.java:
##########
@@ -145,10 +145,16 @@ public ListenableFuture<Boolean> stopAsync(final String id, final boolean publis
   {
     return makeRequest(id, new RequestBuilder(HttpMethod.POST, "/stop" + (publish ? "?publish=true" : "")))
         .onSuccess(r -> true)
-        .onHttpError(e -> Either.value(false))
-        .onNotAvailable(e -> Either.value(false))
+        .onHttpError(e -> {
+          log.warn("Task [%s] coundln't be stopped because of http request failure.", id);
+          return Either.value(false);
+        })
+        .onNotAvailable(e -> {
+          log.warn("Task [%s] coundln't be stopped because it is not available.", id);

Review Comment:
   this corresponds to `ServiceNotAvailableException` which is thrown when the service locator returns empty set of locations 



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org