mirror of https://github.com/apache/kafka.git
KAFKA-18265: Move persister call outside of the lock (3/N) (#20316)
Minor PR to move persister call outside of the lock. The lock is not required while making the persister call. Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>, Abhinav Dixit <adixit@confluent.io>
This commit is contained in:
parent
f12a9d8413
commit
ddab943b0b
|
@ -2424,6 +2424,9 @@ public class SharePartition {
|
||||||
releaseAcquisitionLockOnTimeoutForPerOffsetBatch(inFlightBatch, stateBatches, memberId, firstOffset, lastOffset);
|
releaseAcquisitionLockOnTimeoutForPerOffsetBatch(inFlightBatch, stateBatches, memberId, firstOffset, lastOffset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} finally {
|
||||||
|
lock.writeLock().unlock();
|
||||||
|
}
|
||||||
|
|
||||||
if (!stateBatches.isEmpty()) {
|
if (!stateBatches.isEmpty()) {
|
||||||
writeShareGroupState(stateBatches).whenComplete((result, exception) -> {
|
writeShareGroupState(stateBatches).whenComplete((result, exception) -> {
|
||||||
|
@ -2436,9 +2439,6 @@ public class SharePartition {
|
||||||
maybeUpdateCachedStateAndOffsets();
|
maybeUpdateCachedStateAndOffsets();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} finally {
|
|
||||||
lock.writeLock().unlock();
|
|
||||||
}
|
|
||||||
|
|
||||||
// If we have an acquisition lock timeout for a share-partition, then we should check if
|
// If we have an acquisition lock timeout for a share-partition, then we should check if
|
||||||
// there is a pending share fetch request for the share-partition and complete it.
|
// there is a pending share fetch request for the share-partition and complete it.
|
||||||
|
|
Loading…
Reference in New Issue