Description
def readFromLocalLog() ... if (preferredReadReplica.isDefined) { .... // If a preferred read-replica is set, skip the read val offsetSnapshot = partition.fetchOffsetSnapshot(fetchInfo.currentLeaderEpoch, fetchOnlyFromLeader = false) LogReadResult(info = FetchDataInfo(LogOffsetMetadata.UnknownOffsetMetadata, MemoryRecords.EMPTY), divergingEpoch = None, .... }
when a preferred read-replica is set, skip the read ,return empty data. The fetch request maybe put into the delayFetchQueue and repeat execute the readFromLocalLog() . It might be better to return the response right away.
Attachments
Issue Links
- links to