apoorvmittal10 commented on code in PR #20246:
URL: https://github.com/apache/kafka/pull/20246#discussion_r2395275820
##########
core/src/main/java/kafka/server/share/SharePartition.java:
##########
@@ -675,6 +675,9 @@ public ShareAcquiredRecords acquire(
FetchIsolation isolationLevel
) {
log.trace("Received acquire request for share partition: {}-{}
memberId: {}", groupId, topicIdPartition, memberId);
+ // Since the client side changes are not yet in place, use
BATCH_OPTIMIZED as the default AcquireMode.
+ ShareAcquireMode acquireMode =
acquireMode(ShareAcquireMode.BATCH_OPTIMIZED.toString());
+ boolean strict = ShareAcquireMode.STRICT.equals(acquireMode);
Review Comment:
Thinking again regardin how it will be used until we have capability from
client to tell the acquire mode.
For broker, the acquire method should determine if strict fetch is needed.
To determine same it could be based on delivery count i.e. the fetchOffset is
available in cache and delivery count is x. So we do not need
`ShareAcquireMode` class at all. Just a function call like below, for now:
```
boolean strict = isStrictAcquireMode()
```
```
boolean isStrictAcquireMode() {
return false;
````
Later, we will implement `isStrictAcquireMode()` to return value based on
some inputs.
--
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]