rbd: add debug logging to ProcessMetadata for CBT diagnostics#6203
Open
kaovilai wants to merge 2 commits intoceph:develfrom
Open
rbd: add debug logging to ProcessMetadata for CBT diagnostics#6203kaovilai wants to merge 2 commits intoceph:develfrom
kaovilai wants to merge 2 commits intoceph:develfrom
Conversation
afeabf6 to
b94a798
Compare
There was a problem hiding this comment.
Pull request overview
Adds targeted debug logging to the RBD snapshot metadata streaming path (ProcessMetadata) to help diagnose CBT cases where metadata streams are unexpectedly empty.
Changes:
- Log resolved snapshot ID and volume size before setting the snapshot context.
- Log
DiffIterateByIDconfiguration parameters (offset/length/from-snap). - Log completion status and the number of buffered blocks after
DiffIterateByIDreturns.
Member
|
Is this debugging useful outside the scope where a potential bug needs to be addressed? Can you explain a little more about the issue that you are facing? To get the PR accepted, you will need to squash the extra/correction commits into the original one. |
Add debug log statements to ProcessMetadata to log key parameters at each stage: snapshot ID and volume size after resolution, DiffIterateByID config (Offset, Length, FromSnapID) before the call, and remaining buffered block count after completion. These logs are useful for diagnosing CBT (Changed Block Tracking) issues in production where GetMetadataAllocated may return unexpected results without visibility into the internal state. Fixes: ceph#6206 Assisted-by: Claude <noreply@anthropic.com> Signed-off-by: Tiger Kaovilai <passawit.kaovilai@gmail.com>
0c8b85e to
f68485a
Compare
Contributor
Author
|
squashed, pr body updated. |
nixpanic
previously approved these changes
Mar 27, 2026
Member
|
@Rakshith-R , please have a look at this and #6200 |
Rakshith-R
reviewed
Apr 8, 2026
Co-authored-by: Rakshith R <rakshith.r.0001@gmail.com> Signed-off-by: Tiger Kaovilai <passawit.kaovilai@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add debug log statements to
ProcessMetadatainsnap_diff.goto improve observability of the CBT (Changed Block Tracking) metadata streaming path.Why this is useful beyond a specific bug
The
ProcessMetadatafunction involves multiple steps (snapshot ID resolution, snap context setup, DiffIterateByID call) but currently has no logging between them. WhenGetMetadataAllocatedreturns unexpected results (empty streams, wrong block counts), there's no visibility into:DiffIterateByIDThese are all
DebugLogcalls (not visible at default log levels), so there's no performance impact in production.Changes
Three
log.DebugLogcalls added:DiffIterateByID— logs config parameters (Offset, Length, FromSnapID)DiffIterateByIDcompletes — logs remaining buffered block countFixes: #6206
Note
Responses generated with Claude