1
0
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:
Volker Lendecke 2013-12-07 12:58:43 +00:00 committed by Stefan Metzmacher
parent a31d08feeb
commit 95bfc15686

View File

@ -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);