You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2021/11/16 22:58:34 UTC

[GitHub] [druid] loquisgon opened a new pull request #11934: Fix bug Unrecognized token 'No': was expecting (JSON String,...) when…

loquisgon opened a new pull request #11934:
URL: https://github.com/apache/druid/pull/11934


   
   ### Description
   Fixes bug were a peon task (supervisor?) makes a request to the leader (overlord) for a task report but the leader cannot find the report then the leader responds with something like:
   
   "No task reports were found for this task. The task may not exist, or it may not have completed yet
   
   But the client is expecting JSON to be returned. So client chokes with this response and dies. It has been observed in the field that sometimes this leads to the supervisor task starting to kill all other tasks running under its supervision.
   
   <hr>
   
   <!-- Check the items by putting "x" in the brackets for the done things. Not all of these items apply to every PR. Remove the items which are not done or not relevant to the PR. None of the items from the checklist below are strictly necessary, but it would be very helpful if you at least self-review the PR. -->
   
   This PR has:
   - [ X] been self-reviewed.
      - [ ] using the [concurrency checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md) (Remove this item if the PR doesn't have any relation to concurrency.)
   - [ ] added documentation for new or modified features or behaviors.
   - [ ] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
   - [ ] added or updated version, license, or notice information in [licenses.yaml](https://github.com/apache/druid/blob/master/dev/license.md)
   - [ ] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
   - [X ] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for [code coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md) is met.
   - [ ] added integration tests.
   - [ ] been tested in a test Druid cluster.
   


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


[GitHub] [druid] zachjsh commented on a change in pull request #11934: Fix bug Unrecognized token 'No': was expecting (JSON String,...) when…

Posted by GitBox <gi...@apache.org>.
zachjsh commented on a change in pull request #11934:
URL: https://github.com/apache/druid/pull/11934#discussion_r751568429



##########
File path: server/src/main/java/org/apache/druid/client/indexing/HttpIndexingServiceClient.java
##########
@@ -350,7 +352,10 @@ public TaskPayloadResponse getTaskPayload(String taskId)
           )
       );
 
-      if (responseHolder.getContent().length() == 0) {
+      if (responseHolder.getContent().length() == 0 || responseHolder.getStatus() != HttpResponseStatus.OK) {
+        if (responseHolder.getStatus() == HttpResponseStatus.NOT_FOUND) {
+          log.info("Report not found for taskId [%s] because [%s]", taskId, responseHolder.getContent());

Review comment:
       Should we log if status is other non ok code too? Think would help in debugging other cases too.




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


[GitHub] [druid] zachjsh commented on a change in pull request #11934: Fix bug Unrecognized token 'No': was expecting (JSON String,...) when…

Posted by GitBox <gi...@apache.org>.
zachjsh commented on a change in pull request #11934:
URL: https://github.com/apache/druid/pull/11934#discussion_r751568429



##########
File path: server/src/main/java/org/apache/druid/client/indexing/HttpIndexingServiceClient.java
##########
@@ -350,7 +352,10 @@ public TaskPayloadResponse getTaskPayload(String taskId)
           )
       );
 
-      if (responseHolder.getContent().length() == 0) {
+      if (responseHolder.getContent().length() == 0 || responseHolder.getStatus() != HttpResponseStatus.OK) {
+        if (responseHolder.getStatus() == HttpResponseStatus.NOT_FOUND) {
+          log.info("Report not found for taskId [%s] because [%s]", taskId, responseHolder.getContent());

Review comment:
       Should we log if status is other non ok code too?




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


[GitHub] [druid] loquisgon commented on a change in pull request #11934: Fix bug Unrecognized token 'No': was expecting (JSON String,...) when…

Posted by GitBox <gi...@apache.org>.
loquisgon commented on a change in pull request #11934:
URL: https://github.com/apache/druid/pull/11934#discussion_r751912589



##########
File path: server/src/main/java/org/apache/druid/client/indexing/HttpIndexingServiceClient.java
##########
@@ -350,7 +352,10 @@ public TaskPayloadResponse getTaskPayload(String taskId)
           )
       );
 
-      if (responseHolder.getContent().length() == 0) {
+      if (responseHolder.getContent().length() == 0 || responseHolder.getStatus() != HttpResponseStatus.OK) {
+        if (responseHolder.getStatus() == HttpResponseStatus.NOT_FOUND) {
+          log.info("Report not found for taskId [%s] because [%s]", taskId, responseHolder.getContent());

Review comment:
       Good idea..added logging for other non-ok statuses




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


[GitHub] [druid] zachjsh commented on a change in pull request #11934: Fix bug Unrecognized token 'No': was expecting (JSON String,...) when…

Posted by GitBox <gi...@apache.org>.
zachjsh commented on a change in pull request #11934:
URL: https://github.com/apache/druid/pull/11934#discussion_r751568429



##########
File path: server/src/main/java/org/apache/druid/client/indexing/HttpIndexingServiceClient.java
##########
@@ -350,7 +352,10 @@ public TaskPayloadResponse getTaskPayload(String taskId)
           )
       );
 
-      if (responseHolder.getContent().length() == 0) {
+      if (responseHolder.getContent().length() == 0 || responseHolder.getStatus() != HttpResponseStatus.OK) {
+        if (responseHolder.getStatus() == HttpResponseStatus.NOT_FOUND) {
+          log.info("Report not found for taskId [%s] because [%s]", taskId, responseHolder.getContent());

Review comment:
       Should we log if status is other non ok code too or content is empty? Think would help in debugging other cases too.




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


[GitHub] [druid] loquisgon merged pull request #11934: Fix bug Unrecognized token 'No': was expecting (JSON String,...) when…

Posted by GitBox <gi...@apache.org>.
loquisgon merged pull request #11934:
URL: https://github.com/apache/druid/pull/11934


   


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