Commit 7a078128 authored by Jim Fulton's avatar Jim Fulton

- Removed a missfeature that can cause performance problems when using

  an external garbage collector with ZEO.  When objects were deleted
  from a storage, invalidations were sent to clients. This makes no
  sense.  It's wildly unlikely that the other connections/clients have
  copies of the garbage.  In normal storage garbage collection, we
  don't send invalidations. There's no reason to send them when an
  external garbage collector is used.
parent ea44620e
...@@ -17,6 +17,14 @@ Bugs Fixed ...@@ -17,6 +17,14 @@ Bugs Fixed
https://bugs.launchpad.net/zodb/+bug/665452 https://bugs.launchpad.net/zodb/+bug/665452
- Removed a missfeature that can cause performance problems when using
an external garbage collector with ZEO. When objects were deleted
from a storage, invalidations were sent to clients. This makes no
sense. It's wildly unlikely that the other connections/clients have
copies of the garbage. In normal storage garbage collection, we
don't send invalidations. There's no reason to send them when an
external garbage collector is used.
3.10.0 (2010-10-08) 3.10.0 (2010-10-08)
=================== ===================
......
...@@ -607,8 +607,6 @@ class ZEOStorage: ...@@ -607,8 +607,6 @@ class ZEOStorage:
raise raise
except Exception, err: except Exception, err:
self._op_error(oid, err, 'delete') self._op_error(oid, err, 'delete')
else:
self.invalidated.append(oid)
return err is None return err is None
......
...@@ -1196,56 +1196,6 @@ def dont_log_poskeyerrors_on_server(): ...@@ -1196,56 +1196,6 @@ def dont_log_poskeyerrors_on_server():
False False
""" """
def delete_object_multiple_clients():
"""If we delete on one client, the delete should be reflected on the other.
First, we'll create an object:
>>> addr, _ = start_server()
>>> db = ZEO.DB(addr)
>>> conn = db.open()
>>> conn.root()[0] = conn.root().__class__()
>>> transaction.commit()
>>> oid = conn.root()[0]._p_oid
We verify that we can read it in another client, which also loads
it into the client cache.
>>> cs = ClientStorage(addr)
>>> p, s = cs.load(oid)
Now, we'll remove the object:
>>> txn = transaction.begin()
>>> db.storage.tpc_begin(txn)
>>> db.storage.deleteObject(oid, s, txn)
>>> db.storage.tpc_vote(txn)
>>> db.storage.tpc_finish(txn)
And we'll get a POSKeyError if we try to access it:
>>> db.storage.load(oid) # doctest: +ELLIPSIS
Traceback (most recent call last):
...
POSKeyError: ...
We'll wait for our other storage to get the invalidation and then
try to access the object. We'll get a POSKeyError there too:
>>> tid = db.storage.lastTransaction()
>>> forker.wait_until(
... 'cs has caught up',
... lambda : cs.lastTransaction() == tid)
>>> cs.load(oid) # doctest: +ELLIPSIS
Traceback (most recent call last):
...
POSKeyError: ...
>>> db.close()
>>> cs.close()
"""
def open_convenience(): def open_convenience():
"""Often, we just want to open a single connection. """Often, we just want to open a single connection.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment