From 04dd1737b5fff8ae4a092f6abe9c1786f72ff357 Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Thu, 27 Jun 2019 13:31:04 +0000 Subject: Make covered and numActiveLids visible in larger scope --- searchcore/src/vespa/searchcore/proton/matching/matcher.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'searchcore') diff --git a/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp b/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp index 1c9cd9bad52..6bd1e537bbc 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp +++ b/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp @@ -226,6 +226,8 @@ Matcher::match(const SearchRequest &request, vespalib::ThreadBundle &threadBundl total_matching_time.start(); MatchingStats my_stats; SearchReply::UP reply = std::make_unique(); + size_t covered = 0; + uint32_t numActiveLids = 0; { // we want to measure full set-up and tear-down time as part of // collateral time GroupingContext groupingContext(_clock, request.getTimeOfDoom(), @@ -289,7 +291,7 @@ Matcher::match(const SearchRequest &request, vespalib::ThreadBundle &threadBundl } reply = std::move(result->_reply); - uint32_t numActiveLids = metaStore.getNumActiveLids(); + numActiveLids = metaStore.getNumActiveLids(); // note: this is actually totalSpace+1, since 0 is reserved uint32_t totalSpace = metaStore.getCommittedDocIdLimit(); LOG(debug, "docid limit = %d", totalSpace); @@ -302,7 +304,7 @@ Matcher::match(const SearchRequest &request, vespalib::ThreadBundle &threadBundl // account for docid 0 reserved spaceEstimate += 1; } - size_t covered = (spaceEstimate * numActiveLids) / totalSpace; + covered = (spaceEstimate * numActiveLids) / totalSpace; LOG(debug, "covered = %zd", covered); SearchReply::Coverage & coverage = reply->coverage; -- cgit v1.2.3