Bug #78491
closedrgw multisite: bucket full sync "objects completed" counter overflows after INT32_MAX entries
0%
Description
In RGW multisite, `radosgw-admin bucket sync status` can report an extremely large value for bucket full-sync progress once the completed-entry count crosses INT32_MAX.
The reported value appears close to UINT64_MAX, which suggests a signed 32-bit counter overflow being stored or displayed through a uint64_t field.
Example shape:
full sync: 1844674407xxxxxxxx objects completed
This is confusing for operators and makes bucket full-sync progress monitoring unreliable for very large buckets, especially buckets with versioning, object lock, delete markers, or many historical versions.
Suspected Cause
The bucket full-sync progress count is persisted as uint64_t, but part of the in-memory progress path still uses int.
In particular, the full-sync worker keeps a completed-entry counter as int, then passes it through marker-tracking APIs that also accept int. The value is later stored back into a uint64_t full-sync status field.
Once the counter crosses INT32_MAX, it can wrap and later appear as a very large uint64_t value.
Affected Code Path
RGW multisite bucket full sync:
src/rgw/driver/rados/rgw_data_sync.cc
src/rgw/driver/rados/rgw_sync.h
Proposed Fix
Widen the bucket full-sync progress path from int to uint64_t.
Suggested changes:
1. Change the bucket full-sync completed-entry counter to uint64_t.
2. Change marker-tracking APIs that receive the progress position from int to uint64_t.
3. Ensure existing wrapped values are handled safely when reading or resuming bucket full-sync status.
Please consider backports to maintained RGW multisite releases.
AE Updated by Adam Emerson 4 months ago
- Status changed from New to Fix Under Review
- Backport set to squid tentacle umbrella
AE Updated by Adam Emerson 4 months ago
- Tags set to rgw, multisite multisite-backlog
- Pull request ID set to 70483
JI Updated by J. Eric Ivancich 4 months ago
- Status changed from Fix Under Review to Pending Backport
UB Updated by Upkeep Bot 4 months ago
- Merge Commit set to 92cef49cde2c7da1e42e6616e7fe2cf589937da5
- Fixed In set to v21.3.0-1565-g92cef49cde
- Upkeep Timestamp set to 2026-07-30T14:42:21+00:00
UB Updated by Upkeep Bot 4 months ago
- Copied to Backport #78882: squid: rgw multisite: bucket full sync "objects completed" counter overflows after INT32_MAX entries added
UB Updated by Upkeep Bot 4 months ago
- Copied to Backport #78883: umbrella: rgw multisite: bucket full sync "objects completed" counter overflows after INT32_MAX entries added
UB Updated by Upkeep Bot 4 months ago
- Copied to Backport #78884: tentacle: rgw multisite: bucket full sync "objects completed" counter overflows after INT32_MAX entries added
UB Updated by Upkeep Bot 4 months 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 2026-07-30T14:42:21+00:00 to 2026-08-27T18:43:42+00:00