From 8c35625d8c6d65f42d392ec93721548bad606a8c Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Tue, 9 May 2023 21:14:19 +0000 Subject: Wire the metastore read guard all the way and use it, if present. --- searchcore/src/tests/proton/matching/matching_test.cpp | 5 ++--- .../vespa/searchcore/proton/attribute/imported_attributes_context.h | 2 +- .../proton/documentmetastore/i_document_meta_store_context.h | 2 +- searchcore/src/vespa/searchcore/proton/reference/gid_to_lid_mapper.h | 4 +--- 4 files changed, 5 insertions(+), 8 deletions(-) (limited to 'searchcore') diff --git a/searchcore/src/tests/proton/matching/matching_test.cpp b/searchcore/src/tests/proton/matching/matching_test.cpp index bce9694cd58..130fb29c289 100644 --- a/searchcore/src/tests/proton/matching/matching_test.cpp +++ b/searchcore/src/tests/proton/matching/matching_test.cpp @@ -386,9 +386,8 @@ struct MyWorld { Matcher::SP matcher = createMatcher(); SearchRequest::SP request = createSimpleRequest("f1", "spread"); search::fef::Properties overrides; - MatchToolsFactory::UP match_tools_factory = matcher->create_match_tools_factory( - *request, searchContext, attributeContext, metaStore, overrides, ttb(), nullptr, true); - MatchTools::UP match_tools = match_tools_factory->createMatchTools(); + auto mtf = matcher->create_match_tools_factory(*request, searchContext, attributeContext, metaStore, overrides, ttb(), nullptr, true); + MatchTools::UP match_tools = mtf->createMatchTools(); match_tools->setup_first_phase(nullptr); return match_tools->match_data().get_termwise_limit(); } diff --git a/searchcore/src/vespa/searchcore/proton/attribute/imported_attributes_context.h b/searchcore/src/vespa/searchcore/proton/attribute/imported_attributes_context.h index 39fde4f5fb7..69f566b70a6 100644 --- a/searchcore/src/vespa/searchcore/proton/attribute/imported_attributes_context.h +++ b/searchcore/src/vespa/searchcore/proton/attribute/imported_attributes_context.h @@ -2,7 +2,7 @@ #pragma once #include -#include +#include #include #include #include diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/i_document_meta_store_context.h b/searchcore/src/vespa/searchcore/proton/documentmetastore/i_document_meta_store_context.h index 9853c4af5b6..42c9ee26f35 100644 --- a/searchcore/src/vespa/searchcore/proton/documentmetastore/i_document_meta_store_context.h +++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/i_document_meta_store_context.h @@ -3,7 +3,7 @@ #pragma once #include "i_document_meta_store.h" -#include +#include namespace proton { diff --git a/searchcore/src/vespa/searchcore/proton/reference/gid_to_lid_mapper.h b/searchcore/src/vespa/searchcore/proton/reference/gid_to_lid_mapper.h index dd0e462aa49..8a974b6d527 100644 --- a/searchcore/src/vespa/searchcore/proton/reference/gid_to_lid_mapper.h +++ b/searchcore/src/vespa/searchcore/proton/reference/gid_to_lid_mapper.h @@ -2,13 +2,11 @@ #pragma once -#include +#include #include namespace proton { -class DocumentMetaStore; - /* * Class for mapping from gid to lid. Instances should be short lived * due to read guards preventing resource reuse. -- cgit v1.2.3