dajac commented on code in PR #21350:
URL: https://github.com/apache/kafka/pull/21350#discussion_r2724038053
##########
coordinator-common/src/main/java/org/apache/kafka/coordinator/common/runtime/CoordinatorRuntime.java:
##########
@@ -639,12 +479,35 @@ private CoordinatorContext(
this.state = CoordinatorState.INITIAL;
this.epoch = -1;
this.deferredEventQueue = new DeferredEventQueue(logContext);
- this.timer = new EventBasedCoordinatorTimer(tp, logContext);
+ this.timer = new CoordinatorTimerImpl<>(
+ logContext,
+ CoordinatorRuntime.this.timer,
+ (operationName, operation) -> {
+ try {
+ return scheduleWriteOperation(
+ operationName,
+ tp,
+ coordinator -> operation.generate()
+ );
+ } catch (Throwable t) {
+ return CompletableFuture.failedFuture(t);
+ }
Review Comment:
I handle synchronous exceptions here so components can only work with the
future. It is simpler this way.
--
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]