gejinzh commented on issue #12820:
URL: https://github.com/apache/hudi/issues/12820#issuecomment-2658368072
> It looks like the condition should be `attemptId >= 0` and the logic in
`#handleBootstrapEvent` can be removed.
```
if (context.isRestored()) {
restoreWriteMetadata();
} else {
sendBootstrapEvent();
}
```
```#restoreWriteMetaData``` executed;
```
private void restoreWriteMetadata() throws Exception {
boolean eventSent = false;
HoodieTimeline pendingTimeline =
this.metaClient.getActiveTimeline().filterPendingExcludingCompaction();
for (WriteMetadataEvent event : this.writeMetadataState.get()) {
// Must filter out the completed instants in case it is a partial
failover,
// the write status should not be accumulated in such case.
if (pendingTimeline.containsInstant(event.getInstantTime())) {
// Reset taskID for event
event.setTaskID(taskID);
// The checkpoint succeed but the meta does not commit,
// re-commit the inflight instant
this.eventGateway.sendEventToCoordinator(event);
LOG.info("Send uncommitted write metadata event to coordinator,
task[{}].event: [{}]", taskID, event);
eventSent = true;
}
}
if (!eventSent) {
sendBootstrapEvent();
}
}
```
The write statuses of the event recovered from the checkpoint are empty and
have a Inflight instant; so coordinator reused instant but not unblocked write
tasks;
I haven't modified the code to solve this problem yet, I will give it a try
--
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]