3 Commits

Author SHA1 Message Date
Gorka Eguileor
3c7a71e607 Add error messages to conditional updates devref
There was no mention in conditional updates devref on what kind of error
messages are we expected to return with conditional updates and why we
decided to go with generic errors instead of specific errors like we had
before.

Change-Id: I079a815a656ce5a5c0e05e2e20f26df6ea700547
2016-06-08 10:22:55 +02:00
Gorka Eguileor
6f63347eef Fix MySQL DB error in Delete CG
When running a delete CG operation on a MySQL DB engine we'll get an
error from the DB: "You can't specify target table 'consistencygroups'
for update in FROM clause".

This is caused by a non standard behavior only in MySQL, as SQLite and
PostgreSQL work as expected, on filter `cg_creating_from_src` that
checks that we are not using the CG we are trying to delete to create
another CG at this very moment, CGs that were previously created from
this CG are not considered.

This patch changes the way we perform the filter using a select subquery
as a workaround for MySQL unexpected behavior and updates devref to warn
about this unexpected MySQL behavior.

Change-Id: Ic10de411ffeceb00f1e8525906995bd8b2f49777
Closes-Bug: #1588487
2016-06-06 14:27:37 +02:00
Gorka Eguileor
e4fb5aae59 Add devref for conditional updates
This patch adds developer's documentation for conditional update
functionality used to remove API races.

Change-Id: I63ce1c87f7418feba94479b461a4488d4ae6e48c
2016-05-05 18:07:14 +02:00