@@ -2424,22 +2424,22 @@ && checkForStartOffsetWithinBatch(inFlightBatch.firstOffset(), inFlightBatch.las
24242424 releaseAcquisitionLockOnTimeoutForPerOffsetBatch (inFlightBatch , stateBatches , memberId , firstOffset , lastOffset );
24252425 }
24262426 }
2427-
2428- if (!stateBatches .isEmpty ()) {
2429- writeShareGroupState (stateBatches ).whenComplete ((result , exception ) -> {
2430- if (exception != null ) {
2431- log .debug ("Failed to write the share group state on acquisition lock timeout for share partition: {}-{} memberId: {}" ,
2432- groupId , topicIdPartition , memberId , exception );
2433- }
2434- // Even if write share group state RPC call fails, we will still go ahead with the state transition.
2435- // Update the cached state and start and end offsets after releasing the acquisition lock on timeout.
2436- maybeUpdateCachedStateAndOffsets ();
2437- });
2438- }
24392427 } finally {
24402428 lock .writeLock ().unlock ();
24412429 }
24422430
2431+ if (!stateBatches .isEmpty ()) {
2432+ writeShareGroupState (stateBatches ).whenComplete ((result , exception ) -> {
2433+ if (exception != null ) {
2434+ log .debug ("Failed to write the share group state on acquisition lock timeout for share partition: {}-{} memberId: {}" ,
2435+ groupId , topicIdPartition , memberId , exception );
2436+ }
2437+ // Even if write share group state RPC call fails, we will still go ahead with the state transition.
2438+ // Update the cached state and start and end offsets after releasing the acquisition lock on timeout.
2439+ maybeUpdateCachedStateAndOffsets ();
2440+ });
2441+ }
2442+
24432443 // If we have an acquisition lock timeout for a share-partition, then we should check if
24442444 // there is a pending share fetch request for the share-partition and complete it.
24452445 // Skip null check for stateBatches, it should always be initialized if reached here.
0 commit comments