summaryrefslogtreecommitdiff
path: root/source3/registry
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2012-04-11 16:02:44 +0200
committerAndreas Schneider <asn@samba.org>2012-04-25 14:31:11 +0200
commitab83005b30c621230db674faa1d123f44c9122e7 (patch)
treee4fa60680ec07d812467d5dd3995b0ab7a772d45 /source3/registry
parent4367071f62d2994f1d3d4f33d45fcd6b4c7bec26 (diff)
downloadsamba-ab83005b30c621230db674faa1d123f44c9122e7.tar.gz
samba-ab83005b30c621230db674faa1d123f44c9122e7.tar.bz2
samba-ab83005b30c621230db674faa1d123f44c9122e7.zip
s3:registry: update the seqnum in the subkey cache at the end of regval_store_keys
The purpose is to prevent next reads from going to disk. Note that this will currently only be effective with local tdbs, not with ctdb: For tdb, store and delete bump the seqnum while transaction commit does not. For ctdb, transaction commit bumps the seqnum, while store and delete don't... This needs fixing (in ctdb). Signed-off-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/registry')
-rw-r--r--source3/registry/reg_backend_db.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c
index d4f52b7571..65355aec23 100644
--- a/source3/registry/reg_backend_db.c
+++ b/source3/registry/reg_backend_db.c
@@ -1260,7 +1260,11 @@ static NTSTATUS regdb_store_keys_action(struct db_context *db,
W_ERROR_NOT_OK_GOTO_DONE(werr);
}
- werr = WERR_OK;
+ /*
+ * Update the seqnum in the container to possibly
+ * prevent next read from going to disk
+ */
+ werr = regsubkey_ctr_set_seqnum(store_ctx->ctr, dbwrap_get_seqnum(db));
done:
talloc_free(mem_ctx);