[PATCH 4/7] dbwrap: allow transactions on non-persistent non-clustered dbs.

Stefan (metze) Metzmacher metze at samba.org
Thu Mar 28 01:53:22 MDT 2013


Am 28.03.2013 01:21, schrieb Rusty Russell:
> "Stefan (metze) Metzmacher" <metze at samba.org> writes:
>> Hi Rusty,
>>
>>> Otherwise we can't use dbwrap for schannel_store:
>>>
>>> 	transactions not supported on non-persistent database /home/rusty/samba/st/dc/private/schannel_store.tdb
>>>
>>> Note that the source3/lib/dbwrap/dbwrap_ctdb.c transaction start will
>>> return an error with the same message anyway.
>>
>> I think we should avoid using transactions instead of removing the check!
> 
> I was told to use dbwrap for the ntdb switch, but that means making
> dbwrap a generic wrapper, used for non-clustered databases.  So I think
> we'll hit the same issue as the other databases are converted to dbwrap.
> 
> (Volker pointed out on IRC that I should have checked git annotate
> before looking at this change... indeed!  My mistake.)
> 
> Basically, if it comes from db_open() w/ CLEAR_IF_FIRST, we should make
> sure they don't try to do transactions (which would fail if they *were*
> using ctdb).  But direct calls to dbwrap_local_open() are OK.
> 
> Something like this (untested)?

If we really have the need for this, we can think about it.
But currently we don't need it, other than schannel_state_tdb.c
there's no code that uses CLEAR_IF_FIRST with transactions.
And as pointed out by a previous mail we don't need transactions
in schannel_state_tdb.c.

So for now please just skip this change until it's needed.

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20130328/58544919/attachment.pgp>


More information about the samba-technical mailing list