From 13b7d545350f27db883b27b58b75dbdfc1d5d88f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 17 Dec 2006 23:11:46 +0000 Subject: r20234: metze pointed out that we are re-loading the cache records on each write. We should only be doing this if another process writes and changes the seqnum. This avoids the extra cache loads (This used to be commit 65858ebb68c25a672e9284e8cba9a6675902f1df) --- source4/lib/ldb/ldb_tdb/ldb_cache.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source4/lib/ldb/ldb_tdb/ldb_cache.c b/source4/lib/ldb/ldb_tdb/ldb_cache.c index 55eeca56a4..571e952e76 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_cache.c +++ b/source4/lib/ldb/ldb_tdb/ldb_cache.c @@ -481,6 +481,10 @@ int ltdb_increase_sequence_number(struct ldb_module *module) ltdb->sequence_number += 1; } + /* updating the tdb_seqnum here avoids us reloading the cache + records due to our own modification */ + ltdb->tdb_seqnum = tdb_get_seqnum(ltdb->tdb); + return ret; } -- cgit