diff options
author | Andrew Tridgell <tridge@samba.org> | 2006-12-17 23:11:46 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:29:27 -0500 |
commit | 13b7d545350f27db883b27b58b75dbdfc1d5d88f (patch) | |
tree | 0848c8b997a984b7514cf6084504de5f2b5430a0 /source4 | |
parent | 291271f226057a6aed692e34fc52f0565caa55dc (diff) | |
download | samba-13b7d545350f27db883b27b58b75dbdfc1d5d88f.tar.gz samba-13b7d545350f27db883b27b58b75dbdfc1d5d88f.tar.bz2 samba-13b7d545350f27db883b27b58b75dbdfc1d5d88f.zip |
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)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/lib/ldb/ldb_tdb/ldb_cache.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; } |