summaryrefslogtreecommitdiffstats
path: root/documentapi
diff options
context:
space:
mode:
authorTor Brede Vekterli <vekterli@yahooinc.com>2022-01-31 14:15:49 +0000
committerTor Brede Vekterli <vekterli@yahooinc.com>2022-01-31 14:15:49 +0000
commit9861ab1789e2ed1804a658e9ef65b72be38cdbaa (patch)
treedc554893dde6a7f17b04faf1614e7e52b0a954b2 /documentapi
parentbd05e78a364b6f1d0a4f5ba8088e1ec1ee02a463 (diff)
Don't set deprecated fields when aggregating visitor statistics
The 1st/2nd pass functionality has been deprecated for a long time, but unfortunately the documents/bytes visited stats have been wired to be returned as part of 2nd phase statistics instead of the regular higher-level fields. This commit changes this, but the serialization will still have to remain in place until Vespa 8.
Diffstat (limited to 'documentapi')
-rw-r--r--documentapi/src/tests/messages/messages60test.cpp4
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/routablefactories60.cpp2
2 files changed, 4 insertions, 2 deletions
diff --git a/documentapi/src/tests/messages/messages60test.cpp b/documentapi/src/tests/messages/messages60test.cpp
index aa5411c8a78..c0bdb71fb25 100644
--- a/documentapi/src/tests/messages/messages60test.cpp
+++ b/documentapi/src/tests/messages/messages60test.cpp
@@ -382,8 +382,8 @@ Messages60Test::testCreateVisitorReply()
EXPECT_EQUAL(ref.getVisitorStatistics().getBytesVisited(), (uint64_t)1024000);
EXPECT_EQUAL(ref.getVisitorStatistics().getDocumentsReturned(), (uint64_t)123);
EXPECT_EQUAL(ref.getVisitorStatistics().getBytesReturned(), (uint64_t)512000);
- EXPECT_EQUAL(ref.getVisitorStatistics().getSecondPassDocumentsReturned(), (uint64_t)456);
- EXPECT_EQUAL(ref.getVisitorStatistics().getSecondPassBytesReturned(), (uint64_t)789100);
+ EXPECT_EQUAL(ref.getVisitorStatistics().getSecondPassDocumentsReturned(), (uint64_t)456); // TODO remove on Vespa 8
+ EXPECT_EQUAL(ref.getVisitorStatistics().getSecondPassBytesReturned(), (uint64_t)789100); // TODO remove on Vespa 8
}
}
return true;
diff --git a/documentapi/src/vespa/documentapi/messagebus/routablefactories60.cpp b/documentapi/src/vespa/documentapi/messagebus/routablefactories60.cpp
index 6d93a619e19..8b7c56117b1 100644
--- a/documentapi/src/vespa/documentapi/messagebus/routablefactories60.cpp
+++ b/documentapi/src/vespa/documentapi/messagebus/routablefactories60.cpp
@@ -170,6 +170,7 @@ RoutableFactories60::CreateVisitorReplyFactory::doDecode(document::ByteBuffer &b
vs.setBytesVisited(decodeLong(buf));
vs.setDocumentsReturned(decodeLong(buf));
vs.setBytesReturned(decodeLong(buf));
+ // TODO remove second pass concept on Vespa 8
vs.setSecondPassDocumentsReturned(decodeLong(buf));
vs.setSecondPassBytesReturned(decodeLong(buf));
reply->setVisitorStatistics(vs);
@@ -187,6 +188,7 @@ RoutableFactories60::CreateVisitorReplyFactory::doEncode(const DocumentReply &ob
buf.putLong(reply.getVisitorStatistics().getBytesVisited());
buf.putLong(reply.getVisitorStatistics().getDocumentsReturned());
buf.putLong(reply.getVisitorStatistics().getBytesReturned());
+ // TODO remove second pass concept on Vespa 8
buf.putLong(reply.getVisitorStatistics().getSecondPassDocumentsReturned());
buf.putLong(reply.getVisitorStatistics().getSecondPassBytesReturned());
return true;