Joy-2000 commented on issue #19215:
URL: https://github.com/apache/hudi/issues/19215#issuecomment-4905132682

   Base on branch release-1.1.1 and fix1, mock injected in 
`commitInstants(...)` of `StreamWriteOperatorCoordinator`:
   
   ```java
   if (checkpointId == 2) {
     throw new HoodieException("Mock Exception");
   }
   ```
   
   **Step 1 — Start the job**
   
   **Step 2 — Commit fails → coordinator triggers global failover after CP2.**
   
   <img width="4514" height="1294" alt="Image" 
src="https://github.com/user-attachments/assets/87ebb392-8c20-4f33-b12e-9813a8c7e19b";
 />
   
   **Step 3 — Write tasks restore write metadata from state** (last instant 
stored in metadata: `20260706150153773`)
   ```
   2026-07-06 15:00:38.702 INFO  [Source:: datagen[1] :2) (2/2)#0] 
org.apache.hudi.sink.common.AbstractStreamWriteFunction - Init write metadata 
state : 
   2026-07-06 15:00:38.967 INFO  [Source:: datagen[1] :2) (1/2)#0] 
org.apache.hudi.sink.common.AbstractStreamWriteFunction - Init write metadata 
state : 
   ...
   2026-07-06 15:04:02.437 INFO  [Source:: datagen[1] :2) (2/2)#1] 
org.apache.hudi.sink.common.AbstractStreamWriteFunction - Init write metadata 
state : WriteMetadataEvent{writeStatusesSize=10, taskID=1, checkpointId=1, 
instantTime='20260706150153773', lastBatch=false, endInput=false, 
bootstrap=true} & 
   2026-07-06 15:04:02.445 INFO  [Source:: datagen[1] :2) (1/2)#1] 
org.apache.hudi.sink.common.AbstractStreamWriteFunction - Init write metadata 
state : WriteMetadataEvent{writeStatusesSize=10, taskID=0, checkpointId=1, 
instantTime='20260706150153773', lastBatch=false, endInput=false, 
bootstrap=true} & 
   ```
   
   **Step 4 — Task restarts with `AttemptId = 1` (same-graph global 
failover).** (No resend write metadata of `20260706150153773`)
   
   ```
   2026-07-06 15:00:38.702 INFO  [Source:: datagen[1] :2) (2/2)#0] 
org.apache.hudi.sink.common.AbstractStreamWriteFunction - Send bootstrap event 
when init write metadata. AttemptId : 0 CheckpointId : -1
   2026-07-06 15:00:38.967 INFO  [Source:: datagen[1] :2) (1/2)#0] 
org.apache.hudi.sink.common.AbstractStreamWriteFunction - Send bootstrap event 
when init write metadata. AttemptId : 0 CheckpointId : -1
   ...
   2026-07-06 15:04:02.439 INFO  [Source:: datagen[1] :2) (2/2)#1] 
org.apache.hudi.sink.common.AbstractStreamWriteFunction - Send bootstrap event 
when init write metadata. AttemptId : 1 CheckpointId : 2
   2026-07-06 15:04:02.446 INFO  [Source:: datagen[1] :2) (1/2)#1] 
org.apache.hudi.sink.common.AbstractStreamWriteFunction - Send bootstrap event 
when init write metadata. AttemptId : 1 CheckpointId : 2
   ```
   
   **Step 5 — The JM commits the instant and it completes:**
   ```
   2026-07-06 15:04:19.188 INFO  [meta-event-handle:ent-handle] 
org.apache.hudi.client.BaseHoodieWriteClient - Committing 20260706150153773 
action commit
   ...
   2026-07-06 15:04:19.849 INFO  [meta-event-handle:ent-handle] 
org.apache.hudi.client.BaseHoodieWriteClient - Committed 20260706150153773
   ```
   
   **HDFS timeline now shows the **completed** commit, and all subsequent 
instants proceed normally:**
   
   <img width="3872" height="744" alt="Image" 
src="https://github.com/user-attachments/assets/fc20cb29-0040-4ff1-9482-4d3c522302af";
 />
   
   
   


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