[Neo-report] r2825 jm - /trunk/neo/client/Storage.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Sep 6 11:40:00 CEST 2011


Author: jm
Date: Tue Sep  6 11:40:00 2011
New Revision: 2825

Log:
client: explain why we implement load() like loadBefore()

Modified:
    trunk/neo/client/Storage.py

Modified: trunk/neo/client/Storage.py
==============================================================================
--- trunk/neo/client/Storage.py [iso-8859-1] (original)
+++ trunk/neo/client/Storage.py [iso-8859-1] Tue Sep  6 11:40:00 2011
@@ -95,6 +95,13 @@ class Storage(BaseStorage.BaseStorage,
         return self.app._cache
 
     def load(self, oid, version=''):
+        # In order to know if it was safe to get the last revision of an object
+        # instead of using loadBefore(), ZODB.Connection._setstate relies on
+        # the fact that retrieving data from a remote storage forces incoming
+        # invalidations to be received.
+        # But in NEO, invalidations are not received from the same network
+        # connection that the one used to retrieve data.
+        # So we must implement load() like a loadBefore().
         # XXX: interface definition states that version parameter is
         # mandatory, while some ZODB tests do not provide it. For now, make
         # it optional.




More information about the Neo-report mailing list