diff options
author | Tor Brede Vekterli <vekterli@yahooinc.com> | 2022-01-31 14:15:49 +0000 |
---|---|---|
committer | Tor Brede Vekterli <vekterli@yahooinc.com> | 2022-01-31 14:15:49 +0000 |
commit | 9861ab1789e2ed1804a658e9ef65b72be38cdbaa (patch) | |
tree | dc554893dde6a7f17b04faf1614e7e52b0a954b2 /storageapi | |
parent | bd05e78a364b6f1d0a4f5ba8088e1ec1ee02a463 (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 'storageapi')
-rw-r--r-- | storageapi/src/vespa/storageapi/mbusprot/protocolserialization5_0.cpp | 2 | ||||
-rw-r--r-- | storageapi/src/vespa/storageapi/mbusprot/protocolserialization7.cpp | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/storageapi/src/vespa/storageapi/mbusprot/protocolserialization5_0.cpp b/storageapi/src/vespa/storageapi/mbusprot/protocolserialization5_0.cpp index cc7363af7bc..fa400b565b2 100644 --- a/storageapi/src/vespa/storageapi/mbusprot/protocolserialization5_0.cpp +++ b/storageapi/src/vespa/storageapi/mbusprot/protocolserialization5_0.cpp @@ -538,6 +538,7 @@ ProtocolSerialization5_0::onEncode(GBBuf& buf, const api::CreateVisitorReply& ms buf.putLong(msg.getVisitorStatistics().getBytesVisited()); buf.putLong(msg.getVisitorStatistics().getDocumentsReturned()); buf.putLong(msg.getVisitorStatistics().getBytesReturned()); + // TODO remove second pass concept on Vespa 8 buf.putLong(msg.getVisitorStatistics().getSecondPassDocumentsReturned()); buf.putLong(msg.getVisitorStatistics().getSecondPassBytesReturned()); } @@ -554,6 +555,7 @@ ProtocolSerialization5_0::onDecodeCreateVisitorReply(const SCmd& cmd, BBuf& buf) vs.setBytesVisited(SH::getLong(buf)); vs.setDocumentsReturned(SH::getLong(buf)); vs.setBytesReturned(SH::getLong(buf)); + // TODO remove second pass concept on Vespa 8 vs.setSecondPassDocumentsReturned(SH::getLong(buf)); vs.setSecondPassBytesReturned(SH::getLong(buf)); msg->setVisitorStatistics(vs); diff --git a/storageapi/src/vespa/storageapi/mbusprot/protocolserialization7.cpp b/storageapi/src/vespa/storageapi/mbusprot/protocolserialization7.cpp index 8425294cbbd..91b5999e34c 100644 --- a/storageapi/src/vespa/storageapi/mbusprot/protocolserialization7.cpp +++ b/storageapi/src/vespa/storageapi/mbusprot/protocolserialization7.cpp @@ -1240,8 +1240,8 @@ void ProtocolSerialization7::onEncode(GBBuf& buf, const api::CreateVisitorReply& proto_stats->set_bytes_visited(stats.getBytesVisited()); proto_stats->set_documents_returned(stats.getDocumentsReturned()); proto_stats->set_bytes_returned(stats.getBytesReturned()); - proto_stats->set_second_pass_documents_returned(stats.getSecondPassDocumentsReturned()); - proto_stats->set_second_pass_bytes_returned(stats.getSecondPassBytesReturned()); + proto_stats->set_second_pass_documents_returned(stats.getSecondPassDocumentsReturned()); // TODO remove on Vespa 8 + proto_stats->set_second_pass_bytes_returned(stats.getSecondPassBytesReturned()); // TODO remove on Vespa 8 }); } @@ -1287,8 +1287,8 @@ api::StorageReply::UP ProtocolSerialization7::onDecodeCreateVisitorReply(const S vs.setBytesVisited(proto_stats.bytes_visited()); vs.setDocumentsReturned(proto_stats.documents_returned()); vs.setBytesReturned(proto_stats.bytes_returned()); - vs.setSecondPassDocumentsReturned(proto_stats.second_pass_documents_returned()); - vs.setSecondPassBytesReturned(proto_stats.second_pass_bytes_returned()); + vs.setSecondPassDocumentsReturned(proto_stats.second_pass_documents_returned()); // TODO remove on Vespa 8 + vs.setSecondPassBytesReturned(proto_stats.second_pass_bytes_returned()); // TODO remove on Vespa 8 reply->setVisitorStatistics(vs); return reply; }); |