summaryrefslogtreecommitdiff
path: root/source3/lib/dbwrap/dbwrap_private.h
AgeCommit message (Collapse)AuthorFilesLines
2012-04-20s3-dbwrap: Add dbwrap_set_stored_callbackVolker Lendecke1-0/+3
This is a per-db function that is called whenever some record is modified
2012-04-20s3-dbwrap: Add "db_context" to "db_record"Volker Lendecke1-0/+1
2012-04-20s3-dbwrap: Add dbwrap_db_idVolker Lendecke1-0/+1
This returns a blob uniquely identifying the database
2012-04-17s3: Add dbwrap_try_fetch_lockedVolker Lendecke1-0/+3
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.
2012-01-18s3: Enforce a lock order in dbwrapVolker Lendecke1-0/+1
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.
2012-01-18s3: Add a "lock_order" argument to db_openVolker Lendecke1-0/+2
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.
2011-12-15s3-dbwrap: Remove the "fetch" db_context callbackVolker Lendecke1-2/+0
Signed-off-by: Michael Adam <obnox@samba.org>
2011-12-15s3-dbwrap: Make dbwrap_parse_record return NTSTATUSVolker Lendecke1-4/+4
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>
2011-12-08s3-dbwrap: Make dbwrap_fallback_wipe privateVolker Lendecke1-2/+0
2011-12-08s3-dbwrap: Make dbwrap_fallback_parse_record privateVolker Lendecke1-6/+0
We have the private fallback in dbwrap_parse_record anyway
2011-12-08s3-dbwrap: Make dbwrap_fallback_fetch privateVolker Lendecke1-4/+0
2011-11-29s3:dbwrap: turn the fetch dbwrap method to NTSTATUS return code.Michael Adam1-4/+4
This implement more correct NTSTATUS handling inside the backends. This ensures that data.dptr != NULL if return code is NT_STATUS_OK.
2011-10-11s3:dbwrap: move definitions of db_record and db_contect structs to ↵Michael Adam1-0/+35
dbwrap_private.h The API and callers now only need the forward declarations.
2011-10-11s3:dbwrap: add function dbwrap_wipe()Gregor Beck1-0/+2
Signed-off-by: Michael Adam <obnox@samba.org>
2011-07-29s3:dbwrap: move db_open() to a file dbwrap_open.c of its own.Michael Adam1-0/+38
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.