1. 11 Sep, 2002 6 commits
    • Jeremy Hylton's avatar
    • Guido van Rossum's avatar
      *Properly* protect self.thread (renamed from self._thread) with a · e2ef1abd
      Guido van Rossum authored
      lock.  The lock is now never held for a long time, only while
      self.thread is being assigned or inspected, and while a thread is
      being created, started or stopped.  Waiting for an event or joining a
      thread is now done without holding the lock.  There is no longer a
      fear of AttributeError.
      
      When a thread join doesn't succeed within 30 seconds, a message is
      logged, and depending on the situation, the join is retried.
      e2ef1abd
    • Jeremy Hylton's avatar
      Make hososity more likely for failed multi-jar commits. · 0016a36e
      Jeremy Hylton authored
      The old code would avoid hosing the system when the first jar failed
      during its finish.  The logic is that the failure means that
      transaction did not commit, so it was safe for all the other jars to
      abort.  There are counter-examples to this assumption.  For example,
      ZEO could fail after commiting the transaction on the server but
      before communicating that success to the client.  It would lead to
      inconsistency if the other jars aborted after the first committed.
      
      The solution is to reduce the special case yet further:  If a
      single-jar transaction fails during the finish, assume the transaction
      is aborted and avoid hosage.  If the jar actually committed, it's
      possible to get back to a consistent state since only one jar was
      involved.
      0016a36e
    • Jeremy Hylton's avatar
    • Jeremy Hylton's avatar
      Raise ReadOnlyError on tpc_begin(). · 3058a06f
      Jeremy Hylton authored
      3058a06f
    • Jeremy Hylton's avatar
      Make tpc_begin() a read-only method. · 398e9a4c
      Jeremy Hylton authored
      The effect of this change will be to cause transactions to fail
      immediately, rather than the first time they call store() or
      abortVersion() or some other write-method.  Since the Connection now
      treats empty transactions as a special case, this change will not
      change the class of transactions that fail.
      398e9a4c
  2. 10 Sep, 2002 9 commits
  3. 09 Sep, 2002 6 commits
  4. 08 Sep, 2002 5 commits
  5. 07 Sep, 2002 6 commits
    • Jeremy Hylton's avatar
      Reflow comment. · fdd1d394
      Jeremy Hylton authored
      fdd1d394
    • Jeremy Hylton's avatar
      Whitespace. · a87e64a9
      Jeremy Hylton authored
      a87e64a9
    • Jeremy Hylton's avatar
      Rename _do_async_loop() and _do_async_poll() to wait() and poll(). · bf5f5ec4
      Jeremy Hylton authored
      Repair comments in _call() about how wait() handles reply lock.
      bf5f5ec4
    • Jeremy Hylton's avatar
      Handle empty transactions without touching the storage. · d7a558d1
      Jeremy Hylton authored
      # NB: commit() is responsible for calling tpc_begin() on the storage.
      # It uses self._begun to track whether it has been called.  When
      # self._begun is None, it has not been called.
      
      # This arrangement allows us to handle the special case of a
      # transaction with no modified objects.  It is possible for
      # registration to be occur unintentionally and for a persistent
      # object to compensate by making itself as unchanged.  When this
      # happens, it's possible to commit a transaction with no modified
      # objects.
      
      # Since tpc_begin() may raise a ReadOnlyError, don't call it if there
      # are no objects.  This avoids spurious (?) errors when working with
      # a read-only storage.
      
      Add code to handle this in Connection's tpc_begin() and commit()
      methods.
      
      Add two tests in testZODB.
      d7a558d1
    • Jeremy Hylton's avatar
      Remove code looking for None in self._invalidated. · 38646258
      Jeremy Hylton authored
      An earlier revision (1.68) fixed invalidation code when an object had
      no oid (oid == None).  There is no longer anyway to get None in
      _invalidated, and it has been a long time since a None there meant
      "invalidate everything."
      
      At long last, then, remove all the code deal with the invalidate
      everything behavior.
      38646258
    • Jeremy Hylton's avatar
      Add a little whitespace. · 8e5fa55e
      Jeremy Hylton authored
      8e5fa55e
  6. 06 Sep, 2002 8 commits