1996fanrui commented on code in PR #2268:
URL:
https://github.com/apache/incubator-streampark/pull/2268#discussion_r1107350361
##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/task/CheckpointProcessor.java:
##########
@@ -41,9 +44,16 @@
@Component
public class CheckpointProcessor {
+ private static final Byte DEFAULT_FLAG_BYTE = Byte.valueOf("0");
+ private static final Integer SAVEPOINT_CACHE_HOUR = 1;
+
private final Cache<String, Long> checkPointCache =
Caffeine.newBuilder().expireAfterAccess(1, TimeUnit.DAYS).build();
+ /** Cache to store the savepoint path if be stored in the db. */
+ private final Cache<String, Byte> savepointedCache =
Review Comment:
Using the savepoint path as the cache key, because you want to save the
older checkpoint, right?
If so, it's better to add some comments here to help other developers to
understand this logic.
Also, I'm not sure whether the `app_ip + job_id + chk_id` can be the cache
key ? If it can work, I think it is better than savepoint path.
Because we want to save every savepoint and the latest check point , so the
savepoint cache key added the chkid.
WDYT?
And sorry for the late response, you know, I'm very busy this month.
--
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]