]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Always check that discarded state is the expected one
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 4 Sep 2017 19:53:34 +0000 (15:53 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 4 Sep 2017 20:22:29 +0000 (16:22 -0400)
commit37c5ed2ed948250d7244d1e6e17da37a27c24698
tree140583b708c1798d38b258a6ff0a6823a41da68d
parent65680b2343ef421a62582e23e2b35293732933ad
Always check that discarded state is the expected one

Fixed race condition in ORM identity map which would cause objects
to be inappropriately removed during a load operation, causing
duplicate object identities to occur, particularly under joined eager
loading which involves deduplication of objects.  The issue is specific
to garbage collection of weak references and is observed only under the
Pypy interpreter.

Change-Id: I9f6ae3fe5b078f26146af82b15d16f3a549a9032
Fixes: #4068
doc/build/changelog/unreleased_11/4068.rst [new file with mode: 0644]
lib/sqlalchemy/orm/identity.py
test/orm/test_session.py