summaryrefslogtreecommitdiffstats
path: root/source3/lib/dbwrap/dbwrap.c
Commit message (Collapse)AuthorAgeFilesLines
* move the dbwrap library to the top levelMichael Adam2012-05-141-398/+0
| | | | | Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Mon May 14 04:04:55 CEST 2012 on sn-devel-104
* s3-dbwrap: Add dbwrap_set_stored_callbackVolker Lendecke2012-04-201-2/+36
| | | | This is a per-db function that is called whenever some record is modified
* s3-dbwrap: Add "db_context" to "db_record"Volker Lendecke2012-04-201-0/+6
|
* s3-dbwrap: Add dbwrap_db_idVolker Lendecke2012-04-201-0/+5
| | | | This returns a blob uniquely identifying the database
* s3-dbwrap: Remove dead code: talloc_stackframe() cannot failAndrew Bartlett2012-04-191-10/+1
|
* s3-dbwrap: Add talloc_stackframe() callsAndrew Bartlett2012-04-181-5/+21
| | | | | | | This is in preperation for calling dbwrap from common code, where we may not have a stackframe set up. Andrew Bartlett
* s3: Add dbwrap_try_fetch_lockedVolker Lendecke2012-04-171-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.
* dbwrap: changed log level for information about lock orderAndrew Tridgell2012-02-271-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
* s3: Enforce a lock order in dbwrapVolker Lendecke2012-01-181-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.
* s3-dbwrap: All relevant backends provide parse_record(). Remove the fallback.Volker Lendecke2011-12-151-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
* s3-dbwrap: Remove the "fetch" db_context callbackVolker Lendecke2011-12-151-21/+0
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* s3-dbwrap: Rewrite dbwrap_fetch in terms of dbwrap_parse_recordVolker Lendecke2011-12-151-3/+30
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* s3-dbwrap: Rewrite dbwrap_fallback_parse_record based on dbwrap_fetch_lockedVolker Lendecke2011-12-151-4/+13
| | | | | | This is in preparation to remove the db_context->fetch function pointer Signed-off-by: Michael Adam <obnox@samba.org>
* s3-dbwrap: Make dbwrap_parse_record return NTSTATUSVolker Lendecke2011-12-151-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>
* s3-dbwrap: Fix a typoVolker Lendecke2011-12-091-1/+1
| | | | | Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Fri Dec 9 13:37:51 CET 2011 on sn-devel-104
* s3-dbwrap: & is not required when taking a function pointerVolker Lendecke2011-12-081-1/+1
| | | | | Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Thu Dec 8 16:39:29 CET 2011 on sn-devel-104
* s3-dbwrap: Make dbwrap_fallback_wipe privateVolker Lendecke2011-12-081-1/+4
|
* s3-dbwrap: Avoid an "else" by an early returnVolker Lendecke2011-12-081-4/+4
|
* s3-dbwrap: Make dbwrap_fallback_parse_record privateVolker Lendecke2011-12-081-5/+5
| | | | We have the private fallback in dbwrap_parse_record anyway
* s3-dbwrap: Make dbwrap_fallback_fetch privateVolker Lendecke2011-12-081-3/+6
|
* s3-dbwrap: use wrappers where appropriateVolker Lendecke2011-12-081-7/+7
|
* s3: Fix some nonblank line endingsVolker Lendecke2011-12-021-4/+4
| | | | | Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Fri Dec 2 20:39:33 CET 2011 on sn-devel-104
* s3: Remove unused dbwrap_record_get_private_dataVolker Lendecke2011-12-021-5/+0
| | | | | db_record->private_data is for backends which can include dbwrap_private.h anyway.
* s3:dbwrap: turn the fetch dbwrap method to NTSTATUS return code.Michael Adam2011-11-291-12/+10
| | | | | This implement more correct NTSTATUS handling inside the backends. This ensures that data.dptr != NULL if return code is NT_STATUS_OK.
* s3:dbwrap: convert dbwrap_fetch(), dbwrap_fetch_bystring() and ↵Michael Adam2011-10-111-6/+8
| | | | dbwrap_fetch_bystring_upper() to NTSTATUS
* s3:dbwrap: add dbwrap_fetch_locked(), a wrapper for db->fetch_lockedMichael Adam2011-10-111-0/+7
|
* s3:dbwrap: add dbwrap_record_delete(), a wrapper for record->delete_recMichael Adam2011-10-111-0/+5
|
* s3:dbwrap: add dbwrap_record_store(), a wrapper for record->storeMichael Adam2011-10-111-0/+5
|
* s3:dbwrap: add get-functions for db_record key, value and private_dataMichael Adam2011-10-111-0/+15
|
* s3:dbwrap: add wrapper function dbwrap_get_seqnum()Michael Adam2011-10-111-0/+5
|
* s3:dbwrap: add wrappers for transactions start/cancel/commitMichael Adam2011-10-111-0/+15
|
* s3:dbwrap: add wrapper dbwrap_get_flags()Michael Adam2011-10-111-0/+5
|
* s3:dbwrap: add a commentMichael Adam2011-10-111-0/+4
|
* s3:dbwrap: add function dbwrap_wipe()Gregor Beck2011-10-111-0/+22
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* s3:dbwrap: implement dbwrap_fallback_exists() with dbwrap_parse_record()Gregor Beck2011-10-111-10/+2
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* s3:dbwrap: allow NULL parser for dbwrap_parse_record()Gregor Beck2011-10-111-0/+9
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* s3:dbwrap: dbwrap_parse_record() should always return -1 on "not found"Gregor Beck2011-10-111-1/+1
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* s3:dbwrap: add function dbwrap_parse_record()Gregor Beck2011-10-111-0/+12
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* s3:dbwrap: add function dbwrap_exists()Gregor Beck2011-10-111-0/+29
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* s3:dbwrap: add a wrapper dbwrap_traverse_read()Michael Adam2011-10-111-0/+18
|
* s3:dbwrap: change the dbwrap_traverse() wrapper to return the count in an ↵Michael Adam2011-10-111-2/+12
| | | | additional parameter
* s3:dbwrap: move dbwrap_traverse() to dbwrap.c, the core of the dbrwap subsystemMichael Adam2011-10-111-0/+8
|
* s3:dbwrap: move dbwrap_store() back to dbwrap.c, the core of the dbwrap ↵Michael Adam2011-10-111-0/+16
| | | | subsystem
* s3:dbwrap: move dbwrap_delete() back to dbwrap.c, the core of the dbwrap ↵Michael Adam2011-10-111-0/+14
| | | | subsystem
* s3:dbwrap: move dbwrap_fetch() back to dbwrap.c, the core of the dbwrap ↵Michael Adam2011-10-111-0/+14
| | | | subsystem
* s3:dbwrap: move all .c and .h files of dbwrap to lib/dbwrap/Michael Adam2011-07-291-0/+66
Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Fri Jul 29 13:34:22 CEST 2011 on sn-devel-104