An error occurred fetching the project authors.
  1. 30 May, 2003 1 commit
  2. 19 May, 2003 1 commit
  3. 08 May, 2003 1 commit
  4. 23 Apr, 2003 2 commits
    • Jeremy Hylton's avatar
      Be sure to clear the original cache when calling resetCache(). · 0fc65cfb
      Jeremy Hylton authored
      XXX I've got no idea what this is actually supposed to do.  It may be
      that clearing the old cache isn't safe, but only if it never was.  If
      a non-ghost object is in the cache, it seems that attempts to use it
      will go through the wrong cache.
      0fc65cfb
    • Jeremy Hylton's avatar
      Fix memory leak involving persistent objects and caches. · e5567b6e
      Jeremy Hylton authored
      Problem reported by Ulla Theiss and diagnosed by Shane Hathaway.  The
      long and short of it is that persistent objects refer to their
      connection which refers to its cache which refers to the persistent
      objects.  We can't let GC find the cycle because persistent objects
      are extension class objects, and, thus, don't participate in GC.
      
      Add an explicit clear() method that removes non-ghost objects from the
      ring without going to all the trouble of ghosting them.  At some
      point, they'll just get deallocated (which will ghostify them).
      
      A cleared cache has non-ghost objects in the dict that are not in the
      ring, so we need to add some checks for whether the object is actually
      in the ring.
      e5567b6e
  5. 22 Apr, 2003 1 commit
  6. 08 Apr, 2003 1 commit
    • Jeremy Hylton's avatar
      Backport atomic invalidations code from Zope3. · 61cbc091
      Jeremy Hylton authored
      The DB's invalidate() method takes a set of oids corresponding to all
      the changes from a data manager for one transaction.  All the objects
      are invalidated at once.
      
      Add a few tests in testZODB of the new code.  The tests just cover
      corner cases, because I can't think of a sensible way to test the
      atomicity.  When it has failed in the past, it's been caused by
      nearly-impossible to reproduce data races.
      
      This fix needs to be backported to Zope 2.6, but only after assessing
      how significant an impact the API change will have.
      61cbc091
  7. 04 Mar, 2003 1 commit
  8. 06 Feb, 2003 2 commits
  9. 21 Jan, 2003 1 commit
  10. 17 Jan, 2003 1 commit
    • Shane Hathaway's avatar
      Merged shane-local-transactions-branch. · 5ddbba39
      Shane Hathaway authored
      This change adds a new method, setLocalTransaction(), to the
      Connection class.  ZODB applications can call this method to bind
      transactions to connections rather than threads.  This is especially
      useful for GUI applications, which often have only one thread but
      multiple independent activities within that thread (generally one per
      window).  Thanks to Christian Reis for championing this feature.
      
      Applications that take advantage of this feature should not use the
      get_transaction() function.  Until now, ZODB itself sometimes assumed
      get_transaction() was the only way to get the transaction.  Minor
      corrections have been added.  The ZODB test suite, on the other hand,
      can continue to use get_transaction(), since it is free to assume that
      transactions are bound to threads.
      5ddbba39
  11. 15 Jan, 2003 1 commit
  12. 14 Jan, 2003 1 commit
  13. 03 Dec, 2002 1 commit
  14. 18 Nov, 2002 1 commit
  15. 23 Oct, 2002 1 commit
  16. 04 Oct, 2002 1 commit
  17. 16 Sep, 2002 1 commit
    • Jeremy Hylton's avatar
      Rewrite new_persistent_id() to make it clear what's going on. · e94f7e66
      Jeremy Hylton authored
      Reformat all the code to use Python style.
      
      We got an undiagnosed bug report for coptimization, which lead to an
      attempt at code review.
      
      Break up a the large new_persistent_id() function into several helpers
      -- get_class(), get_class_tuple(), and set_oid().  Each function now
      does a little less.  Don't reuse variable names for random purposes.
      e94f7e66
  18. 07 Sep, 2002 3 commits
    • 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
  19. 14 Aug, 2002 1 commit
  20. 14 Jun, 2002 2 commits
  21. 12 Jun, 2002 2 commits
  22. 10 Jun, 2002 1 commit
  23. 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
  24. 13 Apr, 2002 1 commit
  25. 27 Mar, 2002 1 commit
  26. 11 Feb, 2002 1 commit
  27. 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
  28. 28 Nov, 2001 1 commit
  29. 06 Nov, 2001 1 commit
  30. 18 Sep, 2001 1 commit
  31. 04 Jun, 2001 1 commit
  32. 23 May, 2001 1 commit
  33. 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