Comment 15 for bug 1731032

Revision history for this message
Zane Bitter (zaneb) wrote :

It would be interesting to be able to see the metadata in the Heat database (perhaps Thomas's patch will tell us this).

To me it looks like the database update code is very robust. There's a key that increments atomically every time we change the metadata, and if something else has changed it we reload and try again.

What does *not* look robust is where we push the data into Swift or Zaqar. Once we've updated the metadata in the DB we push the latest data to Swift or Zaqar with no locking whatsoever, and thus no way to check whether there's a race against a later update. If the later update gets written first, stale data will overwrite it.

Prior to convergence this could probably only happen when the two software deployments were in separate stacks or when the deployments were created via the REST API, because operations on resources in a single stack happen in the same thread. (The actual creation of the software deployment happens in a separate context, but the call to create it is synchronous.) With the improved concurrency in convergence, it's possible for two software deployments in the same stack to be racing to update Swift.