summaryrefslogtreecommitdiff
path: root/source3/lib/dbwrap
AgeCommit message (Collapse)AuthorFilesLines
2012-01-18s3: Enforce a lock order in dbwrapVolker Lendecke4-1/+85
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 Lendecke3-3/+26
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.
2012-01-05s3: Fix some nonempty blank linesVolker Lendecke1-3/+3
2011-12-16s3:dbwrap fix return value of db_tdb_parseChristian Ambach1-1/+5
use the TDB ecode to determine the NTSTATUS return value and not the return code that is just -1
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 Lendecke5-113/+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: For nostalgic reasons, make dbwrap_file.c compile at leastVolker Lendecke1-9/+14
Signed-off-by: Michael Adam <obnox@samba.org>
2011-12-15s3-dbwrap: Fix some blank line endingsVolker Lendecke1-5/+5
Signed-off-by: Michael Adam <obnox@samba.org>
2011-12-15s3-dbwrap: Implement db_ctdb_parse_record in terms of db_ctdb_fetchVolker Lendecke1-0/+19
Signed-off-by: Michael Adam <obnox@samba.org>
2011-12-15s3-dbwrap: Make dbwrap_parse_record return NTSTATUSVolker Lendecke5-37/+62
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-13s3-dbwrap: Simplify db_tdb_fetchlock_parse a bitVolker Lendecke1-10/+11
Introduce a local variable for the result, replace "state->result" by "result"
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 Lendecke3-8/+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 Lendecke3-14/+5
We have the private fallback in dbwrap_parse_record anyway
2011-12-08s3-dbwrap: Make dbwrap_fallback_fetch privateVolker Lendecke3-10/+6
2011-12-08s3-dbwrap: use wrappers where appropriateVolker Lendecke1-7/+7
2011-12-08s3-dbwrap: Use simpler code for logging keysVolker Lendecke1-18/+23
2011-12-08s3: Fix some blank line endingsVolker Lendecke3-11/+11
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 Lendecke2-6/+0
db_record->private_data is for backends which can include dbwrap_private.h anyway.
2011-11-30s3:dbwrap_tdb: pass NTSTATUS code further up from db_tdb_fetch_parse in ↵Michael Adam1-1/+1
db_tdb_fetch() Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Wed Nov 30 01:46:31 CET 2011 on sn-devel-104
2011-11-29s3:dbwrap: turn the fetch dbwrap method to NTSTATUS return code.Michael Adam5-55/+58
This implement more correct NTSTATUS handling inside the backends. This ensures that data.dptr != NULL if return code is NT_STATUS_OK.
2011-11-29s3:dbwrap_ctdb: re-use map_nt_error_from_tdb() in local tdb_error_to_ntstatus()Michael Adam1-14/+1
2011-11-25s3:dbwrap: do not burden the user of db_open_ctdb with ifdef voodooGregor Beck2-3/+13
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-14s3:dbwrap_ctdb: return the number of records in db_ctdb_traverse() for ↵Stefan Metzmacher1-3/+15
persistent dbs metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Fri Oct 14 20:59:37 CEST 2011 on sn-devel-104
2011-10-13s3:dbwrap_ctdb: fix the build after changing signature of tdb_wrap_open()Michael Adam1-1/+7
Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Thu Oct 13 18:50:47 CEST 2011 on sn-devel-104
2011-10-13lib/util: Add back control of mmap and hash size in tdb for top level buildAndrew Bartlett1-2/+6
This passes down a struct loadparm_context to allow these parameters to be checked. This may be s3 or s4 context, allowing the #if _SAMBA_BUILD_ macro to go away safely. Andrew Bartlett
2011-10-12s3:dbwrap_ctdb: improve the check for skipping the __db_sequence_number__ ↵Michael Adam1-2/+1
record in traverse It did not compare the last charcter (usually '\0')
2011-10-12s3:dbwrap_ctdb: fix check for skipping the __db_sequence_number__ in traverseMichael Adam1-1/+1
Brown paperbag. This omitted the "== 0" hand hence skipped all keys of the same length as __db_sequence_number__ but different from it...
2011-10-12s3-dbwrap_ctdb: fix the build.Günther Deschner1-1/+4
Michael, please check. Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Wed Oct 12 15:25:56 CEST 2011 on sn-devel-104
2011-10-12s3:dbwrap: remove m_all marshall buffer from ctdb transaction.Gregor Beck1-23/+1
it was only used by ctdb_replay_transaction and was a actually write only Signed-off-by: Michael Adam <obnox@samba.org> Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Wed Oct 12 05:20:36 CEST 2011 on sn-devel-104
2011-10-12s3:dbwrap: traverse records created within this transaction.Gregor Beck1-1/+39
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-11s3:dbwrap: change dbwrap_store_uint32() to NTSTATUS return typeMichael Adam2-4/+6
for consistency and better error propagation Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Tue Oct 11 15:51:00 CEST 2011 on sn-devel-104
2011-10-11s3:dbwrap: change dbwrap_store_int32() to NTSTATUS return typeMichael Adam2-4/+6
for consistency and better error propagation
2011-10-11s3:dbwrap: change dbwrap_fetch_uint32() to NTSTATUS return type (instead of ↵Michael Adam2-7/+11
bool) for consistency and better error propagation
2011-10-11s3:dbwrap: convert dbwrap_fetch_int32() to NTSTATUS return codeMichael Adam2-7/+12
Return the int32 value retrieved from the db by reference. Before this, return value "-1" was used as a error indication, but it could also be a valid value from the database.
2011-10-11s3:dbwrap: move definitions of db_record and db_contect structs to ↵Michael Adam5-35/+40
dbwrap_private.h The API and callers now only need the forward declarations.
2011-10-11s3:dbwrap: convert dbwrap_util.c to use dbwrap wrapper functionsMichael Adam1-33/+41
2011-10-11s3:dbwrap: use dbwrap_fetch_bystring() in dbwrap_fetch_[u]int32()Michael Adam1-2/+6
2011-10-11s3:dbwrap: convert dbwrap_fetch(), dbwrap_fetch_bystring() and ↵Michael Adam3-21/+23
dbwrap_fetch_bystring_upper() to NTSTATUS
2011-10-11s3:dbwrap: add dbwrap_fetch_locked(), a wrapper for db->fetch_lockedMichael Adam2-0/+10
2011-10-11s3:dbwrap: add dbwrap_record_delete(), a wrapper for record->delete_recMichael Adam2-0/+6
2011-10-11s3:dbwrap: add dbwrap_record_store(), a wrapper for record->storeMichael Adam2-0/+6
2011-10-11s3:dbwrap: add get-functions for db_record key, value and private_dataMichael Adam2-0/+19
2011-10-11s3:dbwrap: add wrapper function dbwrap_get_seqnum()Michael Adam2-0/+6
2011-10-11s3:dbwrap: add wrappers for transactions start/cancel/commitMichael Adam2-0/+18