adixitconfluent commented on code in PR #17965:
URL: https://github.com/apache/kafka/pull/17965#discussion_r1868236751
##########
core/src/main/java/kafka/server/share/SharePartition.java:
##########
@@ -2221,6 +2220,13 @@ AcquisitionLockTimerTask
batchAcquisitionLockTimeoutTask() {
return batchState.acquisitionLockTimeoutTask;
}
+ private RecordState batchRollbackState() {
+ if (batchState == null) {
Review Comment:
Sorry, but I don't understand the intention behind this. I cannot use the
value returned by the example that you mentioned directly. We anyways need
different attribute of `batchState` for different functions and hence we have
different functions such as `batchState()`, `batchMemberId()` and
`batchDeliveryCount()`. Even the message in each of the exceptions thrown in
these functions is different. Hence, I am not sure how will it be useful.
```
private RecordState batchRollbackState() {
if (batchState == null) {
throw new IllegalStateException("The batch state is not
available as the offset state is maintained");
}
return batchState.rollbackState();
}
```
--
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]