You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
loadBeforeEx is like loadBefore, but simpler, provides better
information for object delete records and can be more efficiently
implemented by many storages: zopefoundation/ZODB#323
On RelStorage loadBefore is currently implemented via 3 SQL queries:
1) check whether object record exists at all
2) retrieve object state
3) retrieve serial of next object revision
Compared to that loadBeforeEx is implemented via only one SQL query "2"
from the above - "retrieve object state". It is exactly the same query
that loadBefore uses and after the patch loadBefore actually invokes
loadBeforeEx for step 2.
This change was outlined in
zopefoundation/ZODB#318 (comment) and
zopefoundation/ZODB#318 (comment)
and as explained in the first link this patch is also semantically coupled with
zodb#484
This patch passes tests with both ZODB5 and with ZODB5+zopefoundation/ZODB#323:
- when ran with ZODB5 it verifies that loadBefore implementation does
not become broken.
- when ran with ZODB5+zopefoundation/ZODB#323 it
verifies that loadBeforeEx implementation is correct.
For tests to pass with
ZODB5+zopefoundation/ZODB#323 we also need
zopefoundation/zc.zlibstorage#11 because without
that fix zc.zlibstorage does not decompress data on loadBeforeEx.
0 commit comments