diff options
12 files changed, 16 insertions, 103 deletions
diff --git a/documentapi/src/main/java/com/yahoo/documentapi/messagebus/MessageBusVisitorSession.java b/documentapi/src/main/java/com/yahoo/documentapi/messagebus/MessageBusVisitorSession.java index 6aa0a6b9e57..46a05687701 100755 --- a/documentapi/src/main/java/com/yahoo/documentapi/messagebus/MessageBusVisitorSession.java +++ b/documentapi/src/main/java/com/yahoo/documentapi/messagebus/MessageBusVisitorSession.java @@ -1006,9 +1006,7 @@ public class MessageBusVisitorSession implements VisitorSession { return true; } if (params.getMaxTotalHits() != -1 - && ((statistics.getDocumentsReturned() - + statistics.getSecondPassDocumentsReturned()) // TODO: Vespa 8: remove - >= params.getMaxTotalHits())) + && (statistics.getDocumentsReturned() >= params.getMaxTotalHits())) { return true; } diff --git a/documentapi/src/main/java/com/yahoo/documentapi/messagebus/protocol/RoutableFactories60.java b/documentapi/src/main/java/com/yahoo/documentapi/messagebus/protocol/RoutableFactories60.java index 05c686694b4..c4d4fb216be 100644 --- a/documentapi/src/main/java/com/yahoo/documentapi/messagebus/protocol/RoutableFactories60.java +++ b/documentapi/src/main/java/com/yahoo/documentapi/messagebus/protocol/RoutableFactories60.java @@ -232,7 +232,6 @@ public abstract class RoutableFactories60 { public static class CreateVisitorReplyFactory extends DocumentReplyFactory { @Override - @SuppressWarnings("removal")// TODO: Vespa 8: remove protected DocumentReply doDecode(DocumentDeserializer buf) { CreateVisitorReply reply = new CreateVisitorReply(DocumentProtocol.REPLY_CREATEVISITOR); reply.setLastBucket(new BucketId(buf.getLong(null))); @@ -243,14 +242,13 @@ public abstract class RoutableFactories60 { vs.setBytesVisited(buf.getLong(null)); vs.setDocumentsReturned(buf.getLong(null)); vs.setBytesReturned(buf.getLong(null)); - vs.setSecondPassDocumentsReturned(buf.getLong(null)); // TODO: on Vespa 8 remove setter (_not_ getLong()) - vs.setSecondPassBytesReturned(buf.getLong(null)); // TODO: on Vespa 8 remove setter (_not_ getLong()) + buf.getLong(null); // unused + buf.getLong(null); // unused reply.setVisitorStatistics(vs); return reply; } @Override - @SuppressWarnings("removal")// TODO: Vespa 8: remove protected boolean doEncode(DocumentReply obj, DocumentSerializer buf) { CreateVisitorReply reply = (CreateVisitorReply)obj; buf.putLong(null, reply.getLastBucket().getRawId()); @@ -259,8 +257,8 @@ public abstract class RoutableFactories60 { buf.putLong(null, reply.getVisitorStatistics().getBytesVisited()); buf.putLong(null, reply.getVisitorStatistics().getDocumentsReturned()); buf.putLong(null, reply.getVisitorStatistics().getBytesReturned()); - buf.putLong(null, reply.getVisitorStatistics().getSecondPassDocumentsReturned()); // TODO: on Vespa 8 remove getter (_not_ putLong()) - buf.putLong(null, reply.getVisitorStatistics().getSecondPassBytesReturned()); // TODO: on Vespa 8 remove getter (_not_ putLong()) + buf.putLong(null, 0); // was SecondPassDocumentsReturned + buf.putLong(null, 0); // was SecondPassBytesReturned return true; } } diff --git a/documentapi/src/test/java/com/yahoo/documentapi/messagebus/MessageBusVisitorSessionTestCase.java b/documentapi/src/test/java/com/yahoo/documentapi/messagebus/MessageBusVisitorSessionTestCase.java index 874bad6034a..f9b469192fb 100755 --- a/documentapi/src/test/java/com/yahoo/documentapi/messagebus/MessageBusVisitorSessionTestCase.java +++ b/documentapi/src/test/java/com/yahoo/documentapi/messagebus/MessageBusVisitorSessionTestCase.java @@ -968,7 +968,7 @@ public class MessageBusVisitorSessionTestCase { builder.append("onVisitorStatistics : "); // Only bother with a couple of fields. builder.append(vs.getBucketsVisited()).append(" buckets visited, "); - builder.append(vs.getDocumentsReturned() + vs.getSecondPassDocumentsReturned()).append(" docs returned\n"); + builder.append(vs.getDocumentsReturned()).append(" docs returned\n"); } @Override @@ -1454,29 +1454,6 @@ public class MessageBusVisitorSessionTestCase { doTestEarlyCompletion(visitorParameters, replyModifier1, replyModifier2); } - @SuppressWarnings("removal")// TODO: Vespa 8: remove test - @Test - public void testVisitingCompletedFromSecondPassHits() { - VisitorParameters visitorParameters = createVisitorParameters("id.user==1234"); - visitorParameters.setMaxTotalHits(10); - ReplyModifier replyModifier1 = (reply) -> { - VisitorStatistics stats = new VisitorStatistics(); - stats.setBucketsVisited(1); - stats.setDocumentsReturned(5); - stats.setSecondPassDocumentsReturned(4); - reply.setVisitorStatistics(stats); - reply.setLastBucket(new BucketId(33, 1234 | (1L << 32))); - }; - ReplyModifier replyModifier2 = (reply) -> { - VisitorStatistics stats = new VisitorStatistics(); - stats.setBucketsVisited(1); - stats.setSecondPassDocumentsReturned(1); - reply.setVisitorStatistics(stats); - reply.setLastBucket(new BucketId(34, 1234 | (1L << 33))); - }; - doTestEarlyCompletion(visitorParameters, replyModifier1, replyModifier2); - } - /** * Test that waitUntilDone on the session is forwarded to the control handler. */ diff --git a/documentapi/src/test/java/com/yahoo/documentapi/messagebus/protocol/test/Messages60TestCase.java b/documentapi/src/test/java/com/yahoo/documentapi/messagebus/protocol/test/Messages60TestCase.java index 5e8439c9536..35f8e7cf0c8 100644 --- a/documentapi/src/test/java/com/yahoo/documentapi/messagebus/protocol/test/Messages60TestCase.java +++ b/documentapi/src/test/java/com/yahoo/documentapi/messagebus/protocol/test/Messages60TestCase.java @@ -271,7 +271,6 @@ public class Messages60TestCase extends MessagesTestBase { public class testCreateVisitorReply implements RunnableTest { @Override - @SuppressWarnings("removal") public void run() { CreateVisitorReply reply = new CreateVisitorReply(DocumentProtocol.REPLY_CREATEVISITOR); reply.setLastBucket(new BucketId(16, 123)); @@ -280,8 +279,6 @@ public class Messages60TestCase extends MessagesTestBase { reply.getVisitorStatistics().setBytesVisited(1024000); reply.getVisitorStatistics().setDocumentsReturned(123); reply.getVisitorStatistics().setBytesReturned(512000); - reply.getVisitorStatistics().setSecondPassDocumentsReturned(456); - reply.getVisitorStatistics().setSecondPassBytesReturned(789100); assertEquals(65, serialize("CreateVisitorReply", reply)); @@ -294,8 +291,6 @@ public class Messages60TestCase extends MessagesTestBase { assertEquals(1024000, reply.getVisitorStatistics().getBytesVisited()); assertEquals(123, reply.getVisitorStatistics().getDocumentsReturned()); assertEquals(512000, reply.getVisitorStatistics().getBytesReturned()); - assertEquals(456, reply.getVisitorStatistics().getSecondPassDocumentsReturned()); // TODO remove on Vespa 8 - assertEquals(789100, reply.getVisitorStatistics().getSecondPassBytesReturned()); } } } diff --git a/documentapi/src/tests/messages/messages60test.cpp b/documentapi/src/tests/messages/messages60test.cpp index f51b071fc70..ab300794307 100644 --- a/documentapi/src/tests/messages/messages60test.cpp +++ b/documentapi/src/tests/messages/messages60test.cpp @@ -366,8 +366,6 @@ Messages60Test::testCreateVisitorReply() vs.setBytesVisited(1024000); vs.setDocumentsReturned(123); vs.setBytesReturned(512000); - vs.setSecondPassDocumentsReturned(456); - vs.setSecondPassBytesReturned(789100); reply.setVisitorStatistics(vs); EXPECT_EQUAL(65u, serialize("CreateVisitorReply", reply)); @@ -383,8 +381,6 @@ 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); // 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 ad32a5b4fa7..0757db9f5fc 100644 --- a/documentapi/src/vespa/documentapi/messagebus/routablefactories60.cpp +++ b/documentapi/src/vespa/documentapi/messagebus/routablefactories60.cpp @@ -171,11 +171,9 @@ 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)); + decodeLong(buf); // was SecondPassDocumentsReturned + decodeLong(buf); // was SecondPassBytesReturned reply->setVisitorStatistics(vs); - return reply; } @@ -189,9 +187,8 @@ 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()); + buf.putLong(0); // was SecondPassDocumentsReturned + buf.putLong(0); // was SecondPassBytesReturned return true; } diff --git a/documentapi/test/crosslanguagefiles/6.221-java-CreateVisitorReply.dat b/documentapi/test/crosslanguagefiles/6.221-java-CreateVisitorReply.dat Binary files differindex e13917227d1..493fa3291c5 100644 --- a/documentapi/test/crosslanguagefiles/6.221-java-CreateVisitorReply.dat +++ b/documentapi/test/crosslanguagefiles/6.221-java-CreateVisitorReply.dat diff --git a/storage/src/vespa/storageapi/mbusprot/protocolserialization5_0.cpp b/storage/src/vespa/storageapi/mbusprot/protocolserialization5_0.cpp index fa400b565b2..e49eb8842ff 100644 --- a/storage/src/vespa/storageapi/mbusprot/protocolserialization5_0.cpp +++ b/storage/src/vespa/storageapi/mbusprot/protocolserialization5_0.cpp @@ -538,9 +538,8 @@ 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()); + buf.putLong(0); + buf.putLong(0); } api::StorageReply::UP @@ -555,9 +554,8 @@ 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)); + SH::getLong(buf); + SH::getLong(buf); msg->setVisitorStatistics(vs); return msg; diff --git a/storage/src/vespa/storageapi/mbusprot/protocolserialization7.cpp b/storage/src/vespa/storageapi/mbusprot/protocolserialization7.cpp index 91b5999e34c..dee766b4b2d 100644 --- a/storage/src/vespa/storageapi/mbusprot/protocolserialization7.cpp +++ b/storage/src/vespa/storageapi/mbusprot/protocolserialization7.cpp @@ -1240,8 +1240,6 @@ 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()); // TODO remove on Vespa 8 - proto_stats->set_second_pass_bytes_returned(stats.getSecondPassBytesReturned()); // TODO remove on Vespa 8 }); } @@ -1287,8 +1285,6 @@ 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()); // TODO remove on Vespa 8 - vs.setSecondPassBytesReturned(proto_stats.second_pass_bytes_returned()); // TODO remove on Vespa 8 reply->setVisitorStatistics(vs); return reply; }); diff --git a/vdslib/src/main/java/com/yahoo/vdslib/VisitorStatistics.java b/vdslib/src/main/java/com/yahoo/vdslib/VisitorStatistics.java index a79f3d5fb6d..fda456ace05 100644 --- a/vdslib/src/main/java/com/yahoo/vdslib/VisitorStatistics.java +++ b/vdslib/src/main/java/com/yahoo/vdslib/VisitorStatistics.java @@ -7,8 +7,6 @@ public class VisitorStatistics { long bytesVisited = 0; long documentsReturned = 0; long bytesReturned = 0; - long secondPassDocumentsReturned = 0; - long secondPassBytesReturned = 0; public void add(VisitorStatistics other) { bucketsVisited += other.bucketsVisited; @@ -16,8 +14,6 @@ public class VisitorStatistics { bytesVisited += other.bytesVisited; documentsReturned += other.documentsReturned; bytesReturned += other.bytesReturned; - secondPassDocumentsReturned += other.secondPassDocumentsReturned; - secondPassBytesReturned += other.secondPassBytesReturned; } public int getBucketsVisited() { return bucketsVisited; } @@ -44,37 +40,13 @@ public class VisitorStatistics { public long getBytesReturned() { return bytesReturned; } public void setBytesReturned(long bytesReturned) { this.bytesReturned = bytesReturned; } - /** - * @deprecated Use getDocumentsReturned() instead - */ - @Deprecated(since = "7", forRemoval = true) // TODO: Vespa 8: remove - public long getSecondPassDocumentsReturned() { return secondPassDocumentsReturned; } - /** - * @deprecated only applies for deprecated "orderdoc" ID scheme - */ - @Deprecated(since = "7", forRemoval = true)// TODO: Vespa 8: remove - public void setSecondPassDocumentsReturned(long secondPassDocumentsReturned) { this.secondPassDocumentsReturned = secondPassDocumentsReturned; } - - /** - * @deprecated Use getBytesReturned() instead - */ - @Deprecated(since = "7", forRemoval = true) // TODO: Vespa 8: remove - public long getSecondPassBytesReturned() { return secondPassBytesReturned; } - /** - * @deprecated only applies for deprecated "orderdoc" ID scheme - */ - @Deprecated(since = "7", forRemoval = true) // TODO: Vespa 8: remove - public void setSecondPassBytesReturned(long secondPassBytesReturned) { this.secondPassBytesReturned = secondPassBytesReturned; } - public String toString() { String out = "Buckets visited: " + bucketsVisited + "\n" + "Documents visited: " + documentsVisited + "\n" + "Bytes visited: " + bytesVisited + "\n" + "Documents returned: " + documentsReturned + "\n" + - "Bytes returned: " + bytesReturned + "\n" + - "Documents returned (2nd pass): " + secondPassDocumentsReturned + "\n" + - "Bytes returned (2nd pass): " + secondPassBytesReturned + "\n"; + "Bytes returned: " + bytesReturned + "\n"; return out; } diff --git a/vdslib/src/vespa/vdslib/container/visitorstatistics.cpp b/vdslib/src/vespa/vdslib/container/visitorstatistics.cpp index 4dc043c4654..2507b2cfaaa 100644 --- a/vdslib/src/vespa/vdslib/container/visitorstatistics.cpp +++ b/vdslib/src/vespa/vdslib/container/visitorstatistics.cpp @@ -10,9 +10,7 @@ VisitorStatistics::VisitorStatistics() _documentsVisited(0), _bytesVisited(0), _documentsReturned(0), - _bytesReturned(0), - _secondPassDocumentsReturned(0), - _secondPassBytesReturned(0) + _bytesReturned(0) { } @@ -24,8 +22,6 @@ VisitorStatistics::operator+(const VisitorStatistics& other) { vs.setBytesVisited(_bytesVisited + other._bytesVisited); vs.setDocumentsReturned(_documentsReturned + other._documentsReturned); vs.setBytesReturned(_bytesReturned + other._bytesReturned); - vs.setSecondPassDocumentsReturned(_secondPassDocumentsReturned + other._secondPassDocumentsReturned); - vs.setSecondPassBytesReturned(_secondPassBytesReturned + other._secondPassBytesReturned); return vs; } @@ -37,8 +33,6 @@ VisitorStatistics::print(std::ostream& out, bool, const std::string& indent) con out << indent << "Bytes visited: " << _bytesVisited << "\n"; out << indent << "Documents returned: " << _documentsReturned << "\n"; out << indent << "Bytes returned: " << _bytesReturned << "\n"; - out << indent << "Documents returned (2nd pass): " << _secondPassDocumentsReturned << "\n"; - out << indent << "Bytes returned (2nd pass): " << _secondPassBytesReturned << "\n"; } } diff --git a/vdslib/src/vespa/vdslib/container/visitorstatistics.h b/vdslib/src/vespa/vdslib/container/visitorstatistics.h index d4912bbf1ba..3f62d7e602b 100644 --- a/vdslib/src/vespa/vdslib/container/visitorstatistics.h +++ b/vdslib/src/vespa/vdslib/container/visitorstatistics.h @@ -27,12 +27,6 @@ public: uint64_t getBytesReturned() const { return _bytesReturned; } void setBytesReturned(uint32_t bytesReturned) { _bytesReturned = bytesReturned; } - uint64_t getSecondPassDocumentsReturned() const { return _secondPassDocumentsReturned; } - void setSecondPassDocumentsReturned(uint32_t documentsReturned) { _secondPassDocumentsReturned = documentsReturned; } - - uint64_t getSecondPassBytesReturned() const { return _secondPassBytesReturned; } - void setSecondPassBytesReturned(uint32_t bytesReturned) { _secondPassBytesReturned = bytesReturned; } - void print(std::ostream& out, bool verbose, const std::string& indent) const override; private: uint32_t _bucketsVisited; @@ -40,8 +34,6 @@ private: uint64_t _bytesVisited; uint64_t _documentsReturned; uint64_t _bytesReturned; - uint64_t _secondPassDocumentsReturned; // TODO remove on Vespa 8 - uint64_t _secondPassBytesReturned; // TODO remove on Vespa 8 }; } |