Skip to content

KAFKA-19530 RemoteLogManager should record lag stats when remote storage is offline #20218

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 29, 2025

Conversation

m1a2st
Copy link
Collaborator

@m1a2st m1a2st commented Jul 22, 2025

When remote storage is offline, then the segmentLag and bytesLag metrics
are not recorded. These metrics are useful to know the pending data to
upload when remote storage is down.

Reviewers: TaiJuWu [email protected], Kamal Chandraprakash
[email protected]

@github-actions github-actions bot added triage PRs from the community storage Pull requests that target the storage module tiered-storage Related to the Tiered Storage feature small Small PRs labels Jul 22, 2025
Copy link
Collaborator

@TaiJuWu TaiJuWu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions bot removed the triage PRs from the community label Jul 23, 2025
@m1a2st m1a2st requested a review from kamalcph July 23, 2025 09:57
Copy link
Contributor

@kamalcph kamalcph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Left one comment. PTAL.

@@ -973,6 +973,9 @@ public void copyLogSegmentsToRemote(UnifiedLog log) throws InterruptedException
segmentIdsBeingCopied.add(segmentId);
try {
copyLogSegment(log, candidateLogSegment.logSegment, segmentId, candidateLogSegment.nextSegmentOffset);
} catch (RemoteStorageException e) {
Copy link
Contributor

@kamalcph kamalcph Jul 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we catch all exception in the catch block and then throw it?

RemoteStorageException -> Exception

since copyLogSegment throws InterruptedException, ExecutionException, RemoteStorageException, IOException, and CustomMetadataSizeLimitExceededException:

catch (Exception e) {
  recordLagStats(log);
  throw e;
}  

@kamalcph
Copy link
Contributor

@m1a2st
Gentle reminder. Could you address the review comments? Thanks!

@m1a2st
Copy link
Collaborator Author

m1a2st commented Jul 29, 2025

@kamalcph, Sorry for the late reply! I was traveling last week, but I'll go through your comments ASAP.

Copy link
Contributor

@kamalcph kamalcph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for the patch!

@kamalcph kamalcph merged commit 96c8e86 into apache:trunk Jul 29, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
small Small PRs storage Pull requests that target the storage module tiered-storage Related to the Tiered Storage feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants