summaryrefslogtreecommitdiffstats
path: root/storageapi
diff options
context:
space:
mode:
Diffstat (limited to 'storageapi')
-rw-r--r--storageapi/src/vespa/storageapi/message/persistence.cpp8
-rw-r--r--storageapi/src/vespa/storageapi/message/persistence.h6
2 files changed, 11 insertions, 3 deletions
diff --git a/storageapi/src/vespa/storageapi/message/persistence.cpp b/storageapi/src/vespa/storageapi/message/persistence.cpp
index 0b641eea253..8bd4f648f30 100644
--- a/storageapi/src/vespa/storageapi/message/persistence.cpp
+++ b/storageapi/src/vespa/storageapi/message/persistence.cpp
@@ -207,13 +207,17 @@ GetCommand::print(std::ostream& out, bool verbose, const std::string& indent) co
}
}
-GetReply::GetReply(const GetCommand& cmd, const DocumentSP& doc, Timestamp lastModified)
+GetReply::GetReply(const GetCommand& cmd,
+ const DocumentSP& doc,
+ Timestamp lastModified,
+ bool had_consistent_replicas)
: BucketInfoReply(cmd),
_docId(cmd.getDocumentId()),
_fieldSet(cmd.getFieldSet()),
_doc(doc),
_beforeTimestamp(cmd.getBeforeTimestamp()),
- _lastModifiedTime(lastModified)
+ _lastModifiedTime(lastModified),
+ _had_consistent_replicas(had_consistent_replicas)
{
}
diff --git a/storageapi/src/vespa/storageapi/message/persistence.h b/storageapi/src/vespa/storageapi/message/persistence.h
index 1fdd5c369bf..f2161421feb 100644
--- a/storageapi/src/vespa/storageapi/message/persistence.h
+++ b/storageapi/src/vespa/storageapi/message/persistence.h
@@ -217,11 +217,13 @@ class GetReply : public BucketInfoReply {
DocumentSP _doc; // Null pointer if not found
Timestamp _beforeTimestamp;
Timestamp _lastModifiedTime;
+ bool _had_consistent_replicas;
public:
GetReply(const GetCommand& cmd,
const DocumentSP& doc = DocumentSP(),
- Timestamp lastModified = 0);
+ Timestamp lastModified = 0,
+ bool had_consistent_replicas = false);
~GetReply() override;
const DocumentSP& getDocument() const { return _doc; }
@@ -231,6 +233,8 @@ public:
Timestamp getLastModifiedTimestamp() const { return _lastModifiedTime; }
Timestamp getBeforeTimestamp() const { return _beforeTimestamp; }
+ bool had_consistent_replicas() const noexcept { return _had_consistent_replicas; }
+
bool wasFound() const { return (_doc.get() != 0); }
void print(std::ostream& out, bool verbose, const std::string& indent) const override;
DECLARE_STORAGEREPLY(GetReply, onGetReply)