adixitconfluent commented on code in PR #17965:
URL: https://github.com/apache/kafka/pull/17965#discussion_r1862646297
##########
core/src/main/java/kafka/server/share/SharePartition.java:
##########
@@ -643,7 +643,7 @@ public ShareAcquiredRecords acquire(
// acquire subset of offsets from the in-flight batch
but only if the
// complete batch is available yet. Hence, do a
pre-check to avoid exploding
// the in-flight offset tracking unnecessarily.
- if (inFlightBatch.batchState() !=
RecordState.AVAILABLE) {
+ if (inFlightBatch.batchState() !=
RecordState.AVAILABLE || inFlightBatch.batchRollbackState() != null) {
Review Comment:
`batchRollbackState() `will throw an error if `batchState` is null i.e. the
batch is maintained per offsets. If the rollback state of the batch is null, it
will be returned as it is, it won't throw an exception.
--
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]