From 001b9582ccdeea317490adef6918295d8c103b15 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Mon, 10 Feb 2014 16:23:48 +0100 Subject: [PATCH] tdb: always open internal databases with incompatible hash. This makes them more efficient due to better distribution of keys across hash chains. Signed-off-by: Michael Adam Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Sat Feb 15 08:26:07 CET 2014 on sn-devel-104 --- lib/tdb/common/open.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/tdb/common/open.c b/lib/tdb/common/open.c index 6ff37ca1f36..0454c8bb501 100644 --- a/lib/tdb/common/open.c +++ b/lib/tdb/common/open.c @@ -188,6 +188,11 @@ _PUBLIC_ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int td goto fail; } tdb_io_init(tdb); + + if (tdb_flags & TDB_INTERNAL) { + tdb_flags |= TDB_INCOMPATIBLE_HASH; + } + tdb->fd = -1; #ifdef TDB_TRACE tdb->tracefd = -1; -- 2.11.4.GIT