Setting _p_changed of a Blob with no uncomitted changes causes error

Bug #440234 reported by Patrick Strawderman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ZODB
Fix Released
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.

Revision history for this message
Patrick Strawderman (patrick-zope) wrote :
Revision history for this message
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
Revision history for this message
Jim Fulton (jim-zope) wrote :

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

Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.