diff --git a/fdbclient/StorageServerInterface.h b/fdbclient/StorageServerInterface.h index bc340727fd..a3e421a128 100644 --- a/fdbclient/StorageServerInterface.h +++ b/fdbclient/StorageServerInterface.h @@ -451,7 +451,7 @@ struct ReadHotRangeWithMetrics { ReadHotRangeWithMetrics(Arena& arena, const ReadHotRangeWithMetrics& rhs) : keys(arena, rhs.keys), density(rhs.density), readBandwidth(rhs.readBandwidth) {} - int expectedSize() { return keys.expectedSize() + sizeof(density) + sizeof(readBandwidth); } + int expectedSize() const { return keys.expectedSize() + sizeof(density) + sizeof(readBandwidth); } template void serialize(Ar& ar) { diff --git a/fdbserver/KeyValueStoreMemory.actor.cpp b/fdbserver/KeyValueStoreMemory.actor.cpp index fa2d47dbcd..2232fb27ac 100644 --- a/fdbserver/KeyValueStoreMemory.actor.cpp +++ b/fdbserver/KeyValueStoreMemory.actor.cpp @@ -279,7 +279,7 @@ private: StringRef p1, p2; OpRef() {} OpRef(Arena& a, OpRef const& o) : op(o.op), p1(a, o.p1), p2(a, o.p2) {} - size_t expectedSize() { return p1.expectedSize() + p2.expectedSize(); } + size_t expectedSize() const { return p1.expectedSize() + p2.expectedSize(); } }; struct OpHeader { int op;