lm-ylj opened a new issue, #8174:
URL: https://github.com/apache/seatunnel/issues/8174

   ### Search before asking
   
   - [X] I had searched in the 
[feature](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22Feature%22)
 and found no similar feature requirement.
   
   
   ### Description
   
   Only when the amount of data is greater than batchSize will it be written, 
resulting in the inability to write data properly during real-time tasks, The 
relevant code is as follows:
   ```java
   @Override
   public void write(SeaTunnelRow element) throws IOException {
       rowKinds.add(element.getRowKind());
       List<String> fields = Arrays.asList(seaTunnelRowType.getFieldNames());
       String key = getKey(element, fields);
       keyBuffer.add(key);
       String value = getValue(element, fields);
       valueBuffer.add(value);
       // This line
       if (keyBuffer.size() >= batchSize) {
           doBatchWrite();
           clearBuffer();
       }
   }
   ```
   for example, mysqlcdc->redis, If there are only 3 rows of data in MySQL and 
batchSize is set to 10, the data will not be written immediately
   
   ### Usage Scenario
   
   _No response_
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


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