summaryrefslogtreecommitdiff
path: root/source3/lib/dbwrap/dbwrap.c
AgeCommit message (Collapse)AuthorFilesLines
2012-04-17s3: Add dbwrap_try_fetch_lockedVolker Lendecke1-4/+23
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-02-27dbwrap: changed log level for information about lock orderAndrew Tridgell1-1/+1
we were filling our logs with lock ordering debug lines Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Mon Feb 27 12:50:29 CET 2012 on sn-devel-104
2012-01-18s3: Enforce a lock order in dbwrapVolker Lendecke1-1/+80
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.
2011-12-15s3-dbwrap: All relevant backends provide parse_record(). Remove the fallback.Volker Lendecke1-37/+0
Signed-off-by: Michael Adam <obnox@samba.org> Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Thu Dec 15 17:41:53 CET 2011 on sn-devel-104
2011-12-15s3-dbwrap: Remove the "fetch" db_context callbackVolker Lendecke1-21/+0
Signed-off-by: Michael Adam <obnox@samba.org>
2011-12-15s3-dbwrap: Rewrite dbwrap_fetch in terms of dbwrap_parse_recordVolker Lendecke1-3/+30
Signed-off-by: Michael Adam <obnox@samba.org>
2011-12-15s3-dbwrap: Rewrite dbwrap_fallback_parse_record based on dbwrap_fetch_lockedVolker Lendecke1-4/+13
This is in preparation to remove the db_context->fetch function pointer Signed-off-by: Michael Adam <obnox@samba.org>
2011-12-15s3-dbwrap: Make dbwrap_parse_record return NTSTATUSVolker Lendecke1-18/+16
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-09s3-dbwrap: Fix a typoVolker Lendecke1-1/+1
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Fri Dec 9 13:37:51 CET 2011 on sn-devel-104
2011-12-08s3-dbwrap: & is not required when taking a function pointerVolker Lendecke1-1/+1
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Thu Dec 8 16:39:29 CET 2011 on sn-devel-104
2011-12-08s3-dbwrap: Make dbwrap_fallback_wipe privateVolker Lendecke1-1/+4
2011-12-08s3-dbwrap: Avoid an "else" by an early returnVolker Lendecke1-4/+4
2011-12-08s3-dbwrap: Make dbwrap_fallback_parse_record privateVolker Lendecke1-5/+5
We have the private fallback in dbwrap_parse_record anyway
2011-12-08s3-dbwrap: Make dbwrap_fallback_fetch privateVolker Lendecke1-3/+6
2011-12-08s3-dbwrap: use wrappers where appropriateVolker Lendecke1-7/+7
2011-12-02s3: Fix some nonblank line endingsVolker Lendecke1-4/+4
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Fri Dec 2 20:39:33 CET 2011 on sn-devel-104
2011-12-02s3: Remove unused dbwrap_record_get_private_dataVolker Lendecke1-5/+0
db_record->private_data is for backends which can include dbwrap_private.h anyway.
2011-11-29s3:dbwrap: turn the fetch dbwrap method to NTSTATUS return code.Michael Adam1-12/+10
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: convert dbwrap_fetch(), dbwrap_fetch_bystring() and ↵Michael Adam1-6/+8
dbwrap_fetch_bystring_upper() to NTSTATUS
2011-10-11s3:dbwrap: add dbwrap_fetch_locked(), a wrapper for db->fetch_lockedMichael Adam1-0/+7
2011-10-11s3:dbwrap: add dbwrap_record_delete(), a wrapper for record->delete_recMichael Adam1-0/+5
2011-10-11s3:dbwrap: add dbwrap_record_store(), a wrapper for record->storeMichael Adam1-0/+5
2011-10-11s3:dbwrap: add get-functions for db_record key, value and private_dataMichael Adam1-0/+15
2011-10-11s3:dbwrap: add wrapper function dbwrap_get_seqnum()Michael Adam1-0/+5
2011-10-11s3:dbwrap: add wrappers for transactions start/cancel/commitMichael Adam1-0/+15
2011-10-11s3:dbwrap: add wrapper dbwrap_get_flags()Michael Adam1-0/+5
2011-10-11s3:dbwrap: add a commentMichael Adam1-0/+4
2011-10-11s3:dbwrap: add function dbwrap_wipe()Gregor Beck1-0/+22
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-11s3:dbwrap: implement dbwrap_fallback_exists() with dbwrap_parse_record()Gregor Beck1-10/+2
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-11s3:dbwrap: allow NULL parser for dbwrap_parse_record()Gregor Beck1-0/+9
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-11s3:dbwrap: dbwrap_parse_record() should always return -1 on "not found"Gregor Beck1-1/+1
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-11s3:dbwrap: add function dbwrap_parse_record()Gregor Beck1-0/+12
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-11s3:dbwrap: add function dbwrap_exists()Gregor Beck1-0/+29
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-11s3:dbwrap: add a wrapper dbwrap_traverse_read()Michael Adam1-0/+18
2011-10-11s3:dbwrap: change the dbwrap_traverse() wrapper to return the count in an ↵Michael Adam1-2/+12
additional parameter
2011-10-11s3:dbwrap: move dbwrap_traverse() to dbwrap.c, the core of the dbrwap subsystemMichael Adam1-0/+8
2011-10-11s3:dbwrap: move dbwrap_store() back to dbwrap.c, the core of the dbwrap ↵Michael Adam1-0/+16
subsystem
2011-10-11s3:dbwrap: move dbwrap_delete() back to dbwrap.c, the core of the dbwrap ↵Michael Adam1-0/+14
subsystem
2011-10-11s3:dbwrap: move dbwrap_fetch() back to dbwrap.c, the core of the dbwrap ↵Michael Adam1-0/+14
subsystem
2011-07-29s3:dbwrap: move all .c and .h files of dbwrap to lib/dbwrap/Michael Adam1-0/+66
Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Fri Jul 29 13:34:22 CEST 2011 on sn-devel-104