Bug #14764
RGW: 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
Related issues
History
#1 Updated by Mark Kirkwood almost 7 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
#2 Updated by Sandy Xu almost 7 years ago
Probably a known issue, you may want to take a look at http://tracker.ceph.com/issues/13140
#3 Updated by Mark Kirkwood almost 7 years ago
Yeah - looks like the same issue! (Ahem - I did search 1st but clearly missed 13140, apologies)
#4 Updated by Casey Bodley almost 3 years ago
- Duplicates Bug #13140: rgw: swift API returns more than real object count and bytes used when retrieving account metadata added
#5 Updated by Casey Bodley almost 3 years ago
- Status changed from New to Duplicate