summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-11-23 13:59:35 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2020-11-23 13:59:35 +0000
commita9976e18ce5831531816abb3bb1ffa08b0aaabcb (patch)
treebce34c129b315eff95f123c9ac6d25bf71394a13
parentc3c152485a4e2d246d4dd50909a3481cdce71347 (diff)
Avoid having mutating methods const.
-rw-r--r--messagebus/src/vespa/messagebus/routable.h8
-rw-r--r--storage/src/vespa/storage/distributor/operations/external/twophaseupdateoperation.cpp2
-rw-r--r--storage/src/vespa/storage/distributor/operations/external/twophaseupdateoperation.h2
-rw-r--r--storageapi/src/vespa/storageapi/messageapi/storagemessage.h6
4 files changed, 9 insertions, 9 deletions
diff --git a/messagebus/src/vespa/messagebus/routable.h b/messagebus/src/vespa/messagebus/routable.h
index 37b15199f45..2c83daded1e 100644
--- a/messagebus/src/vespa/messagebus/routable.h
+++ b/messagebus/src/vespa/messagebus/routable.h
@@ -24,9 +24,9 @@ namespace mbus {
*/
class Routable {
private:
- Context _context;
- CallStack _stack;
- mutable Trace _trace;
+ Context _context;
+ CallStack _stack;
+ Trace _trace;
public:
/**
@@ -90,7 +90,7 @@ public:
* @return Trace object
*/
Trace &getTrace() { return _trace; }
- Trace && steal_trace() const { return std::move(_trace); }
+ Trace && steal_trace() { return std::move(_trace); }
/**
* Access the Trace object for this Routable. The Trace is part of the
diff --git a/storage/src/vespa/storage/distributor/operations/external/twophaseupdateoperation.cpp b/storage/src/vespa/storage/distributor/operations/external/twophaseupdateoperation.cpp
index 4deaf0b23f3..d7dd0be7f4f 100644
--- a/storage/src/vespa/storage/distributor/operations/external/twophaseupdateoperation.cpp
+++ b/storage/src/vespa/storage/distributor/operations/external/twophaseupdateoperation.cpp
@@ -644,7 +644,7 @@ TwoPhaseUpdateOperation::satisfiesUpdateTimestampConstraint(api::Timestamp ts) c
}
void
-TwoPhaseUpdateOperation::addTraceFromReply(const api::StorageReply& reply)
+TwoPhaseUpdateOperation::addTraceFromReply(api::StorageReply & reply)
{
_trace.addChild(reply.steal_trace());
}
diff --git a/storage/src/vespa/storage/distributor/operations/external/twophaseupdateoperation.h b/storage/src/vespa/storage/distributor/operations/external/twophaseupdateoperation.h
index 8dde87d334b..8527ff0ffba 100644
--- a/storage/src/vespa/storage/distributor/operations/external/twophaseupdateoperation.h
+++ b/storage/src/vespa/storage/distributor/operations/external/twophaseupdateoperation.h
@@ -125,7 +125,7 @@ private:
DistributorMessageSender& sender,
const document::Document& candidateDoc);
bool satisfiesUpdateTimestampConstraint(api::Timestamp) const;
- void addTraceFromReply(const api::StorageReply& reply);
+ void addTraceFromReply(api::StorageReply& reply);
bool hasTasCondition() const noexcept;
void replyWithTasFailure(DistributorMessageSender& sender,
vespalib::stringref message);
diff --git a/storageapi/src/vespa/storageapi/messageapi/storagemessage.h b/storageapi/src/vespa/storageapi/messageapi/storagemessage.h
index f26159758b9..58f167f5002 100644
--- a/storageapi/src/vespa/storageapi/messageapi/storagemessage.h
+++ b/storageapi/src/vespa/storageapi/messageapi/storagemessage.h
@@ -361,8 +361,8 @@ protected:
const MessageType& _type;
Id _msgId;
std::unique_ptr<StorageMessageAddress> _address;
- documentapi::LoadType _loadType;
- mutable vespalib::Trace _trace;
+ documentapi::LoadType _loadType;
+ vespalib::Trace _trace;
uint32_t _approxByteSize;
Priority _priority;
@@ -435,7 +435,7 @@ public:
const documentapi::LoadType& getLoadType() const { return _loadType; }
void setLoadType(const documentapi::LoadType& type) { _loadType = type; }
- mbus::Trace && steal_trace() const { return std::move(_trace); }
+ mbus::Trace && steal_trace() { return std::move(_trace); }
mbus::Trace& getTrace() { return _trace; }
const mbus::Trace& getTrace() const { return _trace; }