jsancio commented on code in PR #19668:
URL: https://github.com/apache/kafka/pull/19668#discussion_r2114290405
##########
raft/src/main/java/org/apache/kafka/raft/KafkaRaftClient.java:
##########
@@ -3301,20 +3313,23 @@ private long maybeSendFetchToBestNode(FollowerState
state, long currentTimeMs) {
private long maybeSendFetchOrFetchSnapshot(FollowerState state, long
currentTimeMs) {
final Supplier<ApiMessage> requestSupplier;
+ final ApiKeys requestType;
if (state.fetchingSnapshot().isPresent()) {
RawSnapshotWriter snapshot = state.fetchingSnapshot().get();
long snapshotSize = snapshot.sizeInBytes();
requestSupplier = () ->
buildFetchSnapshotRequest(snapshot.snapshotId(), snapshotSize);
+ requestType = ApiKeys.FETCH_SNAPSHOT;
Review Comment:
Should we fix all of the `build.*Request` methods to instead return a
`RequestSupplier`? Quickly looked at the code and it looks like we always call
these kind of methods inside a lambda.
--
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]