apoorvmittal10 commented on code in PR #17965:
URL: https://github.com/apache/kafka/pull/17965#discussion_r1869433013
##########
core/src/main/java/kafka/server/share/SharePartition.java:
##########
@@ -2337,7 +2335,10 @@ TimerTask acquisitionLockTimeoutTask() {
return acquisitionLockTimeoutTask;
}
- void updateAcquisitionLockTimeoutTask(AcquisitionLockTimerTask
acquisitionLockTimeoutTask) {
+ void updateAcquisitionLockTimeoutTask(AcquisitionLockTimerTask
acquisitionLockTimeoutTask) throws IllegalArgumentException {
+ if (this.acquisitionLockTimeoutTask != null) {
+ throw new IllegalArgumentException("An already existing
acquisition lock timeout task: " + this.acquisitionLockTimeoutTask + " is being
overridden for the offset");
Review Comment:
Why to `this.acquisitionLockTimeoutTask` in error message, does it have
toString method?
```suggestion
throw new IllegalArgumentException("Existing acquisition
lock timeout exists, cannot override.");
```
--
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]