1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

28 Commits

Author SHA1 Message Date
Volker Lendecke
0f20ffbcbd s3-dbwrap: Add dbwrap_db_id
This returns a blob uniquely identifying the database
2012-04-20 13:42:40 +02:00
Volker Lendecke
94cf5cc284 s3: Add dbwrap_try_fetch_locked
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-04-17 10:21:00 +02:00
Volker Lendecke
26fc72921f s3-dbwrap: Make dbwrap_parse_record return NTSTATUS
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-15 16:00:45 +01:00
Volker Lendecke
259cb94c11 s3: Remove unused dbwrap_record_get_private_data
db_record->private_data is for backends which can include dbwrap_private.h
anyway.
2011-12-02 19:03:13 +01:00
Michael Adam
6760011761 s3:dbwrap: change dbwrap_store_uint32() to NTSTATUS return type
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-11 15:51:00 +02:00
Michael Adam
c9bc1e4924 s3:dbwrap: change dbwrap_store_int32() to NTSTATUS return type
for consistency and better error propagation
2011-10-11 14:17:58 +02:00
Michael Adam
658f72128f s3:dbwrap: change dbwrap_fetch_uint32() to NTSTATUS return type (instead of bool)
for consistency and better error propagation
2011-10-11 14:17:58 +02:00
Michael Adam
603c3e1bcb s3:dbwrap: convert dbwrap_fetch_int32() to NTSTATUS return code
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-11 14:17:58 +02:00
Michael Adam
8750e3f22c s3:dbwrap: move definitions of db_record and db_contect structs to dbwrap_private.h
The API and callers now only need the forward declarations.
2011-10-11 14:17:58 +02:00
Michael Adam
0e28448a78 s3:dbwrap: convert dbwrap_fetch(), dbwrap_fetch_bystring() and dbwrap_fetch_bystring_upper() to NTSTATUS 2011-10-11 14:17:56 +02:00
Michael Adam
25a9978c2c s3:dbwrap: add dbwrap_fetch_locked(), a wrapper for db->fetch_locked 2011-10-11 14:17:56 +02:00
Michael Adam
46370441b7 s3:dbwrap: add dbwrap_record_delete(), a wrapper for record->delete_rec 2011-10-11 14:17:56 +02:00
Michael Adam
b257e83d89 s3:dbwrap: add dbwrap_record_store(), a wrapper for record->store 2011-10-11 14:17:56 +02:00
Michael Adam
bfed62c169 s3:dbwrap: add get-functions for db_record key, value and private_data 2011-10-11 14:17:56 +02:00
Michael Adam
3ed2fb4a87 s3:dbwrap: add wrapper function dbwrap_get_seqnum() 2011-10-11 14:17:56 +02:00
Michael Adam
373b0606a3 s3:dbwrap: add wrappers for transactions start/cancel/commit 2011-10-11 14:17:56 +02:00
Michael Adam
d8ce5bc656 s3:dbwrap: add wrapper dbwrap_get_flags() 2011-10-11 14:17:56 +02:00
Gregor Beck
dc4a5f5323 s3:dbwrap: add function dbwrap_wipe()
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-11 14:17:55 +02:00
Gregor Beck
893805b99c s3:dbwrap: add function dbwrap_parse_record()
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-11 14:17:55 +02:00
Gregor Beck
87b68cea5b s3:dbwrap: add function dbwrap_exists()
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-11 14:17:55 +02:00
Michael Adam
87f51bfa99 s3:dbwrap: add a wrapper dbwrap_traverse_read() 2011-10-11 14:17:55 +02:00
Michael Adam
8f098a635f s3:dbwrap: change the dbwrap_traverse() wrapper to return the count in an additional parameter 2011-10-11 14:17:55 +02:00
Michael Adam
6608ba850b s3:dbwrap: reorganize dbwrap.h some 2011-10-11 14:17:55 +02:00
Michael Adam
7a72c84ee7 s3:dbwrap: move the db_open_rbt() prototype to a new header dbwrap_rbt.h 2011-10-11 14:17:55 +02:00
Michael Adam
c768121661 s3:dbwrap: move the db_open_file() prototype to a new header dbwrap_file.h 2011-10-11 14:17:55 +02:00
Michael Adam
38f7f8e44d s3:dbwrap: move the db_open_tdb() prototype to a new header dbwrap_tdb.h 2011-10-11 14:17:55 +02:00
Michael Adam
82bc3fa81c s3:dbwrap: move the db_open_ctdb() prototype to a new header dbwrap_ctdb.h 2011-10-11 14:17:54 +02:00
Michael Adam
0b5c4a601a s3:dbwrap: move all .c and .h files of dbwrap to lib/dbwrap/
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Fri Jul 29 13:34:22 CEST 2011 on sn-devel-104
2011-07-29 13:34:22 +02:00