s3:dbwrap_ctdb: fix a race in starting concurrent transactions on a single node
authorMichael Adam <obnox@samba.org>
Wed, 28 Oct 2009 00:54:04 +0000 (01:54 +0100)
committerMichael Adam <obnox@samba.org>
Wed, 10 Mar 2010 12:22:11 +0000 (13:22 +0100)
commit87427bcab86fee0a8480cdedecbe81aeb59eeac2
tree2be201c0003687d7a4f5bc93863cb5b36b35f52c
parentd94ec57e36187ac8b6f967698c1d0794fc4e6e9c
s3:dbwrap_ctdb: fix a race in starting concurrent transactions on a single node

There are two races in concurrent transactions on a single node.
One in starting a transaction and one with replay during commit.

This commit closes the first race by storing the client pid in the
transaction-lock record and comparing the stored pid against its own
pid after releasing the lock and refetching the record inside the
transaction.

Michael
source3/lib/dbwrap_ctdb.c