summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-08-17 18:11:49 +0200
committerGitHub <noreply@github.com>2020-08-17 18:11:49 +0200
commit5dc7ba73e714b47fe4a16eb59a5fb16ce4c6323c (patch)
tree02a9c65c367db11e369179a2b62a2bef41169e82
parentf18237c3dba523cb907fa873b1bc2ab8915de3d9 (diff)
parent937bd7d494734f9fa5115c7e46bb3f99d574fb7b (diff)
Merge pull request #14072 from vespa-engine/balder/avoid-unnecessary-copy
There is no need to copy the document type as it has a longer lifetim…
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentretriever.cpp1
-rw-r--r--storage/src/vespa/storage/distributor/distributor.h11
-rw-r--r--storage/src/vespa/storage/persistence/fieldvisitor.h2
3 files changed, 7 insertions, 7 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentretriever.cpp b/searchcore/src/vespa/searchcore/proton/server/documentretriever.cpp
index 031dd4f35e7..952c359b716 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentretriever.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/documentretriever.cpp
@@ -261,6 +261,7 @@ DocumentRetriever::getPartialDocument(search::DocumentIdT lid, const document::D
case FieldSet::Type::DOCID:
break;
}
+ doc->setRepo(getDocumentTypeRepo());
}
return doc;
}
diff --git a/storage/src/vespa/storage/distributor/distributor.h b/storage/src/vespa/storage/distributor/distributor.h
index 84e195fdff2..fcc08030764 100644
--- a/storage/src/vespa/storage/distributor/distributor.h
+++ b/storage/src/vespa/storage/distributor/distributor.h
@@ -25,11 +25,11 @@
#include <unordered_map>
namespace storage {
+ struct DoneInitializeHandler;
+ class HostInfo;
+}
-struct DoneInitializeHandler;
-class HostInfo;
-
-namespace distributor {
+namespace storage::distributor {
class DistributorBucketSpaceRepo;
class SimpleMaintenanceScanner;
@@ -342,5 +342,4 @@ private:
bool _must_send_updated_host_info;
};
-} // distributor
-} // storage
+}
diff --git a/storage/src/vespa/storage/persistence/fieldvisitor.h b/storage/src/vespa/storage/persistence/fieldvisitor.h
index 99558fe6e9c..688874742a6 100644
--- a/storage/src/vespa/storage/persistence/fieldvisitor.h
+++ b/storage/src/vespa/storage/persistence/fieldvisitor.h
@@ -15,7 +15,7 @@ namespace storage {
class FieldVisitor : public document::select::Visitor {
private:
- document::DocumentType _docType;
+ const document::DocumentType & _docType;
document::Field::Set::Builder _fields;
public: