]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Use identity_token for refresh(), unexpire, undefer
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 3 May 2018 16:35:23 +0000 (12:35 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 3 May 2018 16:35:23 +0000 (12:35 -0400)
commit4b71933489cae21ad94b71b0bc7271c075ad0dda
tree6206ad2828b1512e4da7066b7df09aa141603873
parent67fe179d1b2fb559b213d2e924da365f05e169ce
Use identity_token for refresh(), unexpire, undefer

The horizontal sharding extension now makes use of the identity token
added to ORM identity keys as part of :ticket:`4137`, when an object
refresh or column-based deferred load or unexpiration operation occurs.
Since we know the "shard" that the object originated from, we make
use of this value when refreshing, thereby avoiding queries against
other shards that don't match this object's identity in any case.

Change-Id: Ib91637a65d94ace7405998b8410d62944a83f2eb
Fixes: #4247
doc/build/changelog/unreleased_12/4247.rst [new file with mode: 0644]
lib/sqlalchemy/ext/horizontal_shard.py
lib/sqlalchemy/orm/loading.py
lib/sqlalchemy/orm/query.py
test/ext/test_horizontal_shard.py