• Julien Muchembled's avatar
    client: fix item eviction from cache, which could break loading from storage · 4ef05b9e
    Julien Muchembled authored
    `ClientCache._oid_dict` shall not have empty values. For a given oid, when the
    last item is removed from the cache, the oid must be removed as well to free
    memory. In some cases, this was not done.
    
    A consequence of this bug is the following exception:
    
        ERROR ZODB.Connection Couldn't load state for 0x02d1e1e4
        Traceback (most recent call last):
          File "ZODB/Connection.py", line 860, in setstate
            self._setstate(obj)
          File "ZODB/Connection.py", line 901, in _setstate
            p, serial = self._storage.load(obj._p_oid, '')
          File "neo/client/Storage.py", line 82, in load
            return self.app.load(oid)[:2]
          File "neo/client/app.py", line 358, in load
            self._cache.store(oid, data, tid, next_tid)
          File "neo/client/cache.py", line 228, in store
            prev = item_list[-1]
        IndexError: list index out of range
    4ef05b9e
Name
Last commit
Last update
neo Loading commit data...
tools Loading commit data...
.gitignore Loading commit data...
BUGS.rst Loading commit data...
CHANGELOG.rst Loading commit data...
COPYING Loading commit data...
MANIFEST.in Loading commit data...
README.rst Loading commit data...
TESTS.txt Loading commit data...
TODO Loading commit data...
UPGRADE.rst Loading commit data...
ZODB3.patch Loading commit data...
importer.conf Loading commit data...
neo.conf Loading commit data...
neoadmin Loading commit data...
neoctl Loading commit data...
neolog Loading commit data...
neomaster Loading commit data...
neomigrate Loading commit data...
neostorage Loading commit data...
setup.py Loading commit data...