fhan688 commented on code in PR #20271:
URL: https://github.com/apache/hudi/pull/20271#discussion_r4245755018
##########
hudi-kafka-connect/src/main/java/org/apache/hudi/connect/transaction/ConnectTransactionCoordinator.java:
##########
@@ -132,24 +135,25 @@ public void start() {
@Override
public void stop() {
- kafkaControlClient.deregisterTransactionCoordinator(this);
- scheduler.shutdownNow();
- hasStarted.set(false);
- if (executorService != null) {
- boolean terminated = false;
+ if (!hasStarted.compareAndSet(true, false)) {
Review Comment:
Thanks, fixed. Coordinator shutdown and successful deregistration are now
tracked separately. If deregistration fails, local resources are still shut
down, while a subsequent `stop()` retries deregistration. Once it succeeds,
further calls remain idempotent. A regression test covers the fail-then-retry
scenario.
--
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]