adixitconfluent commented on code in PR #17539:
URL: https://github.com/apache/kafka/pull/17539#discussion_r1828824435
##########
core/src/main/java/kafka/server/share/DelayedShareFetch.java:
##########
@@ -54,18 +59,23 @@ public class DelayedShareFetch extends DelayedOperation {
private final ShareFetchData shareFetchData;
private final ReplicaManager replicaManager;
- private Map<TopicIdPartition, FetchRequest.PartitionData>
topicPartitionDataFromTryComplete;
+ private Map<TopicIdPartition, FetchRequest.PartitionData>
partitionsToComplete;
+ private Map<TopicIdPartition, LogReadResult> partitionsAlreadyFetched;
private final SharePartitionManager sharePartitionManager;
+ private final Map<TopicIdPartition, SharePartition> sharePartitions;
DelayedShareFetch(
ShareFetchData shareFetchData,
ReplicaManager replicaManager,
- SharePartitionManager sharePartitionManager) {
+ SharePartitionManager sharePartitionManager,
+ Map<TopicIdPartition, SharePartition> sharePartitions) {
super(shareFetchData.fetchParams().maxWaitMs, Option.empty());
this.shareFetchData = shareFetchData;
this.replicaManager = replicaManager;
- this.topicPartitionDataFromTryComplete = new LinkedHashMap<>();
+ this.partitionsToComplete = new LinkedHashMap<>();
Review Comment:
Yes, there have been comments above where I left some variables as null, and
it was pointed out that I need to initialize them to avoid null checks at
different places, then we just need to do empty checks.. Hence, I've
implemented it in this manner.
--
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]