Add shared lock to improve concurrent performance

Registered by zhangsong

Currently each driver in tooz only support exclusive lock, it is inefficient in some scenarios, such as create volumes concurrently from one snapshot/source-volume in cinder:

we protects create from volume/snapshot by using a lockfile to protect the operation from concurrent deletes the volumes/snapshot used in the create operation, but we use exclusive locks on both delete and create side which will result in only one create operation from the same volume/sanpshot can process on the same time.
To deal with this, we can add exclusive locks for delete operations and shared locks for create operations, so we can create from volume/sanpshot on parallel and also protect create operations from concurrent delete the source volume/snapshot.

So, we need to add shared locks in each tooz driver.

Blueprint information

Status:
Started
Approver:
zhangsong
Priority:
Undefined
Drafter:
zhangsong
Direction:
Needs approval
Assignee:
zhangsong
Definition:
New
Series goal:
None
Implementation:
Started
Milestone target:
None
Started by
zhangsong

Related branches

Sprints

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.