ic4y commented on code in PR #4683:
URL:
https://github.com/apache/incubator-seatunnel/pull/4683#discussion_r1189383524
##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/TaskExecutionService.java:
##########
@@ -142,7 +143,7 @@ public TaskExecutionService(NodeEngineImpl nodeEngine,
HazelcastProperties prope
scheduledExecutorService =
Executors.newSingleThreadScheduledExecutor();
scheduledExecutorService.scheduleAtFixedRate(
this::updateMetricsContextInImap,
- 0,
+ 30 * 1000, // Wait for MapStore loading to complete
Review Comment:
You can check whether the MapStore has finished loading within the
getJobMetricsBackupInterval() method. If it hasn't finished loading, just print
a log and do not perform any other actions. This way, there is no need to add a
delay at this point.
##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/TaskExecutionService.java:
##########
@@ -142,7 +142,7 @@ public TaskExecutionService(NodeEngineImpl nodeEngine,
HazelcastProperties prope
scheduledExecutorService =
Executors.newSingleThreadScheduledExecutor();
scheduledExecutorService.scheduleAtFixedRate(
this::updateMetricsContextInImap,
- 0,
+ 30, // Wait for MapStore loading to complete, wait 30s
Review Comment:
You can check whether the MapStore has finished loading within the
getJobMetricsBackupInterval() method. If it hasn't finished loading, just print
a log and do not perform any other actions. This way, there is no need to add a
delay at this point.
--
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]