server: add a new ctdb control CTDB_TRANS2_ACTIVE
authorMichael Adam <obnox@samba.org>
Wed, 28 Oct 2009 21:50:05 +0000 (22:50 +0100)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Wed, 28 Oct 2009 23:14:30 +0000 (10:14 +1100)
commit8d430ae6968dfe566614379436fc3c56003fcd88
treeb9ec5730a32bc51318afce3a50af453e5d1fc159
parent47b67077bdfa64938bb0fa6d1ca8f56fbd5c960e
server: add a new ctdb control CTDB_TRANS2_ACTIVE

This aske the daemon wheter a transaction is currently active on a
given DB on that node. More precisely this asks for the transaction_active
flag in the ctdb_db_context that is set in the CTDB_TRANS2_COMMIT
control and cleared in the CTDB_TRANS2_ERROR or CTDB_TRANS2_FINISHED controls.

This will be useful for fixing race conditions in the transaction code.

Michael
include/ctdb_private.h
server/ctdb_control.c
server/ctdb_persistent.c