Quota Error In the Case of Parallel Execute

Bug #1368516 reported by AiQingxing
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
New
Undecided
AiQingxing

Bug Description

When a user upload several images at the same time,the storage usage of him may exceed the quota limit.
See sample here:
In glance/glance/api/v1/upload_utils.py Line123 2014/9/12
The Process has finished upload and pass the second quota check,But not yet writes the size to the database.When another process finishes uploading,It will also pass the quota check.
Here's a case:
user_storage_quota = 20 MB,Upload 2 Images which size are both 17MB.
Let the first process sleep 50 seconds before writes the size to the database,The two Images all successful uploaded and returned to user.
Now,My user_storage_quota = 10GB But I have 10 images,every image's size is 8G

AiQingxing (aiqingxing)
Changed in glance:
assignee: nobody → AiQingxing (aiqingxing)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.