count objects in account_stat

asked 2013-11-26 17:42:53 -0500

I found that when adding or deleting an object, the table container_stat will be updated by the TRIGGER ( ( ). But I didn't find how account_stat is updated. In the similar place ( ( ), there are also some TRIGGER responding with adding or deleting a container, not the case of updating a container. So when an object is upload, the container_stat will be updated automatically, but account_stat will not. How and when is account_stat updated in Swift?

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted

answered 2013-11-26 18:01:16 -0500

torgomatic gravatar image

The container updater does this asynchronously.

If it were synchronous, the account database would rapidly become a bottleneck for concurrent object uploads. That's why it's async.

edit flag offensive delete link more

answered 2013-11-26 18:17:18 -0500

Thanks, but I have a further question:

If I didn't run container-updater, the object count in "swift stat" should keep 0 (is it right?). But actually object count of account is updated from the second uploaded object. For example:

Uploading the 1st object, 'swift stat' says "object: 0, Bytes:0" Uploading the 2nd object, 'swift stat' says "object: 1, Bytes: (size of 1st object)" Uploading the 3rd object, 'swift stat' says "object: 2, Bytes: (size of 1st object and 2nd one)"

Is this normal?

edit flag offensive delete link more

answered 2013-11-27 02:30:38 -0500

Thanks Samuel Merritt, that solved my question.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2013-11-26 17:42:53 -0500

Seen: 64 times

Last updated: Nov 27 '13