[RFC] Use mutexes by default in db_open()

Ralph Böhme slow at samba.org
Wed May 24 05:10:00 UTC 2017


Hi Amitay,

On Wed, May 24, 2017 at 11:59:46AM +1000, Amitay Isaacs wrote:
> Will this also happen for clustered samba case?

yes, by passing TDB_MUTEX_LOCKING based on smb.conf setting. Just the smb.conf
setting default would be changed (dbwrap_tdb_mutexes:*=true|false, default:
true).

> In that case, CTDB should
> also default to using mutexes.
> 
> Currently CTDB will attach with mutexes option only if
>   - CTDB tunable TDBMutexEnabled is set to 1, and
>   - Samba passes TDB_MUTEX_LOCKING flag to DB_ATTACH control
> 
> I would like to get rid of the need for clients to specify tdb_flags to
> DB_ATTACH control.  As the tdb_flags are really determined by the database
> model which is dictated by the attach control (DB_ATTACH or
> DB_ATTACH_PERSISTENT).

How would that work with the way we determine the setting based on runtime
settings from smb.conf? Code: <https://goo.gl/MTMKOO>

-slow



More information about the samba-technical mailing list