Bug #73018
closedSnapMapper::Scrubber wrong shard parsing
0%
Description
From the comment at the beginning of the file
the format for snapshot+obj to obj
should be
SNA_%lld_%llx_.%lx rather than SNA_%lld_%llx.%lx in parse_m
the check for sscanf return value is also incorrect,
it returns the number of input items successfully matched and assigned.
before fix,
we always get shard 255(NO_SHARD)
snap_mapper _parse_m mapping pool 4 snap b shard 255 4:0063648e:::1000000026b.00000000:b
but for erase pool object, it will have shard
snap_mapper _parse_m mapping pool 4 snap b shard 0 4:0063648e:::1000000026b.00000000:b
RZ Updated by Radoslaw Zarzynski about 1 year ago
- Assignee changed from ethan wu to Radoslaw Zarzynski
This doesn't look like a recent regression. Though there was a recent refactoring, we use this format since at least 2019.
6192fb60313d (Sage Weil 2019-06-10 17:31:54 -0500 965) int r = sscanf(k.c_str(), "SNA_%lld_%llx.%lx", &p, &s, &sh);
RZ Updated by Radoslaw Zarzynski about 1 year ago
@ethan wu: do you plan to work on this issue? (I'm happy to unassign myself).
MB Updated by Matan Breizman about 1 year ago
- Subject changed from Snapper parse_m use wrong format and to SnapMapper::Scrubber wrong shard parsing
- Status changed from New to Fix Under Review
- Assignee changed from Radoslaw Zarzynski to ethan wu
- Backport set to reef,squid,tentacle
- Pull request ID set to 65525
RZ Updated by Radoslaw Zarzynski about 1 year ago
The PR is approved and awaits QA.
RZ Updated by Radoslaw Zarzynski about 1 year ago
Still awaits QE.
UB Updated by Upkeep Bot about 1 year ago
- Status changed from Fix Under Review to Pending Backport
- Merge Commit set to d5a98a0873e34cd3ee12795f47a0be13d18b36e1
- Fixed In set to v20.3.0-3510-gd5a98a0873
- Upkeep Timestamp set to 2025-10-10T16:03:41+00:00
UB Updated by Upkeep Bot about 1 year ago
- Copied to Backport #73488: squid: SnapMapper::Scrubber wrong shard parsing added
UB Updated by Upkeep Bot about 1 year ago
- Copied to Backport #73489: reef: SnapMapper::Scrubber wrong shard parsing added
UB Updated by Upkeep Bot about 1 year ago
- Copied to Backport #73490: tentacle: SnapMapper::Scrubber wrong shard parsing added
UB Updated by Upkeep Bot about 1 year ago
- Tags (freeform) set to backport_processed
UB Updated by Upkeep Bot 3 months ago
- Status changed from Pending Backport to Backporting
- Tags (freeform) deleted (
backport_processed) - Upkeep Timestamp changed from 2025-10-10T16:03:41+00:00 to 2026-08-27T18:13:16+00:00
UB Updated by Upkeep Bot about 1 month ago
- Released In set to v21.2.0~1892
- Upkeep Timestamp changed from 2026-08-27T18:13:16+00:00 to 2026-10-24T01:08:54+00:00
UB Updated by Upkeep Bot 30 days ago
- Released In changed from v21.2.0~1892 to v21.2.0~1893
- Upkeep Timestamp changed from 2026-10-24T01:08:54+00:00 to 2026-11-04T01:07:15+00:00