[Checkins] SVN: relstorage/trunk/ RelStorage was opening a test database connection (and was leaving it
Shane Hathaway
shane at hathawaymix.org
Sat Nov 12 16:29:45 UTC 2011
Log message for revision 123327:
RelStorage was opening a test database connection (and was leaving it
idle in a transaction with recent ZODB versions that support
IMVCCStorage.) RelStorage no longer opens that test connection.
Changed:
U relstorage/trunk/CHANGES.txt
U relstorage/trunk/relstorage/storage.py
-=-
Modified: relstorage/trunk/CHANGES.txt
===================================================================
--- relstorage/trunk/CHANGES.txt 2011-11-12 15:59:10 UTC (rev 123326)
+++ relstorage/trunk/CHANGES.txt 2011-11-12 16:29:45 UTC (rev 123327)
@@ -34,6 +34,13 @@
will hopefully help people who accidentally use a single cache for
multiple databases.
+1.5.1 (2011-11-12)
+------------------
+
+- RelStorage was opening a test database connection (and was leaving it
+ idle in a transaction with recent ZODB versions that support
+ IMVCCStorage.) RelStorage no longer opens that test connection.
+
1.5.0 (2011-06-30)
------------------
Modified: relstorage/trunk/relstorage/storage.py
===================================================================
--- relstorage/trunk/relstorage/storage.py 2011-11-12 15:59:10 UTC (rev 123326)
+++ relstorage/trunk/relstorage/storage.py 2011-11-12 16:29:45 UTC (rev 123327)
@@ -178,8 +178,6 @@
if create:
self._adapter.schema.prepare()
- self._open_load_connection()
-
self.__lock = threading.RLock()
self.__commit_lock = threading.Lock()
self._lock_acquire = self.__lock.acquire
@@ -201,7 +199,9 @@
prefix = options.cache_prefix
if not prefix:
# Use the database name as the cache prefix.
+ self._open_load_connection()
prefix = adapter.schema.get_database_name(self._load_cursor)
+ self._drop_load_connection()
prefix = prefix.replace(' ', '_')
self._cache = StorageCache(adapter, options, prefix)
@@ -1025,6 +1025,7 @@
raise self._stale_error
self._lock_acquire()
try:
+ self._before_load()
cursor = self._load_cursor
oid_int = u64(oid)
try:
@@ -1310,6 +1311,7 @@
self._lock_acquire()
try:
+ self._before_load()
cursor = self._load_cursor
return self.blobhelper.loadBlob(cursor, oid, serial)
finally:
@@ -1328,6 +1330,7 @@
"""
self._lock_acquire()
try:
+ self._before_load()
cursor = self._load_cursor
return self.blobhelper.openCommittedBlobFile(
cursor, oid, serial, blob=blob)
More information about the checkins
mailing list