[Checkins] SVN: relstorage/trunk/relstorage/adapters/oracle.py Use a 5 second delay to reduce the likelihood of spurious ORA-01466 errors caused by Oracle's fragility with DDL.

Shane Hathaway shane at hathawaymix.org
Mon Jan 26 20:05:48 EST 2009


Log message for revision 95060:
  Use a 5 second delay to reduce the likelihood of spurious ORA-01466 errors caused by Oracle's fragility with DDL.

Changed:
  U   relstorage/trunk/relstorage/adapters/oracle.py

-=-
Modified: relstorage/trunk/relstorage/adapters/oracle.py
===================================================================
--- relstorage/trunk/relstorage/adapters/oracle.py	2009-01-27 00:48:24 UTC (rev 95059)
+++ relstorage/trunk/relstorage/adapters/oracle.py	2009-01-27 01:05:48 UTC (rev 95060)
@@ -15,6 +15,8 @@
 
 import logging
 import re
+import time
+
 import cx_Oracle
 from ZODB.POSException import StorageError
 
@@ -263,6 +265,9 @@
         );
         """
         self._run_script(cursor, stmt)
+        # Let Oracle catch up with the new data definitions by sleeping.
+        # This reduces the likelihood of spurious ORA-01466 errors.
+	time.sleep(5)
 
 
     def prepare_schema(self):



More information about the Checkins mailing list