From 0109cc6fe375ae95f4f741e5c2886aabead3e174 Mon Sep 17 00:00:00 2001 From: Geir Storli Date: Mon, 30 Mar 2020 12:17:35 +0000 Subject: Move functions used to open / load attribute vector data files to separate class. --- .../proton/documentmetastore/documentmetastore.cpp | 24 ++++++++++++---------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'searchcore') diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp index 93d8ef3fff4..3e9ef787f74 100644 --- a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp +++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp @@ -1,24 +1,25 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "documentmetastore.h" -#include "search_context.h" #include "documentmetastoresaver.h" +#include "search_context.h" +#include +#include +#include +#include #include +#include #include +#include +#include #include -#include +#include #include +#include #include -#include -#include -#include -#include -#include -#include #include #include #include -#include #include "document_meta_store_versions.h" #include @@ -32,7 +33,7 @@ using search::FileReader; using search::GrowStrategy; using search::IAttributeSaveTarget; using search::LidUsageStats; -using vespalib::MemoryUsage; +using search::attribute::LoadUtils; using search::attribute::SearchContextParams; using search::btree::BTreeNoLeafData; using search::fef::TermFieldMatchData; @@ -42,6 +43,7 @@ using storage::spi::Timestamp; using vespalib::GenerationHandler; using vespalib::GenerationHeldBase; using vespalib::IllegalStateException; +using vespalib::MemoryUsage; using vespalib::make_string; namespace proton { @@ -260,7 +262,7 @@ DocumentMetaStore::readNextDoc(documentmetastore::Reader & reader, TreeType::Bui bool DocumentMetaStore::onLoad() { - documentmetastore::Reader reader(openDAT()); + documentmetastore::Reader reader(LoadUtils::openDAT(*this)); unload(); size_t numElems = reader.getNumElems(); size_t docIdLimit = reader.getDocIdLimit(); -- cgit v1.2.3