1. 13 Apr, 2004 7 commits
  2. 12 Apr, 2004 2 commits
  3. 09 Apr, 2004 8 commits
  4. 08 Apr, 2004 2 commits
  5. 06 Apr, 2004 3 commits
    • Tim Peters's avatar
      ZODB.utils grows a new function positive_id(), which returns the id() of · f7b96aea
      Tim Peters authored
      an object as a non-negative integer.  Code trying to pass addresses to
      an %x format uses positive_id(), and this avoids a Python FutureWarning
      about applying %x to negative ints.  The primary difference between this
      and the last stab is that positive_id() should work OK on 64-bit boxes
      too.  What we really want here is C's %p format code, but in Python we
      can't even reliably know the width of native addresses.
      f7b96aea
    • Tim Peters's avatar
      As part of int/long unification, Python 2.4 will start printing · fb213a2d
      Tim Peters authored
      negative ints *as* negative ints when fed into %x formats.  Python 2.3
      still renders them as positive ints, but spews
      
      FutureWarning: %u/%o/%x/%X of negative int will return a signed string
                     in Python 2.4 and up
      
      to warn about the impending change.  Jim reported two instances of that
      warning when running the tests on a box where addresses happen to "be
      negative".  So make the addresses look positive instead (2.3 and 2.4
      treat those the same, so 2.3 doesn't warn about those).
      
      Problem:  it occurs to me now that I'm assuming addresses fit in 32
      bits here.
      fb213a2d
    • Tim Peters's avatar
      _commitResources() and _cleanup(): When an exception occurs during · 5453f18b
      Tim Peters authored
      the former, remember it and raise it after calling _cleanup.  If
      abort_sub() or tpc_abort() in _cleanup() also raise exceptions, log
      them but don't propagate them.
      
      This stops stray output produced by tests testExceptionInTpcAbort and
      testExceptionInSubAbortSub.
      
      Grrrrr:  I haven't yet been able to figure out how to get logging to work
      in ZODB, so haven't yet been able to check that the new logging is
      reasonable.
      5453f18b
  6. 05 Apr, 2004 2 commits
  7. 02 Apr, 2004 3 commits
  8. 01 Apr, 2004 2 commits
    • Tim Peters's avatar
      None of the tests ran, but this was shallow -- setup.py hadn't been · 3edc5d6e
      Tim Peters authored
      taught about the new "transaction" package.
      3edc5d6e
    • Jeremy Hylton's avatar
      Merge the jeremy-txn-branch to the head. · a54e7bb3
      Jeremy Hylton authored
      This branch introduces a new transaction API.  The key features are:
        - top-level functions in transaction -- get(), commit(), abort()
        - explicit transaction manager objects
        - Transaction objects are used for exactly one transaction
        - support for transaction synchronizers
      
      The changes here are still provisional, but we want to get them off an
      obscure branch and onto the head for further development.
      a54e7bb3
  9. 30 Mar, 2004 2 commits
    • Tim Peters's avatar
      FileStoragePacker: the change yesterday to speed packing by doing most · 0f8c1aa0
      Tim Peters authored
      of pack in buffered mode, then switching to unbuffered mode to copy the
      tail, actually broke pack completely on Windows:  we didn't close the
      buffered file handle before opening the unbuffered one, and self.gc held
      on to the still-open former handle.  This prevented the caller from
      renaming Data.fs to Data.fs.old (a handle on Data.fs was still open).
      The cure is simply to close a handle when we stop using it.
      0f8c1aa0
    • Jeremy Hylton's avatar
      Add presumed speed optimization for pack(). · 96659bd7
      Jeremy Hylton authored
      Only open the file for unbuffered I/O after finishing the first phase
      of pack.  The first phase gets its end-of-file position from the main
      thread, so there's no possibility of reading a 'c' record.
      
      Timings on Linux are inconclusive, but it seems like using buffered
      I/O for the initial phase should be faster.
      96659bd7
  10. 23 Mar, 2004 1 commit
    • Stephan Richter's avatar
      · 5507592c
      Stephan Richter authored
      Provide a way to shutdown the servers using an exit status.
      5507592c
  11. 21 Mar, 2004 3 commits
  12. 18 Mar, 2004 2 commits
    • Tim Peters's avatar
      FileStoragePacker: open the filestorage in unbuffered mode. Transactions · 3a7a90f6
      Tim Peters authored
      can still be in progress, and they're written to the same physical file via
      a different file object.  Using buffered I/O in the packer creates the
      possiblity for the packer to see stale data from its file object's stdio
      buffers.  This is now known to happen under Linux, Gentoo, OS X, Cygwin,
      and Debian.  It apparently doesn't happen under native Windows, which is
      why everyone except me has been seeing the new checkPackLotsWhileWriting
      test fail.
      
      This will probably need to be backported everywhere, but first I want to
      see in which new way checkPackLotsWhileWriting fails on 48 Linux boxes
      overnight <wink>.
      3a7a90f6
    • 's avatar
      updated / unified sha-bang as discussed on zope-dev · 4e803728
      authored
      (distutils mungs it anyway, so it's just relevant for developers)
      4e803728
  13. 17 Mar, 2004 2 commits
    • Tim Peters's avatar
      By popular demand, FileStorage.pack() no longer propagates a · 00f6abf3
      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).
      00f6abf3
    • Tim Peters's avatar
      checkPackLotsWhileWriting: remove excess generality. Only one client · e15aeeca
      Tim Peters authored
      thread is interesting here, so removed the hair catering to the possiblity
      of N > 1 threads.
      e15aeeca
  14. 16 Mar, 2004 1 commit
    • Tim Peters's avatar
      Bugfix for pack(). Approximately forever, we've seen extremely rare · 9516493c
      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.
      9516493c