[PATCH] s3: enable mutexes for gencache_notrans.tdb

Ira Cooper ira at samba.org
Fri Jun 6 14:14:04 MDT 2014


IMHO: We should take ROBUST_MUTEXES as a hint, in thinking about it a
moment, it may be misnamed... because what we are really saying is "We
won't use transactions, do whatever optimization you think is correct."

It feels like a bug to copy checks all over the codebase for "Do we have
mutexes?  Yes, no?"  And if we come up with another neat idea that doesn't
work with transactions... While it is a TDB level change, I'm not sold it
should show up in the API, if that makes sense.

-Ira


On Fri, Jun 6, 2014 at 3:40 PM, Christof Schmitt <cs at samba.org> wrote:

> On Fri, Jun 06, 2014 at 09:23:35PM +0200, Michael Adam wrote:
> > sn-devel-104 currently does not support robust mutexes, sorry...
> >
> > The sn-devel-124 based on ubuntu 12.04 that metze is preparing
> > will support them. But having one test host which does support
> > them is a good test as this case proves.
> >
> > Wouldn't the proper fix be to convert the db to us dbwrap
> > instead of tdb_open_log ?
>
> I can take a look at that, but doesn't the current dbwrap code try to
> open the database in clustering mode first? Do we need an extra flag for
> dbwrap_open to force a db to be local?
>
> > On 2014-06-06 at 11:13 -0700, Jeremy Allison wrote:
> > > Unfortunately this is failing autobuild due
> > >  to:
> > >
> > >
> tdb(/memdisk/jra/a/b943778/samba/bin/ab/client/lockdir/gencache_notrans.tdb):
> tdb_open_ex: invalid flags for
> /memdisk/jra/a/b943778/samba/bin/ab/client/lockdir/gencache_notrans.tdb -
> TDB_MUTEX_LOCKING requires support for robust_mutexes
> > > ../source3/torture/torture.c:8144: gencache_set() failed
> > >
> > > I think something like the code in source3/lib/dbwrap/dbwrap_open.c
> > >
> > >                 if (try_mutex &&
> tdb_runtime_check_for_robust_mutexes()) {
> > >                         tdb_flags |= TDB_MUTEX_LOCKING;
> > >                 }
> > >
> > > should be added here. Give me a bit to look at this..
>
> Sorry, i assumed that lib/tdb would have a similar check but did not
> verify it. Let me take a look at Michael's suggestion.
>
> Christof
>


More information about the samba-technical mailing list