hbgstc123 opened a new pull request, #7408:
URL: https://github.com/apache/hudi/pull/7408
### Change Logs
code from `org.apache.hudi.sink.compact.CompactOperator`:
` executor.execute(
() -> doCompaction(instantTime, compactionOperation, collector,
reloadWriteConfig()),
(errMsg, t) -> collector.collect(new
CompactionCommitEvent(instantTime, compactionOperation.getFileId(), taskID)),
"Execute compaction for instant %s from task %d", instantTime,
taskID);
`
In flink inline async compaction, if OOM error happen during execution of
`doCompaction(...)`, exception hook will not be executed, and no
CompactionCommitEvent is sent to `CompactionCommitSink`. Result in compaction
instant stuck in "inflight" state, never succeed or rollback, in fact the
compaction is failed.
I change the execute sequence: run ExceptionHook before re-throw
FatalErrorOrOOM.
I tested and it can sent `CompactionCommitEvent` to compaction sink to
rollback the failed compaction when OOM happen during compaction.
### Impact
no
### Risk level (write none, low medium or high below)
low
### Documentation Update
no
### Contributor's checklist
- [ ] Read through [contributor's
guide](https://hudi.apache.org/contribute/how-to-contribute)
- [ ] Change Logs and Impact were stated clearly
- [ ] Adequate tests were added if applicable
- [ ] CI passed
--
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]