1. 12 Jul, 2016 7 commits
    • Jim Fulton's avatar
      Merge pull request #89 from zopefoundation/undo-refactor · 75bae1a6
      Jim Fulton authored
      Refactored FileStorage transactional undo
      75bae1a6
    • Jim Fulton's avatar
      removed out of date comment · b563487e
      Jim Fulton authored
      b563487e
    • Jim Fulton's avatar
      Merge pull request #86 from NextThought/handle-serials4 · e080bdcc
      Jim Fulton authored
      Fix handle_all_serials for the new and old protocols.
      e080bdcc
    • Jason Madden's avatar
      Update comment. [skip ci] · c13649da
      Jason Madden authored
      c13649da
    • Jim Fulton's avatar
      changes · d64a0cbf
      Jim Fulton authored
      d64a0cbf
    • Jim Fulton's avatar
      Refactored FileStorage transactional undo · d717a685
      Jim Fulton authored
      As part of a project to provide object-level commit locks for ZEO, I'm
      refactiring FileStorage to maintain transaction-specific data in
      Tranaction.data.  This involved undo.  In trying to figure this out, I
      found:
      
      - A bug in _undoDataInfo, which I verified with some tests and
      
      - _transactionalUndoRecord was maddeningly difficult to reason about
        (and thus change).
      
      I was concerned less by the bug than my inability to know whether a
      change to the code would be correct.
      
      So I refactored the code, mainly transactionalUndoRecord, to make the
      code easier to understand, fixing some logic errors (I'm pretty sure)
      along the way.  This included lots of comments. (Comments are much
      easier to compose when you're working out logic you didn't
      understand.)
      
      In addition to makeing the code cleaner, it allows undo to be handled
      in cases that weren't handled before.
      d717a685
    • Jim Fulton's avatar
      Long lines. Grrrr. · a6c1713d
      Jim Fulton authored
      a6c1713d
  2. 09 Jul, 2016 1 commit
  3. 08 Jul, 2016 1 commit
  4. 05 Jul, 2016 3 commits
  5. 04 Jul, 2016 8 commits
  6. 01 Jul, 2016 5 commits
    • Jim Fulton's avatar
      4.4.1 · 05be22e0
      Jim Fulton authored
      05be22e0
    • Jim Fulton's avatar
      Merge pull request #76 from zopefoundation/IMultiCommitStorage · caf745f6
      Jim Fulton authored
      Define a new interface for storages that support the new commit protocol.
      caf745f6
    • Jim Fulton's avatar
      fixed typos · d74589ef
      Jim Fulton authored
      d74589ef
    • Jim Fulton's avatar
    • Julien Muchembled's avatar
      Better support of the new API to notify of resolved conflicts (store/tpc_finish) · 572a9652
      Julien Muchembled authored
      When switching all storages to the new API in the master branch,
      I found a few issues, mainly with blobs.
      
      1. Created/modified blobs are invalidated during the first phase
         (in Connection._store_objects):
      
          obj._p_invalidate()
      
          And with the old API, _handle_serial then sets _p_serial
          Ghost objects are not supposed to have a _p_serial and with the new API,
          a few tests would fail because _p_serial are checked without activating the
          blob first.
      
      2. Another consequence of _handle_serial not updating _p_changed/_p_serial
         immediately is that created objects are stored twice if __getstate__
         modifies itself. This case is tested in testConnection by
         doctest_lp485456_setattr_in_setstate_doesnt_cause_multiple_stores
      
          Hence the change in Connection._commit:
          - self._modified is already appended in Connection._store_objects
          - (obj._p_serial == z64) instead of (oid in self._creating)
            would not work for savepoints.
      
      3. Setting _p_changed of a Blob with no uncommitted changes would cause an error
         (lp440234_Setting__p_changed_of_a_Blob_w_no_uncomitted_changes_is_noop)
      
          Fixed by the same change as in 2:
          - oid was appended twice to self._modified but reverted one
            (self._modified.pop() in _store_objects)
          - the test passed because _p_changed was reset early by _handle_serial
      572a9652
  7. 30 Jun, 2016 4 commits
  8. 21 Jun, 2016 1 commit
  9. 19 Jun, 2016 3 commits
  10. 18 Jun, 2016 2 commits
  11. 16 Jun, 2016 1 commit
  12. 13 Jun, 2016 2 commits
  13. 11 Jun, 2016 2 commits
    • Julien Muchembled's avatar
    • Julien Muchembled's avatar
      windows: fix failures due to low-precision of time.time() · f08b40e1
      Julien Muchembled authored
      This fixes the following random failure:
      
      Failure in test checkBaseHistory (ZODB.tests.testDemoStorage.DemoStorageTests)
      Traceback (most recent call last):
        File "unittest\case.py", line 384, in _executeTestPart
          function()
        File "ZODB\tests\testDemoStorage.py", line 96, in checkBaseHistory
          self._checkHistory(base_only())
        File "ZODB\tests\HistoryStorage.py", line 46, in _checkHistory
          self.assertLess(a, b)
        File "unittest\case.py", line 1026, in assertLess
          self.fail(self._formatMessage(msg, standardMsg))
        File "unittest\case.py", line 508, in fail
          raise self.failureException(msg)
      AssertionError: 1465433823.260304 not less than 1465433823.260304
      f08b40e1