incorrect caching in cache.check_memory_cache

Bug #518389 reported by Garth Wells
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.

Revision history for this message
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)
Revision history for this message
Garth Wells (garth-wells) wrote :

Has this been fixed?

Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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