• Julien Muchembled's avatar
    Fix deadlock with storages that "sync" on a new transaction · 9821696f
    Julien Muchembled authored
    This backports a change from commit 227953b9.
    
    NEO, as well as ZEO+server_sync (ERP5 backports this feature with a
    monkey-patch), pings the server (primary master node in the case of NEO) on
    new transactions. However, this round-trip is actually performed by the thread
    that also does tasks requiring to lock the DB, like processing of invalidations.
    
    Since transaction 1.6.1 (more precisely commit e581a120a6), IStorage.sync()
    is called indirectly by DB.open() when a transaction has already begun,
    and the DB must not be locked when this happens.
    9821696f
DB.py 34.7 KB