[ZODB-Dev] [ zodb-Bugs-734822 ] close() should be handled better inside Connection.py

SourceForge.net noreply at sourceforge.net
Wed Jan 14 17:06:23 EST 2004


Bugs item #734822, was opened at 2003-05-08 16:07
Message generated for change (Comment added) made by kiko_async
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=115628&aid=734822&group_id=15628

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Christian Reis (kiko_async)
Assigned to: Nobody/Anonymous (nobody)
Summary: close() should be handled better inside Connection.py

Initial Comment:
If storage.close() or db.close() have been issued and a
commit() or connection.close() is called, evil errors
pop up.

See
http://mail.zope.org/pipermail/zodb-dev/2003-May/004983.html
for details.

Attached patch is a first cut at making this clearer.

----------------------------------------------------------------------

>Comment By: Christian Reis (kiko_async)
Date: 2004-01-14 20:06

Message:
Logged In: YES 
user_id=222305

Yeah, it still is:

Traceback (most recent call last):
  File "testClose.py", line 51, in ?
    test()
  File "testClose.py", line 29, in test
    x.root()["foo"] = 100
  File
"/mondo/local/lib/python2.3/site-packages/ZODB/Connection.py",
line 542, in root
    return self['\0\0\0\0\0\0\0\0']
  File
"/mondo/local/lib/python2.3/site-packages/ZODB/Connection.py",
line 150, in __getitem__
    p, serial = self._storage.load(oid, self._version)
  File
"/mondo/local/lib/python2.3/site-packages/ZODB/FileStorage.py",
line 687, in load
    return self._load(oid, version, self._index, self._file)
  File
"/mondo/local/lib/python2.3/site-packages/ZODB/FileStorage.py",
line 658, in _load
    file.seek(pos)
ValueError: I/O operation on closed file

This happens when trying to write something to
conn.root()['xxx']. If you look at the testcase (just
comment out the ClosedError bits, which require the patch)
you'll see what I mean.

I can help out here, but I'd like guidance as to what to do.

----------------------------------------------------------------------

Comment By: Christian Reis (kiko_async)
Date: 2004-01-14 20:02

Message:
Logged In: YES 
user_id=222305

Let me check again, but I think it still is (with 3.2-CVS HEAD).

----------------------------------------------------------------------

Comment By: Jeremy Hylton (jhylton)
Date: 2004-01-14 20:01

Message:
Logged In: YES 
user_id=31392

Is this still an issue?


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=115628&aid=734822&group_id=15628



More information about the ZODB-Dev mailing list