summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2022-05-03 21:34:15 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2022-05-03 22:01:22 +0200
commit7585981b32937d2b13da1a8f94b42c8a0833a4c2 (patch)
tree9f65f2d5d8326f1dd2be9647d8fea7b7f21d1992 /searchlib
parent1427de3591c05635b46de05fcda78f229f890f51 (diff)
Use lock guard on _lock while getting memory meta footprint.
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/docstore/writeablefilechunk.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/searchlib/src/vespa/searchlib/docstore/writeablefilechunk.cpp b/searchlib/src/vespa/searchlib/docstore/writeablefilechunk.cpp
index c2dd760549c..82a9bb72a51 100644
--- a/searchlib/src/vespa/searchlib/docstore/writeablefilechunk.cpp
+++ b/searchlib/src/vespa/searchlib/docstore/writeablefilechunk.cpp
@@ -629,6 +629,7 @@ WriteableFileChunk::getMemoryFootprint() const
size_t
WriteableFileChunk::getMemoryMetaFootprint() const
{
+ std::lock_guard guard(_lock);
constexpr size_t mySizeWithoutMyParent(sizeof(*this) - sizeof(FileChunk));
return mySizeWithoutMyParent + FileChunk::getMemoryMetaFootprint();
}