{"record":{"id":"0797a30387012788","repo":"apache/seatunnel","slug":"some-vertices-may-not-be-reporting-metrics-yet-for","errorCode":null,"errorMessage":"Some vertices may not be reporting metrics yet for table '{}': expected {} vertices {}, but only received metrics for {} vertices {}","messagePattern":"Some vertices may not be reporting metrics yet for table '(.+?)': expected (.+?) vertices (.+?), but only received metrics for (.+?) vertices (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/BaseService.java","lineNumber":869,"sourceCode":"                unassignedMetrics.add(node);\n            }\n        }\n\n        if (!metricsByIdentifier.isEmpty()) {\n            metricsByIdentifier.keySet().stream()\n                    .sorted(vertexIdentifierComparator())\n                    .forEach(\n                            identifier -> {\n                                putMetricToMap(\n                                        metricName,\n                                        identifier + \".\" + tableName,\n                                        metricsByIdentifier.get(identifier),\n                                        tableMetricsMaps);\n                            });\n\n            if (vertexIdentifiers.size() > 1\n                    && metricsByIdentifier.size() < vertexIdentifiers.size()) {\n                log.warn(\n                        \"Some vertices may not be reporting metrics yet for table '{}': expected {} vertices {}, but only received metrics for {} vertices {}\",\n                        tableName,\n                        vertexIdentifiers.size(),\n                        vertexIdentifiers,\n                        metricsByIdentifier.size(),\n                        metricsByIdentifier.keySet());\n            }\n\n            if (unassignedMetrics != null && unassignedMetrics.size() > 0) {\n                log.warn(\n                        \"Found {} unassigned metric entries for table '{}' metric '{}', using table name key only for these entries\",\n                        unassignedMetrics.size(),\n                        tableName,\n                        metricName);\n                putMetricToMap(metricName, tableName, unassignedMetrics, tableMetricsMaps);\n            }\n            return;\n        }","sourceCodeStart":851,"sourceCodeEnd":887,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/BaseService.java#L851-L887","documentation":"While aggregating per-table metrics, processMetric() compares the number of vertices that actually reported metrics (metricsByIdentifier) against the number of configured vertices (vertexIdentifiers). When fewer vertices reported than expected for a multi-vertex table, it logs this warning listing expected and received vertices — some parallel subtasks/vertices haven't published their metrics yet.","triggerScenarios":"Polling job metrics while some vertices (source/sink parallel instances) have not yet started or reported; vertex identifiers configured for a table exceed the identifiers present in the raw metrics payload.","commonSituations":"Querying metrics immediately after job submission before all subtasks initialize; a stalled or failed subtask not reporting; transient latency between task start and first metric flush.","solutions":["Wait and re-poll metrics once all vertices are running; this is often a startup timing issue.","Check the job's vertex/task status for failed or stuck subtasks.","Verify parallelism settings and that all subtasks registered with the metrics system.","If a vertex never reports, inspect task logs for initialization errors."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// wait until all vertices report before consuming table metrics\nif (metricsByIdentifier.size() < vertexIdentifiers.size()) {\n    // defer aggregation or re-poll after a delay\n}","typeGuard":null,"tryCatchPattern":"try {\n    Map<String, Object> m = getJobMetrics(jobId);\n} catch (IncompleteMetricsException e) {\n    // retry with backoff until all vertices report\n}","preventionTips":["Delay metrics consumption until the job reaches RUNNING state with all subtasks started","Alert on vertices that never report metrics (task failure indicator)","Check subtask logs when expected vertex count is not met"],"tags":["metrics","rest-api","partial-data"],"backgroundTag":"empty-result-set","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}