loserwang1024 commented on code in PR #4422:
URL: https://github.com/apache/flink-cdc/pull/4422#discussion_r3748306079
##########
flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/main/java/org/apache/flink/cdc/connectors/mysql/source/config/MySqlSourceConfig.java:
##########
@@ -42,6 +46,8 @@
/** A MySql Source configuration which is used by {@link MySqlSource}. */
public class MySqlSourceConfig implements Serializable {
private static final long serialVersionUID = 1L;
+ private static final Duration TABLE_FILTER_CACHE_EXPIRE_DURATION =
Duration.ofHours(1);
Review Comment:
I suggest simplifying the cache eviction strategy. Instead of implementing
time-based expiration, we should rely solely on a size limit with an LRU (Least
Recently Used) policy to prevent OOM errors.
Regarding expiration: Even if a record is deleted from the database, the
cached table name and regex pattern remain logically valid for matching
purposes. Therefore, adding timeout logic adds unnecessary complexity without
providing significant benefit.
--
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]