[ZODB-Dev] Possible ZEO bug: DSToolkit permanently disconnects
after ZEO restart
Paul Winkler
pw_lists at slinkp.com
Mon Mar 14 13:14:35 EST 2005
Hi,
I brought this up a while ago on dirstorage-users.
Toby Dickenson suggested it might possibly be a ZEO bug.
The issue, with detailed repro instructions:
http://sourceforge.net/tracker/index.php?func=detail&aid=1106702&group_id=53818&atid=471702
Toby's response from dirstorage-users:
http://sourceforge.net/mailarchive/message.php?msg_id=10470537
Summary:
- if ZEO ever restarts, the DSToolkit Product can no longer do its job
(forcing the storage into Snapshot mode) - instead ZEO raises
DisconnectedError, even though all other Zope activity proceeds
as normal, i.e. Zope is NOT disconnected from ZEO.
Restarting Zope makes the symptom go away.
- I can reproduce this on Zope 2.7.3
- Toby can NOT reproduce this with Zope 2.6.x
- Toby says "DirectoryStorage is using ZEO's getExtensionMethods API,
and I supect the problem will be there."
Now, I don't know squat about getExtensionMethods except what
I've learned browsing the ZEO source in the past few minutes.
But here's what I see:
>From a brief look, DSToolkit is a very simple Product.
It contains a couple of methods that in turn invoke ZEO extension methods.
Here's an example:
security.declareProtected('Manage DirectoryStorages','is_directorystorage')
def is_directorystorage(self):
if self._v_is_directory_storage is None:
storage = self._p_jar._storage
try:
fn = storage.is_directory_storage
except AttributeError:
self._v_is_directory_storage = 0
else:
self._v_is_directory_storage = fn()
return self._v_is_directory_storage
... which method of the storage is referred to in
BaseDirectoryStorage.py:
def getExtensionMethods(self):
return {'enter_snapshot': None,
'leave_snapshot': None,
'get_snapshot_code': None,
'is_directory_storage': None,
}
... which looks fine according to the API in ClientStorage.py;
a bit further down in BaseDirectoryStorage.py
is the method definition:
def is_directory_storage(self):
return 1
So, everything in DirectoryStorage and DSToolkit looks kosher to me;
is this a ZEO bug?
If so, I'll file a collector issue (but where? in the Zope collector?)
thanks,
--
Paul Winkler
http://www.slinkp.com
More information about the ZODB-Dev
mailing list