squah-confluent commented on code in PR #20780:
URL: https://github.com/apache/kafka/pull/20780#discussion_r2470864819
##########
coordinator-common/src/main/java/org/apache/kafka/coordinator/common/runtime/CoordinatorRuntime.java:
##########
@@ -220,8 +226,10 @@ public CoordinatorRuntime<S, U> build() {
throw new IllegalArgumentException("Serializer must be set.");
if (compression == null)
compression = Compression.NONE;
- if (appendLingerMs < 0)
- throw new IllegalArgumentException("AppendLinger must be >=
0");
+ if (appendLingerMs == null)
+ appendLingerMs = OptionalInt.empty();
Review Comment:
I was following the existing pattern in the builder. We don't set a default
value for `logPrefix`, `logContext` and `compression` and initialize them in
`build()`.
##########
coordinator-common/src/main/java/org/apache/kafka/coordinator/common/runtime/CoordinatorRuntime.java:
##########
@@ -186,6 +186,11 @@ public Builder<S, U> withCompression(Compression
compression) {
}
public Builder<S, U> withAppendLingerMs(int appendLingerMs) {
+ this.appendLingerMs = OptionalInt.of(appendLingerMs);
+ return this;
+ }
Review Comment:
Sure, we can remove the method.
--
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]