You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by co...@apache.org on 2025/09/08 10:33:25 UTC

(seatunnel) branch dev updated: [Fix][Zeta] Handle null startTimestamp in `BaseService` to fix flaky `MysqlCDCWithBinlogDeleteIT` test (#9815)

This is an automated email from the ASF dual-hosted git repository.

corgy pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/seatunnel.git


The following commit(s) were added to refs/heads/dev by this push:
     new d1c0a6af8f [Fix][Zeta] Handle null startTimestamp in `BaseService` to fix flaky `MysqlCDCWithBinlogDeleteIT` test (#9815)
d1c0a6af8f is described below

commit d1c0a6af8f0355c44ac2a4807ea33538a496553e
Author: dy102 <13...@users.noreply.github.com>
AuthorDate: Mon Sep 8 19:33:21 2025 +0900

    [Fix][Zeta] Handle null startTimestamp in `BaseService` to fix flaky `MysqlCDCWithBinlogDeleteIT` test (#9815)
---
 .../seatunnel/engine/server/rest/service/BaseService.java    | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/BaseService.java b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/BaseService.java
index eedcb2da2b..8b16b4bb11 100644
--- a/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/BaseService.java
+++ b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/BaseService.java
@@ -206,11 +206,13 @@ public abstract class BaseService {
     private String getJobStartTime(long jobId) {
         IMap<Object, Long[]> stateTimestamps =
                 nodeEngine.getHazelcastInstance().getMap(Constant.IMAP_STATE_TIMESTAMPS);
-        Long[] jobnStateTimestamps = stateTimestamps.get(jobId);
-        if (jobnStateTimestamps != null) {
-            Long startTimestamp = jobnStateTimestamps[JobStatus.SCHEDULED.ordinal()];
-            return DateTimeUtils.toString(
-                    startTimestamp, DateTimeUtils.Formatter.YYYY_MM_DD_HH_MM_SS);
+        Long[] jobStateTimestamps = stateTimestamps.get(jobId);
+        if (jobStateTimestamps != null) {
+            Long startTimestamp = jobStateTimestamps[JobStatus.SCHEDULED.ordinal()];
+            if (startTimestamp != null) {
+                return DateTimeUtils.toString(
+                        startTimestamp, DateTimeUtils.Formatter.YYYY_MM_DD_HH_MM_SS);
+            }
         }
         return null;
     }