1. 08 Jul, 2004 1 commit
    • Tim Peters's avatar
      Zope3-dev Collector #139: Memory leak involving buckets and connections · 1cf893ae
      Tim Peters authored
      Connection objects were typically immortal because the threaded
      transaction manager kept them in an ever-growing lists.  Reworked the
      transaction manager internals to use a simple implementation of weak sets
      instead.  This plugs all leaks in the test program attached to the
      collector report (which was leaking about 100KB/sec on my box).
      1cf893ae
  2. 02 Jul, 2004 1 commit
    • Tim Peters's avatar
      Collector #1397: testTimeStamp fails on FreeBSD · 449e60be
      Tim Peters authored
      Forward-porting from Zope 2.7.
      
      The checkFullTimeStamp() test was sensitive to unique mktime() behavior
      on FreeBSD.  See:
      
      http://lists.freebsd.org/pipermail/freebsd-standards/2003-November/000268.html 
      
      The purpose of this test is to exercise ZODB's TimeStamp object, so got
      rid of dependence on platform mktime() and time.timezone quirks --
      TimeStamp works in GMT, so how mktime() treats tm_isdst should be
      irrelevant in all TimeStamp tests.
      
      Also added a comment about the highly non-obvious numeric characteristics
      of TimeStamp's treatment of seconds (round-tripping is surprisingly
      inaccurate, but for a real reason).
      449e60be
  3. 21 Jun, 2004 1 commit
  4. 07 Jun, 2004 2 commits
  5. 03 Jun, 2004 4 commits
  6. 02 Jun, 2004 2 commits
  7. 22 May, 2004 1 commit
    • Tim Peters's avatar
      find_files(): When trying to do recovery to a time earlier than that · bb2793b8
      Tim Peters authored
      of the most recent full backup, repozo.py failed to find the appropriate
      files, erroneously claiming
      
          No files in repository before <specified time>
      
      Repaired that.  Also made it much more robust against "junk files" the
      user may create, or leave behind, in the backup directory.  Added test.
      bb2793b8
  8. 21 May, 2004 1 commit
    • Tim Peters's avatar
      · 28364343
      Tim Peters authored
      Collector #1330:  repozo.py -R can create corrupt .fs.
      When looking for the backup files needed to recreate a Data.fs file,
      repozo could (unintentionally) include its meta .dat files in the list,
      or random files of any kind created by the user in the backup directory.
      These would then get copied verbatim into the reconstructed file, filling
      parts with junk.  Repaired by filtering the file list to include only
      files with the data extensions repozo.py creates (.fs, .fsz, .deltafs,
      and .deltafsz).  Thanks to James Henderson for the diagnosis.
      28364343
  9. 19 May, 2004 1 commit
    • Tim Peters's avatar
      Collector #1208: Infinite loop in cPickleCache. · 59598a5a
      Tim Peters authored
      This fixes it, based on an approach suggested by Toby
      Dickenson.  The triggering condition wasn't entirely
      sane, so was very rare:  a persistent object with a
      __del__ method that referenced an attribute of self.
      
      scan_gc_items():  Look at persistent objects accessed
      while this is running at most once.
      
      New test checkMinimizeTerminates():  This spawns a thread
      that will in fact run forever if you don't recompile
      cPickleCache.c.  The test suite will keep running, but
      checkMinimizeTerminates will fail, and all future calls
      to cacheMinimize() will be effectively ignored (so other
      bad things may happen as a result).
      59598a5a
  10. 07 May, 2004 1 commit
    • Tim Peters's avatar
      Collector 1309: ZODB.DB.DB.cacheExtremeDetail reports wrong reference count · 3315c73b
      Tim Peters authored
      The refcount reported for a ghost was one too small, because the code for
      ghosts and non-ghosts was the same, and presumably "it's a feature" that
      the code for non-ghosts deliberately lies about the true Python refcount,
      in order (guessing here) to report what the count would have been if the
      cPickleCache didn't exist.  But while the cPickleCache holds on to a real
      reference to non-ghost objects, it does not hold a real reference to ghost
      objects, so subtracting "an extra" count for all objects made it appear
      that non-referenced ghosts exist in the cache (which doesn't actually
      happen).
      
      What a tangled web we weave ...
      3315c73b
  11. 03 May, 2004 1 commit
  12. 16 Apr, 2004 3 commits
  13. 17 Mar, 2004 1 commit
    • Tim Peters's avatar
      By popular demand, FileStorage.pack() no longer propagates a · 19cdc300
      Tim Peters authored
          FileStorageError:  The database has already been packed to a
          later time or no changes have been made since the last pack
      
      exception.  Instead that message is logged (at INFO level), and
      the pack attempt simply returns then (no pack is performed).
      
      Incidentally, this should repair frequent reports of failure in the
      new checkPackLotsWhileWriting test.  On non-Windows systems, it
      seems that the worker thread often didn't get enough cycles to commit
      a change between the main thread's attempts to run pack() (and so
      the exception above got raised then).
      19cdc300
  14. 16 Mar, 2004 1 commit
    • Tim Peters's avatar
      Bugfix for pack(). Approximately forever, we've seen extremely rare · 968efe37
      Tim Peters authored
      failures in the ZEO FileStorage pack-while-writing tests, where they die
      with
          CorruptedError: ... transaction with checkpoint flag set
      
      By coincidence, the same kind of death during pack() was reported on
      zodb-dev today(!).  The new checkPackLotsWhileWriting test provokes this
      on my box reliably (failed each time it was run).
      
      The problem appears to be that pack's idea of where a FileStorage
      ends was obtained merely by seeking to the end of the file.  But if
      a transaction is in progress, there can be an extra "not really there
      yet" transaction at the end of the file, and when either buildPackIndex()
      or findReachableFromFuture() bumped into a such a thing, the CorruptedError
      above got raised.  This is always rare, and was exceedingly rare before
      because only one pack per test was tried.  The new test tries packing
      repeatedly while a thread keeps hammering the database, so is much more
      likely to provoke the problem.
      
      The fix amounts to passing FileStorage._pos to the pack code, telling
      the latter directly where the legit transactions in the file end.
      968efe37
  15. 11 Feb, 2004 1 commit