adixitconfluent commented on code in PR #20246:
URL: https://github.com/apache/kafka/pull/20246#discussion_r2459554092
##########
core/src/main/java/kafka/server/share/SharePartition.java:
##########
@@ -1596,9 +1628,45 @@ private ShareAcquiredRecords acquireNewBatchRecords(
}
}
+ private AcquiredRecords filterShareAcquiredRecordsInRecordLimitMode(int
maxFetchRecords, List<AcquiredRecords> acquiredRecords) {
Review Comment:
you should either write a comment on top of this function that this function
should be called only when the caller holds the write lock
OR
put the function within write lock
```
lock.writeLock().lock();
try {
---
---
} finally {
lock.writeLock().unlock();
}
```
We don't know how we are going to utilize this function in the future. So
although, the code looks good right now, in the future it may create a problem.
--
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]