DisconnectionError not raised when TCP errors messup underlying PostgreSQL db connection
Bug #1025264 reported by
Stuart Bishop
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Storm |
Triaged
|
Undecided
|
Unassigned |
Bug Description
Per Bug #1000805, it is possible for the following exception to be raised when issuing a query:
psycopg2.
While this is probably a network issue that needs fixing, Storm still should detect that this is a disconnection error and reraise it as a DisconnectionError, so the store is put into the 'will reconnect' state.
Related branches
lp:~sidnei/storm/disconnection-send-data
- Free Ekanayaka (community): Approve
- Jamu Kakar (community): Approve
-
Diff: 56 lines (+21/-2)2 files modifiedstorm/databases/postgres.py (+1/-0)
tests/databases/postgres.py (+20/-2)
tags: | added: disconnection postgresql |
Changed in storm: | |
status: | Incomplete → Triaged |
To post a comment you must log in.
Storm already catches all DatabaseError subclasses (including OperationalError) that set the psycopg2 connection object's closed attribute. So for the bug's situation to happen, I think it means psycopg2 is not flagging the connection as closed if this TCP failure happens.