1. 22 Jul, 2005 3 commits
    • Tim Peters's avatar
      Merge rev 37382 from 3.4 branch. · 93103fc7
      Tim Peters authored
      Stitch in ZConfig's docs from ZConfig.
      93103fc7
    • Tim Peters's avatar
      Merge rev 37380 from 3.4 branch. · 72d8ebb8
      Tim Peters authored
      Remove this -- it's a way out-of-date copy of the ZConfig
      docs.  I'll stitch them back in from the ZConfig repo next,
      via svn:externals.  Ideally, ZODB shouldn't have this as
      part of its checkout tree at all, but that also has implications
      for the way ZRS gets packaged, etc.
      72d8ebb8
    • Tim Peters's avatar
      Merge rev 37375 from 3.4 branch. · 8ab7eb8e
      Tim Peters authored
      A large number of changes so that cache tracing isn't
      100% broken -- I can get a trace file now, and stats.py
      doesn't blow up anymore.  Don't yet know whether it's
      reporting sensible things, but it's not obviously insane.
      simul.py doesn't know about the current cache implementation
      either yet.
      8ab7eb8e
  2. 21 Jul, 2005 1 commit
    • Tim Peters's avatar
      Merge rev 37372 from 3.4 branch. · 6140445b
      Tim Peters authored
      ClientCache:  made it a new-style class.
      
      FileCache:  Removed the reuse= argument.  IIRC, it made some sense
      when different cache schemes were first being tried, but complicated
      the logic now to no good end.
      
      Nuked the maddening log warnings about reuse=True.  They were never
      helpful and were often confusing.
      
      Added info-level log messages to record the path of the client cache
      file, whether it's persistent or temporary, and if it's persistent
      whether we're creating or reusing it.
      
      Minor changes to comments.
      6140445b
  3. 20 Jul, 2005 1 commit
  4. 19 Jul, 2005 2 commits
  5. 18 Jul, 2005 2 commits
    • Tim Peters's avatar
      Merge rev 37244 from 3.4 branch. · 31e4242f
      Tim Peters authored
      Collector 1843:  IISet.keys: bad exception handling.
      
      Bucket_rangeSearch():  De-obfuscated the calls to
      Bucket_findRangeEnd(), so that they stop ignoring
      the latter's error returns (a mind-bending combination
      of embedded assignment nested in an UNLESS macro,
      seemingly copy+paste'd so that the error occurred twice).
      31e4242f
    • Tim Peters's avatar
      Merge rev 37239 from 3.4 branch. · ff59389f
      Tim Peters authored
      Port from ZODB 3.2.
      
      Collector #1846:  If an uncommitted transaction was found, fsrecover.py
      fell into an infinite loop.  Fixed that, and added a new test
      (testUncommittedAtEnd) to ensure this stays fixed.
      ff59389f
  6. 14 Jul, 2005 3 commits
  7. 12 Jul, 2005 3 commits
    • Tim Peters's avatar
      Merge news from 3.4.1a5. · 85e9b795
      Tim Peters authored
      85e9b795
    • Tim Peters's avatar
      Merge rev 33285 from 3.4 branch. · fe9fcbe3
      Tim Peters authored
      Convert internal uses of subtxns to use savepoints instead.
      
      I suspect BTrees/convert.py should be removed instead.
      fe9fcbe3
    • Tim Peters's avatar
      Merge rev 33276 from 3.4 branch. · e8b2c3c9
      Tim Peters authored
      Revert extra copying in Connection._rollback().
      
      Since TmpStore.reset() had to change too to copy the index anyway,
      it no longer hurts that _rollback() clears the index (as a side
      effect of self._cache.invalidate(src.index)).
      e8b2c3c9
  8. 11 Jul, 2005 2 commits
    • Tim Peters's avatar
      Merge rev 33273 from 3.4 branch. · 483495dd
      Tim Peters authored
      Merge tim-savepoint branch.
      
      Allow rollback to a given savepoint multiple times.
      
      transaction/_transaction.py
          _remove_and_invalidate_after():  Don't remove the
          argument savepoint from the savepoint stack anymore.
      
          abort():  abort(True) relied on the subtxn savepoint
          being invalidated as a side effect of rolling back
          to it.  Invalidate it explicitly now.
      
          Savepoint.rollback():  Don't invalidate self.
      
      ZODB/Connection.py
          Connection._rollback():  Pass a temp container to
          _cache.invalidate(), because that method clears the
          container as a side effect.  Clearing the index
          in a savepoint was a disaster if the savepoint was
          used again.
      
          TmpStore.reset():  Make a copy of the argument index.
          An alternative would be to make all callers make
          copies, but the only caller now thinks of its `state`
          argument as being opaque.
      
      transaction/savepoint.txt
      ZODB/tests/{testSubTransaction.py, testConnectionSavepoint.txt}
          Test the new semantics, and beef up the tests.
      
      transaction/tests/savepointsample.py
          _rollback_savepoint():  Needed to copy the data.
      483495dd
    • Tim Peters's avatar
      Merge rev 33265 from 3.4 branch. · 63414eac
      Tim Peters authored
      English repairs.
      63414eac
  9. 08 Jul, 2005 1 commit
  10. 05 Jul, 2005 3 commits
    • Tim Peters's avatar
      Merge rev 31016 from 3.4 branch. · d016205a
      Tim Peters authored
      Simplify.
      
      Primarily, _tindex should have been a dict all along, pack()
      worked too hard at the end, and loadEx() is a minor variant
      of load().
      d016205a
    • Tim Peters's avatar
      Merge rev 31012 from 3.4 branch. · 31b7c342
      Tim Peters authored
      load() and loadEx():  eliminate gratuitous differences.
      
      Ideally, load() should call loadEx() instead, but we really
      don't want "an extra" Python-level call here (heavily used).
      
      loadEx():  deleted pointless call of self._read_txn_header().
      
      ServerStub.loadEx() comments:  these were obviously wrong in
      several ways, but I don't know the full truth.  Better to
      say so up front than to leave them clearly wrong, though.
      31b7c342
    • Tim Peters's avatar
      Merge rev 31010 from 3.4 branch. · 5cabdb0c
      Tim Peters authored
      Collector 1831.
      
      The BTree minKey() and maxKey() methods gave a misleading message if no key
      satisfying the constraints existed in a non-empty tree.
      5cabdb0c
  11. 02 Jul, 2005 3 commits
    • Tim Peters's avatar
      Merge rev 30988 from 3.4 branch. · 27e82f8a
      Tim Peters authored
      Collector #1830.
      
      In some error cases when reading a FileStorage index, the
      code referenced an undefined global.
      27e82f8a
    • Tim Peters's avatar
      Merge rev 30984 from 3.4 branch. · e79020e9
      Tim Peters authored
      Get rid of all code defining or referencing t32.
      
      Such code never made sense; it was all of the form
      
          t32 = 1L << 32
          if something < 0:
              something = t32 - something
      
      which is a way to change negative integers into
      gigantic positive integers greater than 4 billion, and
      never made sense in context.  Possibly
      
              something = t32 + something
      
      was intended, but that never made sense in context either.
      
      In any case, `something` is invariably obtained from
      struct.unpack using the "H" format code, and that never
      returns a negative integer to begin with.
      e79020e9
    • Tim Peters's avatar
      Merge rev 30984 from 3.4 branch. · 3abb92ac
      Tim Peters authored
      read_index():  Mechanical reformat for easier reading.
      3abb92ac
  12. 01 Jul, 2005 2 commits
  13. 29 Jun, 2005 1 commit
    • Tim Peters's avatar
      Merge rev 30944 from 3.4 branch. · ee5482ae
      Tim Peters authored
      Collector 1822.
      
      Make undo{Log,Info} arguments act like Python slice indices when
      both are non-negative.  The code used to do that before ZODB 3.4a9,
      but changed to match ZODB's UML documentation.  Alas, some
      (untested) code in Zope relied on the actual behavior (see the
      collector report).  Changed code, docs, and tests to bless the
      old behavior in these cases.
      
      DemoStorage.UndoLog:  this was wrong in several ways.  I'm still
      unsure about why it skips "packed" transactions.  That doesn't seem
      right, but I don't have time to wonder about that now.
      ee5482ae
  14. 27 Jun, 2005 1 commit
  15. 24 Jun, 2005 1 commit
    • Tim Peters's avatar
      Merge rev 30900 from 3.4 branch. · 8c29338a
      Tim Peters authored
      _triggerbase:  Make new-style class, for better debugability.
      
      Windows trigger.__init__:  Simplify more.  The trigger can connect
      after the other end has done  bind() and listen(); no need to wait
      for an accept() too, and so no need to fiddle with blocking/
      non-blocking or "expected" socket.error's either.
      8c29338a
  16. 22 Jun, 2005 1 commit
    • Tim Peters's avatar
      Merge rev 30894 from 3.4 branch. · 8a50c401
      Tim Peters authored
      Largely rewritten.
      
      remove_loop_callback():  There were two definitions of this function.
      Deleted one, changed the other to use enumerate().
      
      poll():  This was trying to repair a bug in Python 2.2's asyncore.poll().
      2.2 is no longer supported, so removed this poll().
      
      _start_loop(), _stop_loop():  Removed; functionality folded into
      reworked loop().
      
      loop():  The signature of asyncore.loop() changed in 2.4, but this
      still had "the old" signature.  Instead of sniffing the signature
      of the Python in use, this does a saner thing:  the original
      asyncore.loop is captured, and called from the body of this loop().
      That way, (A) we don't care what asyncore.loop's signature is; and,
      (B) we still call the original Python code, so debugging prints and
      breakpoints (etc) stuffed into Python's asyncore no longer "vanish
      by magic" when ZEO is used.
      8a50c401
  17. 21 Jun, 2005 1 commit
    • Tim Peters's avatar
      Merge rev 30877 from 3.4 branch. · b51ff3e4
      Tim Peters authored
      Massive refactoring, to move the bulk of the trigger code into
      an OS-indepedent base class.
      
      __repr__:  Use the postive_id function to embed the machine address.
      Addresses with the high bit set trigger warnings before Python 2.4,
      and come out as negative numbers in 2.4+.
      
      Windows trigger.__init__:  Don't make 50 guesses at a port number
      to use, let Windows pick an available port for us.  Also documented
      the baffling single-thread socket setup dance, which took an hour to
      reverse-engineer (in large part because it used a bare "except" w/ no
      clue as to why).
      b51ff3e4
  18. 17 Jun, 2005 2 commits
    • Jim Fulton's avatar
      Updated release numbers. · f467562d
      Jim Fulton authored
      f467562d
    • Jim Fulton's avatar
      We check for implicitly adding objects by looking for "new" objects · 173b1df9
      Jim Fulton authored
      reachable from multiple connections.  Previously, we thought that we
      could limit the time that an object was new to a single savepoint, but
      that didn't work because savepoints of different connections are too
      independent.   Now an object is considered new for the full extent of
      the transaction in which it was created.
      
      Made it possible to use connection add methods to explicitly control
      the database an object is added too.
      173b1df9
  19. 16 Jun, 2005 7 commits
    • Tim Peters's avatar
      Merge rev 30825 from 3.4 branch. · bbe3a92b
      Tim Peters authored
      TmpStore needs to delegate loadBefore().
      bbe3a92b
    • Jim Fulton's avatar
      Updated release number to 3.5a2. · 3e0586d3
      Jim Fulton authored
      3e0586d3
    • Tim Peters's avatar
      Merge rev 30818 from 3.4 branch. · 7614cce3
      Tim Peters authored
      Remove needless "cleanup" code -- Transaction does not have
      a __del__ method (but probably did at some earlier time).
      7614cce3
    • Jim Fulton's avatar
      Took __init__ out of IConnection for 2 reasons · 7ce4935d
      Jim Fulton authored
      1. Construction of Connections is an implementation detail.
         ZODB client code should never construct connections directly.
      
      2. __init__ is not a method of IConnection.  It might be a method of
         some sort of connection factory api, if we had one.
      7ce4935d
    • Jim Fulton's avatar
      Greatly simplified the internal dance to create, open, and close · 318f92e8
      Jim Fulton authored
      connections.   Connections now get their database and related data
      when they are constructed.  They no longer throw away this information
      when they are closed.  (The old design that threw away the database
      and related data did so to avoid memory leaks in Python 1.)
      
      Fixed a multi-database connection-management bug. (The fix
      necessitated the simplification.)
      318f92e8
    • Jim Fulton's avatar
      Because of the, um, automatic way that objects are added to databases · 8fcb1362
      Jim Fulton authored
      by virtue of being reachable from objects in databases, there is
      a danger of ambiguity when an object is reachable from multiple
      databases.  This ambiguity can lead to very subtle bugs with the
      symtom that objects are in unexpected databases.
      
      Introduced a check to refuse to commit when the ambiguity exists.
      
      (This required changing the connection '_creating' attribute to a
      dictionary.)
      8fcb1362
    • Jim Fulton's avatar
      Fixed the basic tests to open the second db correctly. · 00eb5e1d
      Jim Fulton authored
      Secondary connections always need to be made from an existing
      connection.
      
      Added check to make sure we don't get references across incompatible
      connections.
      00eb5e1d