Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If multiple log segment files are ready, they are copied to remote storage one by one, from the earliest to the latest. It generates a universally unique RemoteLogSegmentId for each segment, it calls RLMM.putRemoteLogSegmentData(RemoteLogSegmentId remoteLogSegmentId, RemoteLogSegmentMetadata remoteLogSegmentMetadata) and it invokes copyLogSegment(RemoteLogSegmentId remoteLogSegmentIdRemoteLogSegmentMetadata remoteLogSegmentMetadata, LogSegmentData logSegmentData) on RSMIf it is successful then  it calls RLMM.putRemoteLogSegmentData with the updated RemoteLogSegmentMetadata instance else it removes the entry. Any dangling entries will be removed while removing expired log segments based on remote retentionstate in RemoteLogSegmentMetadata

Handle expired remote segments (leader and follower)

...

RLM follower fetches the earliest offset for the earliest leader epoch by calling RLMM.earliestLogOffset(tp: TopicPartition ).Both leader and follower cleanup the existing indexes till that offset and updates start offset with the received valuetopicPartition, int leaderEpoch) and updates that as the log start offset.

2. Remote Storage Fetcher Thread Pool

...