zope.rdb catches Retry and ConflictError exceptions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zope 3 |
Won't Fix
|
Low
|
Unassigned | ||
zope.rdb |
Confirmed
|
Low
|
Unassigned |
Bug Description
zope/rdb/
try:
except Exception, error:
# Just catch the exception, so that we can convert it to a database
# exception.
raise DatabaseExcepti
This causes all errors from underlying adapters to be catched and converted to
DatabaseException.
It is wrong as sometimes database adapters have to raise Retry or
ConflictError. For example psycopgda (from zope repository) raises Retry(...) in
cursor.execute when database reports error like deadlock detected or conflict,
also it is necessary to add some code to cxoracleda to handle specific oracle
error codes and do 'reconnect' for them but this is not possible to do while
Retry exceptions are not propagated.
Quick fix may be to change above code to:
from zope.publisher.
from ZODB.POSException import ConflictError
(...)
try:
except Retry:
raise
except ConflictError:
raise
except Exception, error:
# Just catch the exception, so that we can convert it to a database
# exception.
raise DatabaseExcepti
Topic about this problem on zope3-dev: http://
Changed in zope3: | |
importance: | Undecided → Low |
status: | New → Confirmed |
Changed in zope.rdb: | |
status: | New → Confirmed |
importance: | Undecided → Low |
Changed in zope3: | |
status: | Confirmed → Won't Fix |