Age | Commit message (Collapse) | Author | Files | Lines |
|
This is designed to spread the load on individual ctdb records to allow upper
layers to do backoff mechanisms. In the ctdb case, do not get the record if a
local lock is already taken. If we are not dmaster, do at most one migrate
attempt.
For the tdb case, this is a nonblocking fetch_locked. If someone else has the
lock, give up.
|
|
This makes sure we do not deadlock from doing two dbwrap_fetch_locked in two
processes in different orders. At open time, we assign a strict order to all
databases. lock_order 1 will be locked first, lock_order 2 second. No two
records of the same lock order may be locked at the same time.
|
|
This will be used to enforce a lock hierarchy between the databases. We have
seen deadlocks between locking.tdb, brlock.tdb, serverid.tdb and notify*.tdb.
These should be fixed by refusing a dbwrap_fetch_locked that does not follow a
defined lock hierarchy.
|
|
Signed-off-by: Michael Adam <obnox@samba.org>
|
|
Also, the parser now returns void. The parser is called if and only if
dbwrap_parse_record returns NT_STATUS_OK.
Signed-off-by: Michael Adam <obnox@samba.org>
|
|
|
|
We have the private fallback in dbwrap_parse_record anyway
|
|
|
|
This implement more correct NTSTATUS handling inside the backends.
This ensures that data.dptr != NULL if return code is NT_STATUS_OK.
|
|
dbwrap_private.h
The API and callers now only need the forward declarations.
|
|
Signed-off-by: Michael Adam <obnox@samba.org>
|
|
Also start new folder lib/dbwrap/ where dbwrap_open.c is stored and
make the fallbacke implementation functoins non-static and create a
dbwrap_private.h header file that contains their prototypes.
|