summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-07-13 17:04:29 +0200
committerVolker Lendecke <vl@samba.org>2009-07-15 10:55:20 +0200
commit8a17cd810fa6cbe7b11139ff0f6f24e7bacd318b (patch)
tree5f9be97803ea334fc85a16d5d3a647018e220482 /source3/include
parented87594e5fd3251f9cb3beaca06c8eee1dcd4ed2 (diff)
downloadsamba-8a17cd810fa6cbe7b11139ff0f6f24e7bacd318b.tar.gz
samba-8a17cd810fa6cbe7b11139ff0f6f24e7bacd318b.tar.bz2
samba-8a17cd810fa6cbe7b11139ff0f6f24e7bacd318b.zip
Make gencache more stable
This provides a compromise between stability and performance: gencache is a persistent database these days that for performance reasons can not use tdb transactions for all writes. This patch splits up gencache into gencache.tdb and gencache_notrans.tdb. gencache_notrans is used with CLEAR_IF_FIRST, writes to it don't use transactions. By default every 5 minutes and when a program exits, all entries from _notrans.tdb are transferred to gencache.tdb in one transaction.
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/proto.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 23bd22aadc..dd49e53338 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -519,6 +519,7 @@ bool gencache_set(const char *keystr, const char *value, time_t timeout);
bool gencache_del(const char *keystr);
bool gencache_get(const char *keystr, char **valstr, time_t *timeout);
bool gencache_get_data_blob(const char *keystr, DATA_BLOB *blob, bool *expired);
+bool gencache_stabilize(void);
bool gencache_set_data_blob(const char *keystr, const DATA_BLOB *blob, time_t timeout);
void gencache_iterate(void (*fn)(const char* key, const char *value, time_t timeout, void* dptr),
void* data, const char* keystr_pattern);