Copilot commented on code in PR #2880:
URL: https://github.com/apache/fluss/pull/2880#discussion_r2939244820
##########
fluss-flink/fluss-flink-common/src/main/java/org/apache/fluss/flink/utils/BinlogRowConverter.java:
##########
@@ -72,13 +86,14 @@ public RowData toBinlogRowData(LogRecord record) {
baseConverter.toFlinkRowData(record.getRow()));
case UPDATE_BEFORE:
- // Buffer the -U record and return null.
+ // Buffer the -U record per split and return null.
// FlinkRecordEmitter.processAndEmitRecord() skips null
results.
Review Comment:
In UPDATE_BEFORE handling, `pendingUpdateBeforeMap.put(splitId, record)`
will silently overwrite an existing buffered -U for the same splitId (e.g., if
two UPDATE_BEFORE records arrive before an UPDATE_AFTER due to a corrupted
sequence or duplicate delivery). That would cause the subsequent +U to merge
with the wrong before-image instead of failing fast. Consider detecting an
existing pending entry for the split and throwing an IllegalStateException (or
otherwise handling it explicitly) to avoid producing incorrect $binlog output.
--
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]