rbd: add debug logging to ProcessMetadata for CBT diagnostics#6203
rbd: add debug logging to ProcessMetadata for CBT diagnostics#6203kaovilai wants to merge 1 commit into
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.
|
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. |
0c8b85e to
f68485a
Compare
|
squashed, pr body updated. |
|
@Rakshith-R , please have a look at this and #6200 |
|
@kaovilai Can you please squash into single commit ? |
e58fbf1 to
37cb3c9
Compare
|
fixed |
|
@Mergifyio rebase |
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 Co-authored-by: Rakshith R <rakshith.r.0001@gmail.com> Signed-off-by: Tiger Kaovilai <passawit.kaovilai@gmail.com>
37cb3c9 to
729342d
Compare
|
Deprecation notice: This pull request comes from a fork and was rebased using |
✅ Branch has been successfully rebased |
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