cinder/cinder/objects
Andrey Pavlov c933c08c89 Avoid race condition at snapshot deletion stage
Snapshot`s list method can raise SnapshotNotFound exception.
It happens because of race condition:
1. List method gets all snapshots from DB.
2. At the same time one of the snapshots is being deleted from DB.
3. List method gets snapshot metadata from DB and checks
   that snapshot exists in DB and raises the exception.

This patchset changes behaviour of getting snapshot metadata from DB.
Code now gets metadata from db_snapshot object that was queried
by joined query from DB instead of second query for each snapshot
for metadata.

And I removed checking of snapshot existence for getting
metadata for private method because all public methods already have
such decorator. Using second decorator will slow public method.

Change-Id: I7f743638d9be4c01e18315a3459aecd2b3e9fd87
Closes-Bug: #1462453
2015-07-02 15:50:01 +03:00
..
__init__.py Backup object 2015-06-18 10:17:53 +02:00
backup.py Use elevated context for backup destroy 2015-06-22 18:33:39 +00:00
base.py Stop using deprecated timeutils.isotime() 2015-05-27 08:28:39 +02:00
snapshot.py Avoid race condition at snapshot deletion stage 2015-07-02 15:50:01 +03:00
volume.py Switch to oslo_versionedobjects 2015-05-13 08:36:53 -07:00