From f9f22058e748bb283dd8d7cbb05bc2420a7b06a8 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 22 Jul 2004 22:14:35 +0000 Subject: [PATCH] ITS#3178 add "fasttool" option to disable transaction logging in tool mode --- doc/man/man5/slapd-bdb.5 | 6 ++++++ servers/slapd/back-bdb/config.c | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/doc/man/man5/slapd-bdb.5 b/doc/man/man5/slapd-bdb.5 index 861728f225..05941827df 100644 --- a/doc/man/man5/slapd-bdb.5 +++ b/doc/man/man5/slapd-bdb.5 @@ -71,6 +71,12 @@ results if the data comes from a transaction that is later aborted. In this case, the modified data is discarded and a subsequent search will return a different result. .TP +.B fasttool +Disables transaction logging when using the slapadd/slapindex tools, +using the DB_TXN_NOT_DURABLE flag. Does not affect normal slapd operation, +but will improve the performance of slapadd/slapindex. +See the Berkeley DB reference guide for more details. +.TP .B idlcachesize Specify the size of the in-memory index cache, in index slots. The default is zero. A larger value will speed up frequent searches of diff --git a/servers/slapd/back-bdb/config.c b/servers/slapd/back-bdb/config.c index 4d2dbbbaba..d7eeba5e74 100644 --- a/servers/slapd/back-bdb/config.c +++ b/servers/slapd/back-bdb/config.c @@ -64,6 +64,11 @@ bdb_db_config( } else if ( strcasecmp( argv[0], "dbnosync" ) == 0 ) { bdb->bi_dbenv_xflags |= DB_TXN_NOSYNC; + /* slapadd/slapindex logging configuration */ + } else if ( strcasecmp( argv[0], "fasttool" ) == 0 && + slapMode & SLAP_TOOL_MODE ) { + bdb->bi_dbenv_xflags |= DB_TXN_NOT_DURABLE; + /* transaction checkpoint configuration */ } else if ( strcasecmp( argv[0], "checkpoint" ) == 0 ) { if ( argc < 3 ) { -- 2.39.5