summaryrefslogtreecommitdiffstats
path: root/storageapi
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2018-09-25 14:43:55 +0200
committerTor Egge <Tor.Egge@broadpark.no>2018-09-25 15:41:09 +0200
commit7d61a960839ea0400cd2e345997425419ab697f4 (patch)
treef99fabb2631f7d67b270d1dd928df36494369735 /storageapi
parent8c58a2f4ed9b873c712c41f7e1f407d078b9a4d4 (diff)
Remove BatchDocumentUpdateMessage and BatchDocumentUpdateReply from
C++ portion of documentapi. Remove corresponding document api cross language files. Remove corresponding storageapi messages.
Diffstat (limited to 'storageapi')
-rw-r--r--storageapi/src/vespa/storageapi/mbusprot/protocolserialization.h2
-rw-r--r--storageapi/src/vespa/storageapi/message/batch.cpp41
-rw-r--r--storageapi/src/vespa/storageapi/message/batch.h47
-rw-r--r--storageapi/src/vespa/storageapi/messageapi/messagehandler.h8
-rw-r--r--storageapi/src/vespa/storageapi/messageapi/storagemessage.cpp2
-rw-r--r--storageapi/src/vespa/storageapi/messageapi/storagemessage.h4
6 files changed, 0 insertions, 104 deletions
diff --git a/storageapi/src/vespa/storageapi/mbusprot/protocolserialization.h b/storageapi/src/vespa/storageapi/mbusprot/protocolserialization.h
index e7d80a0614f..c3b54cd9e46 100644
--- a/storageapi/src/vespa/storageapi/mbusprot/protocolserialization.h
+++ b/storageapi/src/vespa/storageapi/mbusprot/protocolserialization.h
@@ -52,8 +52,6 @@ class RemoveLocationCommand;
class RemoveLocationReply;
class BatchPutRemoveCommand;
class BatchPutRemoveReply;
-class BatchDocumentUpdateCommand;
-class BatchDocumentUpdateReply;
}
namespace storage::mbusprot {
diff --git a/storageapi/src/vespa/storageapi/message/batch.cpp b/storageapi/src/vespa/storageapi/message/batch.cpp
index de8ac849dee..ad90a622491 100644
--- a/storageapi/src/vespa/storageapi/message/batch.cpp
+++ b/storageapi/src/vespa/storageapi/message/batch.cpp
@@ -9,8 +9,6 @@ using document::BucketSpace;
IMPLEMENT_COMMAND(BatchPutRemoveCommand, BatchPutRemoveReply)
IMPLEMENT_REPLY(BatchPutRemoveReply)
-IMPLEMENT_COMMAND(BatchDocumentUpdateCommand, BatchDocumentUpdateReply)
-IMPLEMENT_REPLY(BatchDocumentUpdateReply)
BatchPutRemoveCommand::Operation::Operation(uint64_t ts, Type tp)
@@ -132,42 +130,3 @@ BatchPutRemoveReply::print(std::ostream& out, bool verbose,
BucketInfoReply::print(out, verbose, indent);
}
}
-
-BatchDocumentUpdateCommand::BatchDocumentUpdateCommand(const UpdateList& updates)
- : StorageCommand(MessageType::BATCHDOCUMENTUPDATE),
- _updates(updates),
- _bucket(BucketSpace::placeHolder(), document::BucketId())
-{
- document::BucketIdFactory factory;
- _bucket = document::Bucket(BucketSpace::placeHolder(), factory.getBucketId(updates[0]->getId()));
-}
-
-void
-BatchDocumentUpdateCommand::print(std::ostream& out, bool verbose,
- const std::string& indent) const {
- out << "BatchDocumentUpdate(" << _updates.size() << " operations)";
-
- if (verbose) {
- out << " : ";
- StorageCommand::print(out, verbose, indent);
- }
-}
-
-BatchDocumentUpdateReply::BatchDocumentUpdateReply(const BatchDocumentUpdateCommand& cmd)
- : StorageReply(cmd),
- _documentsNotFound()
-{
-}
-
-void
-BatchDocumentUpdateReply::print(std::ostream& out, bool verbose,
- const std::string& indent) const {
- out << "BatchDocumentUpdateReply("
- << std::count(_documentsNotFound.begin(), _documentsNotFound.end(), true)
- << " not found)";
-
- if (verbose) {
- out << " : ";
- StorageReply::print(out, verbose, indent);
- }
-}
diff --git a/storageapi/src/vespa/storageapi/message/batch.h b/storageapi/src/vespa/storageapi/message/batch.h
index 56cca3cfe38..f265bbca6fb 100644
--- a/storageapi/src/vespa/storageapi/message/batch.h
+++ b/storageapi/src/vespa/storageapi/message/batch.h
@@ -136,51 +136,4 @@ public:
DECLARE_STORAGEREPLY(BatchPutRemoveReply, onBatchPutRemoveReply)
};
-class BatchDocumentUpdateCommand : public StorageCommand
-{
-public:
- typedef std::vector<document::DocumentUpdate::SP > UpdateList;
-
- /**
- Creates a batch update message containing the given updates.
- */
- BatchDocumentUpdateCommand(const UpdateList& updates);
-
- /**
- @return Returns a list of the updates to be performed.
- */
- const UpdateList& getUpdates() const { return _updates; };
- void print(std::ostream& out, bool verbose, const std::string& indent) const override;
-
- /**
- Returns a bucket suitable for routing this message.
- */
- document::Bucket getBucket() const override { return _bucket; }
- bool hasSingleBucketId() const override { return true; }
-
- DECLARE_STORAGECOMMAND(BatchDocumentUpdateCommand, onBatchDocumentUpdate)
-
-private:
- UpdateList _updates;
- document::Bucket _bucket;
-};
-
-/**
- * @class BatchDocumentUpdateReply
- * @ingroup message
- *
- * @brief Confirm that a given docoperations have been received.
- */
-class BatchDocumentUpdateReply : public StorageReply {
- // 1-1 mapping of found/not found state for documents
- std::vector<bool> _documentsNotFound;
-public:
- explicit BatchDocumentUpdateReply(const BatchDocumentUpdateCommand&);
- void print(std::ostream& out, bool verbose, const std::string& indent) const override;
- const std::vector<bool>& getDocumentsNotFound() const { return _documentsNotFound; }
- std::vector<bool>& getDocumentsNotFound() { return _documentsNotFound; }
-
- DECLARE_STORAGEREPLY(BatchDocumentUpdateReply, onBatchDocumentUpdateReply)
-};
-
}
diff --git a/storageapi/src/vespa/storageapi/messageapi/messagehandler.h b/storageapi/src/vespa/storageapi/messageapi/messagehandler.h
index e7bd2b5bf27..4eae26d0442 100644
--- a/storageapi/src/vespa/storageapi/messageapi/messagehandler.h
+++ b/storageapi/src/vespa/storageapi/messageapi/messagehandler.h
@@ -26,7 +26,6 @@ class UpdateCommand; // Update document
class RemoveCommand; // Remove document
class RevertCommand; // Revert put/remove operation
class BatchPutRemoveCommand;
-class BatchDocumentUpdateCommand;
class CreateVisitorCommand; // Create a new visitor
class DestroyVisitorCommand; // Destroy a running visitor
@@ -65,7 +64,6 @@ class UpdateReply;
class RemoveReply;
class RevertReply;
class BatchPutRemoveReply;
-class BatchDocumentUpdateReply;
class CreateVisitorReply;
class DestroyVisitorReply;
@@ -149,12 +147,6 @@ public:
virtual bool onBatchPutRemoveReply(
const std::shared_ptr<api::BatchPutRemoveReply>&)
{ return false; }
- virtual bool onBatchDocumentUpdate(
- const std::shared_ptr<api::BatchDocumentUpdateCommand>&)
- { return false; }
- virtual bool onBatchDocumentUpdateReply(
- const std::shared_ptr<api::BatchDocumentUpdateReply>&)
- { return false; }
// Visiting
virtual bool onCreateVisitor(
diff --git a/storageapi/src/vespa/storageapi/messageapi/storagemessage.cpp b/storageapi/src/vespa/storageapi/messageapi/storagemessage.cpp
index 563a2aab7c1..649e672babb 100644
--- a/storageapi/src/vespa/storageapi/messageapi/storagemessage.cpp
+++ b/storageapi/src/vespa/storageapi/messageapi/storagemessage.cpp
@@ -107,8 +107,6 @@ const MessageType MessageType::QUERYRESULT("QueryResult", QUERYRESULT_ID);
const MessageType MessageType::QUERYRESULT_REPLY("QueryResult reply", QUERYRESULT_REPLY_ID, &MessageType::QUERYRESULT);
const MessageType MessageType::BATCHPUTREMOVE("BatchPutRemove", BATCHPUTREMOVE_ID);
const MessageType MessageType::BATCHPUTREMOVE_REPLY("BatchPutRemove reply", BATCHPUTREMOVE_REPLY_ID, &MessageType::BATCHPUTREMOVE);
-const MessageType MessageType::BATCHDOCUMENTUPDATE("BatchDocumentUpdate", BATCHDOCUMENTUPDATE_ID);
-const MessageType MessageType::BATCHDOCUMENTUPDATE_REPLY("BatchDocumentUpdate reply", BATCHDOCUMENTUPDATE_REPLY_ID, &MessageType::BATCHDOCUMENTUPDATE);
const MessageType MessageType::SETBUCKETSTATE("SetBucketState", SETBUCKETSTATE_ID);
const MessageType MessageType::SETBUCKETSTATE_REPLY("SetBucketStateReply", SETBUCKETSTATE_REPLY_ID, &MessageType::SETBUCKETSTATE);
diff --git a/storageapi/src/vespa/storageapi/messageapi/storagemessage.h b/storageapi/src/vespa/storageapi/messageapi/storagemessage.h
index c81ee51ae22..cd3753bcf09 100644
--- a/storageapi/src/vespa/storageapi/messageapi/storagemessage.h
+++ b/storageapi/src/vespa/storageapi/messageapi/storagemessage.h
@@ -149,8 +149,6 @@ public:
QUERYRESULT_REPLY_ID = 89,
BATCHPUTREMOVE_ID = 90,
BATCHPUTREMOVE_REPLY_ID = 91,
- BATCHDOCUMENTUPDATE_ID = 92,
- BATCHDOCUMENTUPDATE_REPLY_ID = 93,
SETBUCKETSTATE_ID = 94,
SETBUCKETSTATE_REPLY_ID = 95,
MESSAGETYPE_MAX_ID
@@ -235,8 +233,6 @@ public:
static const MessageType QUERYRESULT_REPLY;
static const MessageType BATCHPUTREMOVE;
static const MessageType BATCHPUTREMOVE_REPLY;
- static const MessageType BATCHDOCUMENTUPDATE;
- static const MessageType BATCHDOCUMENTUPDATE_REPLY;
static const MessageType SETBUCKETSTATE;
static const MessageType SETBUCKETSTATE_REPLY;