Usually a record in this DB will be written once and then read
many times by winbindd processes on multiple nodes (when run in
a cluster). In order not to introduce a big performance penalty
with the increased correctness achieved by storing the netlogon
creds, in a cluster setup, we should activate ctdb's read only
record copies on this db.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
global_db = db_open(talloc_autofree_context(), fname,
0, TDB_CLEAR_IF_FIRST|TDB_INCOMPATIBLE_HASH,
O_RDWR|O_CREAT, 0600, DBWRAP_LOCK_ORDER_2,
- DBWRAP_FLAG_NONE);
+ DBWRAP_FLAG_OPTIMIZE_READONLY_ACCESS);
if (global_db == NULL) {
TALLOC_FREE(frame);
return NT_STATUS_NO_MEMORY;