DB update method doesn't return success or failure

Bug #1484492 reported by Limor Stotland
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mistral
Won't Fix
High
Unassigned
Mitaka
Incomplete
High
Unassigned

Bug Description

All the update method in mistral/db/v2/sqlalchemy/api.py does not return indication if the update was successful or not.

Revision history for this message
Nikolay Makhotkin (nmakhotkin) wrote :

If the update was unsuccessful then it raises exception. Isn't it a marker of successfulness?

Revision history for this message
Limor Stotland (limor-bortman) wrote :

Its not safe because if you have 2 components that trying to update the same row in a table one of them will update and the other one will fail without exception

Revision history for this message
Lingxian Kong (kong) wrote :

Hi, Limor, could put some logs in bug description? IIUC, the operation will be happen in db transaction, right?

Revision history for this message
Limor Stotland (limor-bortman) wrote :

Hi Lingxian

i don't have a log because it has no exception or error, The bug is on the behavior of the update method.

if you want an example you can look on update_delayed_call in /opt/stack/mistral/mistral/db/v2/sqlalchemy/api.py

Revision history for this message
Renat Akhmerov (rakhmerov) wrote :

Need to figure out better how our transactional model looks like. Need to do more testing on that.

Changed in mistral:
importance: Undecided → High
Dougal Matthews (d0ugal)
Changed in mistral:
status: New → Triaged
Revision history for this message
Renat Akhmerov (rakhmerov) wrote :

It was filed a while ago and seems like it doesn't harm anything.

summary: - DB update method schedule return success or failure
+ DB update method doesn't return success or failure
Changed in mistral:
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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