adixitconfluent commented on code in PR #17965:
URL: https://github.com/apache/kafka/pull/17965#discussion_r1869420148


##########
core/src/main/java/kafka/server/share/SharePartition.java:
##########
@@ -2332,12 +2330,24 @@ String memberId() {
             return memberId;
         }
 
+        private RecordState rollbackState() {
+            if (rollbackState == null) {
+                // This case could occur when the batch/offset hasn't 
transitioned even once or the state transitions have
+                // been committed.
+                return null;
+            }
+            return rollbackState.state;
+        }
+
         // Visible for testing.
         TimerTask acquisitionLockTimeoutTask() {
             return acquisitionLockTimeoutTask;
         }
 
-        void updateAcquisitionLockTimeoutTask(AcquisitionLockTimerTask 
acquisitionLockTimeoutTask) {
+        void updateAcquisitionLockTimeoutTask(AcquisitionLockTimerTask 
acquisitionLockTimeoutTask) throws IllegalStateException {
+            if (this.acquisitionLockTimeoutTask != null) {
+                throw new IllegalStateException("The acquisition lock timeout 
task is being overridden");

Review Comment:
   enhanced the error message



-- 
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]

Reply via email to