summaryrefslogtreecommitdiff
path: root/source3/include/dbwrap.h
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-03-19 19:40:10 +0100
committerStefan Metzmacher <metze@samba.org>2008-04-12 09:14:09 +0200
commitdfb181ab732e0a43accb3b1b328617701fc3e566 (patch)
treeb5c1feb7de444ce0d449c9014c4c76ec0194664f /source3/include/dbwrap.h
parentd3eebed911becad9b97c78c10a53c9ca8ba066ec (diff)
downloadsamba-dfb181ab732e0a43accb3b1b328617701fc3e566.tar.gz
samba-dfb181ab732e0a43accb3b1b328617701fc3e566.tar.bz2
samba-dfb181ab732e0a43accb3b1b328617701fc3e566.zip
dbwrap: add dbwrap_tdb2 backend
This backend can be used untill ctdb knows about real transactions. It stores a master tdb in a shared location and a readonly copy on the local harddisk. Reads are always on the local tdb and writes always on both. Change notify messages are send to all message context, which ask for them. With the notifies it's possible to just update the changed records, instead of copying all records (which is the fallback). You need to configure: dbwrap:use_tdb2=yes dbwrap_tdb2:master directory=/some/shared/path dbwrap_tdb2:local directory=/var/lib/samba metze (This used to be commit aa6230de0d5f1875aa8c12c4fc017d3a40f90890)
Diffstat (limited to 'source3/include/dbwrap.h')
-rw-r--r--source3/include/dbwrap.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/include/dbwrap.h b/source3/include/dbwrap.h
index fe84709a81..1f388165db 100644
--- a/source3/include/dbwrap.h
+++ b/source3/include/dbwrap.h
@@ -66,6 +66,14 @@ struct db_context *db_open_tdb(TALLOC_CTX *mem_ctx,
int hash_size, int tdb_flags,
int open_flags, mode_t mode);
+struct db_context *db_open_tdb2(TALLOC_CTX *mem_ctx,
+ const char *name,
+ int hash_size, int tdb_flags,
+ int open_flags, mode_t mode);
+
+struct messaging_context;
+void db_tdb2_setup_messaging(struct messaging_context *msg_ctx, bool server);
+
#ifdef CLUSTER_SUPPORT
struct db_context *db_open_ctdb(TALLOC_CTX *mem_ctx,
const char *name,