[ 
https://issues.apache.org/jira/browse/KAFKA-18175?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17904181#comment-17904181
 ] 

Calvin MongoDB commented on KAFKA-18175:
----------------------------------------

> The org.apache.kafka.common.utils package is not part of the public API

 

Yeah that's fair

 

>From a quick scan it looks like there are also a few areas across apache that 
>will also be impacted by this:
 * 
[https://github.com/apache/seatunnel/blob/082814da1fd0c9ded80e19fe1ced1a64e2d89b29/seatunnel-connectors-v2/connector-cdc/connector-cdc-mongodb/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/mongodb/source/fetch/MongodbStreamFetchTask.java#L94]
 * 
[https://github.com/apache/flink-cdc/blob/c2e301222cba4120e4eded48de3c7d2e17700766/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mongodb-cdc/src/main/java/org/apache/flink/cdc/connectors/mongodb/source/reader/fetch/MongoDBStreamFetchTask.java#L86]
 * 
[https://github.com/apache/inlong/blob/36a9017c1f92e8a907b7654f2e997ce7287e259a/inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/mongodb-cdc/src/main/java/org/apache/inlong/sort/cdc/mongodb/source/reader/fetch/MongoDBStreamFetchTask.java#L93]
 * + several tests (search 
[results|https://github.com/search?q=org%3Aapache%20import%20org.apache.kafka.common.utils.SystemTime%3B&type=code])

> Breaking change for SystemTime usages
> -------------------------------------
>
>                 Key: KAFKA-18175
>                 URL: https://issues.apache.org/jira/browse/KAFKA-18175
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 3.9.0
>            Reporter: Calvin MongoDB
>            Priority: Major
>
> Kafka version 3.9 introduced a breaking change by disallowing SystemTime 
> instantiations. 
> https://issues.apache.org/jira/browse/KAFKA-16879
>  
> To quote the original ticket KAFKA-16879
> > Howerver,  system time is unique,In an application, the time obtained in 
> > different places should be consistent,  But now the time obtained by using 
> > the Java System class to interact with the underlying layer is the same。
>  
> I'm not sure we should have introduced a breaking change for these reasons. 
> Also, why do we believe that the time would be different across 
> instantiations of `new SystemTime()` if under the hood they're only calling 
> System methods `return System.currentTimeMillis();`?
>  
> Additionally, I suspect that forcing the singleton pattern with SystemTime 
> might also negatively impact usage patterns around `waitObject`, what if 
> someone wants to have multiple waitObject calls running in parallel? Which 
> they would only be able to do with separate instantiations of SystemTime.
>  
> From MongoDB's perspective it is a fairly simple change for us to just go 
> ahead and reference the singleton, but I just wanted to callout that I 
> suspect this may cause more issues for others.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to