C0urante commented on code in PR #13905: URL: https://github.com/apache/kafka/pull/13905#discussion_r1247963748
########## connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorSourceTask.java: ########## @@ -53,6 +53,7 @@ public class MirrorSourceTask extends SourceTask { private static final Logger log = LoggerFactory.getLogger(MirrorSourceTask.class); private static final int MAX_OUTSTANDING_OFFSET_SYNCS = 10; + public static final long NON_EXISTING_OFFSET_VALUE = -1L; Review Comment: Perhaps instead of a single sentinel value to denote uncommitted offsets, we can reject all values less than zero and replace this constant with a method? Could also help with readability with some of the Java 8 streams logic. ```java private boolean isUncommitted(Long offset) { return offset == null || offset < 0; } ``` -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org