mattwong949 commented on a change in pull request #10914: URL: https://github.com/apache/kafka/pull/10914#discussion_r668302886
########## File path: clients/src/main/java/org/apache/kafka/common/record/DefaultRecordBatch.java ########## @@ -246,6 +265,19 @@ public boolean isTransactional() { return (attributes() & TRANSACTIONAL_FLAG_MASK) > 0; } + @Override + public boolean hasDeleteHorizonMs() { + return (attributes() & DELETE_HORIZON_FLAG_MASK) > 0; + } + + @Override + public long deleteHorizonMs() { Review comment: I've removed the `hasDeleteHorizonMs` function from the interface. I've made it so the DefaultRecordBatch still has the function as a private helper, but the logic overall is pretty much unchanged I've also made the change to return OptionalLong for `deleteHorizonMs` to see how it looks. I think that the current usage in the cases for which this value returns `OptionalLong.Empty` is to just use `RecordBatch.NO_TIMESTAMP`, so I am thinking it could be cleaner to keep it as a `long` and contain the logic for returning the deleteHorizonMs value or `RecordBatch.NO_TIMESTAMP` -- 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