eric666666 opened a new pull request, #4330:
URL: https://github.com/apache/flink-cdc/pull/4330

   ## What is the purpose of the change                                         
                                                                                
                                                                    
                                                                                
                                                                                
                                                                      
     This PR addresses 
[FLINK-39300](https://issues.apache.org/jira/browse/FLINK-39300).               
                                                                                
                                               
                                                                                
                                                                                
                                                                      
     Jackson's `ObjectMapper` is expensive to instantiate (triggers 
reflection-based                                                                
                                                                                
  
     module discovery and codec registry initialization), yet it is thread-safe 
once                                                                            
                                                                      
     configured. Two classes in the MySQL CDC connector were unnecessarily 
creating                                                                        
                                                                           
     new `ObjectMapper` instances on every method call:        
   
     - `BinlogOffsetSerializer`: both `serialize()` and `deserialize()` created 
new instances
     - `OnlineSchemaChangeUtils`: both `isOnLineSchemaChangeEvent()` and 
`parseOnLineSchemaRenameEvent()` created new instances
                                                                                
                                                                                
                                                                      
     This PR extracts `ObjectMapper` into a shared `private static final` 
constant in
     each class to eliminate repeated instantiation overhead.     


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