ctdb-client: Fix implementation of transaction commit
authorAmitay Isaacs <amitay@gmail.com>
Fri, 15 Apr 2016 07:44:14 +0000 (17:44 +1000)
committerMartin Schwenke <martins@samba.org>
Tue, 5 Jul 2016 08:53:14 +0000 (10:53 +0200)
commitf1b6bdb6190a3902d7eb5698d8b9562abe3bd72c
treed51d6cee95d7a5d3dae78593612b2faf834604be
parentf721035d4339d910c3cf479eee93b6539f2ef05a
ctdb-client: Fix implementation of transaction commit

There is no need to explicitly check that recovery is not active before
sending TRANS33_COMMIT control.  Just try TRANS3_COMMIT control and if
recovery occurs before the control is completed, the control will fail
and it can be retried.

Make sure g_lock lock is released after the transaction is complete.
Also, add timeout to the client api.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/client/client.h
ctdb/client/client_db.c