An error occurred fetching the project authors.
  1. 07 Sep, 2002 2 commits
    • 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
  2. 14 Aug, 2002 1 commit
  3. 14 Jun, 2002 2 commits
  4. 12 Jun, 2002 2 commits
  5. 10 Jun, 2002 1 commit
  6. 15 Apr, 2002 1 commit
    • Jeremy Hylton's avatar
      Remove the cache_deactivate_after argument from the cPickleCache · 8007802d
      Jeremy Hylton authored
      constructor, since it is ignored and there is no current plan to
      support two caches with almost-but-not-quite-the-same arguments.
      
      This change has effects in many files.  The Connection and DB don't
      pass this argument and don't bother setting it explicitly when it is
      reset via DB APIs like setCacheDeactivateAfter().  XXX These APIs
      remain, since existing code may depend on them, but they have no
      effect.
      
      New policy in cPersistence.c: A Persistent object can't have its
      _p_jar set or deleted once it is in a cache.  Persistent already
      implemented this policy for _p_oid; it seems safer to do the same for
      the jar.
      
      Add ringlen() method to cache objects (implemented as cc_ringlen).
      This returns the length of the doubly linked list of non-ghost
      objects.  Same as len(cache.lru_items()), but more efficient.  Only
      used for testing at the moment.
      
      In ring_corrupt(), don't raise a new exception if one has already been
      set.  The old behavior masked useful information about the original
      error / traceback.
      8007802d
  7. 13 Apr, 2002 1 commit
  8. 27 Mar, 2002 1 commit
  9. 11 Feb, 2002 1 commit
  10. 17 Jan, 2002 1 commit
    • Jeremy Hylton's avatar
      Merge Standby-branch to trunk (mostly). · c2eed46c
      Jeremy Hylton authored
      The Standby-branch was branched from the StandaloneZODB-1_0-branch,
      which includes the BTrees-fsIndex code.  I didn't include that change
      in the merge, but everything else.  Terse summary follows:
      
      BaseStorage.py:
          Add read-only storage feature.
          Add TransactionRecord and DataRecord marker classes for iteration.
          Reformat some lines.
      
      FileStorage.py:
          Add read-only storage feature.
          Greg Ward's ConflictError patch
          Reformat some lines.
          Add lastTransaction(), lastSerialno().
          Add bounds support to iterator().
          Use TransactionRecord and DataRecord.
      
      Connection.py:
      DemoStorage.py:
      MappingStorage.py:
          Greg Ward's ConflictError patch
      
      POSException.py:
          Greg Ward's ConflictError patch
          Add ReadOnlyError.
      c2eed46c
  11. 28 Nov, 2001 1 commit
  12. 06 Nov, 2001 1 commit
  13. 18 Sep, 2001 1 commit
  14. 04 Jun, 2001 1 commit
  15. 23 May, 2001 1 commit
  16. 22 May, 2001 2 commits
    • Jeremy Hylton's avatar
      Remove many unused default argument definitions used as speed optimizations. · 7b3ca9e6
      Jeremy Hylton authored
      Many methods had default arguments that were used to bind a global or
      builtin name, like type, None, or type(''), as a local name.  In many
      cases, the names bound were not referenced in the method body
      (presumably they used to be referenced).
      
      commit_sub(): In this one case, delete the default arg anyway, because
          it's only used once.
      7b3ca9e6
    • Jeremy Hylton's avatar
      Cleanup of callback handling and tpc_vote(). · 54656f3d
      Jeremy Hylton authored
      There are two kinds of callbacks, commit actions and close actions.
      It is assumed that the use of these callbacks is infrequent.  As a
      result, the implementation used tuples defined as class attributes to
      avoid creation of instance variables to hold callbacks in the common
      case.  This implementation is complicated because tuples are
      immutable.  Unfortunately, the instance variables were actually
      created anyway in tpc_abort() and tpc_vote().
      
      This implementation changes the class attributes __onCloseCallbacks
      and __onCommitCallbacks to default to None.  If a callback is
      registered with an instance, a list is bound to an instance attribute
      of the same name.  When the transaction commits or aborts, the
      instance attribute is deleted.
      
      tpc_vote(): Remove the default arguments since they are unused in the
      body of the method.
      54656f3d
  17. 21 May, 2001 1 commit
    • Jeremy Hylton's avatar
      Fix deadlock problem reported by John D. Heintz. · 30e6b67a
      Jeremy Hylton authored
      If one thread was committing a transaction and another thread was
      opening a new DB connection, deadlock could occur.  The cause of the
      deadlock is that tpc_finish() acquires the storage and db locks in a
      different order than DB.open().  As a result, if each starts at the
      same time and gets one of the two locks it needs, the system will be
      deadlocked.
      
      The solution is to enforce a consistent locking order.  If a thread is
      going to hold the DB lock and the storage lock, it MUST acquire the DB
      lock first.  This patch implements that locking order for the
      invalidation in tpc_finish().
      
      The DB object gets methods called begin_invalidation() and
      finish_invalidation() that acquire and release the DB lock
      respectively.  Before the Connection calls tpc_finish() on the
      storage, it calls begin_invalidation().  This guarantees that the DB
      acquired before the storage lock.
      
      When the invalidation phase is over, the Connection calls
      end_invalidation() to release the DB lock.  This is an optimization.
      It could wait until tpc_finish() returns, but we know that the DB will
      not be used again for the rest of the tpc_finish() and tpc_finish()
      could take a long time.
      
      Specific changes:
      
      DB.py
      begin_invalidation(): Added.
      finish_invalidation(): Added.
      invalidate(): Remove locking.
      invalidateMany(): Add comment about how it should be used.
      
      Connection.py
      tpc_finish(): Don't pass second argument to storage's tpc_finish()
          when committing a transaction with no data.  Add call to
          begin_invalidation() before calling storage's tpc_finish().
      _invalidate_sub(): Remove empty, unnecessary method.
      _invalidating_invalidating(): Add call to finish_invalidation() after
          last call to DB's invalidate().
      30e6b67a
  18. 17 May, 2001 1 commit
  19. 16 May, 2001 1 commit
  20. 10 May, 2001 1 commit
    • Jeremy Hylton's avatar
      Add _handle_serial() helper that handles serialno responses from a · f3a1b261
      Jeremy Hylton authored
      storage in all their many flavors.
      
      This fixes a conflict resolution bug with subtransactions.
      XXX Commit same change of zope-2_3-branch.
      
      A related change in store() is to call _handle_serial() *after*
      putting new objects in the cache.  This simplifies the logic of
      _handle_serial() a bit, because every object should be in the cache.
      f3a1b261
  21. 14 Apr, 2001 1 commit
  22. 02 Apr, 2001 1 commit
  23. 28 Mar, 2001 1 commit
  24. 20 Mar, 2001 1 commit
  25. 15 Mar, 2001 1 commit
  26. 09 Feb, 2001 1 commit
  27. 18 Jan, 2001 1 commit
    • Jim Fulton's avatar
      Fixed a bug that could cause database consistency problems · c223ab34
      Jim Fulton authored
      in cases where a transaction is aborted due to a storage error
      (e.g. ConflictError) during two-phase commit and new objects
      have been stored. The new objects were left in a state where they
      incorrectly appeared to have been saved and be up to date.
      
      Also removed unnecessary invalidation of objects in other connections
      when commiting sub-transactions.
      c223ab34
  28. 15 Jan, 2001 2 commits
  29. 11 Jan, 2001 1 commit
  30. 06 Oct, 2000 1 commit
  31. 21 Sep, 2000 1 commit
  32. 07 Sep, 2000 1 commit
  33. 12 Jul, 2000 1 commit
  34. 06 Jul, 2000 1 commit
  35. 01 Jul, 2000 1 commit