ctdb-scripts: Avoid no-op "ctdb ptrans" call
authorMartin Schwenke <martin@meltin.net>
Tue, 3 Jan 2017 22:53:54 +0000 (09:53 +1100)
committerMartin Schwenke <martins@samba.org>
Thu, 1 Mar 2018 18:39:15 +0000 (19:39 +0100)
commit2ad1604c2baa547ad881dc75cbb47722d0af651b
treefb2ae15a6021b42aecbc8e78bec1b3ccd8e8b8f3
parent9a12d6af0553207809ad1e882df25fbcb00c22a2
ctdb-scripts: Avoid no-op "ctdb ptrans" call

This causes unnecessary g_lock activity and overhead.

This could be optimised in ctdb.c:control_ptrans().  However, that
makes the code more complex.  Let's only do that if we get more
potentially no-op uses.

Note no optimisation is needed in the "notify" case because there is
already an early exit if there are no items.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/config/statd-callout