Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide loadBeforeEx #485

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Provide loadBeforeEx #485

wants to merge 1 commit into from

Commits on Nov 11, 2021

  1. Provide loadBeforeEx

    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.
    navytux committed Nov 11, 2021
    Configuration menu
    Copy the full SHA
    b5a6b97 View commit details
    Browse the repository at this point in the history