DanielCarter-stack commented on PR #10376:
URL: https://github.com/apache/seatunnel/pull/10376#issuecomment-3794695704
<!-- code-pr-reviewer -->
<!-- cpr:pr_reply_v2_parts {"group": "apache/seatunnel#10376", "part": 1,
"total": 1} -->
### MAJOR: getJobProgressInformation() method lacks null checks for the
sinkMetrics list and its elements, which may lead to a NullPointerException
**Location**:
`seatunnel-engine/seatunnel-engine-client/src/main/java/org/apache/seatunnel/engine/client/job/JobClient.java`
**Problem Description**:
The code directly iterates over the sinkMetrics list and calls
metric.getWriteCount(), without checking: 1) whether sinkMetrics itself is
null; 2) whether elements in the list are null. In certain abnormal scenarios
(such as Job initialization failure), this may lead to NPE.
**Impact**:
In production environments, if abnormal situations cause sinkMetrics to be
null or contain null elements, a NullPointerException will be thrown, causing
progress information retrieval to fail and affecting monitoring log output and
troubleshooting. All Jobs using the Zeta engine may be affected.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]