1. 04 Mar, 2024 1 commit
    • Jérome Perrin's avatar
      FileStorage: fix rare data corruption when using restore after multiple undos (#395) · 8160568b
      Jérome Perrin authored
      * FileStorage: fix data corruption when using restore after multiple undos
      
      The case of a history like this:
       - T0 initialize an object in state 0
       - T1 modifies object to state 1
       - T2 modifies object to state 2
       - T3 undo T2 and T1, bringing back to state 0
       - T4 modified object to state 3
       - T5 undo T4, bringing back object to state 0
      
      was not correct after `restore`: the state is 1 instead of the expected 0.
      
      This is because T3 contains two data records:
       - an undo of T2, with a backpointer to the data of state 1
       - an undo of T1, with a backpointer to the data of state 0
      When restoring T5 (the undo of T4), the transaction is made of one data
      record, with a backpointer that is copied from the backpointer from T3,
      but this uses backpointer from the first record for this object, which
      is incorrect, in such a case where there is more than one backpointer
      for the same oid, we need to iterate in all data record to find the
      oldest version.
      Co-authored-by: Kirill Smelkov's avatarKirill Smelkov <kirr@nexedi.com>
      8160568b
  2. 06 Feb, 2024 1 commit
  3. 21 Nov, 2023 1 commit
  4. 10 Oct, 2023 1 commit
  5. 09 Oct, 2023 1 commit
  6. 03 Oct, 2023 4 commits
  7. 10 Sep, 2023 1 commit
  8. 01 Aug, 2023 2 commits
  9. 19 Jul, 2023 1 commit
  10. 18 Jul, 2023 2 commits
  11. 17 Jul, 2023 1 commit
  12. 26 May, 2023 1 commit
  13. 24 May, 2023 1 commit
    • Kirill Smelkov's avatar
      Remove unused ZODB.tests.warnhook · 8a7e3162
      Kirill Smelkov authored
      The last usage of WarningsHook was removed in 2011 in f1b04dd8 (Lots of
      code cleanups.). And when we need to capture warnings there is
      `warnings.catch_warnings` that is available out of the box from stdlib
      on both py2 and py3.
      8a7e3162
  14. 04 May, 2023 1 commit
  15. 18 Apr, 2023 3 commits
    • Dieter Maurer's avatar
      Merge pull request #380 from zopefoundation/racetest · 30c861dc
      Dieter Maurer authored
      `racetest` improvement
      30c861dc
    • dieter's avatar
      ca41ccd1
    • Kirill Smelkov's avatar
      racetest: Review 2 · 2d456463
      Kirill Smelkov authored
      - Rename `TestGroup` -> `TestWorkGroup`. I originally named it as just
        WorkGroup similarly to sync.WorkGroup in pygolang, but later added
        "Test" prefix to highlight the difference that this class manages
        working group of threads that take part in tests, instead of group of
        arbitrary threads. However in that process I dropped the "Work" part
        which turned the name to be somewhat ambiguous: it is not clear whether
        "TestGroup" is a group of threads serving one test, or a group of
        separate tests without any relation to threading. To remove the
        ambiguity let's restore the "Work" in the name so that both "Test" and
        "WorkGroup" are there.
      
      - Review test_racetest.py a bit:
      
        * make it a bit more robust by increasing "ok" timeout from 0.1s to 10s.
          in my experience 0.1s is too little and will regularly hit "timeout"
          when CI machines are overloaded. I'm still somewhat uncomfortable
          with 0.1s timeout we left in tests that exercise timeout handling,
          but let's leave it as is for now and see how it goes.
      
        * add test for cases when only one thread fails out of many, and when
          several threads fail too.
      
        * minor cosmetics.
      
      - spellcheck.
      2d456463
  16. 17 Apr, 2023 3 commits
  17. 15 Apr, 2023 1 commit
  18. 14 Apr, 2023 1 commit
    • Kirill Smelkov's avatar
      racetest: Review · f2335127
      Kirill Smelkov authored
      - Factor common logic to spawn and run group of test threads into
        TestGroup. This way the extra checks and robustness improvements, that
        Dieter just added to check_race_external_invalidate_vs_disconnect,
        become available to all tests in racetest module.
      
        Rework moved code so that nwork is not fixed beforehand and test threads
        can be added dynamically.
      
      - fix waiting logic in Finished:
        * on py2 Condition.wait does not return True/False as it does on py3 -
          we need to manually inspect the state.
        * fix race for when wait is called with already met condition:
          previously in such case it was waiting indefinitely and reporting
          failure on timeout
      
      - rename Finished to well-established concept of WaitGroup and adjust
        its interface accordingly (see
        https://pkg.go.dev/sync#WaitGroup,
        https://lab.nexedi.com/nexedi/pygolang/blob/master/golang/sync.py and
        https://lab.nexedi.com/nexedi/pygolang/blob/39dde7eb/golang/sync.cpp#L153-200)
      
      - no need to wrap try/except with additional try/finally, as
        try/except/finally works out of the box.
      f2335127
  19. 13 Apr, 2023 4 commits
  20. 28 Mar, 2023 1 commit
  21. 12 Mar, 2023 2 commits
  22. 06 Feb, 2023 1 commit
  23. 03 Feb, 2023 5 commits