locking: Do not create multiple lock processes for the same key
authorAmitay Isaacs <amitay@gmail.com>
Fri, 2 Aug 2013 00:54:38 +0000 (10:54 +1000)
committerAmitay Isaacs <amitay@gmail.com>
Fri, 9 Aug 2013 01:04:55 +0000 (11:04 +1000)
commit477a51aba5e36324263614cad6bef5d4c4c98942
tree31a4726fe8409a89f7089c8c0d89c2fbfb29f581
parent9ba793a80ff489ba5ec40b3a55bef5f97aac634e
locking: Do not create multiple lock processes for the same key

If there are multiple lock helper processes waiting for the same record, then
it will cause a thundering herd when that record has been unlocked.  So avoid
scheduling lock contexts for the same record.  This will also mean that
multiple requests will get queued up behind the same lock context and can be
processed quickly once the lock has been obtained.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit ebecc3a18f1cb397a78b56eaf8f752dd5495bcc9)
ctdb/server/ctdb_lock.c