Setting _p_changed of a Blob with no uncomitted changes causes error

Reported by Patrick Strawderman on 2009-10-01
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ZODB
Undecided
Unassigned

Bug Description

The following reproduces this issue:

blob = ZODB.blob.Blob('blah')
conn.add(blob)
transaction.commit()
blob._p_changed = True
transaction.commit() # raises an error because blob._uncommitted() is None.

Connection is passing the result of blob._uncommitted() to ClientStorage.storeBlob, which expects a path,
but gets None instead. A TypeError is eventually raised in ZODB.blob.rename_or_copy_blob.
I'm not sure what the correct behavior is here, but this case should probably handled.

Jim Fulton (jim-zope) wrote :

I'm inclined to consider the correct behavior undefined.

Why do you think someone would set _p_changed on a blob?

Changed in zodb:
status: New → Incomplete
Jim Fulton (jim-zope) wrote :

Never mind, I decided to treat the _p_changed as a noop in this situation.

Jim Fulton (jim-zope) wrote :

for 3.10b7

Changed in zodb:
status: Incomplete → Fix Committed
Changed in zodb:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments