Project

General

Profile

Actions

Bug #62709

open

num_objects in bucket stats mismatch between primary and secondary sites which can be fixed by a bucket list

Added by Jane Zhu 9 months ago. Updated 7 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
% Done:

0%

Source:
Tags:
multisite
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

"num_objects", along with other fields in the "usage" section, in "radosgw-admin bucket stats" on the secondary site is 1 or 2 less than on the primary site after the replication is done. However this is not a real replication mismatch, since it can be fixed by running "radosgw-admin bucket list" on the bucket on the secondary site. This can be reproduced with the main branch (as of Aug. 29th, 2023).

An example:
This is after 1 hr of write-only cosbench traffic against a pair of Ceph multisite clusters.
Sync status shows all caught up on both sites.

On Primary site:

$ sudo radosgw-admin -n client.rgw.`hostname`.dev.1 bucket stats --bucket=prod-mixed-1k-thisisbcstestuser0081015
...
    "usage": {
        "rgw.main": {
            "size": 1357000,
            "size_actual": 5558272,
            "size_utilized": 1357000,
            "size_kb": 1326,
            "size_kb_actual": 5428,
            "size_kb_utilized": 1326,
            "num_objects": 1357
        }
    },
...

On Secondary site:

$ sudo radosgw-admin -n client.rgw.`hostname`.dev.1 bucket stats --bucket=prod-mixed-1k-thisisbcstestuser0081015
...
    "usage": {
        "rgw.main": {
            "size": 1356000,
            "size_actual": 5554176,
            "size_utilized": 1356000,
            "size_kb": 1325,
            "size_kb_actual": 5424,
            "size_kb_utilized": 1325,
            "num_objects": 1356
        }
    },
...

$ sudo radosgw-admin -n client.rgw.`hostname`.dev.1 bucket list --max-entries=10000 --bucket=prod-mixed-1k-thisisbcstestuser0081015 > /dev/null

$ sudo radosgw-admin -n client.rgw.`hostname`.dev.1 bucket stats --bucket=prod-mixed-1k-thisisbcstestuser0081015
..
    "usage": {
        "rgw.main": {
            "size": 1357000,
            "size_actual": 5558272,
            "size_utilized": 1357000,
            "size_kb": 1326,
            "size_kb_actual": 5428,
            "size_kb_utilized": 1326,
            "num_objects": 1357
        }
    },
...

Actions

Also available in: Atom PDF