summaryrefslogtreecommitdiff
path: root/source3/torture/test_dbwrap_watch.c
Commit message (Collapse)AuthorAgeFilesLines
* dbwrap_watch: Test cleanup of dead watchersVolker Lendecke2019-10-181-0/+103
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* dbwrap: Clarify db_open_watched APIVolker Lendecke2018-08-171-2/+2
| | | | | | | | | | | Point out in the API that "backend" talloc_moves into the watched database. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Aug 17 21:29:15 CEST 2018 on sn-devel-144
* dbwrap_watch: Remove the "prec" parameter from watch_recvVolker Lendecke2017-11-291-2/+1
| | | | | | | | | | | The initial idea was to have some "atomicity" in this API. Every caller interested in a record would have to do something with it once it changes. However, only one caller really used this feature, and that is easily changed to not use it. So remove the complexity. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* torture3: Make sure dbwrap_parse_record returns NOT_FOUND for invalid ↵Volker Lendecke2017-05-011-0/+68
| | | | | | | | | | watchers data Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon May 1 14:39:41 CEST 2017 on sn-devel-144
* torture3: In LOCAL-DBWRAP-WATCH1, open tdb with CLEAR_IF_FIRSTVolker Lendecke2017-05-011-1/+2
| | | | | | | | | Also ensure we delete the temp tdb file on success. Just make sure we start with fresh data Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org>
* dbwrap: Add an alternative implementation of dbwrap_watch_record_sendVolker Lendecke2016-07-151-9/+12
| | | | | | | | | | | | | | | The existing one with a separate dbwrap_watchers.tdb turns out to create a performance penalty in a clustered environment. Non-clustered, dbwrap_parse_record on non-existent records is very cheap, but in a cluster environment this is very noticable. This implementation puts the watcher information into the records itself. For large records, this might be another performance penalty, because we have to assemble the final record together with talloc and memcpy, but this might be fixed later with a tdb_storev call. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* dbwrap: Add "blocker" to record_watch_sendVolker Lendecke2016-07-151-2/+4
| | | | | | | | | | Typicall, when we watch a record, we wait for a process to give up some resource. Be it an oplock, a share mode or the g_lock. If everything goes well, the blocker sends us a message. If the blocker dies hard, we want to also be informed immediately. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture3: Add a bit more coverage to messaging_readVolker Lendecke2014-04-301-0/+7
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* dbwrap: add a dbwrap_flags argument to db_open()Michael Adam2014-02-071-1/+2
| | | | | | | | | | This is in preparation to support handing flags to backends, in particular activating read only record support for ctdb databases. For a start, this does nothing but adding the parameter, and all databases use DBWRAP_FLAG_NONE. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:torture: make use of samba_tevent_context_init()Stefan Metzmacher2013-02-191-1/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* dbwrap: dbwrap_store_int32->dbwrap_store_int32_bystringVolker Lendecke2012-06-151-1/+1
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* s3-dbwrap: Add dbwrap_record_watch_send/recvVolker Lendecke2012-04-191-0/+96
With this API you can asynchronously wait for a record to be modified