e-mhui opened a new pull request, #8607:
URL: https://github.com/apache/inlong/pull/8607

   ### Prepare a Pull Request
   
   [INLONG-8602][Sort] Fix StackOverflowError of Oracle CDC
   
   - Fixes #8602 
   
   ### Motivation
   
   **DebeziumDeserializationSchema** has three methods:
   
   - `void deserialize(SourceRecord record, Collector<T> out)`
   - `default void deserialize(SourceRecord record, Collector<T> out, 
TableChanges.TableChange tableSchema)`
   - `default void deserialize(SourceRecord record, Collector<T> out, Boolean 
isStreamingPhase)`
   
   **RowDataDebeziumDeserializeSchema** is an implementation of 
**DebeziumDeserializationSchema**. When calling the 
`RowDataDebeziumDeserializeSchema.deserialize(SourceRecord record, 
Collector<RowData> out)` method, it invokes the `deserialize(record, out)` 
method, as shown in the code below:
   
   ```java
   
   ```
   
   This results in a recursive call, causing StackOverflowError like #8602.
   
   In fact, we need to call the `deserialize(SourceRecord record, 
Collector<RowData> out, TableChange tableSchema)` method. Previously, we could 
use `deserialize(record, out, null)`, but later the `deserialize(SourceRecord 
record, Collector<T> out, Boolean isStreamingPhase)` method was added, which 
conflicts with the `deserialize(SourceRecord record, Collector<RowData> out, 
TableChange tableSchema)` method.
   
   <img width="1312" alt="image" 
src="https://github.com/apache/inlong/assets/111486498/cf8db1d4-f736-4b9c-aea6-68ce99b411da";>
   
   Therefore, we must override the `deserialize(SourceRecord record, 
Collector<RowData> out, TableChange tableSchema)` method.
   
   ### Modifications
   
   Override the `RowDataDebeziumDeserializeSchema.deserialize(SourceRecord 
record, Collector<RowData> out, TableChange tableSchema)` 
   


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