{"record":{"id":"a0f98cb54084e77a","repo":"apache/druid","slug":"failed-to-post-the-worker-error-s-to-the-contro","errorCode":null,"errorMessage":"Failed to post the worker error [%s] to the controller","messagePattern":"Failed to post the worker error \\[(.+?)\\] to the controller","errorType":"exception","errorClass":"QueryException/ResponseException (RE)","httpStatus":null,"severity":"error","filePath":"multi-stage-query/src/main/java/org/apache/druid/msq/indexing/error/MSQWarningReportLimiterPublisher.java","lineNumber":103,"sourceCode":"    this.workerId = workerId;\n    this.host = host;\n  }\n\n  @Override\n  public void publishException(int stageNumber, Throwable e)\n  {\n    String errorCode = MSQErrorReport.getFaultFromException(e).getErrorCode();\n    synchronized (lock) {\n      totalCount = totalCount + 1;\n      errorCodeToCurrentCount.compute(errorCode, (ignored, count) -> count == null ? 1L : count + 1);\n\n      // Send the warning as an error if it is disallowed altogether\n      if (criticalWarningCodes.contains(errorCode)) {\n        try {\n          controllerClient.postWorkerError(MSQErrorReport.fromException(workerId, host, stageNumber, e));\n        }\n        catch (IOException postException) {\n          throw new RE(postException, \"Failed to post the worker error [%s] to the controller\", errorCode);\n        }\n      }\n\n      if (totalLimit != -1 && totalCount > totalLimit) {\n        return;\n      }\n    }\n\n    long limitForFault = errorCodeToLimit.getOrDefault(errorCode, -1L);\n    synchronized (lock) {\n      if (limitForFault != -1 && errorCodeToCurrentCount.getOrDefault(errorCode, 0L) > limitForFault) {\n        return;\n      }\n    }\n    delegate.publishException(stageNumber, e);\n  }\n}\n","sourceCodeStart":85,"sourceCodeEnd":121,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/multi-stage-query/src/main/java/org/apache/druid/msq/indexing/error/MSQWarningReportLimiterPublisher.java#L85-L121","documentation":"In MSQWarningReportLimiterPublisher.publishException, when a warning's error code is in criticalWarningCodes (warnings disallowed altogether), the publisher escalates it and posts it to the controller via postWorkerError. This message is the failure of that POST itself — the worker could not deliver the (now-critical) error to the controller, typically due to HTTP/network failure or the controller task being gone.","triggerScenarios":"Thrown at multi-stage-query/src/main/java/org/apache/druid/msq/indexing/error/MSQWarningReportLimiterPublisher.java:103 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check controller task logs and availability; the worker HTTP post failed, often because the controller already exited.","Inspect network/connectivity between middle managers/peons and the controller.","If the controller is gone, the query is already failing elsewhere; examine the original controller-side error."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}