Bug #14764
closedRGW: swift API 'swift stat' double counts objects
0%
Description
Performing an account 'stat' results in double the expected number of objects and bytes.
The replication level in the various rgw pools is 2, but can demonstrate the same double counting on systems with higher replication level pools...
The os is Ubuntu 14.04 and Ceph 0.94.5:
$ swift stat
Account: v1
Containers: 0
Objects: 0
Bytes: 0
Server: Apache/2.4.7 (Ubuntu)
X-Account-Bytes-Used-Actual: 0
X-Trans-Id: tx000000000000000076a2f-0056a9a763-19c9aa4-default
Content-Type: text/plain; charset=utf-8
Accept-Ranges: bytes
$ swift upload con0 file
file
$ swift upload con1 file
file
$ swift stat
Account: v1
Containers: 2
Objects: 4
Bytes: 4004
Server: Apache/2.4.7 (Ubuntu)
X-Account-Bytes-Used-Actual: 16384
X-Trans-Id: tx000000000000000076a44-0056a9a7e7-19c9aa4-default
Content-Type: text/plain; charset=utf-8
Accept-Ranges: bytes
There are only 2 objects:
$ swift list con0
file
$ swift list con1
file
Updated by Mark Kirkwood about 8 years ago
Sorry that example is utterly unreadable, trying again:
$ swift stat
Account: v1
Containers: 0
Objects: 0
Bytes: 0
Server: Apache/2.4.7 (Ubuntu)
X-Account-Bytes-Used-Actual: 0
X-Trans-Id: tx000000000000000076a2f-0056a9a763-19c9aa4-default
Content-Type: text/plain; charset=utf-8
Accept-Ranges: bytes
$ swift upload con0 file
file
$ swift upload con1 file
file
$ swift stat
Account: v1
Containers: 2
Objects: 4
Bytes: 4004
Server: Apache/2.4.7 (Ubuntu)
X-Account-Bytes-Used-Actual: 16384
X-Trans-Id: tx000000000000000076a44-0056a9a7e7-19c9aa4-default
Content-Type: text/plain; charset=utf-8
Accept-Ranges: bytes
There are only 2 objects:
$ swift list con0
file
$ swift list con1
file
Updated by Sandy Xu about 8 years ago
Probably a known issue, you may want to take a look at http://tracker.ceph.com/issues/13140
Updated by Mark Kirkwood about 8 years ago
Yeah - looks like the same issue! (Ahem - I did search 1st but clearly missed 13140, apologies)
Updated by Casey Bodley about 4 years ago
- Is duplicate of Bug #13140: rgw: swift API returns more than real object count and bytes used when retrieving account metadata added