• Tim Peters's avatar
    Forward-porting critical ZEO client fixes from ZODB3-3_1-boston-branch. · 5c2cfb31
    Tim Peters authored
    + If a storage times out between the vote and the finish, the ZEO cache
      could get populated with objects that don't make it to the storage
      server.
    
      A new flag self._midtxn_disconnect gets reset in tpc_begin() and set
      in notifyDisconnected().  If tpc_finish() discovers this flag set, it
      raises a ClientDisconnected error before calling tpc_finish() on the
      server.
    
    + In tpc_finish() we re-order the calls so that the server's tpc_finish()
      is called (and must succeed) before we update the ZEO client cache.
    
    + The storage name is now prepended to the sort key, to ensure a
      unique global sort order if storages are named uniquely.
    
    + Added new tests for the above (checkTimeoutAfterVote,
      checkTimeoutProvokingConflicts, checkSortKey).
    5c2cfb31
ClientStorage.py 41 KB