Skip to content

Latest commit

 

History

History
80 lines (51 loc) · 2.96 KB

kafka-server-ReplicaFetcherBlockingSend.adoc

File metadata and controls

80 lines (51 loc) · 2.96 KB

ReplicaFetcherBlockingSend

ReplicaFetcherBlockingSend is…​FIXME

ReplicaFetcherBlockingSend is created exclusively when ReplicaFetcherThread is created.

ReplicaFetcherBlockingSend uses NetworkClient to send requests for…​FIXME

ReplicaFetcherBlockingSend sendRequest
Figure 1. ReplicaFetcherBlockingSend’s Sending Client Request and Waiting for Response

ReplicaFetcherBlockingSend uses replica.socket.timeout.ms configuration property when sending a request to the partition leader broker.

Creating ReplicaFetcherBlockingSend Instance

ReplicaFetcherBlockingSend takes the following when created:

ReplicaFetcherBlockingSend initializes the internal registries and counters.

Sending Client Request and Waiting for Response — sendRequest Method

sendRequest(requestBuilder: Builder[_ <: AbstractRequest]): ClientResponse

sendRequest requests NetworkClientUtils to wait until the connection is ready to the source broker node (in replica.socket.timeout.ms).

sendRequest requests NetworkClient to create a new client request to the source broker.

sendRequest requests NetworkClientUtils to send the client request and wait for a response.

Note
sendRequest is a blocking operation (i.e. blocks the current thread) and polls for responses until the one arrives or a disconnection or a version mismatch happens.

In case NetworkClientUtils found the broker node unavailable, sendRequest reports a SocketTimeoutException:

Failed to connect to [sourceNode] within [socketTimeout] ms
Note
sendRequest is used when ReplicaFetcherThread earliestOrLatestOffset and fetchEpochsFromLeader.

close Method

close(): Unit

close…​FIXME

Note
close is used when…​FIXME

Internal Properties

Name Description

networkClient

Used when…​FIXME

sourceNode

Source Node

Used when…​FIXME