ctdbd: Add an index db for message list for faster searches
authorAmitay Isaacs <amitay@gmail.com>
Thu, 21 Feb 2013 02:16:15 +0000 (13:16 +1100)
committerAmitay Isaacs <amitay@gmail.com>
Wed, 6 Mar 2013 04:32:33 +0000 (15:32 +1100)
commit5d7efb4cf10dd230096d29449c37af3fca291eb5
tree3f3030865bb9b281028f5a4ff6dae333a9c067d6
parent8cd6a67b8bf055cae6caf75e4f45602b8f9e4a50
ctdbd: Add an index db for message list for faster searches

When CTDB is busy with lots of smbd, CTDB was spending too much time in
daemon_check_srvids() which searches a list of srvids in the registered
message handlers.  Using a hash based index significantly improves the
performance of search in a linked list.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 3e09f25d419635f6dd679b48fa65370f7860be7d)
ctdb/common/ctdb_message.c
ctdb/include/ctdb_private.h
ctdb/server/ctdb_daemon.c