Incorrect expected result in subsequent finds using read commited isolation level

Bug #1055565 reported by Ronaldo Maia
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Storm
New
Undecided
Unassigned

Bug Description

When using read-commited isolation level and running the same store.find()
query after another transaction has committed, doesn't update the results.
For example:

I have 2 stores (s1 and s2). First I get the existing objects in s1:

>>> results = s1.find(ClientCategory)
>>> print [i.name for i in results]
[u'foo']

Now I modify the object in s2:

>>> c2 = s2.find(ClientCategory, ClientCategory.name == 'foo').one()
>>> c2.name = 'bar'
>>> s2.commit()

And re-run the first query:

>>> results = s1.find(ClientCategory)
>>> print [i.name for i in results]
[u'foo']

The object was not updated.

I can see that after running the Select for the second query, the values are
fetched correctly, but _set_values(..., keep_defined=True) (store.py, line
714, inside _load_object) [1] is preventing from setting the updated values,
when the object is already in the cache.

[1] http://bazaar.launchpad.net/~storm/storm/trunk/view/452/storm/store.py#L711

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.