memorycache#get scans the whole cache for expired items on every fetch

Bug #1276530 reported by Matthew Gilliard
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo-incubator
Won't Fix
Low
Tom Cammann

Bug Description

Every time an item is fetched from the memory cache, the whole cache is scanned for expired items:

https://github.com/openstack/nova/blob/master/nova/openstack/common/memorycache.py#L63-L67

This is not the right place to expire items - a large cache can become slow. There should be a more sensible approach to the (difficult) problem of cache expiry.

summary: - memorycache get scans the whole cache for expired items on every fetch
+ memorycache#get scans the whole cache for expired items on every fetch
description: updated
Changed in nova:
assignee: nobody → Matthew Gilliard (matthew-gilliard-u)
status: New → In Progress
Revision history for this message
Joe Gordon (jogo) wrote :

memorycache is synced in from oslo-incubator so the fix has to go there first.

Changed in oslo:
status: New → Confirmed
Changed in oslo:
assignee: nobody → Matthew Gilliard (matthew-gilliard-u)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo-incubator (master)

Fix proposed to branch: master
Review: https://review.openstack.org/71559

Changed in oslo:
status: Confirmed → In Progress
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/96757

Changed in oslo:
assignee: Matthew Gilliard (matthew-gilliard-u) → Tom Cammann (tom-cammann)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on oslo-incubator (master)

Change abandoned by Matthew Gilliard (<email address hidden>) on branch: master
Review: https://review.openstack.org/71559
Reason: indeed. See https://review.openstack.org/96757

Revision history for this message
Ben Nemec (bnemec) wrote :

Marking importance as low because there's some debate on the review as to whether this should even be fixed.

Changed in oslo:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Tom Cammann (<email address hidden>) on branch: master
Review: https://review.openstack.org/96757
Reason: Cache is to be left un-performant.

Changed in oslo:
status: In Progress → Triaged
Changed in nova:
status: In Progress → Triaged
Revision history for this message
Ben Nemec (bnemec) wrote :

The in-memory cache isn't intended for production use anyway, so we don't want to spend a bunch of time optimizing it.

Changed in oslo:
status: Triaged → Won't Fix
Joe Gordon (jogo)
no longer affects: nova
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.