{"record":{"id":"ce5cb16439128e72","repo":"apache/druid","slug":"status-report-not-available","errorCode":null,"errorMessage":"Status report not available","messagePattern":"Status report not available","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"multi-stage-query/src/main/java/org/apache/druid/msq/indexing/TaskReportQueryListener.java","lineNumber":255,"sourceCode":"      if (report.getCounters() != null) {\n        writeObjectField(FIELD_COUNTERS, report.getCounters());\n      }\n\n      jg.writeEndObject(); // End MSQTaskReportPayload\n      jg.writeEndObject(); // End MSQTaskReport\n      jg.writeObjectField(TaskContextReport.REPORT_KEY, new TaskContextReport(taskId, taskContext));\n      jg.writeEndObject(); // End report\n      jg.close();\n    }\n    catch (IOException e) {\n      throw new RuntimeException(e);\n    }\n  }\n\n  public MSQStatusReport getStatusReport()\n  {\n    if (statusReport == null) {\n      throw new ISE(\"Status report not available\");\n    }\n\n    return statusReport;\n  }\n\n  /**\n   * Initialize {@link #jg}, if it wasn't already set up. Writes the object start marker, too.\n   */\n  private void openGenerator() throws IOException\n  {\n    if (jg == null) {\n      jg = jsonMapper.createGenerator(reportSink.get());\n      jg.writeStartObject(); // Start report\n      jg.writeObjectFieldStart(MSQTaskReport.REPORT_KEY); // Start MSQTaskReport\n      jg.writeStringField(FIELD_TYPE, MSQTaskReport.REPORT_KEY);\n      jg.writeStringField(FIELD_TASK_ID, taskId);\n      jg.writeObjectFieldStart(FIELD_PAYLOAD); // Start MSQTaskReportPayload\n    }","sourceCodeStart":237,"sourceCodeEnd":273,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/multi-stage-query/src/main/java/org/apache/druid/msq/indexing/TaskReportQueryListener.java#L237-L273","documentation":"getStatusReport() on TaskReportQueryListener throws this ISE when statusReport is still null — i.e. the controller is asked for a status report before the listener has ever received one. It is a lifecycle/state guard: the report is only populated once all stages finish and buildStatusReport is called, so an early getStatusReport call indicates the query has not produced status output yet.","triggerScenarios":"Thrown at multi-stage-query/src/main/java/org/apache/druid/msq/indexing/TaskReportQueryListener.java:255 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Wait for the task to progress and poll the report again; status is published when stages complete.","Check the controller task logs for an earlier failure that prevented the status report from being built.","If this occurs persistently, look for exceptions in report writing/serialization (IOException paths) that left statusReport unset."],"exampleFix":null,"handlingStrategy":"retry","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"}