github-actions[bot] commented on code in PR #65588:
URL: https://github.com/apache/doris/pull/65588#discussion_r3593746028


##########
fs_brokers/cdc_client/src/main/java/io/debezium/connector/mysql/MySqlStreamingChangeEventSource.java:
##########
@@ -408,7 +416,10 @@ protected void handleEvent(
             eventDispatcher.dispatchHeartbeatEvent(partition, offsetContext);
 
             // Capture that we've completed another event ...
-            offsetContext.completeEvent();
+            // OceanBase heartbeat events must not participate in restart 
event counting.
+            if (shouldCompleteEvent(excludeHeartbeatFromEventCount, 
eventType)) {

Review Comment:
   [P1] Apply heartbeat exclusion to the replay skip count too
   
   `initialEventsToSkip` is restored from the events counted by 
`completeEvent()`, but this change filters OceanBase heartbeats only when 
incrementing that count. While replaying a partial transaction, lines 427-431 
still decrement the count for such a heartbeat. For example, with a saved 
prefix of BEGIN plus one row, replayed BEGIN leaves one skip; a 
timing-dependent HEARTBEAT consumes it, clears `skipEvent`, and the 
already-processed row is emitted again. Please use the same 
`shouldCompleteEvent(...)` decision for both counting and replay decrement, and 
add a deterministic BEGIN/HEARTBEAT/row restart test.



##########
regression-test/data/job_p0/streaming_job/cdc/test_streaming_oceanbase_job_all_type.out:
##########
@@ -0,0 +1,8 @@
+-- This file is automatically generated. You should know what you did if you 
want to edit this
+-- !oceanbase_all_type_snapshot --
+1      200     18446744073709551610    123456789.12345 true    2026-07-10      
2026-07-10T10:11:12.123456      2026-07-10T10:11:12.123456      abc     
snapshot        snapshot text   41514944        {"id": 1, "name": "snapshot"}   
A,C     NEW     4367734D
+2      \N      \N      \N      \N      \N      \N      \N      \N      \N      
\N      \N      \N      \N      \N      \N
+
+-- !oceanbase_all_type_incremental --
+1      200     18446744073709551610    1.25000 true    2026-07-10      
2026-07-10T10:11:12.123456      2026-07-10T02:11:12.123456      abc     updated 
snapshot text   41514944        {"id":1,"name":"snapshot"}      A,C     NEW     
4367734D

Review Comment:
   [P1] Keep OceanBase TIMESTAMP values consistent across snapshot and CDC
   
   This expected result records `id=1.event_timestamp` as `10:11:12.123456` 
after the snapshot, but as `02:11:12.123456` after the UPDATE at suite lines 
123-124, which changes only `amount` and `variable_text`. With 
`serverTimezone=UTC`, the established MySQL-compatible contract keeps an 
unchanged TIMESTAMP at the same instant across snapshot and binlog paths; here 
the first unrelated update silently shifts it by eight hours. Please align 
OceanBase snapshot and binlog timestamp decoding, keep this untouched value 
stable, and regenerate the result with an explicit regression assertion for the 
transition.



##########
fe/fe-core/src/main/java/org/apache/doris/job/common/DataSourceType.java:
##########
@@ -19,5 +19,6 @@
 
 public enum DataSourceType {
     MYSQL,
-    POSTGRES
+    POSTGRES,
+    OCEANBASE

Review Comment:
   [P2] Wire OCEANBASE through the cdc_stream entry path
   
   Adding this shared enum value makes `cdc_stream(type="oceanbase", ...)` pass 
`DataSourceType.valueOf()`, but `CdcStreamTableValuedFunction.validate()` still 
handles only MYSQL and POSTGRES and then throws `Unsupported type: OCEANBASE`. 
That blocks both standalone TVF use and streaming INSERT jobs before they can 
reach the already-compatible TVF offset provider, `getRemoteDbName()`, or the 
new CDC reader. Please add the MySQL-compatible OceanBase validation/preflight 
here and cover both cdc_stream forms.



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