mirror of
https://github.com/samba-team/samba.git
synced 2025-03-09 08:58:35 +03:00
dbwrap_cache: Check negative first
dbwrap_cache is right now used for notify most, and we hope to have very few notifies around. So negative hits will be more likely than positive Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
a31d08feeb
commit
95bfc15686
@ -69,13 +69,13 @@ static NTSTATUS dbwrap_cache_parse_record(
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
if (dbwrap_exists(ctx->negative, key)) {
|
||||
return NT_STATUS_NOT_FOUND;
|
||||
}
|
||||
status = dbwrap_parse_record(ctx->positive, key, parser, private_data);
|
||||
if (NT_STATUS_IS_OK(status)) {
|
||||
return status;
|
||||
}
|
||||
if (dbwrap_exists(ctx->negative, key)) {
|
||||
return NT_STATUS_NOT_FOUND;
|
||||
}
|
||||
|
||||
status = dbwrap_fetch(ctx->backing, talloc_tos(), key, &value);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user