← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1276530] [NEW] memorycache#get scans the whole cache for expired items on every fetch

 

Public bug reported:

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 periodic task to take care of expired items.

** Affects: nova
     Importance: Undecided
         Status: New

** Summary changed:

- 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 changed:

  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 - there should be a periodic task to take
- care of expired items.
+ This is not the right place to expire items - a large cache can become
+ slow.  There should be a periodic task to take care of expired items.

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1276530

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

Status in OpenStack Compute (Nova):
  New

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 periodic task to take care of expired items.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1276530/+subscriptions


Follow ups

References