Enforce locking order in dbwrap?
Volker.Lendecke at SerNet.DE
Sat Jan 14 07:14:36 MST 2012
Hi (Jeremy and Metze in particular)!
find a patchset that enforces a strict ordering of the dbwrap_fetch_lock
calls. This is driven primarily by my dbwrap_record_watch_send work
(I want a separate tdb locked simultaneously with others to store the
watchers), but it will also make sure that we don't deadlock between
smbds by locking records in an arbitrary order.
It works by assigning a lock_order value to each database. If a record
is locked, dbwrap makes sure that no record of the same or higher lock
order is already locked. This way all smbds will always lock the records
from tdb files in the same sequence. We will also communicate this to
ctdb in the future to avoid a really horrible hack there.
I've also added patches to fix bug 8175 in a different way. It makes
locking.tdb the leading database. When you want something else locked,
you need to lock the share mode record first.
With best regards,
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
More information about the samba-technical