From 9861ab1789e2ed1804a658e9ef65b72be38cdbaa Mon Sep 17 00:00:00 2001 From: Tor Brede Vekterli Date: Mon, 31 Jan 2022 14:15:49 +0000 Subject: 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. --- documentapi/src/tests/messages/messages60test.cpp | 4 ++-- documentapi/src/vespa/documentapi/messagebus/routablefactories60.cpp | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'documentapi/src') 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; -- cgit v1.2.3