[PATCH] Clean up tdb flags calculation in CTDB
slow at samba.org
Mon Jun 26 09:06:58 UTC 2017
On Mon, Jun 26, 2017 at 04:25:16PM +1000, Martin Schwenke via samba-technical wrote:
> On Mon, 26 Jun 2017 11:58:42 +1000, Amitay Isaacs via samba-technical
> <samba-technical at lists.samba.org> wrote:
> > CTDB's database attach controls were designed to pass the tdb open flags.
> > It means that clients (including samba) have to calculate the tdb flags
> > before opening to a clustered database exactly the same way as calculated
> > by ctdb daemon. This is counter-intuitive and prone to errors specially
> > when robust mutexes are involved. Once a clustered database is opened, all
> > the clients have to match the flags to attach to that clustered database.
> > This patch set cleans up database code in ctdb daemon and refactors the
> > logic to calculate tdb open flags in one place. For clients to know the
> > correct tdb flags to use while opening the database locally, a new control
> > is added which returns tdb_flags. This avoids the need to pass any
> > tdb_flags with DB_ATTACH controls and hence the flags are now ignored.
> > Please review and push.
> Reviewed-by: Martin Schwenke <martin at meltin.net>
> Ralph, does this meet your expectations? :-)
yup, looks good! :)
More information about the samba-technical