From 95bfc1568648d03d5f03ab3f720a961dbc4d6cd5 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 7 Dec 2013 12:58:43 +0000 Subject: 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 Reviewed-by: Stefan Metzmacher --- lib/dbwrap/dbwrap_cache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/dbwrap') diff --git a/lib/dbwrap/dbwrap_cache.c b/lib/dbwrap/dbwrap_cache.c index 6c6b795a416..c5f7cce61ad 100644 --- a/lib/dbwrap/dbwrap_cache.c +++ b/lib/dbwrap/dbwrap_cache.c @@ -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); -- cgit