Closed
Bug 745059
Opened 13 years ago
Closed 13 years ago
memcached backend fails to increment total size
Categories
(Cloud Services Graveyard :: Server: Sync, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: rfkelly, Unassigned)
References
Details
(Whiteboard: [qa+])
Attachments
(1 file)
|
2.58 KB,
patch
|
telliott
:
review+
|
Details | Diff | Splinter Review |
The MemcachedSQLStorage backend fails to increment the cached "total size" measurement when the user uploads an item, due to a quirk of memcached/pylibmc.
The "user_id:size" is currently stored into memcached as a float. When storing a new item, the MemcachedSQLStorage backend uses the "incr" command to increase this by the size of the new item. Unfortunately, "incr" silently fails to work on floats and the size does not get updated.
Attached patch fixes the problem by explicitly coercing to an integer.
This could well explain the strange behaviour witnessed in Bug 687108. There is a small value stored in memcache from an earlier quota viewing, and it is not updated as the user syncs lots and lots of stuff. This leads to a growing discrepancy between the information in /info/quota (which is calculated from memcached) and /info/collection_usage (which is calculated from the database).
The eventual call to /info/collection_usage forces an update of the cached data and results in subsequent /info/quota calls returning the correct(ish) value.
Attachment #614653 -
Flags: review?(telliott)
Comment 1•13 years ago
|
||
Comment on attachment 614653 [details] [diff] [review]
patch to correctly increment storage size in memcached
This sort of thing is not endearing me to python :P
Attachment #614653 -
Flags: review?(telliott) → review+
| Reporter | ||
Comment 2•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•13 years ago
|
Whiteboard: [qa-]
Comment 3•13 years ago
|
||
This is no longer happening.
Tested on qa1.
Status: RESOLVED → VERIFIED
Whiteboard: [qa-] → [qa+]
| Reporter | ||
Comment 4•13 years ago
|
||
Backported to Sync1.1 trunk: http://hg.mozilla.org/services/server-storage/rev/505649a33610
Comment 5•13 years ago
|
||
And, again, Verified as fixed with 4/16 make build and make test.
| Reporter | ||
Comment 6•13 years ago
|
||
Backported to 1.10 release branch: http://hg.mozilla.org/services/server-storage/rev/406ea814d079
Updated•2 years ago
|
Product: Cloud Services → Cloud Services Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•