Incorrect expected result in subsequent finds using read commited isolation level
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(
>>> print [i.name for i in results]
[u'foo']
Now I modify the object in s2:
>>> c2 = s2.find(
>>> c2.name = 'bar'
>>> s2.commit()
And re-run the first query:
>>> results = s1.find(
>>> 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://