1. 02 Jun, 2004 8 commits
  2. 01 Jun, 2004 4 commits
  3. 31 May, 2004 2 commits
    • Tim Peters's avatar
      testItemsNegativeIndex (3 instances): repaired off-by-one glitch in loop... · 8baa7461
      Tim Peters authored
      testItemsNegativeIndex (3 instances):  repaired off-by-one glitch in loop (range(i, j, k) is always exclusive of j).
      8baa7461
    • Casey Duncan's avatar
      Fix bug indexing BTreeItems with negative values. Previous code assumed that... · a23c8981
      Casey Duncan authored
      Fix bug indexing BTreeItems with negative values. Previous code assumed that idexes passed to BTreeItem_item would be negative, in practice this was not the case, and an index of -1 actually passed len(items)-1 as the index argument. Consequently, it was possible to access each item using two negative indexes (i.e., -1 and -len(items)-1). This made each item appear twice in a reverse iteration.
      
      Code in BTreeItems_seek attempted to match the sign of the pseudoindex kept in the BTreeItems obj and the incoming index. Since this incoming index was never legitimately negative as it assumed, actually negatives passed in due to "overshooting" the first item would repeat the items again from the end. Removal of this code corrects the problem.
      
      Unittests which provoke the error in the original code have also been added.
      
      a23c8981
  4. 26 May, 2004 1 commit
  5. 24 May, 2004 2 commits
  6. 22 May, 2004 3 commits
    • Tim Peters's avatar
      find_files(): When trying to do recovery to a time earlier than that · af51e3ae
      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.
      af51e3ae
    • Tim Peters's avatar
      New test for repozo.py. It doesn't run automatically, · fa76112e
      Tim Peters authored
      but nothing in scripts/tests/ does.  It failed before the
      earlier (today) fixes to repozo.py, and passes now.
      Better Than Nothing -- which is what we had before.
      fa76112e
    • Tim Peters's avatar
      Foward port fix for race in DB.open(): · a9442313
      Tim Peters authored
      Under exceedingly rare conditions, a timing hole made it
      possible for a second open() call on a database to block for an
      arbitrarily long time.  This accounts for the intermittent
      failure of a thread to make any progress after 5 minutes in
      checkConcurrentUpdates1Storage.
      
      We intend to get rid of most of this delicate lock
      business, but before then the test failures are still
      hurting me.
      a9442313
  7. 21 May, 2004 2 commits
    • Tim Peters's avatar
      · 595d304c
      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.
      595d304c
    • Tim Peters's avatar
      The __future__ has arrived for generators. · 8d3f8bd4
      Tim Peters authored
      8d3f8bd4
  8. 19 May, 2004 2 commits
    • Tim Peters's avatar
      Collector #1208: Infinite loop in cPickleCache. · e96f23ba
      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).
      e96f23ba
    • Tim Peters's avatar
      checkFullSweep() and checkMinimize(): removed time.sleep(3) calls, and a comment block explaining · f25d047e
      Tim Peters authored
      why the sleeps are needed.  The explanation (and the
      sleeps) didn't make sense -- must be left over
      from a cache implementation before my time.
      f25d047e
  9. 14 May, 2004 8 commits
  10. 11 May, 2004 3 commits
  11. 10 May, 2004 2 commits
  12. 07 May, 2004 1 commit
    • Tim Peters's avatar
      Collector 1309: ZODB.DB.DB.cacheExtremeDetail reports wrong reference count · 9619def9
      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 ...
      9619def9
  13. 05 May, 2004 2 commits