[Zodb-checkins] CVS: ZODB3/ZEO - ClientStorage.py:1.45

Jeremy Hylton jeremy@zope.com
Wed, 14 Aug 2002 16:44:28 -0400


Update of /cvs-repository/ZODB3/ZEO
In directory cvs.zope.org:/tmp/cvs-serv31846

Modified Files:
	ClientStorage.py 
Log Message:
Allow read-only client connections to call pack().

Not sure about this judgement call.  It is really convenient to be
able to pack a ZEO server, even if it is only accepting read-only
connections.  Is pack() a write operation?  At one level: Yes, it
modifies the data.fs.  But it doesn't modify current objects, so it
isn't the same as calling store().

We can revisit this later if it ends up being a problem for someone.



=== ZODB3/ZEO/ClientStorage.py 1.44 => 1.45 ===
--- ZODB3/ZEO/ClientStorage.py:1.44	Wed Aug 14 15:46:28 2002
+++ ZODB3/ZEO/ClientStorage.py	Wed Aug 14 16:44:28 2002
@@ -290,8 +290,7 @@
         return oid
 
     def pack(self, t=None, rf=None, wait=0, days=0):
-        if self._is_read_only:
-            raise POSException.ReadOnlyError()
+        # XXX Is it okay that read-only connections allow pack()?
         # rf argument ignored; server will provide it's own implementation
         if t is None:
             t = time.time()