diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-01-06 09:29:58 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-01-06 13:51:43 +0000 |
commit | 3110d9380650e0f68fad2a621ea71d083519446a (patch) | |
tree | 47e472faba8a07f8047424ef21c2d165f3265be4 /storage | |
parent | 6a27f0340bdc34b2ce3bbd1db29ca431ba8ed89e (diff) |
Simplify by avoid both DocumentSize and PersistedDocumentSize. That is the same.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/src/tests/visiting/visitortest.cpp | 7 | ||||
-rw-r--r-- | storage/src/vespa/storage/persistence/processallhandler.cpp | 2 | ||||
-rw-r--r-- | storage/src/vespa/storage/visiting/visitor.cpp | 5 |
3 files changed, 5 insertions, 9 deletions
diff --git a/storage/src/tests/visiting/visitortest.cpp b/storage/src/tests/visiting/visitortest.cpp index 1b5f077aaf0..82ccdb60736 100644 --- a/storage/src/tests/visiting/visitortest.cpp +++ b/storage/src/tests/visiting/visitortest.cpp @@ -382,11 +382,8 @@ VisitorTest::sendGetIterReply(GetIterCommand& cmd, assert(maxDocuments < _documents.size()); size_t documentCount = maxDocuments != 0 ? maxDocuments : _documents.size(); for (size_t i = 0; i < documentCount; ++i) { - reply->getEntries().emplace_back( - std::make_unique<spi::DocEntry>( - spi::Timestamp(1000 + i), - spi::NONE, - document::Document::UP(_documents[i]->clone()))); + reply->getEntries().push_back(spi::DocEntry::create(spi::Timestamp(1000 + i), spi::NONE, + document::Document::UP(_documents[i]->clone()))); } if (documentCount == _documents.size() || overrideCompleted) { reply->setCompleted(); diff --git a/storage/src/vespa/storage/persistence/processallhandler.cpp b/storage/src/vespa/storage/persistence/processallhandler.cpp index 3da6372cda8..c23d246d463 100644 --- a/storage/src/vespa/storage/persistence/processallhandler.cpp +++ b/storage/src/vespa/storage/persistence/processallhandler.cpp @@ -32,7 +32,7 @@ public: if (e.getDocument() != nullptr) { ost << "Doc(" << e.getDocument()->getId() << ")" << ", " << e.getDocument()->getId().getGlobalId().toString() - << ", size: " << e.getPersistedDocumentSize(); + << ", size: " << e.getDocumentSize(); } else if (e.getDocumentId() != nullptr) { ost << *e.getDocumentId() << ", " << e.getDocumentId()->getGlobalId().toString(); diff --git a/storage/src/vespa/storage/visiting/visitor.cpp b/storage/src/vespa/storage/visiting/visitor.cpp index 7da397b670a..ac2c918910c 100644 --- a/storage/src/vespa/storage/visiting/visitor.cpp +++ b/storage/src/vespa/storage/visiting/visitor.cpp @@ -815,12 +815,11 @@ Visitor::onGetIterReply(const std::shared_ptr<GetIterReply>& reply, uint64_t size = 0; for (const auto& entry : reply->getEntries()) { - size += entry->getPersistedDocumentSize(); + size += entry->getDocumentSize(); } _visitorStatistics.setDocumentsVisited( - _visitorStatistics.getDocumentsVisited() - + reply->getEntries().size()); + _visitorStatistics.getDocumentsVisited() + reply->getEntries().size()); _visitorStatistics.setBytesVisited(_visitorStatistics.getBytesVisited() + size); } catch (std::exception& e) { LOG(warning, "handleDocuments threw exception %s", e.what()); |