diff options
| author | Dan Engelbrecht <[email protected]> | 2022-04-12 09:57:38 +0200 |
|---|---|---|
| committer | Dan Engelbrecht <[email protected]> | 2022-04-12 10:05:35 +0200 |
| commit | fb53d1685c7eca283a4f7bb13e2b45be529db29e (patch) | |
| tree | 8e39d2a4a3b5e660950546d200bee4c04667a1db | |
| parent | Running linux build test (diff) | |
| download | zen-fb53d1685c7eca283a4f7bb13e2b45be529db29e.tar.xz zen-fb53d1685c7eca283a4f7bb13e2b45be529db29e.zip | |
Be more strict with m_TotalSize atomic operations
| -rw-r--r-- | zenstore/compactcas.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/zenstore/compactcas.cpp b/zenstore/compactcas.cpp index 51fe7a901..ce93a3320 100644 --- a/zenstore/compactcas.cpp +++ b/zenstore/compactcas.cpp @@ -330,7 +330,7 @@ CasContainerStrategy::InsertChunk(const void* ChunkData, size_t ChunkSize, const WriteBlock->Write(ChunkData, ChunkSize, InsertOffset); m_CasLog.Append(IndexEntry); - m_TotalSize.fetch_add(static_cast<uint64_t>(ChunkSize), std::memory_order_release); + m_TotalSize.fetch_add(static_cast<uint64_t>(ChunkSize), std::memory_order_seq_cst); { RwLock::ExclusiveLockScope __(m_LocationMapLock); m_LocationMap.emplace(ChunkHash, Location); @@ -1484,7 +1484,7 @@ CasContainerStrategy::OpenContainer(bool IsNewStore) for (const auto& Entry : m_LocationMap) { const BlockStoreDiskLocation& Location = Entry.second; - m_TotalSize.fetch_add(Location.GetSize(), std::memory_order_release); + m_TotalSize.fetch_add(Location.GetSize(), std::memory_order_seq_cst); KnownBlocks.insert(Location.GetBlockIndex()); } |