[Checkins] [zopefoundation/ZODB] c670d0: Fix deadlock with storages that "sync" on a new tr...

GitHub noreply at github.com
Fri Jan 13 23:56:54 CET 2017


  Branch: refs/heads/fix-deadlock-on-storage-sync
  Home:   https://github.com/zopefoundation/ZODB
  Commit: c670d0ddbd0e7d981021793e57dca400281fa1f0
      https://github.com/zopefoundation/ZODB/commit/c670d0ddbd0e7d981021793e57dca400281fa1f0
  Author: Julien Muchembled <jm at nexedi.com>
  Date:   2017-01-13 (Fri, 13 Jan 2017)

  Changed paths:
    M src/ZODB/DB.py

  Log Message:
  -----------
  Fix deadlock with storages that "sync" on a new transaction

This backports a change from commit 227953b977a9e195c4ce9bbb9acd9c5ee60c333a.

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.




More information about the checkins mailing list