diff options
author | Amitay Isaacs <amitay@gmail.com> | 2016-04-15 17:44:14 +1000 |
---|---|---|
committer | Martin Schwenke <martins@samba.org> | 2016-07-05 10:53:14 +0200 |
commit | f1b6bdb6190a3902d7eb5698d8b9562abe3bd72c (patch) | |
tree | d51d6cee95d7a5d3dae78593612b2faf834604be /ctdb/client/client.h | |
parent | f721035d4339d910c3cf479eee93b6539f2ef05a (diff) | |
download | samba-f1b6bdb6190a3902d7eb5698d8b9562abe3bd72c.tar.gz |
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>
Diffstat (limited to 'ctdb/client/client.h')
-rw-r--r-- | ctdb/client/client.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ctdb/client/client.h b/ctdb/client/client.h index 3ad098fd699..f5b8601aa2c 100644 --- a/ctdb/client/client.h +++ b/ctdb/client/client.h @@ -828,6 +828,7 @@ int ctdb_transaction_delete_record(struct ctdb_transaction_handle *h, struct tevent_req *ctdb_transaction_commit_send( TALLOC_CTX *mem_ctx, struct tevent_context *ev, + struct timeval timeout, struct ctdb_transaction_handle *h); bool ctdb_transaction_commit_recv(struct tevent_req *req, int *perr); |