Doris-Breakwater commented on issue #71466:
URL: https://github.com/apache/doris/issues/71466#issuecomment-7449554195

   Confirmed on the `4.1.5-release` source. `DorisBatchStreamLoad.commitOffset` 
declares a UTF-8 JSON request and uses HttpCore’s ISO-8859-1 
`StringEntity(String)` constructor for the body. In a standalone check using 
HttpCore 4.4.13, the UTF-8 JSON parser rejected `été`, read `cœur` and `€` as 
`c?ur` and `?`, and read `é` as `é`. With the explicit UTF-8 constructor, 
every string round-tripped. The live MySQL/FE restart and binlog-purge cases 
are from the report. [CDC request 
construction](https://github.com/apache/doris/blob/4.1.5-release/fs_brokers/cdc_client/src/main/java/org/apache/doris/cdcclient/sink/DorisBatchStreamLoad.java#L517-L573)
   
   The CDC coordinator flushes row loads before committing the offset, so 
writes can be visible while the checkpoint is stale. It sends `tableSchemas` 
after DDL or on a binlog split when the FE has no schema. If JSON decoding 
fails, the FE rejects the body before the offset handler runs. The FE can 
return a nonzero JSON error code inside HTTP 200, which explains the client’s 
`commit offset failed with: HTTP/1.1 200 OK`. If the modified text still 
parses, the FE can save it with the offset and supply the changed schema to a 
resumed reader. [CDC flush and 
commit](https://github.com/apache/doris/blob/4.1.5-release/fs_brokers/cdc_client/src/main/java/org/apache/doris/cdcclient/service/PipelineCoordinator.java#L706-L731)
 · [FE error 
response](https://github.com/apache/doris/blob/4.1.5-release/fe/fe-core/src/main/java/org/apache/doris/httpv2/entity/ResponseEntityBuilder.java#L60-L64)
 · [FE checkpoint 
update](https://github.com/apache/doris/blob/4.1.5-release/fe/fe-core/src/main/java/or
 
g/apache/doris/job/extensions/insert/streaming/StreamingInsertJob.java#L1576-L1589)
 · [Reader schema 
restore](https://github.com/apache/doris/blob/4.1.5-release/fs_brokers/cdc_client/src/main/java/org/apache/doris/cdcclient/source/reader/mysql/MySqlSourceReader.java#L438-L447)
   
   Draft PR #71467 applies explicit UTF-8 to both requests. `reportTaskFailure` 
shares the encoding defect for a non-ASCII error reason. Its live impact still 
needs verification. Run the PR’s HTTP regression and extend it to compare the 
parsed schema with the original for `été`, `€`, and `é`. Check the 
task-failure reason round-trip too. Then use the supplied MySQL case to verify 
that `CurrentOffset` advances and that values match the source before and after 
FE restart. Prioritize a `branch-4.1` backport after validation. `branch-4.0` 
has the same constructor in `commitOffset`, and its request type has no 
`tableSchemas` field, so verify the affected payload there before assigning the 
same impact. [Draft fix and 
test](https://github.com/apache/doris/pull/71467/files) · [4.0 request 
fields](https://github.com/apache/doris/blob/branch-4.0/fe/fe-common/src/main/java/org/apache/doris/job/cdc/request/CommitOffsetRequest.java#L33-L41)
   
   The report has enough detail to start the fix. For cluster validation or 
recovery, capture one matching FE exception and CDC `commit result` response by 
job/task ID, the last saved binlog file and position, and the source and Doris 
rows for the same primary keys across the restart. For an affected job, check 
binlog availability before choosing a replay point, and verify the saved schema 
and existing destination rows when planning recovery.
   
   Breakwater-GitHub-Analysis-Slot: slot_42904065505a
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to