diff options
author | Volker Lendecke <vl@samba.org> | 2013-12-07 12:58:43 +0000 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2013-12-14 10:10:25 +0100 |
commit | 95bfc1568648d03d5f03ab3f720a961dbc4d6cd5 (patch) | |
tree | 80ffd6eaf4007c973caa5a9316e461d55f9e94ba /lib/dbwrap | |
parent | a31d08feeb65bd3b4ff175c8096fb23f8d496789 (diff) | |
download | samba-95bfc1568648d03d5f03ab3f720a961dbc4d6cd5.tar.gz samba-95bfc1568648d03d5f03ab3f720a961dbc4d6cd5.tar.xz samba-95bfc1568648d03d5f03ab3f720a961dbc4d6cd5.zip |
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>
Diffstat (limited to 'lib/dbwrap')
-rw-r--r-- | lib/dbwrap/dbwrap_cache.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/dbwrap/dbwrap_cache.c b/lib/dbwrap/dbwrap_cache.c index 6c6b795a41..c5f7cce61a 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); |