summaryrefslogtreecommitdiffstats
path: root/source3/lib/dbwrap
Commit message (Collapse)AuthorAgeFilesLines
...
* s3: Remove header==NULL code from db_ctdb_marshall_recordVolker Lendecke2012-11-291-12/+5
| | | | | | The only call chain (via db_ctdb_marshall_add) has header != NULL Reviewed-by: Michael Adam <obnox@samba.org>
* s3: Fix some blank line endingsVolker Lendecke2012-11-201-10/+10
| | | | | | | Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Tue Nov 20 19:18:33 CET 2012 on sn-devel-104
* s3:dbwrap_ctdb: set errno = ENOSYS if clustering is not supportedGregor Beck2012-09-211-0/+1
| | | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Sep 21 18:05:56 CEST 2012 on sn-devel-104
* s3: Fix a commentVolker Lendecke2012-09-041-1/+1
| | | | Signed-off-by: Jeremy Allison <jra@samba.org>
* s3:dbwrap_ctdb: Add DB name and key to warning messageChristof Schmitt2012-08-311-1/+8
| | | | | | | When a operation takes too long, it is useful for debugging to know the DB and the key. Signed-off-by: Christian Ambach <ambi@samba.org>
* s3:dbwrap_ctdb: initialize db_record->dbStefan Metzmacher2012-07-311-0/+1
| | | | metze
* s3_dbrwap_ctdb: improve a comment in db_ctdb_can_use_local_record()Michael Adam2012-06-291-1/+3
| | | | Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
* s3:dbwrap_ctdb: fix a comment in db_ctdb_fetch()Michael Adam2012-06-291-2/+3
| | | | Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
* s3:dbwrap_ctdb: expand the comment for the db_ctdb_can_use_local_copy() functionMichael Adam2012-06-291-1/+4
| | | | Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
* s3:dbwrap_ctdb: rename db_ctdb_own_record() -> db_ctdb_can_use_local_copy()Michael Adam2012-06-291-3/+3
| | | | | | | This matches the function's intention much closer, since it also tests whether we have a valid local read only copy. Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
* s3:dbrwap_ctdb: remove commented out legacy codeMichael Adam2012-06-291-5/+1
|
* s3:dbwrap_ctdb: fix fetch/fetch_locked when samba is built against old ctdbMichael Adam2012-06-291-4/+3
| | | | | | | | | | | | The introduction of read only copies has broken the algorithm for deteting whether we can use the local record copy for fetch_locked and fetch: For fetch locked the new code always uses the local copy if there is one... This patch re-establish the original algorithm for the build against a ctdb without read only record copies. Reported-by: Gregor Beck <gbeck@sernet.de>
* s3-param: Rename loadparm_s3_context -> loadparm_s3_helpersAndrew Bartlett2012-06-272-2/+2
| | | | | | | | | | | | | | | | | This helps clarify the role of this structure and wrapper function. The purpose here is to provide helper functions to the lib/param loadparm_context that point back at the s3 lp_ functions. This allows a struct loadparm_context to be passed to any point in the code, and always refer to the correct loadparm system. If this has not been set, the variables loaded in the lib/param code will be returned. As requested by Michael Adam. Andrew Bartlett Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Jun 27 17:11:16 CEST 2012 on sn-devel-104
* s3:lib:dbwrap: fix return value of db_ctdb_traverse[_read] for ↵Gregor Beck2012-06-271-6/+17
| | | | | | | | non-persistent dbs to return the number of traversed records upon successful traverse. Signed-off-by: Michael Adam <obnox@samba.org>
* dbwrap: dbwrap_local_open()Rusty Russell2012-06-221-3/+3
| | | | | | | | This simply opens a tdb: it will eventually switch depending on the extension. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* dbwrap: remove get_flags().Rusty Russell2012-06-221-8/+0
| | | | | | | | | | | | The flags returned were TDB-specific: this was only used for detecting the endianness of obsolete databases (the conversion code was put in in 2003, with reference to Samba 2.3). It's easier to remove it than to translate the NTDB flags to TDB flags, and it's a really weird thing to ask for anyway. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* s3:util: rename procid_equal() to serverid_equal()Michael Adam2012-06-211-1/+1
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* move the dbwrap library to the top levelMichael Adam2012-05-1414-2812/+2
| | | | | Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Mon May 14 04:04:55 CEST 2012 on sn-devel-104
* s3:lib:dbwrap: use [u]int[num]_t consistently in dbwrap_tdb.cMichael Adam2012-05-131-1/+1
|
* s3:lib:dbwrap: use [u]int[num]_t consistently in dbwrap_rbt.cMichael Adam2012-05-131-2/+2
|
* s3:lib:dbwrap: use [u]int[num]_t consistently in dbwrap_ctdb.cMichael Adam2012-05-131-6/+8
|
* s3:lib:dbwrap: use [u]int[num]_t consistently in dbwrap_file.cMichael Adam2012-05-131-6/+7
|
* s3:lib:dbwrap: use [u]int[num]_t consistently in dbwrap_util.cMichael Adam2012-05-131-9/+9
|
* s3:dbwrap: move definition of dbwrap_lock_order to dbwrap.hMichael Adam2012-05-134-8/+7
| | | | This is needed in all of the library, not only in the dbwrap_open part.
* s3: Fix Coverity ID 2751: REVERSE_INULLVolker Lendecke2012-04-241-1/+1
|
* s3-dbwrap: A void function can not return a valueAndrew Bartlett2012-04-231-1/+1
| | | | | | | | | Only non-gcc compilers seem to notice this as an error. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Mon Apr 23 05:58:52 CEST 2012 on sn-devel-104
* s3: Implement db_id for dbwrap_cacheVolker Lendecke2012-04-211-0/+9
| | | | | Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Sat Apr 21 13:46:00 CEST 2012 on sn-devel-104
* s3: Initialize "stored_callback" in dbwrap_cacheVolker Lendecke2012-04-211-0/+1
| | | | This should fix one of the recent flaky tests
* s3-dbwrap: dbwrap_watch_record_stored => NT_STATUS_NOT_FOUND is ok...Stefan Metzmacher2012-04-201-0/+3
| | | | | Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Fri Apr 20 17:05:52 CEST 2012 on sn-devel-104
* s3-dbwrap: Add dbwrap_record_watch_send/recvVolker Lendecke2012-04-192-0/+529
| | | | With this API you can asynchronously wait for a record to be modified
* s3-dbwrap: Add dbwrap_set_stored_callbackVolker Lendecke2012-04-206-2/+47
| | | | 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-204-0/+10
|
* s3-dbwrap: Add dbwrap_db_idVolker Lendecke2012-04-206-0/+50
| | | | This returns a blob uniquely identifying the database
* s3: Fix Coverity ID 2744: CHECKED_RETURNVolker Lendecke2012-04-191-1/+6
|
* s3: Fix Coverity ID 2745 and 2746: FORWARD_NULLVolker Lendecke2012-04-191-11/+15
| | | | We can assume that the rbt dbs are around
* s3-dbwrap: Remove dead code: talloc_stackframe() cannot failAndrew Bartlett2012-04-191-10/+1
|
* s3-dbwrap: Fix an unused var warningVolker Lendecke2012-04-181-0/+2
|
* s3-dbwrap: push lp_ctx up another layer in the stackAndrew Bartlett2012-04-183-5/+6
| | | | | | | | | | This will allow db_open_tdb() to be called from common code, which may already have a loadparm context loaded. It also slowly moves the lp_ctx up the stack, as required to remove the library loop between smbconf and the registry. Andrew Bartlett
* 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-178-16/+97
| | | | | | | | | | 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.
* s3: Add dbwrap_cacheVolker Lendecke2012-04-172-0/+242
| | | | | | This is a caching layer for the notify database and potentially for the brlock database. It caches the parse_record operation as long as the underlying seqnum does not change.
* s3: Open up 3 levels of dbwrap_lock_orderVolker Lendecke2012-04-172-5/+9
|
* s3: Return CTDB_PATH from lp_ctdbd_socket()Volker Lendecke2012-04-171-8/+0
| | | | All callers had that fallback
* s3: Compile fix for dbwrap_file.cVolker Lendecke2012-04-071-1/+1
| | | | | Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Sat Apr 7 14:10:35 CEST 2012 on sn-devel-104
* build: Remove sys_lseek wrapperAndrew Bartlett2012-04-051-2/+2
|
* build: Remove sys_ftruncate wrapperAndrew Bartlett2012-04-051-2/+2
|
* s3: Enhance the dbwrap needed x attempts msgVolker Lendecke2012-04-031-1/+5
| | | | | Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Tue Apr 3 15:17:11 CEST 2012 on sn-devel-104
* s3: Avoid a crash with debug level 10Volker Lendecke2012-03-301-1/+2
| | | | | Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Fri Mar 30 16:52:16 CEST 2012 on sn-devel-104
* s3-dbwrap: Move "lock_order" initialization to db_open_xxVolker Lendecke2012-03-164-6/+8
|
* tdb_wrap: Move to specific directory.Jelmer Vernooij2012-03-102-2/+2
| | | | | | | | | | It's a bit confusing to mix low-level and high-level libraries. We had multiple libraries in one directory, and there were have circular dependencies with other libraries outside that directory (in this case, samba-hostconfig). Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sat Mar 10 23:13:01 CET 2012 on sn-devel-104