Note that this will currently only be effective in the local TDB implementation.
For CTDB, this wont work since seqnum currently works differently there (needs
fixing): For tdb, store and delete operations bump the db seqnum, while
transaction commits don't. For ctdb, the seqnum is bumped by the transaction
commit but not by store and delete operations.
(cherry picked from commit
13347d11c0e918f82e7e3c21125acc5e241d389f)
int len;
NTSTATUS status;
bool result = false;
+ WERROR werr;
DEBUG(10,("regdb_store_values: Looking for values of key [%s]\n", key));
}
status = dbwrap_trans_store_bystring(db, keystr, data, TDB_REPLACE);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(0, ("regdb_store_values_internal: error storing: %s\n", nt_errstr(status)));
+ goto done;
+ }
- result = NT_STATUS_IS_OK(status);
+ /*
+ * update the seqnum in the cache to prevent the next read
+ * from going to disk
+ */
+ werr = regval_ctr_set_seqnum(values, db->get_seqnum(db));
+ result = W_ERROR_IS_OK(status);
done:
TALLOC_FREE(ctx);