You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "wombatu-kun (via GitHub)" <gi...@apache.org> on 2026/10/14 02:45:54 UTC
[PR] fix(kafka-connect): retry start commit when the topic partition lookup fails [hudi]
wombatu-kun opened a new pull request, #20312:
URL: https://github.com/apache/hudi/pull/20312
### Describe the issue this Pull Request addresses
Closes #20311
### Summary and Changelog
The Kafka Connect transaction coordinator no longer stalls when the topic partition lookup fails while it starts a commit.
- `ConnectTransactionCoordinator.startNewCommit()`: the `getLatestNumPartitions` lookup now runs inside the `try`, so a failed lookup takes the existing path that logs and reschedules START_COMMIT after `RESTART_COMMIT_DELAY_MS`, exactly like a failed `startCommit()`. Before, the `HoodieException` escaped to the event loop's catch-all, and no further commit was started until the coordinator was recreated by a task restart or a rebalance.
- `TestConnectTransactionCoordinator`: a partition lookup that fails once no longer stops the coordinator from publishing START_COMMIT.
### Impact
Liveness fix for the Kafka Connect sink: a single failed lookup, for example while the brokers are briefly unreachable as a commit starts, left every partition paused, so the connector stopped ingesting while its task stayed RUNNING. There are no public API, configuration, or storage format changes.
### Risk Level
low. The change moves one statement into an existing `try`, ahead of `startCommit()`, so a failed lookup also leaves no instant behind. The new test fails without the fix (`Wanted but not invoked: kafkaControlAgent.publishMessage(...)`) and also when the lookup is moved after `startCommit()` (the first published commit time becomes `102`), and all 23 hudi-kafka-connect unit tests pass. I audited every path that schedules START_COMMIT, where exactly one is ever pending and every other exception path in the event loop still has a pending event that recovers it, and the shutdown path, where a lookup interrupted by `stop()` reaches the same catch and `submitEvent` schedules nothing once `hasStarted` is false. A lookup that keeps failing is now retried every 500 ms, like a failing `startCommit()`; each attempt creates a Kafka `AdminClient`, which #20303 closes, so this is best merged after #20303.
### Documentation Update
none
### Contributor's checklist
- [x] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute)
- [x] Enough context is provided in the sections above
- [x] Adequate tests were added if applicable
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(kafka-connect): retry start commit when the topic partition lookup fails [hudi]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #20312:
URL: https://github.com/apache/hudi/pull/20312#issuecomment-6161270358
## [Codecov](https://app.codecov.io/gh/apache/hudi/pull/20312?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 80.70%. Comparing base ([`e9da226`](https://app.codecov.io/gh/apache/hudi/commit/e9da226db3a90747cc51d13fec56ebd1704c1699?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`ff4c565`](https://app.codecov.io/gh/apache/hudi/commit/ff4c5657138e4383e54f181e8c9e81b2e379d685?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 6 commits behind head on master.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #20312 +/- ##
============================================
- Coverage 80.70% 80.70% -0.01%
+ Complexity 35124 35123 -1
============================================
Files 2553 2553
Lines 143524 143523 -1
Branches 17474 17474
============================================
- Hits 115830 115829 -1
Misses 19746 19746
Partials 7948 7948
```
| [Components](https://app.codecov.io/gh/apache/hudi/pull/20312/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [hudi-common](https://app.codecov.io/gh/apache/hudi/pull/20312/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `84.15% <ø> (ø)` | |
| [hudi-client](https://app.codecov.io/gh/apache/hudi/pull/20312/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `83.94% <ø> (ø)` | |
| [hudi-flink](https://app.codecov.io/gh/apache/hudi/pull/20312/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `86.06% <ø> (ø)` | |
| [hudi-spark-datasource](https://app.codecov.io/gh/apache/hudi/pull/20312/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `74.18% <ø> (ø)` | |
| [hudi-utilities](https://app.codecov.io/gh/apache/hudi/pull/20312/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `78.17% <ø> (ø)` | |
| [hudi-cli](https://app.codecov.io/gh/apache/hudi/pull/20312/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `70.80% <ø> (ø)` | |
| [hudi-hadoop](https://app.codecov.io/gh/apache/hudi/pull/20312/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `71.16% <ø> (ø)` | |
| [hudi-sync](https://app.codecov.io/gh/apache/hudi/pull/20312/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `76.58% <ø> (ø)` | |
| [hudi-io](https://app.codecov.io/gh/apache/hudi/pull/20312/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `81.52% <ø> (ø)` | |
| [hudi-timeline-service](https://app.codecov.io/gh/apache/hudi/pull/20312/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `83.41% <ø> (ø)` | |
| [hudi-cloud](https://app.codecov.io/gh/apache/hudi/pull/20312/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `81.00% <ø> (ø)` | |
| [hudi-kafka-connect](https://app.codecov.io/gh/apache/hudi/pull/20312/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `54.44% <ø> (-0.05%)` | :arrow_down: |
| [Flag](https://app.codecov.io/gh/apache/hudi/pull/20312/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [hadoop-mr-java-client](https://app.codecov.io/gh/apache/hudi/pull/20312/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `43.95% <ø> (+0.01%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Files with missing lines](https://app.codecov.io/gh/apache/hudi/pull/20312?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [...ect/transaction/ConnectTransactionCoordinator.java](https://app.codecov.io/gh/apache/hudi/pull/20312?src=pr&el=tree&filepath=hudi-kafka-connect%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fhudi%2Fconnect%2Ftransaction%2FConnectTransactionCoordinator.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aHVkaS1rYWZrYS1jb25uZWN0L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9odWRpL2Nvbm5lY3QvdHJhbnNhY3Rpb24vQ29ubmVjdFRyYW5zYWN0aW9uQ29vcmRpbmF0b3IuamF2YQ==) | `80.40% <ø> (-0.08%)` | :arrow_down: |
</details>
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(kafka-connect): retry start commit when the topic partition lookup fails [hudi]
Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 merged PR #20312:
URL: https://github.com/apache/hudi/pull/20312
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org