incorrect caching in cache.check_memory_cache

Bug #518389 reported by Garth Wells on 2010-02-07
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Instant
Confirmed
Medium
Kent-Andre Mardal

Bug Description

A fix has been committed in http://bazaar.launchpad.net/~instant-core/instant/main/revision/288

Instant was inserting an object into the memory cache even though it was already found in the cache. It was inserting the object based on its address, and not its signature. This meant that a element or form declared in a loop would be repeatedly inserted into the memory cache, despite the signature being the same.

Anders Logg (logg) wrote :

The above fix led to a unit test failing. This is now commented out in tests/test19.py. We need to figure out whether

1. The bug fix is correct

and/or

2. The unit test makes sense

Changed in instant:
importance: Undecided → Medium
status: New → Confirmed
assignee: nobody → Kent (kent-and)
Garth Wells (garth-wells) wrote :

Has this been fixed?

Martin Sandve Alnæs (martinal) wrote :

The disabled test checks (in an inconvenient way through timing) that .signature() is not called if the signature object (the object with a .signature() function) has already been placed in the memory cache. Since you've disabled placing signature objects in the memory cache, this fails. Since nobody has complained and ufl.Form.signature() caches the repr string itself anyway, this is probably ok. There are probably other places in instant with code designed to handle such object ids in the memory cache, but a cleanup here is a rather high risk operation and it probably doesn't hurt anyone.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers