aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@oath.com>2018-03-16 22:03:09 +0100
committerHenning Baldersheim <balder@oath.com>2018-03-19 09:59:20 +0100
commit9335569e415a04beaab3ebcb62e02faf37be7ad3 (patch)
tree0468dce784c03994f0de8e70a5ad9be3da109dbe
parentf52a07e96ccf1baf2b4bbfa148bff540ba35357d (diff)
Remove MultiOperation
Conflicts: storage/src/tests/persistence/filestorage/filestormanagertest.cpp storage/src/vespa/storage/persistence/persistencethread.cpp Fix merge conflict.
-rw-r--r--documentapi/src/tests/policies/policies_test.cpp23
-rw-r--r--documentapi/src/vespa/documentapi/documentapi.h1
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/documentprotocol.h4
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/messages/CMakeLists.txt1
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/messages/multioperationmessage.cpp128
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/messages/multioperationmessage.h66
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/messages/writedocumentreply.h2
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/policies/documentrouteselectorpolicy.cpp14
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/policies/storagepolicy.cpp4
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/routablefactories50.cpp45
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/routablefactories50.h13
-rw-r--r--storage/src/tests/distributor/splitbuckettest.cpp1
-rw-r--r--storage/src/tests/persistence/CMakeLists.txt1
-rw-r--r--storage/src/tests/persistence/filestorage/filestormanagertest.cpp157
-rw-r--r--storage/src/tests/persistence/legacyoperationhandlertest.cpp191
-rw-r--r--storage/src/tests/storageserver/changedbucketownershiphandlertest.cpp12
-rw-r--r--storage/src/tests/storageserver/documentapiconvertertest.cpp62
-rw-r--r--storage/src/tests/visiting/visitormanagertest.cpp3
-rw-r--r--storage/src/tests/visiting/visitortest.cpp6
-rw-r--r--storage/src/vespa/storage/bucketdb/bucketmanager.cpp1
-rw-r--r--storage/src/vespa/storage/common/messagebucket.cpp21
-rw-r--r--storage/src/vespa/storage/distributor/bucketdbupdater.cpp1
-rw-r--r--storage/src/vespa/storage/distributor/distributor.cpp1
-rw-r--r--storage/src/vespa/storage/distributor/externaloperationhandler.cpp20
-rw-r--r--storage/src/vespa/storage/distributor/externaloperationhandler.h1
-rw-r--r--storage/src/vespa/storage/distributor/idealstatemanager.cpp1
-rw-r--r--storage/src/vespa/storage/distributor/operations/external/CMakeLists.txt2
-rw-r--r--storage/src/vespa/storage/distributor/operations/external/multioperationoperation.cpp249
-rw-r--r--storage/src/vespa/storage/distributor/operations/external/multioperationoperation.h53
-rw-r--r--storage/src/vespa/storage/distributor/operations/idealstate/mergeoperation.cpp1
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp6
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/filestormanager.cpp11
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/filestormanager.h1
-rw-r--r--storage/src/vespa/storage/persistence/persistencethread.cpp61
-rw-r--r--storage/src/vespa/storage/persistence/persistencethread.h1
-rw-r--r--storage/src/vespa/storage/storageserver/bouncer.cpp2
-rw-r--r--storage/src/vespa/storage/storageserver/changedbucketownershiphandler.cpp1
-rw-r--r--storage/src/vespa/storage/storageserver/changedbucketownershiphandler.h1
-rw-r--r--storage/src/vespa/storage/storageserver/communicationmanager.cpp4
-rw-r--r--storage/src/vespa/storage/storageserver/documentapiconverter.cpp24
-rw-r--r--storage/src/vespa/storage/storageserver/documentapiconverter.h4
-rw-r--r--storage/src/vespa/storage/visiting/CMakeLists.txt1
-rw-r--r--storage/src/vespa/storage/visiting/dumpvisitor.cpp133
-rw-r--r--storage/src/vespa/storage/visiting/dumpvisitor.h58
-rw-r--r--storage/src/vespa/storage/visiting/dumpvisitorsingle.cpp11
-rw-r--r--storage/src/vespa/storage/visiting/visitormanager.cpp12
-rw-r--r--storageapi/src/tests/mbusprot/mbusprot.4.2.serialization.V_4_2_STABLE4
-rw-r--r--storageapi/src/tests/mbusprot/storageprotocoltest.cpp27
-rw-r--r--storageapi/src/vespa/storageapi/mbusprot/protocolserialization.cpp31
-rw-r--r--storageapi/src/vespa/storageapi/mbusprot/protocolserialization.h15
-rw-r--r--storageapi/src/vespa/storageapi/mbusprot/protocolserialization4_2.cpp50
-rw-r--r--storageapi/src/vespa/storageapi/mbusprot/protocolserialization4_2.h9
-rw-r--r--storageapi/src/vespa/storageapi/mbusprot/protocolserialization5_0.cpp27
-rw-r--r--storageapi/src/vespa/storageapi/mbusprot/protocolserialization5_0.h8
-rw-r--r--storageapi/src/vespa/storageapi/mbusprot/protocolserialization5_1.cpp22
-rw-r--r--storageapi/src/vespa/storageapi/mbusprot/storagecommand.cpp4
-rw-r--r--storageapi/src/vespa/storageapi/mbusprot/storagecommand.h2
-rw-r--r--storageapi/src/vespa/storageapi/mbusprot/storagereply.cpp11
-rw-r--r--storageapi/src/vespa/storageapi/mbusprot/storagereply.h4
-rw-r--r--storageapi/src/vespa/storageapi/message/CMakeLists.txt1
-rw-r--r--storageapi/src/vespa/storageapi/message/batch.cpp1
-rw-r--r--storageapi/src/vespa/storageapi/message/batch.h4
-rw-r--r--storageapi/src/vespa/storageapi/message/bucketsplitting.h6
-rw-r--r--storageapi/src/vespa/storageapi/message/multioperation.cpp108
-rw-r--r--storageapi/src/vespa/storageapi/message/multioperation.h92
-rw-r--r--storageapi/src/vespa/storageapi/message/removelocation.cpp6
-rw-r--r--storageapi/src/vespa/storageapi/message/removelocation.h4
-rw-r--r--storageapi/src/vespa/storageapi/message/visitor.h7
-rw-r--r--storageapi/src/vespa/storageapi/messageapi/messagehandler.h8
-rw-r--r--storageapi/src/vespa/storageapi/messageapi/storagemessage.cpp3
-rw-r--r--storageapi/src/vespa/storageapi/messageapi/storagemessage.h4
-rwxr-xr-xvespamalloc/bin/parsememorydump.pl6
72 files changed, 74 insertions, 1806 deletions
diff --git a/documentapi/src/tests/policies/policies_test.cpp b/documentapi/src/tests/policies/policies_test.cpp
index cc598aef786..bffbefb6ff1 100644
--- a/documentapi/src/tests/policies/policies_test.cpp
+++ b/documentapi/src/tests/policies/policies_test.cpp
@@ -617,29 +617,6 @@ Test::testDocumentRouteSelector()
frame.setMessage(std::move(put));
EXPECT_TRUE(frame.testSelect( StringList().add("foo")));
- {
- vdslib::OperationList opList;
-
- DocumentId id("doc:scheme:");
- Document::UP doc(new Document(*_docType, id));
- opList.addPut(std::move(doc));
-
- document::BucketIdFactory factory;
- put = frame.setMessage(MultiOperationMessage::create(_repo, factory.getBucketId(id), opList));
- EXPECT_TRUE(frame.testSelect(StringList().add("foo")));
- }
-
- {
- vdslib::OperationList opList;
- DocumentId id("doc:scheme:");
- Document::UP doc(new Document(*_repo->getDocumentType("other"), id));
- opList.addPut(std::move(doc));
-
- document::BucketIdFactory factory;
- put = frame.setMessage(MultiOperationMessage::create(_repo, factory.getBucketId(id), opList));
- EXPECT_TRUE(frame.testSelect(StringList().add("bar")));
- }
-
frame.setMessage(mbus::Message::UP(new RemoveDocumentMessage(DocumentId("doc:scheme:"))));
EXPECT_TRUE(frame.testSelect(StringList().add("foo").add("bar")));
diff --git a/documentapi/src/vespa/documentapi/documentapi.h b/documentapi/src/vespa/documentapi/documentapi.h
index a64fbc866d8..dff4125e624 100644
--- a/documentapi/src/vespa/documentapi/documentapi.h
+++ b/documentapi/src/vespa/documentapi/documentapi.h
@@ -15,7 +15,6 @@
#include <vespa/documentapi/messagebus/messages/updatedocumentmessage.h>
#include <vespa/documentapi/messagebus/messages/searchresultmessage.h>
#include <vespa/documentapi/messagebus/messages/visitor.h>
-#include <vespa/documentapi/messagebus/messages/multioperationmessage.h>
#include <vespa/documentapi/messagebus/messages/documentsummarymessage.h>
#include <vespa/documentapi/messagebus/messages/wrongdistributionreply.h>
#include <vespa/documentapi/messagebus/messages/getbucketlistmessage.h>
diff --git a/documentapi/src/vespa/documentapi/messagebus/documentprotocol.h b/documentapi/src/vespa/documentapi/messagebus/documentprotocol.h
index c3417d85197..aea3f390c71 100644
--- a/documentapi/src/vespa/documentapi/messagebus/documentprotocol.h
+++ b/documentapi/src/vespa/documentapi/messagebus/documentprotocol.h
@@ -59,7 +59,7 @@ public:
MESSAGE_DESTROYVISITOR = DOCUMENT_MESSAGE + 8,
MESSAGE_VISITORINFO = DOCUMENT_MESSAGE + 9,
MESSAGE_SEARCHRESULT = DOCUMENT_MESSAGE + 11,
- MESSAGE_MULTIOPERATION = DOCUMENT_MESSAGE + 13,
+ //MESSAGE_MULTIOPERATION = DOCUMENT_MESSAGE + 13,
MESSAGE_DOCUMENTSUMMARY = DOCUMENT_MESSAGE + 14,
MESSAGE_MAPVISITOR = DOCUMENT_MESSAGE + 15,
MESSAGE_GETBUCKETSTATE = DOCUMENT_MESSAGE + 18,
@@ -83,7 +83,7 @@ public:
REPLY_DESTROYVISITOR = DOCUMENT_REPLY + 8,
REPLY_VISITORINFO = DOCUMENT_REPLY + 9,
REPLY_SEARCHRESULT = DOCUMENT_REPLY + 11,
- REPLY_MULTIOPERATION = DOCUMENT_REPLY + 13,
+ //REPLY_MULTIOPERATION = DOCUMENT_REPLY + 13,
REPLY_DOCUMENTSUMMARY = DOCUMENT_REPLY + 14,
REPLY_MAPVISITOR = DOCUMENT_REPLY + 15,
REPLY_GETBUCKETSTATE = DOCUMENT_REPLY + 18,
diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/CMakeLists.txt b/documentapi/src/vespa/documentapi/messagebus/messages/CMakeLists.txt
index f55e7782901..3fa7e6086e9 100644
--- a/documentapi/src/vespa/documentapi/messagebus/messages/CMakeLists.txt
+++ b/documentapi/src/vespa/documentapi/messagebus/messages/CMakeLists.txt
@@ -18,7 +18,6 @@ vespa_add_library(documentapi_documentapimessages OBJECT
getbucketstatereply.cpp
getdocumentmessage.cpp
getdocumentreply.cpp
- multioperationmessage.cpp
putdocumentmessage.cpp
queryresultmessage.cpp
removedocumentmessage.cpp
diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/multioperationmessage.cpp b/documentapi/src/vespa/documentapi/messagebus/messages/multioperationmessage.cpp
deleted file mode 100644
index 0512ef1e76e..00000000000
--- a/documentapi/src/vespa/documentapi/messagebus/messages/multioperationmessage.cpp
+++ /dev/null
@@ -1,128 +0,0 @@
-// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-
-#include "multioperationmessage.h"
-#include <vespa/vdslib/container/mutabledocumentlist.h>
-#include <vespa/vespalib/util/exceptions.h>
-#include <vespa/document/update/documentupdate.h>
-#include <vespa/document/bucket/bucketidfactory.h>
-
-namespace documentapi {
-
-MultiOperationMessage::MultiOperationMessage(const document::DocumentTypeRepo::SP & repo, const document::BucketId& bucketId) :
- VisitorMessage(),
- _bucketId(bucketId),
- _buffer(0),
- _operations(repo, 0, 0),
- _keepTimeStamps(false)
-{
-}
-
-MultiOperationMessage::MultiOperationMessage(const document::DocumentTypeRepo::SP & repo, const document::BucketId& bucketId, int bufferSize) :
- VisitorMessage(),
- _bucketId(bucketId),
- _buffer(bufferSize),
- _operations(repo, &_buffer[0], _buffer.size(), false),
- _keepTimeStamps(false)
-{
-}
-
-
-MultiOperationMessage::MultiOperationMessage(const document::DocumentTypeRepo::SP & repo,
- const document::BucketId& bucketId,
- const std::vector<char> &buffer,
- bool timeStamps) :
- VisitorMessage(),
- _bucketId(bucketId),
- _operations(repo, 0, 0),
- _keepTimeStamps(timeStamps)
-{
- setOperations(repo, buffer);
-}
-
-MultiOperationMessage::MultiOperationMessage(const document::BucketId& bucketId,
- vdslib::DocumentList &operations,
- bool timeStamps) :
- VisitorMessage(),
- _bucketId(bucketId),
- _buffer(),
- _operations(operations.getTypeRepo(), 0, 0),
- _keepTimeStamps(timeStamps)
-{
- _buffer.resize(operations.getBufferSize());
- memcpy(&_buffer[0], operations.getBuffer(), _buffer.size());
- _operations = vdslib::DocumentList(operations.getTypeRepo(), &_buffer[0], _buffer.size(), true);
-}
-
-MultiOperationMessage::~MultiOperationMessage() {
-}
-
-void
-MultiOperationMessage::setOperations(const document::DocumentTypeRepo::SP & repo, const std::vector<char> &buffer)
-{
- _buffer = buffer;
- if (_buffer.size() > 0) {
- _operations = vdslib::DocumentList(repo, &_buffer[0], _buffer.size(), true);
- }
- verifyBucketId();
-}
-
-void
-MultiOperationMessage::setOperations(vdslib::DocumentList &operations)
-{
- if (&_buffer[0] == operations.getBuffer()) {
- _buffer.resize(operations.getBufferSize());
- } else {
- _buffer.resize(operations.getBufferSize());
- memcpy(&_buffer[0], operations.getBuffer(), _buffer.size());
- }
- _operations = vdslib::DocumentList(operations.getTypeRepo(), &_buffer[0], _buffer.size(), true);
- verifyBucketId();
-}
-
-void
-MultiOperationMessage::verifyBucketId() const {
- document::BucketIdFactory fac;
-
- for (vdslib::DocumentList::const_iterator iter = _operations.begin();
- iter != _operations.end();
- iter++) {
- document::DocumentId docId = iter->getDocumentId();
- document::BucketId bucketId = fac.getBucketId(docId);
- bucketId.setUsedBits(_bucketId.getUsedBits());
- if (bucketId != _bucketId) {
- throw vespalib::IllegalArgumentException(vespalib::make_string("Operations added to a MultiOperationMessage must belong to the specified bucketId. Document %s with bucket id %s does not match bucket id %s", docId.toString().c_str(), bucketId.toString().c_str(), _bucketId.toString().c_str()));
- }
- }
-}
-
-mbus::Message::UP
-MultiOperationMessage::create(const document::DocumentTypeRepo::SP & repo, const document::BucketId& bucketId, const vdslib::OperationList &opl) {
- std::unique_ptr<MultiOperationMessage> msg(
- new MultiOperationMessage(repo, bucketId, opl.getRequiredBufferSize()));
- std::vector<char> &buf = msg->getBuffer();
- vdslib::MutableDocumentList mdl(repo, &(buf[0]), buf.size());
- if (! mdl.addOperationList(opl)) {
- abort();
- }
- msg->setOperations(mdl);
- return mbus::Message::UP(msg.release());
-}
-
-uint32_t
-MultiOperationMessage::getApproxSize() const
-{
- return _operations.getBufferSize();
-}
-
-DocumentReply::UP
-MultiOperationMessage::doCreateReply() const
-{
- return DocumentReply::UP(new VisitorReply(DocumentProtocol::REPLY_MULTIOPERATION));
-}
-
-uint32_t MultiOperationMessage::getType() const
-{
- return DocumentProtocol::MESSAGE_MULTIOPERATION;
-}
-
-}
diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/multioperationmessage.h b/documentapi/src/vespa/documentapi/messagebus/messages/multioperationmessage.h
deleted file mode 100644
index 7a8f0833f0c..00000000000
--- a/documentapi/src/vespa/documentapi/messagebus/messages/multioperationmessage.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#pragma once
-
-#include "visitor.h"
-#include "documentreply.h"
-#include <vespa/vdslib/container/parameters.h>
-#include <vespa/vdslib/container/documentlist.h>
-#include <vespa/vdslib/container/operationlist.h>
-#include <vespa/document/bucket/bucketid.h>
-#include <vespa/documentapi/messagebus/documentprotocol.h>
-
-namespace documentapi {
-
-/**
- * @class MultiOperationMessage
- * @ingroup message
- *
- * @brief Encapsulates a set of operations (PUT, REMOVE, UPDATE).
- */
-class MultiOperationMessage : public VisitorMessage {
-private:
- document::BucketId _bucketId;
- std::vector<char> _buffer;
- vdslib::DocumentList _operations;
- bool _keepTimeStamps;
-
-protected:
- DocumentReply::UP doCreateReply() const override;
-
-public:
- typedef std::unique_ptr<MultiOperationMessage> UP;
-
- MultiOperationMessage(const document::DocumentTypeRepo::SP & repo, const document::BucketId& bucketId);
- MultiOperationMessage(const document::DocumentTypeRepo::SP & repo, const document::BucketId& bucketId, int bufferSize);
- MultiOperationMessage(const document::DocumentTypeRepo::SP & repo, const document::BucketId& bucketId,
- const std::vector<char>& buffer, bool keepTimeStamps = false);
- MultiOperationMessage(const document::BucketId& bucketId, vdslib::DocumentList& docList, bool keepTimeStamps = false);
- ~MultiOperationMessage();
-
- static mbus::Message::UP create(const document::DocumentTypeRepo::SP & repo, const document::BucketId& bucketId, const vdslib::OperationList& operations);
-
- std::vector<char>& getBuffer() { return _buffer; }
- const std::vector<char>& getBuffer() const { return _buffer; }
-
- void setOperations(const document::DocumentTypeRepo::SP & repo, const std::vector<char>& buffer);
- void setOperations(vdslib::DocumentList& operations);
- const vdslib::DocumentList& getOperations() const { return _operations; }
-
- void serialize(document::ByteBuffer& buf) const;
-
- uint32_t getApproxSize() const override;
-
- uint32_t getType() const override;
- const document::BucketId& getBucketId() const { return _bucketId; }
-
- bool keepTimeStamps() const { return _keepTimeStamps;}
- void keepTimeStamps(bool b) { _keepTimeStamps = b;}
-
- string toString() const override { return "multioperationmessage"; }
-
-private:
- void verifyBucketId() const;
-};
-
-}
-
diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/writedocumentreply.h b/documentapi/src/vespa/documentapi/messagebus/messages/writedocumentreply.h
index 01730bde359..f8c5c6335d5 100644
--- a/documentapi/src/vespa/documentapi/messagebus/messages/writedocumentreply.h
+++ b/documentapi/src/vespa/documentapi/messagebus/messages/writedocumentreply.h
@@ -7,7 +7,7 @@ namespace documentapi {
/**
* This reply class is used by operations that perform writes to VDS/search,
- * that is: Put, Remove, Update, MultiOperation.
+ * that is: Put, Remove, Update.
*/
class WriteDocumentReply : public DocumentAcceptedReply {
private:
diff --git a/documentapi/src/vespa/documentapi/messagebus/policies/documentrouteselectorpolicy.cpp b/documentapi/src/vespa/documentapi/messagebus/policies/documentrouteselectorpolicy.cpp
index c763723ada1..42120b8052a 100644
--- a/documentapi/src/vespa/documentapi/messagebus/policies/documentrouteselectorpolicy.cpp
+++ b/documentapi/src/vespa/documentapi/messagebus/policies/documentrouteselectorpolicy.cpp
@@ -5,7 +5,6 @@
#include <vespa/document/select/parser.h>
#include <vespa/documentapi/messagebus/documentprotocol.h>
#include <vespa/documentapi/messagebus/messages/batchdocumentupdatemessage.h>
-#include <vespa/documentapi/messagebus/messages/multioperationmessage.h>
#include <vespa/documentapi/messagebus/messages/putdocumentmessage.h>
#include <vespa/documentapi/messagebus/messages/updatedocumentmessage.h>
#include <vespa/documentapi/messagebus/messages/documentignoredreply.h>
@@ -140,19 +139,6 @@ DocumentRouteSelectorPolicy::select(mbus::RoutingContext &context, const vespali
}
}
- case DocumentProtocol::MESSAGE_MULTIOPERATION:
- {
- const MultiOperationMessage& mom = static_cast<const MultiOperationMessage&>(msg);
- for (vdslib::DocumentList::const_iterator iter = mom.getOperations().begin();
- iter != mom.getOperations().end();
- iter++) {
- document::Document::UP doc = iter->getDocument();
- if (it->second->contains(*doc) == Result::False) {
- return false;
- }
- }
- return true;
- }
case DocumentProtocol::MESSAGE_BATCHDOCUMENTUPDATE:
{
const BatchDocumentUpdateMessage& mom = static_cast<const BatchDocumentUpdateMessage&>(msg);
diff --git a/documentapi/src/vespa/documentapi/messagebus/policies/storagepolicy.cpp b/documentapi/src/vespa/documentapi/messagebus/policies/storagepolicy.cpp
index b7b451e8ddf..723c6fc836a 100644
--- a/documentapi/src/vespa/documentapi/messagebus/policies/storagepolicy.cpp
+++ b/documentapi/src/vespa/documentapi/messagebus/policies/storagepolicy.cpp
@@ -134,10 +134,6 @@ StoragePolicy::doSelect(mbus::RoutingContext &context)
id = _bucketIdFactory.getBucketId(static_cast<const UpdateDocumentMessage&>(msg).getDocumentUpdate().getId());
break;
- case DocumentProtocol::MESSAGE_MULTIOPERATION:
- id = (static_cast<const MultiOperationMessage&>(msg)).getBucketId();
- break;
-
case DocumentProtocol::MESSAGE_STATBUCKET:
id = static_cast<const StatBucketMessage&>(msg).getBucketId();
break;
diff --git a/documentapi/src/vespa/documentapi/messagebus/routablefactories50.cpp b/documentapi/src/vespa/documentapi/messagebus/routablefactories50.cpp
index 7eb227cd382..b5a4a8306b1 100644
--- a/documentapi/src/vespa/documentapi/messagebus/routablefactories50.cpp
+++ b/documentapi/src/vespa/documentapi/messagebus/routablefactories50.cpp
@@ -618,51 +618,6 @@ RoutableFactories50::MapVisitorReplyFactory::doEncode(const DocumentReply &obj,
return true;
}
-DocumentMessage::UP
-RoutableFactories50::MultiOperationMessageFactory::doDecode(document::ByteBuffer &buf) const
-{
- int64_t bucketId = decodeLong(buf);
-
- int32_t len = decodeInt(buf);
- std::vector<char> tmp(len);
- buf.getBytes(&tmp[0], len);
-
- DocumentMessage::UP ret(new MultiOperationMessage(_repo, document::BucketId(bucketId), tmp, decodeBoolean(buf)));
- return ret;
-}
-
-bool
-RoutableFactories50::MultiOperationMessageFactory::doEncode(const DocumentMessage &obj, vespalib::GrowableByteBuffer &buf) const
-{
- const MultiOperationMessage &msg = static_cast<const MultiOperationMessage&>(obj);
- buf.putLong(msg.getBucketId().getRawId());
-
- uint64_t docBlockSize = msg.getOperations().spaceNeeded();
- buf.putInt(docBlockSize);
- char* pos = buf.allocate(docBlockSize);
- vdslib::DocumentList copy(msg.getOperations(), pos, docBlockSize);
-
- buf.putBoolean(msg.keepTimeStamps());
-
- return true;
-}
-
-DocumentReply::UP
-RoutableFactories50::MultiOperationReplyFactory::doDecode(document::ByteBuffer &buf) const
-{
- WriteDocumentReply* reply = new WriteDocumentReply(DocumentProtocol::REPLY_MULTIOPERATION);
- reply->setHighestModificationTimestamp(decodeLong(buf));
- return DocumentReply::UP(reply);
-}
-
-bool
-RoutableFactories50::MultiOperationReplyFactory::doEncode(const DocumentReply &obj, vespalib::GrowableByteBuffer &buf) const
-{
- const WriteDocumentReply& reply = (const WriteDocumentReply&)obj;
- buf.putLong(reply.getHighestModificationTimestamp());
- return true;
-}
-
void
RoutableFactories50::PutDocumentMessageFactory::decodeInto(PutDocumentMessage & msg, document::ByteBuffer & buf) const {
msg.setDocument(make_shared<document::Document>(_repo, buf));
diff --git a/documentapi/src/vespa/documentapi/messagebus/routablefactories50.h b/documentapi/src/vespa/documentapi/messagebus/routablefactories50.h
index 4ca069f3f9a..37a7f6d7e61 100644
--- a/documentapi/src/vespa/documentapi/messagebus/routablefactories50.h
+++ b/documentapi/src/vespa/documentapi/messagebus/routablefactories50.h
@@ -280,19 +280,6 @@ public:
DocumentReply::UP doDecode(document::ByteBuffer &buf) const override;
bool doEncode(const DocumentReply &reply, vespalib::GrowableByteBuffer &buf) const override;
};
- class MultiOperationMessageFactory : public DocumentMessageFactory {
- document::DocumentTypeRepo::SP _repo;
- protected:
- DocumentMessage::UP doDecode(document::ByteBuffer &buf) const override;
- bool doEncode(const DocumentMessage &msg, vespalib::GrowableByteBuffer &buf) const override;
- public:
- MultiOperationMessageFactory(const document::DocumentTypeRepo::SP &r) : _repo(r) {}
- };
- class MultiOperationReplyFactory : public DocumentReplyFactory {
- protected:
- DocumentReply::UP doDecode(document::ByteBuffer &buf) const override;
- bool doEncode(const DocumentReply &reply, vespalib::GrowableByteBuffer &buf) const override;
- };
class PutDocumentMessageFactory : public DocumentMessageFactory {
protected:
const document::DocumentTypeRepo &_repo;
diff --git a/storage/src/tests/distributor/splitbuckettest.cpp b/storage/src/tests/distributor/splitbuckettest.cpp
index e0986930e1d..aead043e120 100644
--- a/storage/src/tests/distributor/splitbuckettest.cpp
+++ b/storage/src/tests/distributor/splitbuckettest.cpp
@@ -7,7 +7,6 @@
#include <vespa/document/base/documentid.h>
#include <vespa/storageapi/message/persistence.h>
#include <vespa/storage/distributor/idealstatemanager.h>
-#include <vespa/storageapi/message/multioperation.h>
#include <tests/distributor/distributortestutil.h>
#include <vespa/document/test/make_document_bucket.h>
#include <vespa/storage/distributor/distributor.h>
diff --git a/storage/src/tests/persistence/CMakeLists.txt b/storage/src/tests/persistence/CMakeLists.txt
index 07b71dbae8a..fb0337f0953 100644
--- a/storage/src/tests/persistence/CMakeLists.txt
+++ b/storage/src/tests/persistence/CMakeLists.txt
@@ -3,7 +3,6 @@ vespa_add_library(storage_testpersistence TEST
SOURCES
bucketownershipnotifiertest.cpp
diskmoveoperationhandlertest.cpp
- legacyoperationhandlertest.cpp
mergehandlertest.cpp
persistencequeuetest.cpp
persistencetestutils.cpp
diff --git a/storage/src/tests/persistence/filestorage/filestormanagertest.cpp b/storage/src/tests/persistence/filestorage/filestormanagertest.cpp
index 248fb1e5203..70890a7c1d3 100644
--- a/storage/src/tests/persistence/filestorage/filestormanagertest.cpp
+++ b/storage/src/tests/persistence/filestorage/filestormanagertest.cpp
@@ -26,9 +26,6 @@
#include <vespa/vespalib/util/stringfmt.h>
#include <vespa/storageapi/message/bucket.h>
#include <vespa/storageapi/message/bucketsplitting.h>
-#include <vespa/storageapi/message/multioperation.h>
-#include <vespa/storageapi/message/persistence.h>
-#include <vespa/storageapi/message/removelocation.h>
#include <vespa/persistence/dummyimpl/dummypersistence.h>
#include <vespa/persistence/spi/test.h>
#include <vespa/storageapi/message/batch.h>
@@ -103,7 +100,6 @@ struct FileStorManagerTest : public CppUnit::TestFixture {
void testDeleteBucketWithInvalidBucketInfo();
void testNoTimestamps();
void testEqualTimestamps();
- void testMultiOp();
void testGetIter();
void testSetBucketActiveState();
void testNotifyOwnerDistributorOnOutdatedSetBucketState();
@@ -141,7 +137,6 @@ struct FileStorManagerTest : public CppUnit::TestFixture {
CPPUNIT_TEST(testDeleteBucketWithInvalidBucketInfo);
CPPUNIT_TEST(testNoTimestamps);
CPPUNIT_TEST(testEqualTimestamps);
- CPPUNIT_TEST(testMultiOp);
CPPUNIT_TEST(testGetIter);
CPPUNIT_TEST(testSetBucketActiveState);
CPPUNIT_TEST(testNotifyOwnerDistributorOnOutdatedSetBucketState);
@@ -2579,158 +2574,6 @@ FileStorManagerTest::testEqualTimestamps()
}
void
-FileStorManagerTest::testMultiOp()
-{
- TestName testName("testMultiOp");
- // Setting up manager
- DummyStorageLink top;
- FileStorManager *manager;
- top.push_back(unique_ptr<StorageLink>(manager =
- new FileStorManager(config->getConfigId(), _node->getPartitions(), _node->getPersistenceProvider(), _node->getComponentRegister())));
- top.open();
- api::StorageMessageAddress address(
- "storage", lib::NodeType::STORAGE, 3);
-
- createBucket(document::BucketId(16, 0), 0);
-
- // Add some documents to remove/update later
- for (uint32_t i=0; i<10; ++i) {
- std::ostringstream did;
- did << "userdoc:crawler:0:http://www.ntnu.no/" << i;
- Document::SP doc(createDocument(
- "some content", did.str()).release());
- doc->set("headerval", (int) i);
- doc->set("content", "some content");
- std::shared_ptr<api::PutCommand> cmd(
- new api::PutCommand(makeDocumentBucket(document::BucketId(16, 0)), doc, 100 + i));
- cmd->setAddress(address);
- top.sendDown(cmd);
- top.waitForMessages(1, _waitTime);
- CPPUNIT_ASSERT_EQUAL((size_t) 1, top.getNumReplies());
- std::shared_ptr<api::PutReply> reply(
- std::dynamic_pointer_cast<api::PutReply>(
- top.getReply(0)));
- top.reset();
- CPPUNIT_ASSERT(reply.get());
- CPPUNIT_ASSERT_EQUAL(ReturnCode(ReturnCode::OK), reply->getResult());
- }
- document::DocumentTypeRepo::SP repo = _node->getTypeRepo();
-
- // Create operation list
- std::vector<char> buffer(1024 * 1024);
- vdslib::WritableDocumentList mdl(repo, &buffer[0], buffer.size());
- for (uint32_t i=10; i<15; ++i) {
- std::ostringstream did;
- did << "userdoc:crawler:0:http://www.ntnu.no/" << i;
- mdl.addPut(*createDocument("foo bar", did.str()),
- 1000 + i);
- }
- for (uint32_t i=4; i<8; ++i) {
- std::ostringstream did;
- did << "userdoc:crawler:0:http://www.ntnu.no/" << i;
- mdl.addRemove(document::DocumentId(did.str()), 2000 + i);
- }
- for (uint32_t i=1; i<3; ++i) {
- std::ostringstream did;
- did << "userdoc:crawler:0:http://www.ntnu.no/" << i;
- document::DocumentUpdate update(*_testdoctype1,
- document::DocumentId(did.str()));
- if (i % 2 == 0) {
- document::FieldUpdate fupd(_testdoctype1->getField("content"));
- fupd.addUpdate(document::AssignValueUpdate(
- document::StringFieldValue("baah")));
- update.addUpdate(fupd);
- } else {
- document::FieldUpdate fupd(_testdoctype1->getField("headerval"));
- fupd.addUpdate(document::AssignValueUpdate(
- document::IntFieldValue(i + 100)));
- update.addUpdate(fupd);
- }
- mdl.addUpdate(update, 3000 + i);
- }
- // Add a non-existing update
- {
- std::ostringstream did;
- did << "userdoc:crawler:0:http://www.ntnu.no/nonexisting1";
- document::DocumentUpdate update(*_testdoctype1,
- document::DocumentId(did.str()));
- document::FieldUpdate fupd(_testdoctype1->getField("content"));
- fupd.addUpdate(document::AssignValueUpdate(
- document::StringFieldValue("baah")));
- update.addUpdate(fupd);
- mdl.addUpdate(update, 4000);
- }
-
- // Issue operation.
- {
- std::shared_ptr<api::MultiOperationCommand> cmd(
- new api::MultiOperationCommand(
- repo, makeDocumentBucket(document::BucketId(16, 0)), buffer));
- cmd->setAddress(address);
- top.sendDown(cmd);
- top.waitForMessages(1, _waitTime);
- CPPUNIT_ASSERT_EQUAL((size_t) 1, top.getNumReplies());
- std::shared_ptr<api::MultiOperationReply> reply(
- std::dynamic_pointer_cast<api::MultiOperationReply>(
- top.getReply(0)));
- top.reset();
- CPPUNIT_ASSERT(reply.get());
- CPPUNIT_ASSERT_EQUAL(ReturnCode(ReturnCode::OK),
- reply->getResult());
- }
- // Verify that new documents exist and that removed are gone.
- // Removing it
- for (uint32_t i=0; i<16; ++i) {
- std::ostringstream did;
- did << "userdoc:crawler:0:http://www.ntnu.no/" << i;
- std::shared_ptr<api::GetCommand> cmd(new api::GetCommand(
- makeDocumentBucket(document::BucketId(16, 0)), document::DocumentId(did.str()),
- "[all]"));
- cmd->setAddress(address);
- top.sendDown(cmd);
- top.waitForMessages(1, _waitTime);
- CPPUNIT_ASSERT_EQUAL((size_t) 1, top.getNumReplies());
- std::shared_ptr<api::GetReply> reply3(
- std::dynamic_pointer_cast<api::GetReply>(
- top.getReply(0)));
- top.reset();
- CPPUNIT_ASSERT(reply3.get());
- if (i < 4 || (i >= 8 && i < 15)) {
- CPPUNIT_ASSERT_EQUAL(ReturnCode(ReturnCode::OK),
- reply3->getResult());
- CPPUNIT_ASSERT_EQUAL(vespalib::string(did.str()),
- reply3->getDocumentId().toString());
- if (i >= 10) {
- CPPUNIT_ASSERT(!reply3->getDocument()->hasValue("headerval"));
- CPPUNIT_ASSERT(reply3->getDocument()->hasValue("content"));
- } else if (i >= 1 && i <3) {
- CPPUNIT_ASSERT(reply3->getDocument()->hasValue("headerval"));
- CPPUNIT_ASSERT(reply3->getDocument()->hasValue("content"));
- CPPUNIT_ASSERT_EQUAL(
- static_cast<const document::FieldValue&>(
- document::IntFieldValue(i % 2 == 0 ? i : i + 100)),
- *reply3->getDocument()->getValue("headerval"));
- CPPUNIT_ASSERT_EQUAL(
- static_cast<const document::FieldValue&>(
- document::StringFieldValue(i % 2 == 0 ? "baah" : "some content")),
- *reply3->getDocument()->getValue("content"));
- } else {
- CPPUNIT_ASSERT(reply3->getDocument()->hasValue("headerval"));
- CPPUNIT_ASSERT(reply3->getDocument()->hasValue("content"));
- CPPUNIT_ASSERT_EQUAL(
- static_cast<const document::FieldValue&>(
- document::IntFieldValue(i)),
- *reply3->getDocument()->getValue("headerval"));
- }
- } else {
- CPPUNIT_ASSERT_EQUAL(false, reply3->wasFound());
- CPPUNIT_ASSERT_EQUAL(vespalib::string(did.str()),
- reply3->getDocumentId().toString());
- }
- }
-}
-
-void
FileStorManagerTest::testGetIter()
{
TestName testName("testGetIter");
diff --git a/storage/src/tests/persistence/legacyoperationhandlertest.cpp b/storage/src/tests/persistence/legacyoperationhandlertest.cpp
deleted file mode 100644
index 817f85eedc5..00000000000
--- a/storage/src/tests/persistence/legacyoperationhandlertest.cpp
+++ /dev/null
@@ -1,191 +0,0 @@
-// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-
-#include <vespa/document/base/testdocrepo.h>
-#include <vespa/documentapi/loadtypes/loadtype.h>
-#include <vespa/storage/persistence/messages.h>
-#include <vespa/vdstestlib/cppunit/macros.h>
-#include <vespa/storageapi/message/multioperation.h>
-#include <vespa/persistence/spi/test.h>
-#include <vespa/persistence/dummyimpl/dummypersistence.h>
-#include <tests/persistence/persistencetestutils.h>
-#include <vespa/document/test/make_document_bucket.h>
-
-using document::DocumentTypeRepo;
-using document::TestDocRepo;
-using storage::spi::test::makeSpiBucket;
-using document::test::makeDocumentBucket;
-
-namespace storage {
-
-class LegacyOperationHandlerTest : public SingleDiskPersistenceTestUtils
-{
- CPPUNIT_TEST_SUITE(LegacyOperationHandlerTest);
- CPPUNIT_TEST(testMultioperationSingleBodyPut);
- CPPUNIT_TEST(testMultioperationSingleRemove);
- CPPUNIT_TEST(testMultioperationSingleUpdate);
- CPPUNIT_TEST(testMultioperationUpdateNotFound);
- CPPUNIT_TEST(testMultioperationMixedOperations);
- CPPUNIT_TEST_SUITE_END();
-
-public:
- void setUp() override {
- SingleDiskPersistenceTestUtils::setUp();
- createBucket(document::BucketId(16, 4));
- spi::Context context(spi::LoadType(0, "default"), spi::Priority(0),
- spi::Trace::TraceLevel(0));
- getPersistenceProvider().createBucket(
- makeSpiBucket(document::BucketId(16, 4)),
- context);
- }
-
- std::string stat() {
- return dumpBucket(document::BucketId(16, 4), 0);
- }
-
- void testMultioperationSingleBodyPut();
- void testMultioperationSingleRemove();
- void testMultioperationSingleUpdate();
- void testMultioperationUpdateNotFound();
- void testMultioperationMixedOperations();
- void testMultioperationMixedOperationsWrongBucket();
-};
-
-CPPUNIT_TEST_SUITE_REGISTRATION(LegacyOperationHandlerTest);
-
-void
-LegacyOperationHandlerTest::testMultioperationSingleBodyPut()
-{
- std::unique_ptr<PersistenceThread> thread(createPersistenceThread(0));
- document::BucketId bucketId(16, 4);
-
- document::Document::SP doc(createRandomDocumentAtLocation(4, 1234, 0, 128));
-
- std::vector<char> buffer(1024);
- vdslib::WritableDocumentList block(getTypeRepo(), &buffer[0], buffer.size());
- block.addPut(*doc, api::Timestamp(1234));
-
- api::MultiOperationCommand cmd(getTypeRepo(), makeDocumentBucket(bucketId), 0);
- cmd.setOperations(block);
-
- thread->handleMultiOperation(cmd);
-
- CPPUNIT_ASSERT_EQUAL(
- std::string("DocEntry(1234, 0, Doc(id:mail:testdoctype1:n=4:3619.html))\n"), stat());
-}
-
-void
-LegacyOperationHandlerTest::testMultioperationSingleRemove()
-{
- std::unique_ptr<PersistenceThread> thread(createPersistenceThread(0));
- document::BucketId bucketId(16, 4);
-
- document::Document::SP doc = doPut(4, spi::Timestamp(1234));
-
- std::vector<char> buffer(1024);
- vdslib::WritableDocumentList block(getTypeRepo(), &buffer[0], buffer.size());
- block.addRemove(doc->getId(), spi::Timestamp(1235));
-
- api::MultiOperationCommand cmd(getTypeRepo(), makeDocumentBucket(bucketId), 0);
- cmd.setOperations(block);
-
- thread->handleMultiOperation(cmd);
-
- CPPUNIT_ASSERT_EQUAL(
- std::string("DocEntry(1234, 0, Doc(id:mail:testdoctype1:n=4:3619.html))\n"
- "DocEntry(1235, 1, id:mail:testdoctype1:n=4:3619.html)\n"), stat());
-}
-
-void
-LegacyOperationHandlerTest::testMultioperationSingleUpdate()
-{
- std::unique_ptr<PersistenceThread> thread(createPersistenceThread(0));
- document::BucketId bucketId(16, 4);
- document::StringFieldValue updateValue("foo");
-
- document::Document::SP doc = doPut(4, spi::Timestamp(1234));
- document::Document originalDoc(*doc);
-
- document::DocumentUpdate::SP update = createBodyUpdate(
- doc->getId(), updateValue);
-
- std::vector<char> buffer(1024);
- vdslib::WritableDocumentList block(getTypeRepo(), &buffer[0], buffer.size());
- block.addUpdate(*update, api::Timestamp(1235));
-
- api::MultiOperationCommand cmd(getTypeRepo(), makeDocumentBucket(bucketId), 0);
- cmd.setOperations(block);
-
- thread->handleMultiOperation(cmd);
-
- CPPUNIT_ASSERT_EQUAL(
- std::string("DocEntry(1234, 0, Doc(id:mail:testdoctype1:n=4:3619.html))\n"
- "DocEntry(1235, 0, Doc(id:mail:testdoctype1:n=4:3619.html))\n"), stat());
-}
-
-void
-LegacyOperationHandlerTest::testMultioperationUpdateNotFound()
-{
- std::unique_ptr<PersistenceThread> thread(createPersistenceThread(0));
- document::BucketId bucketId(16, 4);
- document::DocumentId docId("userdoc:test:4:0");
- document::StringFieldValue updateValue("foo");
-
- document::DocumentUpdate::SP update = createBodyUpdate(
- docId, updateValue);
-
- std::vector<char> buffer(1024);
- vdslib::WritableDocumentList block(getTypeRepo(), &buffer[0], buffer.size());
- block.addUpdate(*update, api::Timestamp(1235));
-
- api::MultiOperationCommand cmd(getTypeRepo(), makeDocumentBucket(bucketId), 0);
- cmd.setOperations(block);
-
- thread->handleMultiOperation(cmd);
-
- CPPUNIT_ASSERT_EQUAL(std::string(""), stat());
-}
-
-void
-LegacyOperationHandlerTest::testMultioperationMixedOperations()
-{
- std::unique_ptr<PersistenceThread> thread(createPersistenceThread(0));
- document::BucketId bucketId(16, 4);
- document::StringFieldValue updateValue("bar");
-
- document::Document::SP originalUpdateDoc = doPut(4, spi::Timestamp(1234));
- document::Document::SP originalRemoveDoc = doPut(4, spi::Timestamp(2345));
-
- document::DocumentUpdate::SP update = createBodyUpdate(
- originalUpdateDoc->getId(), updateValue);
-
- document::DocumentUpdate::SP nonExistingUpdate = createBodyUpdate(
- document::DocumentId("id:test:testdoctype1:n=4:nonexisting1"), updateValue);
-
- document::Document::SP putDoc(createRandomDocumentAtLocation(4, 5678, 0, 128));
-
- std::vector<char> buffer(1024);
- vdslib::WritableDocumentList block(getTypeRepo(), &buffer[0], buffer.size());
-
- block.addUpdate(*update, api::Timestamp(3456));
- block.addUpdate(*nonExistingUpdate, api::Timestamp(3457));
- block.addRemove(originalRemoveDoc->getId(), api::Timestamp(4567));
- block.addRemove(document::DocumentId("id:test:testdoctype1:n=4:nonexisting2"),
- api::Timestamp(4568));
- block.addPut(*putDoc, api::Timestamp(5678));
-
- api::MultiOperationCommand cmd(getTypeRepo(), makeDocumentBucket(bucketId), 0);
- cmd.setOperations(block);
-
- thread->handleMultiOperation(cmd);
-
- CPPUNIT_ASSERT_EQUAL(
- std::string("DocEntry(1234, 0, Doc(id:mail:testdoctype1:n=4:3619.html))\n"
- "DocEntry(2345, 0, Doc(id:mail:testdoctype1:n=4:4008.html))\n"
- "DocEntry(3456, 0, Doc(id:mail:testdoctype1:n=4:3619.html))\n"
- "DocEntry(4567, 1, id:mail:testdoctype1:n=4:4008.html)\n"
- "DocEntry(4568, 1, id:test:testdoctype1:n=4:nonexisting2)\n"
- "DocEntry(5678, 0, Doc(id:mail:testdoctype1:n=4:5177.html))\n"),
- stat());
-}
-
-}
diff --git a/storage/src/tests/storageserver/changedbucketownershiphandlertest.cpp b/storage/src/tests/storageserver/changedbucketownershiphandlertest.cpp
index 18e93d00494..b035ea93ddf 100644
--- a/storage/src/tests/storageserver/changedbucketownershiphandlertest.cpp
+++ b/storage/src/tests/storageserver/changedbucketownershiphandlertest.cpp
@@ -9,7 +9,6 @@
#include <vespa/storageapi/message/bucketsplitting.h>
#include <vespa/storageapi/message/removelocation.h>
#include <vespa/storageapi/message/persistence.h>
-#include <vespa/storageapi/message/multioperation.h>
#include <tests/common/teststorageapp.h>
#include <tests/common/testhelper.h>
#include <tests/common/dummystoragelink.h>
@@ -46,7 +45,6 @@ class ChangedBucketOwnershipHandlerTest : public CppUnit::TestFixture
CPPUNIT_TEST(testAbortOutdatedRemoveLocation);
CPPUNIT_TEST(testIdealStateAbortsAreConfigurable);
CPPUNIT_TEST(testAbortOutdatedPutOperation);
- CPPUNIT_TEST(testAbortOutdatedMultiOperation);
CPPUNIT_TEST(testAbortOutdatedUpdateCommand);
CPPUNIT_TEST(testAbortOutdatedRemoveCommand);
CPPUNIT_TEST(testAbortOutdatedRevertCommand);
@@ -112,7 +110,6 @@ public:
void testAbortOutdatedRemoveLocation();
void testIdealStateAbortsAreConfigurable();
void testAbortOutdatedPutOperation();
- void testAbortOutdatedMultiOperation();
void testAbortOutdatedUpdateCommand();
void testAbortOutdatedRemoveCommand();
void testAbortOutdatedRevertCommand();
@@ -564,15 +561,6 @@ ChangedBucketOwnershipHandlerTest::testAbortOutdatedPutOperation()
}
void
-ChangedBucketOwnershipHandlerTest::testAbortOutdatedMultiOperation()
-{
- CPPUNIT_ASSERT(changeAbortsMessage<api::MultiOperationCommand>(
- _testDocRepo.getTypeRepoSP(), getBucketToAbort(), 1024));
- CPPUNIT_ASSERT(!changeAbortsMessage<api::MultiOperationCommand>(
- _testDocRepo.getTypeRepoSP(), getBucketToAllow(), 1024));
-}
-
-void
ChangedBucketOwnershipHandlerTest::testAbortOutdatedUpdateCommand()
{
const document::DocumentType* docType(_testDocRepo.getTypeRepo()
diff --git a/storage/src/tests/storageserver/documentapiconvertertest.cpp b/storage/src/tests/storageserver/documentapiconvertertest.cpp
index b878d5f6719..caf498cb272 100644
--- a/storage/src/tests/storageserver/documentapiconvertertest.cpp
+++ b/storage/src/tests/storageserver/documentapiconvertertest.cpp
@@ -13,7 +13,6 @@
#include <vespa/storage/storageserver/documentapiconverter.h>
#include <vespa/storageapi/message/batch.h>
#include <vespa/storageapi/message/datagram.h>
-#include <vespa/storageapi/message/multioperation.h>
#include <vespa/storageapi/message/persistence.h>
#include <vespa/storageapi/message/removelocation.h>
#include <vespa/storageapi/message/stat.h>
@@ -87,7 +86,7 @@ struct DocumentApiConverterTest : public CppUnit::TestFixture
template <typename T>
std::unique_ptr<T> toStorageAPI(documentapi::DocumentMessage &msg) {
- auto result = _converter->toStorageAPI(msg, _repo);
+ auto result = _converter->toStorageAPI(msg);
return dynamic_unique_ptr_cast<T>(std::move(result));
}
@@ -100,7 +99,7 @@ struct DocumentApiConverterTest : public CppUnit::TestFixture
template <typename T>
std::unique_ptr<T> toDocumentAPI(api::StorageCommand &cmd) {
- auto result = _converter->toDocumentAPI(cmd, _repo);
+ auto result = _converter->toDocumentAPI(cmd);
return dynamic_unique_ptr_cast<T>(std::move(result));
}
@@ -115,7 +114,6 @@ struct DocumentApiConverterTest : public CppUnit::TestFixture
void testCreateVisitorReplyLastBucket();
void testDestroyVisitor();
void testVisitorInfo();
- void testMultiOperation();
void testBatchDocumentUpdate();
void testStatBucket();
void testGetBucketList();
@@ -134,7 +132,6 @@ struct DocumentApiConverterTest : public CppUnit::TestFixture
CPPUNIT_TEST(testCreateVisitorReplyLastBucket);
CPPUNIT_TEST(testDestroyVisitor);
CPPUNIT_TEST(testVisitorInfo);
- CPPUNIT_TEST(testMultiOperation);
CPPUNIT_TEST(testBatchDocumentUpdate);
CPPUNIT_TEST(testStatBucket);
CPPUNIT_TEST(testGetBucketList);
@@ -323,61 +320,6 @@ DocumentApiConverterTest::testVisitorInfo()
}
void
-DocumentApiConverterTest::testMultiOperation()
-{
- auto doc = std::make_shared<Document>(_html_type, DocumentId(DocIdString("test", "test")));
-
- document::BucketIdFactory fac;
- document::BucketId bucketId = fac.getBucketId(doc->getId());
- bucketId.setUsedBits(32);
-
- {
- documentapi::MultiOperationMessage momsg(_repo, bucketId, 10000);
-
- vdslib::WritableDocumentList operations(_repo, &(momsg.getBuffer()[0]), momsg.getBuffer().size());
- operations.addPut(*doc, 100);
- momsg.setOperations(operations);
- CPPUNIT_ASSERT(momsg.getBuffer().size() > 0);
-
- // Convert it to Storage API
- auto mocmd = toStorageAPI<api::MultiOperationCommand>(momsg);
- CPPUNIT_ASSERT(mocmd->getBuffer().size() > 0);
-
- // Get operations from Storage API message and check document
- const vdslib::DocumentList& list = mocmd->getOperations();
- CPPUNIT_ASSERT_EQUAL((uint32_t)1, list.size());
- CPPUNIT_ASSERT_EQUAL(*doc, *dynamic_cast<document::Document*>(list.begin()->getDocument().get()));
-
- // Create Storage API Reply
- auto moreply = std::make_unique<api::MultiOperationReply>(*mocmd);
- CPPUNIT_ASSERT(moreply.get());
-
- // convert storage api reply to mbus reply.....
- // ...
- }
-
- {
- api::MultiOperationCommand mocmd(_repo, makeDocumentBucket(bucketId), 10000, false);
- mocmd.getOperations().addPut(*doc, 100);
-
- // Convert it to documentapi
- auto momsg = toDocumentAPI<documentapi::MultiOperationMessage>(mocmd);
-
- // Get operations from Document API msg and check document
- const vdslib::DocumentList& list = momsg->getOperations();
- CPPUNIT_ASSERT_EQUAL((uint32_t)1, list.size());
- CPPUNIT_ASSERT_EQUAL(*doc, *dynamic_cast<document::Document*>(list.begin()->getDocument().get()));
-
- // Create Document API reply
- mbus::Reply::UP moreply = momsg->createReply();
- CPPUNIT_ASSERT(moreply.get());
-
- //Convert DocumentAPI reply to storageapi reply
- toStorageAPI<api::MultiOperationReply>(*moreply, mocmd);
- }
-}
-
-void
DocumentApiConverterTest::testBatchDocumentUpdate()
{
std::vector<document::DocumentUpdate::SP > updates;
diff --git a/storage/src/tests/visiting/visitormanagertest.cpp b/storage/src/tests/visiting/visitormanagertest.cpp
index 5da86a134e2..8b17e851868 100644
--- a/storage/src/tests/visiting/visitormanagertest.cpp
+++ b/storage/src/tests/visiting/visitormanagertest.cpp
@@ -15,11 +15,10 @@
#include <vespa/document/test/make_document_bucket.h>
#include <vespa/document/test/make_bucket_space.h>
#include <tests/storageserver/testvisitormessagesession.h>
-#include <vespa/documentapi/messagebus/messages/multioperationmessage.h>
#include <vespa/documentapi/messagebus/messages/putdocumentmessage.h>
#include <vespa/documentapi/messagebus/messages/removedocumentmessage.h>
+#include <vespa/documentapi/messagebus/messages/visitor.h>
#include <vespa/config/common/exceptions.h>
-#include <vespa/vespalib/util/exceptions.h>
using document::test::makeDocumentBucket;
using document::test::makeBucketSpace;
diff --git a/storage/src/tests/visiting/visitortest.cpp b/storage/src/tests/visiting/visitortest.cpp
index 00051d64b90..27281d9b95f 100644
--- a/storage/src/tests/visiting/visitortest.cpp
+++ b/storage/src/tests/visiting/visitortest.cpp
@@ -13,11 +13,10 @@
#include <tests/common/teststorageapp.h>
#include <tests/common/dummystoragelink.h>
#include <tests/storageserver/testvisitormessagesession.h>
-#include <vespa/documentapi/messagebus/messages/multioperationmessage.h>
#include <vespa/documentapi/messagebus/messages/putdocumentmessage.h>
#include <vespa/documentapi/messagebus/messages/removedocumentmessage.h>
+#include <vespa/documentapi/messagebus/messages/visitor.h>
#include <vespa/config/common/exceptions.h>
-#include <vespa/vespalib/util/exceptions.h>
#include <thread>
using namespace std::chrono_literals;
@@ -349,8 +348,7 @@ VisitorTest::getMessagesAndReply(
static_cast<documentapi::RemoveDocumentMessage&>(*msg).getDocumentId());
break;
case documentapi::DocumentProtocol::MESSAGE_VISITORINFO:
- infoMessages.push_back(
- static_cast<documentapi::VisitorInfoMessage&>(*msg).getErrorMessage());
+ infoMessages.push_back(static_cast<documentapi::VisitorInfoMessage&>(*msg).getErrorMessage());
break;
default:
break;
diff --git a/storage/src/vespa/storage/bucketdb/bucketmanager.cpp b/storage/src/vespa/storage/bucketdb/bucketmanager.cpp
index 5078d35956a..733cc490bd3 100644
--- a/storage/src/vespa/storage/bucketdb/bucketmanager.cpp
+++ b/storage/src/vespa/storage/bucketdb/bucketmanager.cpp
@@ -12,7 +12,6 @@
#include <vespa/storageframework/generic/status/htmlstatusreporter.h>
#include <vespa/storageframework/generic/status/xmlstatusreporter.h>
#include <vespa/storageframework/generic/clock/timer.h>
-#include <vespa/storageapi/message/multioperation.h>
#include <vespa/storageapi/message/persistence.h>
#include <vespa/storageapi/message/state.h>
#include <vespa/storageapi/message/bucketsplitting.h>
diff --git a/storage/src/vespa/storage/common/messagebucket.cpp b/storage/src/vespa/storage/common/messagebucket.cpp
index f23bece015f..ecbad310a58 100644
--- a/storage/src/vespa/storage/common/messagebucket.cpp
+++ b/storage/src/vespa/storage/common/messagebucket.cpp
@@ -5,7 +5,6 @@
#include "bucketmessages.h"
#include <vespa/storageapi/message/bucket.h>
#include <vespa/storageapi/message/bucketsplitting.h>
-#include <vespa/storageapi/message/multioperation.h>
#include <vespa/storageapi/message/persistence.h>
#include <vespa/storageapi/message/removelocation.h>
#include <vespa/storage/persistence/messages.h>
@@ -32,15 +31,10 @@ getStorageMessageBucket(const api::StorageMessage& msg)
return static_cast<const api::RevertCommand&>(msg).getBucket();
case api::MessageType::STATBUCKET_ID:
return static_cast<const api::StatBucketCommand&>(msg).getBucket();
- case api::MessageType::MULTIOPERATION_ID:
- return static_cast<const api::MultiOperationCommand&>(msg)
- .getBucket();
case api::MessageType::BATCHPUTREMOVE_ID:
- return static_cast<const api::BatchPutRemoveCommand&>(msg)
- .getBucket();
+ return static_cast<const api::BatchPutRemoveCommand&>(msg).getBucket();
case api::MessageType::REMOVELOCATION_ID:
- return static_cast<const api::RemoveLocationCommand&>(msg)
- .getBucket();
+ return static_cast<const api::RemoveLocationCommand&>(msg).getBucket();
case api::MessageType::CREATEBUCKET_ID:
return static_cast<const api::CreateBucketCommand&>(msg).getBucket();
case api::MessageType::DELETEBUCKET_ID:
@@ -52,18 +46,15 @@ getStorageMessageBucket(const api::StorageMessage& msg)
case api::MessageType::GETBUCKETDIFF_REPLY_ID:
return static_cast<const api::GetBucketDiffReply&>(msg).getBucket();
case api::MessageType::APPLYBUCKETDIFF_ID:
- return static_cast<const api::ApplyBucketDiffCommand&>(msg)
- .getBucket();
+ return static_cast<const api::ApplyBucketDiffCommand&>(msg).getBucket();
case api::MessageType::APPLYBUCKETDIFF_REPLY_ID:
return static_cast<const api::ApplyBucketDiffReply&>(msg).getBucket();
-
case api::MessageType::JOINBUCKETS_ID:
return static_cast<const api::JoinBucketsCommand&>(msg).getBucket();
case api::MessageType::SPLITBUCKET_ID:
return static_cast<const api::SplitBucketCommand&>(msg).getBucket();
case api::MessageType::SETBUCKETSTATE_ID:
return static_cast<const api::SetBucketStateCommand&>(msg).getBucket();
-
case api::MessageType::INTERNAL_ID:
switch(static_cast<const api::InternalCommand&>(msg).getType()) {
case RequestStatusPage::ID:
@@ -71,8 +62,7 @@ getStorageMessageBucket(const api::StorageMessage& msg)
case GetIterCommand::ID:
return static_cast<const GetIterCommand&>(msg).getBucket();
case CreateIteratorCommand::ID:
- return static_cast<const CreateIteratorCommand&>(msg)
- .getBucket();
+ return static_cast<const CreateIteratorCommand&>(msg).getBucket();
case ReadBucketList::ID:
return static_cast<const ReadBucketList&>(msg).getBucket();
case ReadBucketInfo::ID:
@@ -82,8 +72,7 @@ getStorageMessageBucket(const api::StorageMessage& msg)
case BucketDiskMoveCommand::ID:
return static_cast<const BucketDiskMoveCommand&>(msg).getBucket();
case InternalBucketJoinCommand::ID:
- return static_cast<const InternalBucketJoinCommand&>(msg)
- .getBucket();
+ return static_cast<const InternalBucketJoinCommand&>(msg).getBucket();
case RecheckBucketInfoCommand::ID:
return static_cast<const RecheckBucketInfoCommand&>(msg).getBucket();
default:
diff --git a/storage/src/vespa/storage/distributor/bucketdbupdater.cpp b/storage/src/vespa/storage/distributor/bucketdbupdater.cpp
index 39e21772547..ea621bef7f3 100644
--- a/storage/src/vespa/storage/distributor/bucketdbupdater.cpp
+++ b/storage/src/vespa/storage/distributor/bucketdbupdater.cpp
@@ -8,7 +8,6 @@
#include <vespa/storage/common/bucketoperationlogger.h>
#include <vespa/storageapi/message/persistence.h>
#include <vespa/storageapi/message/removelocation.h>
-#include <vespa/storageapi/message/multioperation.h>
#include <vespa/vespalib/util/xmlstream.h>
#include <vespa/log/bufferedlogger.h>
diff --git a/storage/src/vespa/storage/distributor/distributor.cpp b/storage/src/vespa/storage/distributor/distributor.cpp
index 28b9fb7f0ef..495aaa30968 100644
--- a/storage/src/vespa/storage/distributor/distributor.cpp
+++ b/storage/src/vespa/storage/distributor/distributor.cpp
@@ -611,7 +611,6 @@ bool is_client_request(const api::StorageMessage& msg) noexcept {
case api::MessageType::REMOVE_ID:
case api::MessageType::VISITOR_CREATE_ID:
case api::MessageType::VISITOR_DESTROY_ID:
- case api::MessageType::MULTIOPERATION_ID: // Deprecated
case api::MessageType::GETBUCKETLIST_ID:
case api::MessageType::STATBUCKET_ID:
case api::MessageType::UPDATE_ID:
diff --git a/storage/src/vespa/storage/distributor/externaloperationhandler.cpp b/storage/src/vespa/storage/distributor/externaloperationhandler.cpp
index 5985d990fcd..0c4c67bb94f 100644
--- a/storage/src/vespa/storage/distributor/externaloperationhandler.cpp
+++ b/storage/src/vespa/storage/distributor/externaloperationhandler.cpp
@@ -8,14 +8,12 @@
#include <vespa/storage/distributor/operations/external/updateoperation.h>
#include <vespa/storage/distributor/operations/external/removeoperation.h>
#include <vespa/storage/distributor/operations/external/getoperation.h>
-#include <vespa/storage/distributor/operations/external/multioperationoperation.h>
#include <vespa/storage/distributor/operations/external/statbucketoperation.h>
#include <vespa/storage/distributor/operations/external/statbucketlistoperation.h>
#include <vespa/storage/distributor/operations/external/removelocationoperation.h>
#include <vespa/storage/distributor/operations/external/visitoroperation.h>
#include <vespa/document/util/stringutil.h>
#include <vespa/storageapi/message/persistence.h>
-#include <vespa/storageapi/message/multioperation.h>
#include <vespa/storageapi/message/removelocation.h>
#include <vespa/storageapi/message/batch.h>
#include <vespa/storageapi/message/stat.h>
@@ -245,24 +243,6 @@ IMPL_MSG_COMMAND_H(ExternalOperationHandler, Get)
return true;
}
-IMPL_MSG_COMMAND_H(ExternalOperationHandler, MultiOperation)
-{
- if (!checkDistribution(*cmd, cmd->getBucket())) {
- LOG(debug,
- "Distributor manager received multi-operation message, "
- "bucket %s with wrong distribution",
- cmd->getBucket().toString().c_str());
- return true;
- }
-
- _op = Operation::SP(new MultiOperationOperation(
- *this,
- _bucketSpaceRepo.get(cmd->getBucket().getBucketSpace()),
- cmd,
- getMetrics().multioperations[cmd->getLoadType()]));
- return true;
-}
-
IMPL_MSG_COMMAND_H(ExternalOperationHandler, StatBucket)
{
if (!checkDistribution(*cmd, cmd->getBucket())) {
diff --git a/storage/src/vespa/storage/distributor/externaloperationhandler.h b/storage/src/vespa/storage/distributor/externaloperationhandler.h
index ae5b4ae21ac..c198fe30159 100644
--- a/storage/src/vespa/storage/distributor/externaloperationhandler.h
+++ b/storage/src/vespa/storage/distributor/externaloperationhandler.h
@@ -31,7 +31,6 @@ public:
DEF_MSG_COMMAND_H(Update);
DEF_MSG_COMMAND_H(Remove);
DEF_MSG_COMMAND_H(RemoveLocation);
- DEF_MSG_COMMAND_H(MultiOperation);
DEF_MSG_COMMAND_H(StatBucket);
DEF_MSG_COMMAND_H(CreateVisitor);
DEF_MSG_COMMAND_H(GetBucketList);
diff --git a/storage/src/vespa/storage/distributor/idealstatemanager.cpp b/storage/src/vespa/storage/distributor/idealstatemanager.cpp
index 773014391fd..77b924ad351 100644
--- a/storage/src/vespa/storage/distributor/idealstatemanager.cpp
+++ b/storage/src/vespa/storage/distributor/idealstatemanager.cpp
@@ -7,7 +7,6 @@
#include <vespa/vespalib/stllike/asciistream.h>
#include <vespa/storage/storageserver/storagemetricsset.h>
#include <vespa/storageapi/message/persistence.h>
-#include <vespa/storageapi/message/multioperation.h>
#include <vespa/storage/common/bucketmessages.h>
#include <vespa/document/bucket/fixed_bucket_spaces.h>
#include <vespa/vespalib/stllike/hash_map.hpp>
diff --git a/storage/src/vespa/storage/distributor/operations/external/CMakeLists.txt b/storage/src/vespa/storage/distributor/operations/external/CMakeLists.txt
index f3547f2d879..efef4e5e51d 100644
--- a/storage/src/vespa/storage/distributor/operations/external/CMakeLists.txt
+++ b/storage/src/vespa/storage/distributor/operations/external/CMakeLists.txt
@@ -2,8 +2,6 @@
vespa_add_library(storage_distributoroperationexternal OBJECT
SOURCES
getoperation.cpp
- multioperationoperation.cpp
- multioperationoperation.cpp
putoperation.cpp
removelocationoperation.cpp
removeoperation.cpp
diff --git a/storage/src/vespa/storage/distributor/operations/external/multioperationoperation.cpp b/storage/src/vespa/storage/distributor/operations/external/multioperationoperation.cpp
deleted file mode 100644
index 1ea077fd1c1..00000000000
--- a/storage/src/vespa/storage/distributor/operations/external/multioperationoperation.cpp
+++ /dev/null
@@ -1,249 +0,0 @@
-// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-
-#include "multioperationoperation.h"
-#include "putoperation.h"
-#include <vespa/storageapi/message/multioperation.h>
-#include <vespa/storageapi/message/persistence.h>
-#include <vespa/storage/distributor/distributor_bucket_space.h>
-
-#include <vespa/log/log.h>
-LOG_SETUP(".distributor.callback.doc.multioperation");
-
-using document::BucketSpace;
-
-namespace storage::distributor {
-
-MultiOperationOperation::MultiOperationOperation(
- DistributorComponent& manager,
- DistributorBucketSpace &bucketSpace,
- const std::shared_ptr<api::MultiOperationCommand> & msg,
- PersistenceOperationMetricSet& metric)
- : Operation(),
- _reply(new api::MultiOperationReply(*msg)),
- _trackerInstance(metric, _reply, manager),
- _tracker(_trackerInstance),
- _msg(msg),
- _manager(manager),
- _bucketSpace(bucketSpace),
- _minUseBits(manager.getDistributor().getConfig().getMinimalBucketSplit())
-{
-}
-
-MultiOperationOperation::~MultiOperationOperation() {}
-
-bool
-MultiOperationOperation::sendToBucket(
- BucketDatabase::Entry& e,
- std::shared_ptr<api::MultiOperationCommand> moCommand)
-{
- std::vector<uint16_t> targetNodes;
- std::vector<MessageTracker::ToSend> createBucketBatch;
-
- if (PutOperation::checkCreateBucket(_bucketSpace.getDistribution(),
- _bucketSpace.getClusterState(),
- e,
- targetNodes,
- createBucketBatch,
- *moCommand))
- {
- _bucketSpace.getBucketDatabase().update(e);
- }
-
- if (createBucketBatch.size()) {
- _tracker.queueMessageBatch(createBucketBatch);
- }
-
- std::vector<MessageTracker::ToSend> messages;
-
- for (uint32_t i = 0; i < targetNodes.size(); i++) {
- std::shared_ptr<api::MultiOperationCommand> snd(
- new api::MultiOperationCommand(*moCommand));
- copyMessageSettings(*moCommand, *snd);
- messages.push_back(MessageTracker::ToSend(snd, targetNodes[i]));
- }
-
- _tracker.queueMessageBatch(messages);
-
- return true;
-}
-
-typedef std::vector<vdslib::DocumentList::Entry> EntryVector;
-
-uint32_t
-MultiOperationOperation::getMinimumUsedBits(const vdslib::DocumentList& opList) const
-{
- uint32_t splitBit = 58;
- uint64_t splitMask = 0;
- document::BucketId refBucket;
-
- for (uint32_t i=0; i< splitBit; ++i) {
- splitMask = (splitMask << 1) | 1;
- }
-
- //iterate through operations to find which bucketId they belong to
- for (vdslib::DocumentList::const_iterator operationIt = opList.begin();
- operationIt != opList.end();
- operationIt++)
- {
- document::DocumentId docId = operationIt->getDocumentId();
- document::BucketId bucketId(
- _manager.getBucketIdFactory().getBucketId(docId));
-
- if (refBucket.getRawId() == 0) {
- refBucket = bucketId;
- } else {
- while ((bucketId.getRawId() & splitMask) != (refBucket.getRawId() & splitMask)) {
- --splitBit;
- splitMask = splitMask >> 1;
- }
- }
- }
-
- return splitBit;
-}
-
-namespace {
-
-struct BucketOperationList {
- BucketDatabase::Entry entry;
- EntryVector operations;
-};
-
-}
-
-void
-MultiOperationOperation::onStart(DistributorMessageSender& sender)
-{
- lib::ClusterState systemState = _bucketSpace.getClusterState();
-
- // Don't do anything if all nodes are down.
- bool up = false;
- for (uint16_t i = 0; i < systemState.getNodeCount(lib::NodeType::STORAGE); i++) {
- if (_manager.storageNodeIsUp(_msg->getBucket().getBucketSpace(), i)) {
- up = true;
- break;
- }
- }
-
- if (!up) {
- _tracker.fail(sender, api::ReturnCode(api::ReturnCode::NOT_CONNECTED, "Can't perform operations: No storage nodes available"));
- return;
- }
-
- const vdslib::DocumentList& opList= _msg->getOperations();
- LOG(debug, "Received MultiOperation message with %d operations", opList.size());
- std::map<document::BucketId, BucketOperationList> bucketMap;
-
- if ((_manager.getDistributor().getConfig().getSplitCount() != 0 && opList.size() > _manager.getDistributor().getConfig().getSplitCount() / 3) ||
- (_manager.getDistributor().getConfig().getSplitSize() != 0 && opList.getBufferSize() > _manager.getDistributor().getConfig().getSplitSize() / 3)) {
- _minUseBits = getMinimumUsedBits(opList);
- }
-
- //iterate through operations to find which bucketId they belong to
- for (vdslib::DocumentList::const_iterator operationIt = opList.begin();
- operationIt != opList.end();
- operationIt++)
- {
- if (operationIt->valid()) {
- document::DocumentId docId = operationIt->getDocumentId();
- document::Bucket bucket(_msg->getBucket().getBucketSpace(),
- _manager.getBucketIdFactory().getBucketId(docId));
-
- LOG(debug, "Operation with documentid %s mapped to bucket %s", docId.toString().c_str(), bucket.toString().c_str());
-
- // OK, we have a bucket ID, must now know which buckets this belongs
- // to
- std::vector<BucketDatabase::Entry> entries;
- _bucketSpace.getBucketDatabase().getParents(bucket.getBucketId(), entries);
-
- if (entries.empty()) {
- entries.push_back(_manager.createAppropriateBucket(bucket));
- }
-
- for (uint32_t i = 0; i < entries.size(); ++i) {
- bucketMap[entries[i].getBucketId()].entry = entries[i];
- bucketMap[entries[i].getBucketId()].operations.push_back(*operationIt);
-
- LOG(debug, "Operation with flags %d must go to bucket %s",
- operationIt->getFlags(), entries[i].toString().c_str());
- }
- }
- }
-
- LOG(debug,
- "MultiOperation has operations for %lu bucketIds",
- (unsigned long)bucketMap.size());
-
- uint64_t highestTimestamp = 0;
-
- //iterate through the map of <bucket, vector<Entry>>
- for (std::map<document::BucketId, BucketOperationList>::iterator bucketIt =
- bucketMap.begin();
- bucketIt != bucketMap.end();
- bucketIt++)
- {
- LOG(debug, "Iterating through bucketMap, bucket %s", bucketIt->first.toString().c_str());
- //get the size of the buffer large enough to hold the entries that
- //must go to this bucketId
- uint32_t blockSize = 4; //4 bytes initially for length
-
- EntryVector& v = bucketIt->second.operations;
- for (EntryVector::iterator entryIt = v.begin();
- entryIt != v.end();
- entryIt++) {
- blockSize += entryIt->getSerializedSize();
- }
- assert(blockSize > 4);
-
- document::Bucket bucket(_msg->getBucket().getBucketSpace(), bucketIt->first);
- //now create a MultiOperationCommand with the new DocumentList
- std::shared_ptr<api::MultiOperationCommand>
- command(new api::MultiOperationCommand(
- _manager.getTypeRepo(),
- bucket, blockSize));
- copyMessageSettings(*_msg, *command);
-
- LOG(debug, "Block size %d", blockSize);
- vdslib::WritableDocumentList& block = command->getOperations();
-
- //iterate through the entries, and add them to the new DocumentList
- for (EntryVector::iterator entryIt = v.begin(); entryIt != v.end(); entryIt++)
- {
- uint64_t ts;
- if(!_msg->keepTimeStamps()){
- ts = _manager.getUniqueTimestamp();
- }
- else{
- ts = entryIt->getTimestamp();
- }
-
- if (ts > highestTimestamp) {
- highestTimestamp = ts;
- }
- block.addEntry(*entryIt, ts);
-
- LOG(debug, "Entry size is %d", block.size());
- }
-
- sendToBucket(bucketIt->second.entry, command);
- }
-
- _tracker.flushQueue(sender);
-
- _msg = std::shared_ptr<api::MultiOperationCommand>();
- _reply->setHighestModificationTimestamp(highestTimestamp);
-}
-
-void
-MultiOperationOperation::onReceive(DistributorMessageSender& sender, const std::shared_ptr<api::StorageReply> & msg)
-{
- _tracker.receiveReply(sender, static_cast<api::BucketInfoReply&>(*msg));
-}
-
-void
-MultiOperationOperation::onClose(DistributorMessageSender& sender)
-{
- _tracker.fail(sender, api::ReturnCode(api::ReturnCode::ABORTED, "Process is shutting down"));
-}
-
-}
diff --git a/storage/src/vespa/storage/distributor/operations/external/multioperationoperation.h b/storage/src/vespa/storage/distributor/operations/external/multioperationoperation.h
deleted file mode 100644
index f63fbbc5458..00000000000
--- a/storage/src/vespa/storage/distributor/operations/external/multioperationoperation.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#pragma once
-
-#include <vespa/storage/distributor/persistencemessagetracker.h>
-#include <vespa/storage/bucketdb/bucketdatabase.h>
-#include <vespa/storageapi/messageapi/returncode.h>
-#include <vespa/vdslib/container/writabledocumentlist.h>
-
-namespace document { class Document; }
-
-namespace storage {
-
-namespace api {
- class CreateBucketReply;
- class MultiOperationCommand;
-}
-
-namespace distributor {
-
-class DistributorBucketSpace;
-
-class MultiOperationOperation : public Operation
-{
-public:
- MultiOperationOperation(DistributorComponent& manager,
- DistributorBucketSpace &bucketSpace,
- const std::shared_ptr<api::MultiOperationCommand> & msg,
- PersistenceOperationMetricSet& metric);
- ~MultiOperationOperation();
-
- void onStart(DistributorMessageSender& sender) override;
- const char* getName() const override { return "multioperation"; };
- std::string getStatus() const override { return ""; };
- void onReceive(DistributorMessageSender& sender, const std::shared_ptr<api::StorageReply> &) override;
- void onClose(DistributorMessageSender& sender) override;
-private:
- std::shared_ptr<api::MultiOperationReply> _reply;
- PersistenceMessageTrackerImpl _trackerInstance;
- PersistenceMessageTracker& _tracker;
- std::shared_ptr<api::MultiOperationCommand> _msg;
- DistributorComponent& _manager;
- DistributorBucketSpace &_bucketSpace;
- uint32_t _minUseBits;
-
- uint32_t getMinimumUsedBits(const vdslib::DocumentList& opList) const;
-
- bool sendToBucket(BucketDatabase::Entry& e,
- std::shared_ptr<api::MultiOperationCommand> moCommand);
-};
-
-}
-
-}
diff --git a/storage/src/vespa/storage/distributor/operations/idealstate/mergeoperation.cpp b/storage/src/vespa/storage/distributor/operations/idealstate/mergeoperation.cpp
index b61de2fa06b..3475e3e12ba 100644
--- a/storage/src/vespa/storage/distributor/operations/idealstate/mergeoperation.cpp
+++ b/storage/src/vespa/storage/distributor/operations/idealstate/mergeoperation.cpp
@@ -309,7 +309,6 @@ constexpr std::array<uint32_t, 7> WRITE_FEED_MESSAGE_TYPES {{
api::MessageType::REMOVE_ID,
api::MessageType::UPDATE_ID,
api::MessageType::REMOVELOCATION_ID,
- api::MessageType::MULTIOPERATION_ID,
api::MessageType::BATCHPUTREMOVE_ID,
api::MessageType::BATCHDOCUMENTUPDATE_ID
}};
diff --git a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp
index 31f712faea2..c8b5c71ee2e 100644
--- a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp
+++ b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp
@@ -3,7 +3,6 @@
#include "filestorhandlerimpl.h"
#include "filestormetrics.h"
#include <vespa/storageapi/message/bucketsplitting.h>
-#include <vespa/storageapi/message/multioperation.h>
#include <vespa/storageapi/message/persistence.h>
#include <vespa/storageapi/message/removelocation.h>
#include <vespa/storage/bucketdb/storbucketdb.h>
@@ -312,7 +311,6 @@ FileStorHandlerImpl::messageMayBeAborted(const api::StorageMessage& msg) const
case api::MessageType::APPLYBUCKETDIFF_ID:
case api::MessageType::SPLITBUCKET_ID:
case api::MessageType::JOINBUCKETS_ID:
- case api::MessageType::MULTIOPERATION_ID:
case api::MessageType::UPDATE_ID:
case api::MessageType::REMOVELOCATION_ID:
case api::MessageType::BATCHPUTREMOVE_ID:
@@ -897,7 +895,6 @@ FileStorHandlerImpl::remapMessage(
break;
}
case api::MessageType::STAT_ID:
- case api::MessageType::MULTIOPERATION_ID:
case api::MessageType::BATCHPUTREMOVE_ID:
case api::MessageType::REVERT_ID:
case api::MessageType::REMOVELOCATION_ID:
@@ -905,8 +902,7 @@ FileStorHandlerImpl::remapMessage(
{
// Move to correct queue if op == MOVE
// Fail with bucket not found if op != MOVE
- api::BucketCommand& cmd(
- static_cast<api::BucketCommand&>(msg));
+ api::BucketCommand& cmd(static_cast<api::BucketCommand&>(msg));
if (cmd.getBucket() == source) {
if (op == MOVE) {
targetDisk = targets[0]->diskIndex;
diff --git a/storage/src/vespa/storage/persistence/filestorage/filestormanager.cpp b/storage/src/vespa/storage/persistence/filestorage/filestormanager.cpp
index d5e08da7fe0..6644d09da7f 100644
--- a/storage/src/vespa/storage/persistence/filestorage/filestormanager.cpp
+++ b/storage/src/vespa/storage/persistence/filestorage/filestormanager.cpp
@@ -14,7 +14,6 @@
#include <vespa/storage/storageutil/log.h>
#include <vespa/storageapi/message/batch.h>
#include <vespa/storageapi/message/bucketsplitting.h>
-#include <vespa/storageapi/message/multioperation.h>
#include <vespa/storageapi/message/persistence.h>
#include <vespa/storageapi/message/removelocation.h>
#include <vespa/storageapi/message/state.h>
@@ -383,16 +382,6 @@ FileStorManager::onRevert(const shared_ptr<api::RevertCommand>& cmd)
}
bool
-FileStorManager::onMultiOperation(const std::shared_ptr<api::MultiOperationCommand>& cmd)
-{
- StorBucketDatabase::WrappedEntry entry(mapOperationToBucketAndDisk(*cmd, 0));
- if (entry.exist()) {
- handlePersistenceMessage(cmd, entry->disk);
- }
- return true;
-}
-
-bool
FileStorManager::onBatchPutRemove(const std::shared_ptr<api::BatchPutRemoveCommand>& cmd)
{
StorBucketDatabase::WrappedEntry entry(mapOperationToBucketAndDisk(*cmd, 0));
diff --git a/storage/src/vespa/storage/persistence/filestorage/filestormanager.h b/storage/src/vespa/storage/persistence/filestorage/filestormanager.h
index 4043bb9de8b..0bd2ffa5910 100644
--- a/storage/src/vespa/storage/persistence/filestorage/filestormanager.h
+++ b/storage/src/vespa/storage/persistence/filestorage/filestormanager.h
@@ -152,7 +152,6 @@ private:
bool onGet(const std::shared_ptr<api::GetCommand>&) override;
bool onRemove(const std::shared_ptr<api::RemoveCommand>&) override;
bool onRevert(const std::shared_ptr<api::RevertCommand>&) override;
- bool onMultiOperation(const std::shared_ptr<api::MultiOperationCommand>&) override;
bool onBatchPutRemove(const std::shared_ptr<api::BatchPutRemoveCommand>&) override;
bool onStatBucket(const std::shared_ptr<api::StatBucketCommand>&) override;
diff --git a/storage/src/vespa/storage/persistence/persistencethread.cpp b/storage/src/vespa/storage/persistence/persistencethread.cpp
index c42959b1a87..6c4cd7b64d2 100644
--- a/storage/src/vespa/storage/persistence/persistencethread.cpp
+++ b/storage/src/vespa/storage/persistence/persistencethread.cpp
@@ -4,7 +4,6 @@
#include "splitbitdetector.h"
#include "bucketownershipnotifier.h"
#include "testandsethelper.h"
-#include <vespa/storageapi/message/multioperation.h>
#include <vespa/storageapi/message/bucketsplitting.h>
#include <vespa/storage/common/bucketoperationlogger.h>
#include <vespa/document/fieldset/fieldsetrepo.h>
@@ -238,62 +237,6 @@ PersistenceThread::handleRepairBucket(RepairBucketCommand& cmd)
}
MessageTracker::UP
-PersistenceThread::handleMultiOperation(api::MultiOperationCommand& cmd)
-{
- MessageTracker::UP tracker(new MessageTracker(
- _env._metrics.multiOp[cmd.getLoadType()],
- _env._component.getClock()));
- spi::Bucket b = spi::Bucket(cmd.getBucket(), spi::PartitionId(_env._partition));
- long puts = 0;
- long removes = 0;
- long updates = 0;
- long updatesNotFound = 0;
- long removesNotFound = 0;
- for (vdslib::DocumentList::const_iterator it =
- cmd.getOperations().begin();
- it != cmd.getOperations().end(); ++it)
- {
- document::DocumentId docId = it->getDocumentId();
- if (it->isRemoveEntry()) {
- ++removes;
- spi::RemoveResult result = _spi.removeIfFound(
- b,
- spi::Timestamp(it->getTimestamp()),
- docId, _context);
- if (!checkForError(result, *tracker)) {
- return tracker;
- }
- if (!result.wasFound()) {
- LOG(debug, "Cannot remove %s; document not found",
- docId.toString().c_str());
- ++removesNotFound;
- }
- } else if (it->isUpdateEntry()) {
- ++updates;
- document::DocumentUpdate::SP docUpdate = it->getUpdate();
- spi::UpdateResult result =
- _spi.update(b, spi::Timestamp(it->getTimestamp()), docUpdate,
- _context);
- if (!checkForError(result, *tracker)) {
- return tracker;
- }
- if (result.getExistingTimestamp() == 0) {
- ++updatesNotFound;
- }
- } else {
- ++puts;
- document::Document::SP doc = it->getDocument();
- spi::Result result = _spi.put(b, spi::Timestamp(it->getTimestamp()),
- doc, _context);
- if (!checkForError(result, *tracker)) {
- return tracker;
- }
- }
- }
- return tracker;
-}
-
-MessageTracker::UP
PersistenceThread::handleRevert(api::RevertCommand& cmd)
{
MessageTracker::UP tracker(new MessageTracker(
@@ -902,9 +845,6 @@ PersistenceThread::handleCommandSplitByType(api::StorageCommand& msg)
return handleRemove(static_cast<api::RemoveCommand&>(msg));
case api::MessageType::UPDATE_ID:
return handleUpdate(static_cast<api::UpdateCommand&>(msg));
- case api::MessageType::MULTIOPERATION_ID:
- return handleMultiOperation(
- static_cast<api::MultiOperationCommand&>(msg));
case api::MessageType::REVERT_ID:
return handleRevert(static_cast<api::RevertCommand&>(msg));
case api::MessageType::CREATEBUCKET_ID:
@@ -1086,7 +1026,6 @@ bool isBatchable(const api::StorageMessage& msg)
return (msg.getType().getId() == api::MessageType::PUT_ID ||
msg.getType().getId() == api::MessageType::REMOVE_ID ||
msg.getType().getId() == api::MessageType::UPDATE_ID ||
- msg.getType().getId() == api::MessageType::MULTIOPERATION_ID ||
msg.getType().getId() == api::MessageType::REVERT_ID);
}
diff --git a/storage/src/vespa/storage/persistence/persistencethread.h b/storage/src/vespa/storage/persistence/persistencethread.h
index 2977f44090e..07fadb875cc 100644
--- a/storage/src/vespa/storage/persistence/persistencethread.h
+++ b/storage/src/vespa/storage/persistence/persistencethread.h
@@ -32,7 +32,6 @@ public:
MessageTracker::UP handleRemove(api::RemoveCommand& cmd);
MessageTracker::UP handleUpdate(api::UpdateCommand& cmd);
MessageTracker::UP handleGet(api::GetCommand& cmd);
- MessageTracker::UP handleMultiOperation(api::MultiOperationCommand& cmd);
MessageTracker::UP handleRevert(api::RevertCommand& cmd);
MessageTracker::UP handleCreateBucket(api::CreateBucketCommand& cmd);
MessageTracker::UP handleDeleteBucket(api::DeleteBucketCommand& cmd);
diff --git a/storage/src/vespa/storage/storageserver/bouncer.cpp b/storage/src/vespa/storage/storageserver/bouncer.cpp
index 72edbfd095e..65e04ad7fdb 100644
--- a/storage/src/vespa/storage/storageserver/bouncer.cpp
+++ b/storage/src/vespa/storage/storageserver/bouncer.cpp
@@ -172,7 +172,6 @@ Bouncer::isExternalLoad(const api::MessageType& type) const noexcept
case api::MessageType::UPDATE_ID:
case api::MessageType::GET_ID:
case api::MessageType::VISITOR_CREATE_ID:
- case api::MessageType::MULTIOPERATION_ID:
case api::MessageType::STATBUCKET_ID:
return true;
default:
@@ -186,7 +185,6 @@ Bouncer::isExternalWriteOperation(const api::MessageType& type) const noexcept {
case api::MessageType::PUT_ID:
case api::MessageType::REMOVE_ID:
case api::MessageType::UPDATE_ID:
- case api::MessageType::MULTIOPERATION_ID:
return true;
default:
return false;
diff --git a/storage/src/vespa/storage/storageserver/changedbucketownershiphandler.cpp b/storage/src/vespa/storage/storageserver/changedbucketownershiphandler.cpp
index 7cf42af841d..0bc84e0d878 100644
--- a/storage/src/vespa/storage/storageserver/changedbucketownershiphandler.cpp
+++ b/storage/src/vespa/storage/storageserver/changedbucketownershiphandler.cpp
@@ -307,7 +307,6 @@ ChangedBucketOwnershipHandler::isMutatingExternalOperation(
switch (msg.getType().getId()) {
case api::MessageType::PUT_ID:
case api::MessageType::REMOVE_ID:
- case api::MessageType::MULTIOPERATION_ID:
case api::MessageType::UPDATE_ID:
case api::MessageType::REVERT_ID:
return true;
diff --git a/storage/src/vespa/storage/storageserver/changedbucketownershiphandler.h b/storage/src/vespa/storage/storageserver/changedbucketownershiphandler.h
index 9c6e4256db6..eddc8566d2b 100644
--- a/storage/src/vespa/storage/storageserver/changedbucketownershiphandler.h
+++ b/storage/src/vespa/storage/storageserver/changedbucketownershiphandler.h
@@ -42,7 +42,6 @@ namespace storage {
*
* We consider the following external operations as mutating:
* - PutCommand
- * - MultiOperationCommand
* - UpdateCommand
* - RemoveCommand
* - RevertCommand
diff --git a/storage/src/vespa/storage/storageserver/communicationmanager.cpp b/storage/src/vespa/storage/storageserver/communicationmanager.cpp
index b9721635c24..105f1c25cca 100644
--- a/storage/src/vespa/storage/storageserver/communicationmanager.cpp
+++ b/storage/src/vespa/storage/storageserver/communicationmanager.cpp
@@ -123,7 +123,7 @@ CommunicationManager::handleMessage(std::unique_ptr<mbus::Message> msg)
std::unique_ptr<api::StorageCommand> cmd;
try {
- cmd = _docApiConverter.toStorageAPI(static_cast<documentapi::DocumentMessage&>(*docMsgPtr), _component.getTypeRepo());
+ cmd = _docApiConverter.toStorageAPI(static_cast<documentapi::DocumentMessage&>(*docMsgPtr));
} catch (document::UnknownBucketSpaceException& e) {
fail_with_unresolvable_bucket_space(std::move(docMsgPtr), e.getMessage());
return;
@@ -577,7 +577,7 @@ CommunicationManager::sendCommand(
{
MBUS_TRACE(msg->getTrace(), 7, "Communication manager: Converting storageapi message to documentapi");
- std::unique_ptr<mbus::Message> mbusMsg(_docApiConverter.toDocumentAPI(*msg, _component.getTypeRepo()));
+ std::unique_ptr<mbus::Message> mbusMsg(_docApiConverter.toDocumentAPI(*msg));
if (mbusMsg.get()) {
MBUS_TRACE(msg->getTrace(), 7, "Communication manager: Converted OK");
diff --git a/storage/src/vespa/storage/storageserver/documentapiconverter.cpp b/storage/src/vespa/storage/storageserver/documentapiconverter.cpp
index 09ca9924891..00bc395b536 100644
--- a/storage/src/vespa/storage/storageserver/documentapiconverter.cpp
+++ b/storage/src/vespa/storage/storageserver/documentapiconverter.cpp
@@ -8,7 +8,6 @@
#include <vespa/storageapi/message/batch.h>
#include <vespa/storageapi/message/datagram.h>
#include <vespa/storageapi/message/documentsummary.h>
-#include <vespa/storageapi/message/multioperation.h>
#include <vespa/storageapi/message/persistence.h>
#include <vespa/storageapi/message/queryresult.h>
#include <vespa/storageapi/message/removelocation.h>
@@ -32,8 +31,7 @@ DocumentApiConverter::DocumentApiConverter(const config::ConfigUri &configUri,
DocumentApiConverter::~DocumentApiConverter() {}
std::unique_ptr<api::StorageCommand>
-DocumentApiConverter::toStorageAPI(documentapi::DocumentMessage& fromMsg,
- const document::DocumentTypeRepo::SP &repo)
+DocumentApiConverter::toStorageAPI(documentapi::DocumentMessage& fromMsg)
{
api::StorageCommand::UP toMsg;
@@ -102,13 +100,6 @@ DocumentApiConverter::toStorageAPI(documentapi::DocumentMessage& fromMsg,
toMsg = std::make_unique<api::DestroyVisitorCommand>(from.getInstanceId());
break;
}
- case DocumentProtocol::MESSAGE_MULTIOPERATION:
- {
- documentapi::MultiOperationMessage& from(static_cast<documentapi::MultiOperationMessage&>(fromMsg));
- toMsg = std::make_unique<api::MultiOperationCommand>(repo, document::Bucket(BucketSpace::placeHolder(), from.getBucketId()), from.getBuffer(),
- from.keepTimeStamps());
- break;
- }
case DocumentProtocol::MESSAGE_BATCHDOCUMENTUPDATE:
{
documentapi::BatchDocumentUpdateMessage& from(static_cast<documentapi::BatchDocumentUpdateMessage&>(fromMsg));
@@ -214,7 +205,7 @@ DocumentApiConverter::toStorageAPI(documentapi::DocumentReply& fromReply,
}
std::unique_ptr<mbus::Message>
-DocumentApiConverter::toDocumentAPI(api::StorageCommand& fromMsg, const document::DocumentTypeRepo::SP &repo)
+DocumentApiConverter::toDocumentAPI(api::StorageCommand& fromMsg)
{
std::unique_ptr<mbus::Message> toMsg;
switch (fromMsg.getType().getId()) {
@@ -271,13 +262,6 @@ DocumentApiConverter::toDocumentAPI(api::StorageCommand& fromMsg, const document
toMsg = std::make_unique<documentapi::DocumentSummaryMessage>(from);
break;
}
- case api::MessageType::MULTIOPERATION_ID:
- {
- api::MultiOperationCommand& from(static_cast<api::MultiOperationCommand&>(fromMsg));
- toMsg = std::make_unique<documentapi::MultiOperationMessage>(repo, from.getBucketId(), from.getBuffer(),
- from.keepTimeStamps());
- break;
- }
case api::MessageType::MAPVISITOR_ID:
{
api::MapVisitorCommand& from(static_cast<api::MapVisitorCommand&>(fromMsg));
@@ -371,10 +355,6 @@ DocumentApiConverter::transferReplyState(api::StorageReply& fromMsg, mbus::Reply
api::PutReply& from(static_cast<api::PutReply&>(fromMsg));
documentapi::WriteDocumentReply& to(static_cast<documentapi::WriteDocumentReply&>(toMsg));
to.setHighestModificationTimestamp(from.getTimestamp());
- } else if (toMsg.getType() == DocumentProtocol::REPLY_MULTIOPERATION) {
- api::MultiOperationReply& from(static_cast<api::MultiOperationReply&>(fromMsg));
- documentapi::WriteDocumentReply& to(static_cast<documentapi::WriteDocumentReply&>(toMsg));
- to.setHighestModificationTimestamp(from.getHighestModificationTimestamp());
} else if (toMsg.getType() == DocumentProtocol::REPLY_UPDATEDOCUMENT) {
api::UpdateReply& from(static_cast<api::UpdateReply&>(fromMsg));
documentapi::UpdateDocumentReply& to(static_cast<documentapi::UpdateDocumentReply&>(toMsg));
diff --git a/storage/src/vespa/storage/storageserver/documentapiconverter.h b/storage/src/vespa/storage/storageserver/documentapiconverter.h
index 546bc86a007..eef37467c93 100644
--- a/storage/src/vespa/storage/storageserver/documentapiconverter.h
+++ b/storage/src/vespa/storage/storageserver/documentapiconverter.h
@@ -27,10 +27,10 @@ public:
std::shared_ptr<const BucketResolver> bucketResolver);
~DocumentApiConverter();
- std::unique_ptr<api::StorageCommand> toStorageAPI(documentapi::DocumentMessage& msg, const document::DocumentTypeRepo::SP &repo);
+ std::unique_ptr<api::StorageCommand> toStorageAPI(documentapi::DocumentMessage& msg);
std::unique_ptr<api::StorageReply> toStorageAPI(documentapi::DocumentReply& reply, api::StorageCommand& originalCommand);
void transferReplyState(storage::api::StorageReply& from, mbus::Reply& to);
- std::unique_ptr<mbus::Message> toDocumentAPI(api::StorageCommand& cmd, const document::DocumentTypeRepo::SP &repo);
+ std::unique_ptr<mbus::Message> toDocumentAPI(api::StorageCommand& cmd);
const PriorityConverter& getPriorityConverter() const { return *_priConverter; }
// BucketResolver getter and setter are both thread safe.
diff --git a/storage/src/vespa/storage/visiting/CMakeLists.txt b/storage/src/vespa/storage/visiting/CMakeLists.txt
index 9344a2cc983..358cdaa140e 100644
--- a/storage/src/vespa/storage/visiting/CMakeLists.txt
+++ b/storage/src/vespa/storage/visiting/CMakeLists.txt
@@ -3,7 +3,6 @@ vespa_add_library(storage_visitor OBJECT
SOURCES
${CMAKE_CURRENT_BINARY_DIR}/config-stor-visitor.h
countvisitor.cpp
- dumpvisitor.cpp
dumpvisitorsingle.cpp
memory_bounded_trace.cpp
recoveryvisitor.cpp
diff --git a/storage/src/vespa/storage/visiting/dumpvisitor.cpp b/storage/src/vespa/storage/visiting/dumpvisitor.cpp
deleted file mode 100644
index 12ce2c1d22c..00000000000
--- a/storage/src/vespa/storage/visiting/dumpvisitor.cpp
+++ /dev/null
@@ -1,133 +0,0 @@
-// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-
-#include "dumpvisitor.h"
-#include <vespa/documentapi/messagebus/messages/multioperationmessage.h>
-#include <vespa/document/update/documentupdate.h>
-#include <vespa/vdslib/container/mutabledocumentlist.h>
-#include <vespa/vespalib/text/stringtokenizer.h>
-#include <vespa/vespalib/stllike/hash_map.hpp>
-#include <vespa/log/log.h>
-LOG_SETUP(".visitor.instance.dumpvisitor");
-
-namespace storage {
-
-DumpVisitor::DumpVisitor(StorageComponent& component,
- const vdslib::Parameters& params)
- : Visitor(component),
- _keepTimeStamps(false)
-{
- if (params.hasValue("requestfields")) {
- std::string fields = params.get("requestfields");
-
- _requestedFields.reset(new std::set<std::string>());
- vespalib::StringTokenizer tokenizer(fields);
- for (uint32_t i = 0; i < tokenizer.size(); i++) {
- _requestedFields->insert(tokenizer[i]);
- }
- }
-
- if (params.hasValue("requestdocuments")) {
- std::string documents = params.get("requestdocuments");
-
- _requestedDocuments.reset(new std::set<std::string>());
- vespalib::StringTokenizer tokenizer(documents, " \t");
- for (uint32_t i = 0; i < tokenizer.size(); i++) {
- _requestedDocuments->insert(tokenizer[i]);
- }
- }
-
- if (params.hasValue("keeptimestamps")) {
- _keepTimeStamps = true;
- }
-
- LOG(debug, "Created DumpVisitor");
-}
-
-std::unique_ptr<documentapi::MultiOperationMessage>
-DumpVisitor::createMultiOperation(const document::BucketId& bucketId,
- const std::vector<const document::Document*>& docs)
-{
- for (int multiplier = 1; ; multiplier *= 2) {
- std::vector<char> buffer(getDocBlockSize() * multiplier);
- vdslib::MutableDocumentList newBlock(_component.getTypeRepo(),
- &buffer[0], buffer.size(), false);
- bool mustResizeBuffer = false;
- for (uint32_t i = 0; i < docs.size(); i++) {
- bool ok = newBlock.addPut(*docs[i], docs[i]->getLastModified());
- if (!ok) {
- mustResizeBuffer = true;
- break;
- }
- }
-
- if (!mustResizeBuffer) {
- return std::unique_ptr<documentapi::MultiOperationMessage>(
- new documentapi::MultiOperationMessage(bucketId, newBlock, _keepTimeStamps));
- }
- }
- assert(false);
- return std::unique_ptr<documentapi::MultiOperationMessage>();
-}
-
-void DumpVisitor::handleDocuments(const document::BucketId& bucketId,
- std::vector<spi::DocEntry::UP>& entries,
- HitCounter& hitCounter)
-{
- LOG(debug, "Visitor %s handling block of %zu documents.",
- _id.c_str(), entries.size());
-
- std::unique_ptr<documentapi::MultiOperationMessage> cmd;
- if (_requestedFields.get() || _requestedDocuments.get()) {
- std::vector<const document::Document*> newDocuments;
-
- // Remove all fields from the document that are not listed in
- // requestedFields.
- for (size_t i = 0; i < entries.size(); ++i) {
- std::unique_ptr<document::Document> d(entries[i]->getDocument()->clone());
-
- if (!_requestedDocuments.get()
- || _requestedDocuments->find(d->getId().toString())
- != _requestedDocuments->end())
- {
- if (_requestedFields.get()) {
- for (document::Document::const_iterator docIter
- = d->begin(); docIter != d->end(); ++docIter)
- {
- if (_requestedFields->find(docIter.field().getName())
- == _requestedFields->end())
- {
- d->remove(docIter.field());
- }
- }
- }
- newDocuments.push_back(d.release());
- }
- }
-
- cmd = createMultiOperation(bucketId, newDocuments);
-
- // FIXME: not exception safe
- for (uint32_t i = 0; i < newDocuments.size(); i++) {
- delete newDocuments[i];
- }
- } else {
- std::vector<const document::Document*> docs;
- docs.reserve(entries.size());
- for (size_t i = 0; i < entries.size(); ++i) {
- docs.push_back(entries[i]->getDocument());
- assert(docs.back() != 0);
- }
- cmd = createMultiOperation(bucketId, docs);
- }
-
- for (vdslib::DocumentList::const_iterator iter
- = cmd->getOperations().begin();
- iter != cmd->getOperations().end(); iter++)
- {
- hitCounter.addHit(iter->getDocumentId(), iter->getSerializedSize());
- }
-
- sendMessage(documentapi::DocumentMessage::UP(cmd.release()));
-}
-
-}
diff --git a/storage/src/vespa/storage/visiting/dumpvisitor.h b/storage/src/vespa/storage/visiting/dumpvisitor.h
deleted file mode 100644
index 1dcf2899704..00000000000
--- a/storage/src/vespa/storage/visiting/dumpvisitor.h
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-/**
- * @class storage::DumpVisitor
- * @ingroup visitors
- *
- * @brief A dump visitor is a visitor that sends documents to the client.
- *
- */
-#pragma once
-
-#include <vespa/storage/visiting/visitor.h>
-
-namespace documentapi {
-class MultiOperationMessage;
-}
-
-namespace storage {
-
-class DumpVisitor : public Visitor {
-public:
- DumpVisitor(StorageComponent& component, const vdslib::Parameters&);
-
-private:
- std::unique_ptr<documentapi::MultiOperationMessage>
- createMultiOperation(const document::BucketId& bucketId,
- const std::vector<const document::Document*>& docs);
-
- void handleDocuments(const document::BucketId& bucketId,
- std::vector<spi::DocEntry::UP>& entries,
- HitCounter& hitCounter) override;
-
- std::unique_ptr<std::set<std::string> > _requestedFields;
- std::unique_ptr<std::set<std::string> > _requestedDocuments;
-
- bool _keepTimeStamps;
-};
-
-class DumpVisitorFactory : public VisitorFactory {
-public:
- DumpVisitorFactory() {}
-
- VisitorEnvironment::UP
- makeVisitorEnvironment(StorageComponent&) override {
- return VisitorEnvironment::UP(new VisitorEnvironment);
- };
-
- storage::Visitor*
- makeVisitor(StorageComponent& component, storage::VisitorEnvironment&,
- const vdslib::Parameters& params) override
- {
- return new DumpVisitor(component, params);
- }
-};
-
-}
-
-
-
diff --git a/storage/src/vespa/storage/visiting/dumpvisitorsingle.cpp b/storage/src/vespa/storage/visiting/dumpvisitorsingle.cpp
index 41ce63a08f9..f52b549de42 100644
--- a/storage/src/vespa/storage/visiting/dumpvisitorsingle.cpp
+++ b/storage/src/vespa/storage/visiting/dumpvisitorsingle.cpp
@@ -1,8 +1,8 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "dumpvisitorsingle.h"
-#include <vespa/documentapi/messagebus/messages/multioperationmessage.h>
#include <vespa/document/update/documentupdate.h>
+#include <vespa/document/fieldvalue/document.h>
#include <vespa/documentapi/messagebus/messages/putdocumentmessage.h>
#include <vespa/documentapi/messagebus/messages/removedocumentmessage.h>
@@ -11,8 +11,7 @@ LOG_SETUP(".visitor.instance.dumpvisitorsingle");
namespace storage {
-DumpVisitorSingle::DumpVisitorSingle(StorageComponent& component,
- const vdslib::Parameters&)
+DumpVisitorSingle::DumpVisitorSingle(StorageComponent& component, const vdslib::Parameters&)
: Visitor(component)
{
}
@@ -29,12 +28,10 @@ void DumpVisitorSingle::handleDocuments(const document::BucketId& /*bucketId*/,
const uint32_t docSize = entry.getDocumentSize();
if (entry.isRemove()) {
hitCounter.addHit(*entry.getDocumentId(), docSize);
- sendMessage(std::make_unique<documentapi::RemoveDocumentMessage>(
- *entry.getDocumentId()));
+ sendMessage(std::make_unique<documentapi::RemoveDocumentMessage>(*entry.getDocumentId()));
} else {
hitCounter.addHit(*entry.getDocumentId(), docSize);
- auto msg = std::make_unique<documentapi::PutDocumentMessage>(
- entry.releaseDocument());
+ auto msg = std::make_unique<documentapi::PutDocumentMessage>(entry.releaseDocument());
msg->setApproxSize(docSize);
sendMessage(std::move(msg));
}
diff --git a/storage/src/vespa/storage/visiting/visitormanager.cpp b/storage/src/vespa/storage/visiting/visitormanager.cpp
index f207c4436b1..6330b580eb9 100644
--- a/storage/src/vespa/storage/visiting/visitormanager.cpp
+++ b/storage/src/vespa/storage/visiting/visitormanager.cpp
@@ -2,7 +2,6 @@
#include "visitormanager.h"
#include "messages.h"
-#include "dumpvisitor.h"
#include "dumpvisitorsingle.h"
#include "countvisitor.h"
#include "testvisitor.h"
@@ -52,13 +51,7 @@ VisitorManager::VisitorManager(const config::ConfigUri & configUri,
framework::MilliSecTime waitTime(1000);
_thread = _component.startThread(*this, maxProcessTime, waitTime);
_component.registerMetricUpdateHook(*this, framework::SecondTime(5));
-
- // Register built-in visitors.
- if (_component.isUpgradingToMajorVersion()) {
- _visitorFactories["dumpvisitor"].reset(new DumpVisitorFactory);
- } else {
- _visitorFactories["dumpvisitor"].reset(new DumpVisitorSingleFactory);
- }
+ _visitorFactories["dumpvisitor"].reset(new DumpVisitorSingleFactory);
_visitorFactories["dumpvisitorsingle"].reset(new DumpVisitorSingleFactory);
_visitorFactories["testvisitor"].reset(new TestVisitorFactory);
_visitorFactories["countvisitor"].reset(new CountVisitorFactory);
@@ -185,8 +178,7 @@ VisitorManager::configure(std::unique_ptr<vespa::config::content::core::StorVisi
"No visitor threads configured. If you don't want visitors "
"to run, don't use visitormanager.", VESPA_STRLOC);
}
- _metrics->initThreads(config->visitorthreads,
- _component.getLoadTypes()->getMetricLoadTypes());
+ _metrics->initThreads(config->visitorthreads, _component.getLoadTypes()->getMetricLoadTypes());
for (int32_t i=0; i<config->visitorthreads; ++i) {
_visitorThread.push_back(std::make_pair(
std::shared_ptr<VisitorThread>(
diff --git a/storageapi/src/tests/mbusprot/mbusprot.4.2.serialization.V_4_2_STABLE b/storageapi/src/tests/mbusprot/mbusprot.4.2.serialization.V_4_2_STABLE
index 4ee14c628b4..5045a98b037 100644
--- a/storageapi/src/tests/mbusprot/mbusprot.4.2.serialization.V_4_2_STABLE
+++ b/storageapi/src/tests/mbusprot/mbusprot.4.2.serialization.V_4_2_STABLE
@@ -62,9 +62,5 @@ MessageType(18, Visitor Create)
\00\00\00\12\00\00\00\07library\00\00\00\02id\00\00\00\0ddoc selection\00\00\00\01\00\00\00\0bcontroldest\00\00\00\08datadest\00\00\00\02\00\00\00\00\00\00\00{\00\00\00\00\00\00\01\c8\00\00\00\02@\00\00\00\00\00\00\01@\00\00\00\00\00\00\02\00\01\01\00\00\00d\00\00\00\03\00\00\00\0dinto darkness\00\00\00\09bind them\00\00\00\08one ring\00\00\00\10to rule them all\00\00\00\0bone ring to\00\00\00\0dfind them and\00\00\00\00\00\00\00\00\01\ff\ff
MessageType(19, Visitor Create Reply, reply of Visitor Create)
\00\00\00\13\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\01
-MessageType(70, MultiOperation)
-\00\00\00F\00\00'\10\01\00\00\00\00\00\00\00\00\00\00\00\a6&\00\00$\00\00\00\ca&\00\00F\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\08\00\00\00\1edoc:test:test\00\01testdoctype1\00\00\01\00\00\00=\00\01\05\00= ;This is the contents of the test document.
It ain't much.
\00\00P\00\00\f1\f1\f1\f1\f1\00\00\00\00\00\00\00\00\01\ff\ff
-MessageType(71, MultiOperation Reply, reply of MultiOperation)
-\00\00\00GP\00\00\f1\f1\f1\f1\f1\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\01 \ No newline at end of file
diff --git a/storageapi/src/tests/mbusprot/storageprotocoltest.cpp b/storageapi/src/tests/mbusprot/storageprotocoltest.cpp
index a04b0d71e96..73fbb43a4e9 100644
--- a/storageapi/src/tests/mbusprot/storageprotocoltest.cpp
+++ b/storageapi/src/tests/mbusprot/storageprotocoltest.cpp
@@ -5,7 +5,6 @@
#include <vespa/storageapi/message/bucketsplitting.h>
#include <vespa/storageapi/message/internal.h>
#include <vespa/storageapi/message/removelocation.h>
-#include <vespa/storageapi/message/multioperation.h>
#include <vespa/storageapi/message/batch.h>
#include <vespa/storageapi/mbusprot/storageprotocol.h>
#include <vespa/storageapi/mbusprot/storagecommand.h>
@@ -92,7 +91,6 @@ struct StorageProtocolTest : public CppUnit::TestFixture {
void testSplitBucket51();
void testSplitBucketChain51();
void testJoinBuckets51();
- void testMultiOperation51();
void testBatchPutRemove51();
void testCreateVisitor51();
void testDestroyVisitor51();
@@ -135,7 +133,6 @@ struct StorageProtocolTest : public CppUnit::TestFixture {
CPPUNIT_TEST(testCreateVisitor51);
CPPUNIT_TEST(testDestroyVisitor51);
CPPUNIT_TEST(testRemoveLocation51);
- CPPUNIT_TEST(testMultiOperation51);
CPPUNIT_TEST(testBatchPutRemove51);
CPPUNIT_TEST(testInternalMessage);
CPPUNIT_TEST(testSetBucketState51);
@@ -784,30 +781,6 @@ StorageProtocolTest::testApplyBucketDiff51()
}
void
-StorageProtocolTest::testMultiOperation51()
-{
- ScopedName test("testMultiOperation51");
-
- document::BucketId bucketId(20, 0xf1f1f1f1f1ull);
- document::Bucket bucket(makeDocumentBucket(bucketId));
- DocumentTypeRepo::SP repo(new DocumentTypeRepo);
- MultiOperationCommand::SP
- cmd(new MultiOperationCommand(repo, bucket, 10000));
- cmd->getOperations().addPut(*_testDoc);
- MultiOperationCommand::SP cmd2(copyCommand(cmd, _version5_1));
- CPPUNIT_ASSERT_EQUAL(bucketId, cmd2->getBucketId());
- CPPUNIT_ASSERT_EQUAL(*_testDoc,
- *cmd2->getOperations().begin()->getDocument());
-
- MultiOperationReply::SP reply(new MultiOperationReply(*cmd2));
- MultiOperationReply::SP reply2(copyReply(reply));
-
- recordOutput(*cmd2);
- recordOutput(*reply2);
- recordSerialization50();
-}
-
-void
StorageProtocolTest::testBatchPutRemove51()
{
ScopedName test("testBatchPutRemove51");
diff --git a/storageapi/src/vespa/storageapi/mbusprot/protocolserialization.cpp b/storageapi/src/vespa/storageapi/mbusprot/protocolserialization.cpp
index dcc2239ac06..98beda4d483 100644
--- a/storageapi/src/vespa/storageapi/mbusprot/protocolserialization.cpp
+++ b/storageapi/src/vespa/storageapi/mbusprot/protocolserialization.cpp
@@ -4,16 +4,13 @@
#include "serializationhelper.h"
#include "storagecommand.h"
#include "storagereply.h"
-
-#include <vespa/storageapi/messageapi/storagemessage.h>
-#include <vespa/storageapi/message/bucket.h>
#include <vespa/storageapi/message/bucketsplitting.h>
-#include <vespa/storageapi/message/persistence.h>
-#include <vespa/storageapi/message/multioperation.h>
-#include <vespa/storageapi/message/batch.h>
+#include <vespa/storageapi/message/visitor.h>
#include <vespa/storageapi/message/removelocation.h>
+#include <vespa/storageapi/message/batch.h>
#include <vespa/vespalib/util/exceptions.h>
-#include <vespa/vespalib/util/growablebytebuffer.h>
+
+
#include <sstream>
#include <vespa/log/log.h>
@@ -21,8 +18,7 @@ LOG_SETUP(".storage.api.mbusprot.serialization.base");
namespace storage::mbusprot {
-ProtocolSerialization::ProtocolSerialization(
- const document::DocumentTypeRepo::SP& repo)
+ProtocolSerialization::ProtocolSerialization(const document::DocumentTypeRepo::SP& repo)
: _repo(repo)
{
}
@@ -118,12 +114,6 @@ ProtocolSerialization::encode(const api::StorageMessage& msg) const
case api::MessageType::JOINBUCKETS_REPLY_ID:
onEncode(buf, static_cast<const api::JoinBucketsReply&>(msg));
break;
- case api::MessageType::MULTIOPERATION_ID:
- onEncode(buf, static_cast<const api::MultiOperationCommand&>(msg));
- break;
- case api::MessageType::MULTIOPERATION_REPLY_ID:
- onEncode(buf, static_cast<const api::MultiOperationReply&>(msg));
- break;
case api::MessageType::VISITOR_CREATE_ID:
onEncode(buf, static_cast<const api::CreateVisitorCommand&>(msg));
break;
@@ -209,8 +199,6 @@ ProtocolSerialization::decodeCommand(mbus::BlobRef data) const
cmd = onDecodeSplitBucketCommand(buf); break;
case api::MessageType::JOINBUCKETS_ID:
cmd = onDecodeJoinBucketsCommand(buf); break;
- case api::MessageType::MULTIOPERATION_ID:
- cmd = onDecodeMultiOperationCommand(buf); break;
case api::MessageType::VISITOR_CREATE_ID:
cmd = onDecodeCreateVisitorCommand(buf); break;
case api::MessageType::VISITOR_DESTROY_ID:
@@ -228,12 +216,11 @@ ProtocolSerialization::decodeCommand(mbus::BlobRef data) const
throw vespalib::IllegalArgumentException(ost.str(), VESPA_STRLOC);
}
}
- return StorageCommand::UP(new StorageCommand(SCmd::SP(cmd.release())));
+ return std::make_unique<StorageCommand>(std::move(cmd));
}
StorageReply::UP
-ProtocolSerialization::decodeReply(mbus::BlobRef data,
- const api::StorageCommand& cmd) const
+ProtocolSerialization::decodeReply(mbus::BlobRef data, const api::StorageCommand& cmd) const
{
LOG(spam, "Decode %d bytes of data.", data.size());
if (data.size() < sizeof(int32_t)) {
@@ -276,8 +263,6 @@ ProtocolSerialization::decodeReply(mbus::BlobRef data,
reply = onDecodeSplitBucketReply(cmd, buf); break;
case api::MessageType::JOINBUCKETS_REPLY_ID:
reply = onDecodeJoinBucketsReply(cmd, buf); break;
- case api::MessageType::MULTIOPERATION_REPLY_ID:
- reply = onDecodeMultiOperationReply(cmd, buf); break;
case api::MessageType::VISITOR_CREATE_REPLY_ID:
reply = onDecodeCreateVisitorReply(cmd, buf); break;
case api::MessageType::VISITOR_DESTROY_REPLY_ID:
@@ -295,7 +280,7 @@ ProtocolSerialization::decodeReply(mbus::BlobRef data,
throw vespalib::IllegalArgumentException(ost.str(), VESPA_STRLOC);
}
}
- return StorageReply::UP(new StorageReply(SRep::SP(reply.release())));
+ return std::make_unique<StorageReply>(std::move(reply));
}
}
diff --git a/storageapi/src/vespa/storageapi/mbusprot/protocolserialization.h b/storageapi/src/vespa/storageapi/mbusprot/protocolserialization.h
index d1e5783e609..532b50ac680 100644
--- a/storageapi/src/vespa/storageapi/mbusprot/protocolserialization.h
+++ b/storageapi/src/vespa/storageapi/mbusprot/protocolserialization.h
@@ -17,8 +17,7 @@ namespace mbus {
namespace vespalib {
class GrowableByteBuffer;
}
-namespace storage {
-namespace api {
+namespace storage::api {
class StorageCommand;
class StorageReply;
class PutCommand;
@@ -49,8 +48,6 @@ class JoinBucketsCommand;
class JoinBucketsReply;
class SetBucketStateCommand;
class SetBucketStateReply;
-class MultiOperationCommand;
-class MultiOperationReply;
class CreateVisitorCommand;
class RemoveLocationCommand;
class RemoveLocationReply;
@@ -60,7 +57,7 @@ class BatchDocumentUpdateCommand;
class BatchDocumentUpdateReply;
}
-namespace mbusprot {
+namespace storage::mbusprot {
class SerializationHelper;
class StorageCommand;
@@ -123,8 +120,6 @@ protected:
virtual void onEncode(GBBuf&, const api::JoinBucketsReply&) const = 0;
virtual void onEncode(GBBuf&, const api::SetBucketStateCommand&) const = 0;
virtual void onEncode(GBBuf&, const api::SetBucketStateReply&) const = 0;
- virtual void onEncode(GBBuf&, const api::MultiOperationCommand&) const = 0;
- virtual void onEncode(GBBuf&, const api::MultiOperationReply&) const = 0;
virtual void onEncode(GBBuf&, const api::CreateVisitorCommand&) const = 0;
virtual void onEncode(GBBuf&, const api::CreateVisitorReply&) const = 0;
virtual void onEncode(GBBuf&, const api::DestroyVisitorCommand&) const = 0;
@@ -166,8 +161,6 @@ protected:
virtual SRep::UP onDecodeJoinBucketsReply(const SCmd&, BBuf&) const = 0;
virtual SCmd::UP onDecodeSetBucketStateCommand(BBuf&) const = 0;
virtual SRep::UP onDecodeSetBucketStateReply(const SCmd&, BBuf&) const = 0;
- virtual SCmd::UP onDecodeMultiOperationCommand(BBuf&) const = 0;
- virtual SRep::UP onDecodeMultiOperationReply(const SCmd&, BBuf&) const = 0;
virtual SCmd::UP onDecodeCreateVisitorCommand(BBuf&) const = 0;
virtual SRep::UP onDecodeCreateVisitorReply(const SCmd&, BBuf&) const = 0;
virtual SCmd::UP onDecodeDestroyVisitorCommand(BBuf&) const = 0;
@@ -186,6 +179,4 @@ protected:
};
-} // mbusprot
-} // storage
-
+}
diff --git a/storageapi/src/vespa/storageapi/mbusprot/protocolserialization4_2.cpp b/storageapi/src/vespa/storageapi/mbusprot/protocolserialization4_2.cpp
index cd8e4992ba5..0f8a7bc0206 100644
--- a/storageapi/src/vespa/storageapi/mbusprot/protocolserialization4_2.cpp
+++ b/storageapi/src/vespa/storageapi/mbusprot/protocolserialization4_2.cpp
@@ -5,27 +5,19 @@
#include "serializationhelper.h"
#include "storagecommand.h"
#include "storagereply.h"
-#include "storageprotocol.h"
-#include <vespa/messagebus/blob.h>
-#include <vespa/messagebus/blobref.h>
-#include <vespa/storageapi/messageapi/storagemessage.h>
-#include <vespa/storageapi/message/bucket.h>
#include <vespa/storageapi/message/bucketsplitting.h>
-#include <vespa/storageapi/message/persistence.h>
#include <vespa/storageapi/message/batch.h>
-#include <vespa/storageapi/message/multioperation.h>
-
+#include <vespa/storageapi/message/visitor.h>
#include <vespa/storageapi/message/removelocation.h>
-#include <vespa/vespalib/util/growablebytebuffer.h>
#include <vespa/vespalib/util/exceptions.h>
+
#include <vespa/log/log.h>
LOG_SETUP(".storage.api.mbusprot.serialization.4_2");
using document::BucketSpace;
-namespace storage {
-namespace mbusprot {
+namespace storage::mbusprot {
ProtocolSerialization4_2::ProtocolSerialization4_2(
const document::DocumentTypeRepo::SP& repo)
@@ -33,33 +25,6 @@ ProtocolSerialization4_2::ProtocolSerialization4_2(
{
}
-void ProtocolSerialization4_2::onEncode(
- GBBuf& buf, const api::MultiOperationCommand& msg) const
-{
- uint64_t docBlockSize = msg.getOperations().spaceNeeded();
- buf.putInt(docBlockSize);
- char* pos = buf.allocate(docBlockSize);
- vdslib::DocumentList copy(msg.getOperations(), pos, docBlockSize);
- buf.putBoolean(msg.keepTimeStamps());
- putBucket(msg.getBucket(), buf);
- onEncodeBucketInfoCommand(buf, msg);
-}
-
-api::StorageCommand::UP
-ProtocolSerialization4_2::onDecodeMultiOperationCommand(BBuf& buf) const
-{
- uint32_t length = SH::getInt(buf);
- std::vector<char> buffer(length);
- buf.getBytes(&buffer[0], length);
- bool keepTimestamps = SH::getBoolean(buf);
- document::Bucket bucket = getBucket(buf);
- api::MultiOperationCommand::UP msg(
- new api::MultiOperationCommand(getTypeRepoSp(),
- bucket, buffer, keepTimestamps));
- onDecodeBucketInfoCommand(buf, *msg);
- return api::StorageCommand::UP(msg.release());
-}
-
void
ProtocolSerialization4_2::onEncode(
GBBuf& buf, const api::BatchPutRemoveCommand& msg) const
@@ -512,13 +477,11 @@ api::StorageReply::UP
ProtocolSerialization4_2::onDecodeSetBucketStateReply(const SCmd&,
BBuf&) const
{
- throw vespalib::IllegalStateException("Unsupported deserialization",
- VESPA_STRLOC);
+ throw vespalib::IllegalStateException("Unsupported deserialization", VESPA_STRLOC);
}
void
-ProtocolSerialization4_2::onEncode(
- GBBuf& buf, const api::CreateVisitorCommand& msg) const
+ProtocolSerialization4_2::onEncode(GBBuf& buf, const api::CreateVisitorCommand& msg) const
{
putBucketSpace(msg.getBucketSpace(), buf);
buf.putString(msg.getLibraryName());
@@ -706,5 +669,4 @@ ProtocolSerialization4_2::onDecodeDiffEntry(
entry._hasMask = SH::getShort(buf);
}
-} // mbusprot
-} // storage
+}
diff --git a/storageapi/src/vespa/storageapi/mbusprot/protocolserialization4_2.h b/storageapi/src/vespa/storageapi/mbusprot/protocolserialization4_2.h
index 3adae600dac..56d832ad4f8 100644
--- a/storageapi/src/vespa/storageapi/mbusprot/protocolserialization4_2.h
+++ b/storageapi/src/vespa/storageapi/mbusprot/protocolserialization4_2.h
@@ -3,8 +3,7 @@
#include "protocolserialization.h"
-namespace storage {
-namespace mbusprot {
+namespace storage::mbusprot {
class ProtocolSerialization4_2 : public ProtocolSerialization {
public:
@@ -22,7 +21,6 @@ protected:
void onEncode(GBBuf&, const api::NotifyBucketChangeCommand&) const override;
void onEncode(GBBuf&, const api::NotifyBucketChangeReply&) const override;
void onEncode(GBBuf&, const api::SplitBucketCommand&) const override;
- void onEncode(GBBuf&, const api::MultiOperationCommand&) const override;
void onEncode(GBBuf&, const api::CreateVisitorCommand&) const override;
void onEncode(GBBuf&, const api::DestroyVisitorCommand&) const override;
void onEncode(GBBuf&, const api::DestroyVisitorReply&) const override;
@@ -55,7 +53,6 @@ protected:
SCmd::UP onDecodeSplitBucketCommand(BBuf&) const override;
SCmd::UP onDecodeSetBucketStateCommand(BBuf&) const override;
SRep::UP onDecodeSetBucketStateReply(const SCmd&, BBuf&) const override;
- SCmd::UP onDecodeMultiOperationCommand(BBuf&) const override;
SCmd::UP onDecodeCreateVisitorCommand(BBuf&) const override;
SCmd::UP onDecodeDestroyVisitorCommand(BBuf&) const override;
SRep::UP onDecodeDestroyVisitorReply(const SCmd&, BBuf&) const override;
@@ -74,6 +71,4 @@ protected:
virtual void onDecodeDiffEntry(BBuf&, api::GetBucketDiffCommand::Entry&) const;
};
-} // mbusprot
-} // storage
-
+}
diff --git a/storageapi/src/vespa/storageapi/mbusprot/protocolserialization5_0.cpp b/storageapi/src/vespa/storageapi/mbusprot/protocolserialization5_0.cpp
index 355a7871cc6..6351818df6b 100644
--- a/storageapi/src/vespa/storageapi/mbusprot/protocolserialization5_0.cpp
+++ b/storageapi/src/vespa/storageapi/mbusprot/protocolserialization5_0.cpp
@@ -5,15 +5,14 @@
#include "storagecommand.h"
#include "storagereply.h"
#include <vespa/storageapi/message/bucketsplitting.h>
-#include <vespa/storageapi/message/multioperation.h>
+#include <vespa/storageapi/message/visitor.h>
#include <vespa/document/bucket/fixed_bucket_spaces.h>
#include <sstream>
using document::BucketSpace;
using document::FixedBucketSpaces;
-namespace storage {
-namespace mbusprot {
+namespace storage::mbusprot {
document::Bucket
ProtocolSerialization5_0::getBucket(document::ByteBuffer& buf) const
@@ -509,22 +508,6 @@ ProtocolSerialization5_0::onDecodeSplitBucketReply(const SCmd& cmd,
return api::StorageReply::UP(msg.release());
}
-void ProtocolSerialization5_0::onEncode(
- GBBuf& buf, const api::MultiOperationReply& msg) const
-{
- onEncodeBucketInfoReply(buf, msg);
-}
-
-api::StorageReply::UP
-ProtocolSerialization5_0::onDecodeMultiOperationReply(const SCmd& cmd,
- BBuf& buf) const
-{
- api::MultiOperationReply::UP msg(new api::MultiOperationReply(
- static_cast<const api::MultiOperationCommand&>(cmd)));
- onDecodeBucketInfoReply(buf, *msg);
- return api::StorageReply::UP(msg.release());
-}
-
void
ProtocolSerialization5_0::onEncode(
GBBuf& buf, const api::JoinBucketsCommand& msg) const
@@ -612,8 +595,7 @@ ProtocolSerialization5_0::onDecodeBucketReply(
}
void
-ProtocolSerialization5_0::onEncode(
- GBBuf& buf, const api::CreateVisitorReply& msg) const
+ProtocolSerialization5_0::onEncode(GBBuf& buf, const api::CreateVisitorReply& msg) const
{
onEncodeReply(buf, msg);
buf.putInt(msg.getVisitorStatistics().getBucketsVisited());
@@ -707,5 +689,4 @@ ProtocolSerialization5_0::onDecodeCreateVisitorCommand(BBuf& buf) const
return cvc;
}
-} // mbusprot
-} // storage
+} \ No newline at end of file
diff --git a/storageapi/src/vespa/storageapi/mbusprot/protocolserialization5_0.h b/storageapi/src/vespa/storageapi/mbusprot/protocolserialization5_0.h
index c1285939a1c..933be68158f 100644
--- a/storageapi/src/vespa/storageapi/mbusprot/protocolserialization5_0.h
+++ b/storageapi/src/vespa/storageapi/mbusprot/protocolserialization5_0.h
@@ -4,8 +4,7 @@
#include "protocolserialization4_2.h"
#include <vespa/documentapi/loadtypes/loadtypeset.h>
-namespace storage {
-namespace mbusprot {
+namespace storage::mbusprot {
class ProtocolSerialization5_0 : public ProtocolSerialization4_2 {
private:
@@ -37,7 +36,6 @@ public:
void onEncode(GBBuf&, const api::GetBucketDiffReply&) const override;
void onEncode(GBBuf&, const api::ApplyBucketDiffReply&) const override;
void onEncode(GBBuf&, const api::SplitBucketReply&) const override;
- void onEncode(GBBuf&, const api::MultiOperationReply&) const override;
void onEncode(GBBuf&, const api::JoinBucketsCommand&) const override;
void onEncode(GBBuf&, const api::JoinBucketsReply&) const override;
void onEncode(GBBuf&, const api::RequestBucketInfoCommand&) const override;
@@ -65,7 +63,6 @@ public:
SRep::UP onDecodeGetBucketDiffReply(const SCmd&, BBuf&) const override;
SRep::UP onDecodeApplyBucketDiffReply(const SCmd&, BBuf&) const override;
SRep::UP onDecodeSplitBucketReply(const SCmd&, BBuf&) const override;
- SRep::UP onDecodeMultiOperationReply(const SCmd&, BBuf&) const override;
SCmd::UP onDecodeJoinBucketsCommand(BBuf& buf) const override;
SRep::UP onDecodeJoinBucketsReply(const SCmd& cmd, BBuf& buf) const override;
SCmd::UP onDecodeCreateVisitorCommand(BBuf&) const override;
@@ -78,5 +75,4 @@ public:
void onDecodeReply(BBuf&, api::StorageReply&) const override;
};
-} // mbusprot
-} // storage
+}
diff --git a/storageapi/src/vespa/storageapi/mbusprot/protocolserialization5_1.cpp b/storageapi/src/vespa/storageapi/mbusprot/protocolserialization5_1.cpp
index 0afdfebd5b7..07bab044dca 100644
--- a/storageapi/src/vespa/storageapi/mbusprot/protocolserialization5_1.cpp
+++ b/storageapi/src/vespa/storageapi/mbusprot/protocolserialization5_1.cpp
@@ -4,23 +4,12 @@
#include "serializationhelper.h"
#include "storagecommand.h"
#include "storagereply.h"
-#include "storageprotocol.h"
-
-#include <vespa/messagebus/blob.h>
-#include <vespa/messagebus/blobref.h>
-#include <vespa/storageapi/messageapi/storagemessage.h>
-#include <vespa/storageapi/message/bucket.h>
#include <vespa/storageapi/message/bucketsplitting.h>
-#include <vespa/storageapi/message/persistence.h>
-#include <vespa/storageapi/message/multioperation.h>
-#include <vespa/vespalib/util/growablebytebuffer.h>
-#include <vespa/document/select/orderingspecification.h>
-#include <vespa/storageapi/messageapi/returncode.h>
+#include <vespa/storageapi/message/visitor.h>
using document::BucketSpace;
-namespace storage {
-namespace mbusprot {
+namespace storage::mbusprot {
api::BucketInfo
ProtocolSerialization5_1::getBucketInfo(document::ByteBuffer& buf) const
@@ -61,8 +50,7 @@ ProtocolSerialization5_1::ProtocolSerialization5_1(
{
}
-void ProtocolSerialization5_1::onEncode(
- GBBuf& buf, const api::SetBucketStateCommand& msg) const
+void ProtocolSerialization5_1::onEncode(GBBuf& buf, const api::SetBucketStateCommand& msg) const
{
putBucket(msg.getBucket(), buf);
buf.putByte(static_cast<uint8_t>(msg.getState()));
@@ -223,6 +211,4 @@ ProtocolSerialization5_1::onDecodeCreateBucketCommand(BBuf& buf) const
return api::StorageCommand::UP(msg.release());
}
-
-} // mbusprot
-} // storage
+}
diff --git a/storageapi/src/vespa/storageapi/mbusprot/storagecommand.cpp b/storageapi/src/vespa/storageapi/mbusprot/storagecommand.cpp
index 8aa44a0d7bf..8d97efafde6 100644
--- a/storageapi/src/vespa/storageapi/mbusprot/storagecommand.cpp
+++ b/storageapi/src/vespa/storageapi/mbusprot/storagecommand.cpp
@@ -3,9 +3,9 @@
namespace storage::mbusprot {
-StorageCommand::StorageCommand(const storage::api::StorageCommand::SP& cmd)
+StorageCommand::StorageCommand(api::StorageCommand::SP cmd)
: mbus::Message(),
- _cmd(cmd)
+ _cmd(std::move(cmd))
{ }
}
diff --git a/storageapi/src/vespa/storageapi/mbusprot/storagecommand.h b/storageapi/src/vespa/storageapi/mbusprot/storagecommand.h
index 651336b39e5..88af61509d5 100644
--- a/storageapi/src/vespa/storageapi/mbusprot/storagecommand.h
+++ b/storageapi/src/vespa/storageapi/mbusprot/storagecommand.h
@@ -12,7 +12,7 @@ class StorageCommand : public mbus::Message, public StorageMessage {
public:
typedef std::unique_ptr<StorageCommand> UP;
- StorageCommand(const storage::api::StorageCommand::SP&);
+ StorageCommand(api::StorageCommand::SP);
const mbus::string & getProtocol() const override { return StorageProtocol::NAME; }
uint32_t getType() const override { return _cmd->getType().getId(); }
diff --git a/storageapi/src/vespa/storageapi/mbusprot/storagereply.cpp b/storageapi/src/vespa/storageapi/mbusprot/storagereply.cpp
index 7a21a1bbb27..469c6a41bc7 100644
--- a/storageapi/src/vespa/storageapi/mbusprot/storagereply.cpp
+++ b/storageapi/src/vespa/storageapi/mbusprot/storagereply.cpp
@@ -21,18 +21,15 @@ StorageReply::StorageReply(mbus::BlobRef data, const ProtocolSerialization& seri
buf.getIntNetwork(reinterpret_cast<int32_t&>(_mbusType));
}
-StorageReply::StorageReply(const api::StorageReply::SP& reply)
+StorageReply::StorageReply(api::StorageReply::SP reply)
: _serializer(0),
_sz(0),
_buffer(),
_mbusType(reply->getType().getId()),
- _reply(reply)
-{
-}
+ _reply(std::move(reply))
+{}
-StorageReply::~StorageReply()
-{
-}
+StorageReply::~StorageReply() = default;
void
StorageReply::deserialize() const
diff --git a/storageapi/src/vespa/storageapi/mbusprot/storagereply.h b/storageapi/src/vespa/storageapi/mbusprot/storagereply.h
index 2fd6be2dc14..fc0425369d1 100644
--- a/storageapi/src/vespa/storageapi/mbusprot/storagereply.h
+++ b/storageapi/src/vespa/storageapi/mbusprot/storagereply.h
@@ -19,7 +19,7 @@ public:
typedef std::unique_ptr<StorageReply> UP;
StorageReply(mbus::BlobRef data, const ProtocolSerialization&);
- StorageReply(const api::StorageReply::SP& reply);
+ StorageReply(api::StorageReply::SP reply);
~StorageReply();
const mbus::string& getProtocol() const override { return StorageProtocol::NAME; }
@@ -33,7 +33,7 @@ public:
api::StorageMessage::CSP getInternalMessage() const override { deserialize(); return _reply; }
uint8_t priority() const override {
- if (_reply.get()) {
+ if (_reply) {
return _reply->getPriority();
}
return 0;
diff --git a/storageapi/src/vespa/storageapi/message/CMakeLists.txt b/storageapi/src/vespa/storageapi/message/CMakeLists.txt
index 248a3d61121..dbbaad8eed1 100644
--- a/storageapi/src/vespa/storageapi/message/CMakeLists.txt
+++ b/storageapi/src/vespa/storageapi/message/CMakeLists.txt
@@ -8,7 +8,6 @@ vespa_add_library(storageapi_message OBJECT
state.cpp
searchresult.cpp
bucketsplitting.cpp
- multioperation.cpp
documentsummary.cpp
stat.cpp
removelocation.cpp
diff --git a/storageapi/src/vespa/storageapi/message/batch.cpp b/storageapi/src/vespa/storageapi/message/batch.cpp
index f92d88e179e..de8ac849dee 100644
--- a/storageapi/src/vespa/storageapi/message/batch.cpp
+++ b/storageapi/src/vespa/storageapi/message/batch.cpp
@@ -3,7 +3,6 @@
#include "batch.h"
#include <vespa/document/bucket/bucketidfactory.h>
#include <ostream>
-#include <algorithm>
using namespace storage::api;
using document::BucketSpace;
diff --git a/storageapi/src/vespa/storageapi/message/batch.h b/storageapi/src/vespa/storageapi/message/batch.h
index 372d1bdb340..8d67c7813fa 100644
--- a/storageapi/src/vespa/storageapi/message/batch.h
+++ b/storageapi/src/vespa/storageapi/message/batch.h
@@ -7,8 +7,7 @@
#include <vespa/storageapi/messageapi/bucketinfocommand.h>
#include <vespa/storageapi/messageapi/bucketinforeply.h>
-namespace storage {
-namespace api {
+namespace storage::api {
/**
* @class BatchPutRemoveCommand
@@ -190,4 +189,3 @@ public:
};
}
-}
diff --git a/storageapi/src/vespa/storageapi/message/bucketsplitting.h b/storageapi/src/vespa/storageapi/message/bucketsplitting.h
index 115cd9f01bb..66ebae6497c 100644
--- a/storageapi/src/vespa/storageapi/message/bucketsplitting.h
+++ b/storageapi/src/vespa/storageapi/message/bucketsplitting.h
@@ -6,8 +6,7 @@
#include <vespa/storageapi/messageapi/bucketinforeply.h>
#include <vespa/storageapi/messageapi/maintenancecommand.h>
-namespace storage {
-namespace api {
+namespace storage::api {
/**
* @class SplitBucketCommand
@@ -118,5 +117,4 @@ public:
DECLARE_STORAGEREPLY(JoinBucketsReply, onJoinBucketsReply)
};
-} // api
-} // storage
+}
diff --git a/storageapi/src/vespa/storageapi/message/multioperation.cpp b/storageapi/src/vespa/storageapi/message/multioperation.cpp
deleted file mode 100644
index a6494002e18..00000000000
--- a/storageapi/src/vespa/storageapi/message/multioperation.cpp
+++ /dev/null
@@ -1,108 +0,0 @@
-// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-
-#include "multioperation.h"
-#include <vespa/document/update/documentupdate.h>
-
-using document::DocumentTypeRepo;
-
-namespace storage::api {
-
-IMPLEMENT_COMMAND(MultiOperationCommand, MultiOperationReply)
-IMPLEMENT_REPLY(MultiOperationReply)
-
-MultiOperationCommand::MultiOperationCommand(const DocumentTypeRepo::SP &repo,
- const document::Bucket &bucket,
- int bufferSize,
- bool keepTimeStamps_)
- : BucketInfoCommand(MessageType::MULTIOPERATION, bucket),
- _buffer(),
- _operations(repo, 0, 0),
- _keepTimeStamps(keepTimeStamps_)
-{
- _buffer.resize(bufferSize);
- if (_buffer.size() > 0) {
- _operations = vdslib::WritableDocumentList(_operations.getTypeRepo(),
- &_buffer[0], _buffer.size(), false);
- }
-}
-
-MultiOperationCommand::MultiOperationCommand(const DocumentTypeRepo::SP &repo,
- const document::Bucket &bucket,
- const std::vector<char>& buffer,
- bool keepTimeStamps_)
- : BucketInfoCommand(MessageType::MULTIOPERATION, bucket),
- _buffer(buffer),
- _operations(repo, 0, 0),
- _keepTimeStamps(keepTimeStamps_)
-{
- if (_buffer.size() > 0) {
- _operations = vdslib::WritableDocumentList(_operations.getTypeRepo(),
- &_buffer[0], _buffer.size(), true);
- }
-}
-
-MultiOperationCommand::MultiOperationCommand(const MultiOperationCommand& o)
- : BucketInfoCommand(MessageType::MULTIOPERATION, o.getBucket()),
- _buffer(o._buffer),
- _operations(o._operations.getTypeRepo(),0, 0),
- _keepTimeStamps(o._keepTimeStamps)
-{
- setTimeout(o.getTimeout());
- setSourceIndex(o.getSourceIndex());
- setPriority(o.getPriority());
- if (_buffer.size() > 0) {
- _operations = vdslib::WritableDocumentList(_operations.getTypeRepo(),
- &_buffer[0], _buffer.size(), true);
- }
-}
-
-MultiOperationCommand::~MultiOperationCommand() {}
-
-void
-MultiOperationCommand::print(std::ostream& out, bool verbose,
- const std::string& indent) const
-{
- out << "MultiOperationCommand(" << getBucketId()
- << ", size " << _operations.getBufferSize() << ", used space "
- << (_operations.getBufferSize() - _operations.countFree())
- << ", doccount " << _operations.size() << ", keepTimeStamps "
- << _keepTimeStamps << ")";
- if (verbose) {
- out << " {";
- bool first = true;
- for(vdslib::DocumentList::const_iterator it = _operations.begin();
- it != _operations.end(); ++it)
- {
- if (!first) { out << ","; } else { first = false; }
- out << "\n" << indent << " ";
- if (it->isRemoveEntry()) {
- out << "Remove(" << it->getDocumentId() << ")";
- } else if (it->isUpdateEntry()) {
- out << "Update(" << it->getDocumentId() << ")";
- } else {
- out << "Put(" << it->getDocumentId() << ")";
- }
- }
- out << "\n" << indent << "} : ";
- BucketInfoCommand::print(out, verbose, indent);
- }
-}
-
-MultiOperationReply::MultiOperationReply(const MultiOperationCommand& cmd)
- : BucketInfoReply(cmd),
- _highestModificationTimestamp(0)
-{
-}
-
-void
-MultiOperationReply::print(std::ostream& out, bool verbose,
- const std::string& indent) const
-{
- out << "MultiOperationReply(" << getBucketId() << ")";
- if (verbose) {
- out << " : ";
- BucketInfoReply::print(out, verbose, indent);
- }
-}
-
-}
diff --git a/storageapi/src/vespa/storageapi/message/multioperation.h b/storageapi/src/vespa/storageapi/message/multioperation.h
deleted file mode 100644
index 3d80cd042ea..00000000000
--- a/storageapi/src/vespa/storageapi/message/multioperation.h
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-
-#pragma once
-
-#include <vespa/document/bucket/bucketid.h>
-#include <vespa/document/fieldvalue/document.h>
-#include <vespa/storageapi/messageapi/bucketinfocommand.h>
-#include <vespa/storageapi/messageapi/bucketinforeply.h>
-#include <vespa/storageapi/defs.h>
-#include <vespa/storageapi/message/visitor.h>
-#include <vespa/vdslib/container/writabledocumentlist.h>
-
-namespace storage {
-namespace api {
-
-/**
- * @class MultiOperationCommand
- * @ingroup message
- *
- * @brief Sends a documentlist
- */
-class MultiOperationCommand : public BucketInfoCommand {
-private:
- std::vector<char> _buffer; // Used to hold data refered to by document list
- // if message is to own its data.
- vdslib::WritableDocumentList _operations;
- bool _keepTimeStamps;
-
-public:
- explicit MultiOperationCommand(const document::DocumentTypeRepo::SP &repo,
- const document::Bucket &bucket,
- int bufferSize,
- bool keepTimeStamps = false);
- explicit MultiOperationCommand(const document::DocumentTypeRepo::SP &repo,
- const document::Bucket &bucket,
- const std::vector<char>& buffer,
- bool keepTimeStamps = false);
- explicit MultiOperationCommand(const MultiOperationCommand& template_);
- ~MultiOperationCommand();
-
- std::vector<char>& getBuffer() { return _buffer; };
- const std::vector<char>& getBuffer() const { return _buffer; };
-
- vdslib::WritableDocumentList& getOperations()
- { assert(_operations.getBufferSize() > 0); return _operations; }
- const vdslib::WritableDocumentList& getOperations() const
- { assert(_operations.getBufferSize() > 0); return _operations; }
-
- void setOperations(vdslib::WritableDocumentList& operations) {
- _buffer.clear();
- _operations = operations;
- }
-
- uint32_t getMemoryFootprint() const override {
- return _buffer.size() + 20;
- }
-
- bool keepTimeStamps() const { return _keepTimeStamps; }
- void keepTimeStamps(bool keepTime) { _keepTimeStamps = keepTime; }
-
- void print(std::ostream& out, bool verbose, const std::string& indent) const override;
-
- DECLARE_STORAGECOMMAND(MultiOperationCommand, onMultiOperation)
-};
-
-/**
- * @class MultiOperationReply
- * @ingroup message
- *
- * @brief Confirm that a given docoperations have been received.
- */
-class MultiOperationReply : public BucketInfoReply {
-private:
- // No need to serialize this, as it's only used internally in the distributor.
- uint64_t _highestModificationTimestamp;
-
-public:
- explicit MultiOperationReply(const MultiOperationCommand&);
-
- void print(std::ostream& out, bool verbose, const std::string& indent) const override;
-
- void setHighestModificationTimestamp(uint64_t highestModificationTimestamp) {
- _highestModificationTimestamp = highestModificationTimestamp;
- }
- uint64_t getHighestModificationTimestamp() const { return _highestModificationTimestamp; }
-
- DECLARE_STORAGEREPLY(MultiOperationReply, onMultiOperationReply)
-};
-
-} // api
-} // storage
-
diff --git a/storageapi/src/vespa/storageapi/message/removelocation.cpp b/storageapi/src/vespa/storageapi/message/removelocation.cpp
index 38b56101f04..ab44f0e6890 100644
--- a/storageapi/src/vespa/storageapi/message/removelocation.cpp
+++ b/storageapi/src/vespa/storageapi/message/removelocation.cpp
@@ -3,8 +3,7 @@
#include "removelocation.h"
#include <ostream>
-namespace storage {
-namespace api {
+namespace storage::api {
IMPLEMENT_COMMAND(RemoveLocationCommand, RemoveLocationReply)
IMPLEMENT_REPLY(RemoveLocationReply)
@@ -31,5 +30,4 @@ RemoveLocationReply::RemoveLocationReply(const RemoveLocationCommand& cmd)
{
}
-} // api
-} // storage
+}
diff --git a/storageapi/src/vespa/storageapi/message/removelocation.h b/storageapi/src/vespa/storageapi/message/removelocation.h
index 4a3dec2e0f6..55b2d1eb75e 100644
--- a/storageapi/src/vespa/storageapi/message/removelocation.h
+++ b/storageapi/src/vespa/storageapi/message/removelocation.h
@@ -5,8 +5,7 @@
#include <vespa/storageapi/messageapi/storagecommand.h>
#include <vespa/storageapi/messageapi/bucketinforeply.h>
-namespace storage {
-namespace api {
+namespace storage::api {
class RemoveLocationCommand : public BucketInfoCommand
{
@@ -32,4 +31,3 @@ public:
};
}
-}
diff --git a/storageapi/src/vespa/storageapi/message/visitor.h b/storageapi/src/vespa/storageapi/message/visitor.h
index e1850686222..0e78ea93753 100644
--- a/storageapi/src/vespa/storageapi/message/visitor.h
+++ b/storageapi/src/vespa/storageapi/message/visitor.h
@@ -15,8 +15,7 @@
#include <vespa/storageapi/messageapi/storagereply.h>
#include <vespa/document/select/orderingspecification.h>
-namespace storage {
-namespace api {
+namespace storage::api {
/**
* @class CreateVisitorCommand
@@ -251,6 +250,4 @@ public:
DECLARE_STORAGEREPLY(VisitorInfoReply, onVisitorInfoReply)
};
-} // api
-} // storage
-
+}
diff --git a/storageapi/src/vespa/storageapi/messageapi/messagehandler.h b/storageapi/src/vespa/storageapi/messageapi/messagehandler.h
index de8af718bcf..e7bd2b5bf27 100644
--- a/storageapi/src/vespa/storageapi/messageapi/messagehandler.h
+++ b/storageapi/src/vespa/storageapi/messageapi/messagehandler.h
@@ -25,7 +25,6 @@ class PutCommand; // Add document
class UpdateCommand; // Update document
class RemoveCommand; // Remove document
class RevertCommand; // Revert put/remove operation
-class MultiOperationCommand; // Multi put/remove/update operation
class BatchPutRemoveCommand;
class BatchDocumentUpdateCommand;
@@ -65,7 +64,6 @@ class PutReply;
class UpdateReply;
class RemoveReply;
class RevertReply;
-class MultiOperationReply;
class BatchPutRemoveReply;
class BatchDocumentUpdateReply;
@@ -145,12 +143,6 @@ public:
{ return false; }
virtual bool onRevertReply(const std::shared_ptr<api::RevertReply>&)
{ return false; }
- virtual bool onMultiOperation(
- const std::shared_ptr<api::MultiOperationCommand>&)
- { return false; }
- virtual bool onMultiOperationReply(
- const std::shared_ptr<api::MultiOperationReply>&)
- { return false; }
virtual bool onBatchPutRemove(
const std::shared_ptr<api::BatchPutRemoveCommand>&)
{ return false; }
diff --git a/storageapi/src/vespa/storageapi/messageapi/storagemessage.cpp b/storageapi/src/vespa/storageapi/messageapi/storagemessage.cpp
index d9eecf36a03..ee6b908020c 100644
--- a/storageapi/src/vespa/storageapi/messageapi/storagemessage.cpp
+++ b/storageapi/src/vespa/storageapi/messageapi/storagemessage.cpp
@@ -144,9 +144,6 @@ const MessageType MessageType::JOINBUCKETS("Joinbuckets", JOINBUCKETS_ID);
const MessageType MessageType::JOINBUCKETS_REPLY(
"Joinbuckets reply", JOINBUCKETS_REPLY_ID,
&MessageType::JOINBUCKETS);
-const MessageType MessageType::MULTIOPERATION("MultiOperation", MULTIOPERATION_ID);
-const MessageType MessageType::MULTIOPERATION_REPLY(
- "MultiOperation Reply", MULTIOPERATION_REPLY_ID, &MessageType::MULTIOPERATION);
const MessageType MessageType::STATBUCKET("Statbucket", STATBUCKET_ID);
const MessageType MessageType::STATBUCKET_REPLY(
"Statbucket Reply", STATBUCKET_REPLY_ID, &MessageType::STATBUCKET);
diff --git a/storageapi/src/vespa/storageapi/messageapi/storagemessage.h b/storageapi/src/vespa/storageapi/messageapi/storagemessage.h
index 1625be88418..46f00127202 100644
--- a/storageapi/src/vespa/storageapi/messageapi/storagemessage.h
+++ b/storageapi/src/vespa/storageapi/messageapi/storagemessage.h
@@ -128,8 +128,8 @@ public:
SPLITBUCKET_REPLY_ID = 67,
JOINBUCKETS_ID = 68,
JOINBUCKETS_REPLY_ID = 69,
- MULTIOPERATION_ID = 70,
- MULTIOPERATION_REPLY_ID = 71,
+ //MULTIOPERATION_ID = 70,
+ //MULTIOPERATION_REPLY_ID = 71,
DOCUMENTSUMMARY_ID = 72,
DOCUMENTSUMMARY_REPLY_ID = 73,
MAPVISITOR_ID = 74,
diff --git a/vespamalloc/bin/parsememorydump.pl b/vespamalloc/bin/parsememorydump.pl
index 1919e33fbff..a1183f185ea 100755
--- a/vespamalloc/bin/parsememorydump.pl
+++ b/vespamalloc/bin/parsememorydump.pl
@@ -65,10 +65,7 @@ my %patterns = (
'storage::SlotFileBuffer::getInputBuffer' => 'Persistence layer - Input buffer',
'storage::SlotFileBuffer::getIndexBuffer' => 'Persistence layer - Index buffer',
'storage::SlotFileBuffer::getOutputBuffer' => 'Persistence layer - Output buffer',
- 'std::vector<storage::SlotFile::WriteEntry.*storage::FileStorThread::onMultiOperation'
- => 'Persistence layer - Temporary buffer used to store data to write multi operation commands',
- 'storage::api::MultiOperationCommand::onDeserialize' => 'Messages - Queued multi operation commands',
'storage::api::\S*::makeReply.*storage::MessageDispatcher::handleCommand' => 'Messages - Replies stored in message dispatcher',
'document::SerializableArray::onDeserialize.*storage::CommunicationManager::onEvent\(std::auto_ptr<storage::rpc::Event>\)'
=> 'Messages - Documents from storage API messages - serializable arrays',
@@ -82,13 +79,10 @@ my %patterns = (
=> 'Messages - Merge apply entries',
'storage::api::ApplyBucketDiffCommand::Entry::Entry.*storage::api::StorageMessage::onDeserialize'
=> 'Messages - Merge apply entries',
- 'storage::api::MultiOperationCommand::MultiOperationCommand.*storage::api::MultiOperationCommand::clone.*storage::MessageDispatcher::handleCommand'
=> 'Messages - Queued multi operation commands - cloned for local use in message dispatcher',
'storage::BufHolder::reserve.*storage::FileStorThread::onGetIterCommand' => 'Visiting - Downsized docblocks',
'storage::BufHolder::resize.*storage::FileStorThread::onGetIterCommand' => 'Visiting - Upsized docblocks',
- 'documentapi::MultiOperationMessage::MultiOperationMessage.*storage::VisitorManager::send'
- => 'Visiting - Pending messagebus multi operation messages',
'JudyLIns.*storage::StorBucketDatabase::(get|insert)' => 'Bucket database - Judy',
'JudyLDel.*WrappedEntry::remove' => 'Bucket database - Judy',