Hisoka-X opened a new pull request, #4270:
URL: https://github.com/apache/flink-cdc/pull/4270

   This close https://issues.apache.org/jira/browse/FLINK-38455
   
   When the pipeline starts, Flink CDC sends CreateTableEvent (a 
SchemaChangeEvent) before any DataChangeEvent. The ElasticsearchEventSerializer 
returns null for SchemaChangeEvent since it only updates the internal schema 
cache and does not produce an actual ES operation.
   
   In Elasticsearch8AsyncWriter.submitRequestEntries(), operations with null 
BulkOperationVariant are skipped via continue. However, when all operations in 
a batch are SchemaChangeEvent (which is common at pipeline startup), no 
operation is added to the BulkRequest.Builder. Calling br.build() on an empty 
builder throws:
   ```
   Missing required property 'BulkRequest.operations'
   ```
   because operations is a required field in the ES8 Java Client's BulkRequest.
   
   The fix checks whether any valid operation was added before calling 
br.build(). If the batch is effectively empty, it returns success immediately 
without sending a request to Elasticsearch.


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