joyCurry30 commented on code in PR #3994:
URL: https://github.com/apache/flink-cdc/pull/3994#discussion_r2086802656


##########
flink-cdc-common/src/main/java/org/apache/flink/cdc/common/schema/Selectors.java:
##########
@@ -29,8 +33,16 @@
 /** Selectors for filtering tables. */
 public class Selectors {
 
+    private static final Duration CACHE_EXPIRE_DURATION = Duration.ofHours(1);
+
     private List<Selector> selectors;
 
+    private final Cache<TableId, Boolean> cache =

Review Comment:
   Using LoadingCache is not suitable here because the cache value computation 
(computeIsMatch) depends on the internal state of the Selectors instance 
(specifically the selectors list). LoadingCache requires a stateless or 
independently executable loading function. Forcing it here would introduce 
unnecessary complexity and potential bugs — the current manual approach is 
safer, clearer, and easier to maintain.



-- 
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]

Reply via email to