TDB mutex support breaks CTDB
amitay at gmail.com
Thu Dec 11 22:34:40 MST 2014
On Thu, Dec 11, 2014 at 7:55 PM, Stefan (metze) Metzmacher <metze at samba.org>
> Am 11.12.2014 um 05:50 schrieb Amitay Isaacs:
> > Hi Volker/Metze,
> > The TDB robust mutex changes make certain assumptions which completely
> > breaks CTDB. Here are some of the findings which are causing concern.
> > 1. CTDB does not always specify all the matching flags (i.e. the flags
> > for creation) to tdb_open_ex() when opening tdb database subsequently (or
> > in not-first case). This does not work for databases created with
> > TDB_MUTEX_LOCKING.
> > 2. If I specify TDB_MUTEX_LOCKING in tdb_flags for subsequent (non-first)
> > tdb_open_ex(), it does not work unless I also include TDB_CLEAR_IF_FIRST.
> > If the process knows that it's not the first opener, why should it need
> > specify TDB_CLEAR_IF_FIRST?
> As indication that it's a non persistent database.
> > 3. CTDB database recovery uses transactions to update the databases after
> > recovery. With TDB_MUTEX_LOCKING enabled, CTDB cannot do database
> Can the all record lock be used instead of a transaction?
> I wonder why we didn't notice this before...
Changing from transaction to all record lock is going to be a major
change. What's the reason for not allowing transactions on mutex enabled
> > First two issues can be resolved by modifying CTDB to pass correct flags
> > tdb_open_ex().
> Please do that.
More information about the samba-technical