diff options
| author | Dan Engelbrecht <[email protected]> | 2025-05-30 11:51:05 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2025-05-30 11:51:05 +0200 |
| commit | 42aa2c9a8124ada33c88f5c608e4865b1ff84c64 (patch) | |
| tree | 4c237a2e515f73a256ee290e8f9a113f0a2060f2 /src/zenstore/compactcas.cpp | |
| parent | frequent disk space check (#407) (diff) | |
| download | zen-42aa2c9a8124ada33c88f5c608e4865b1ff84c64.tar.xz zen-42aa2c9a8124ada33c88f5c608e4865b1ff84c64.zip | |
faster oplog validate (#408)
Improvement: Faster oplog validate to reduce GC wall time and disk I/O pressure
Diffstat (limited to 'src/zenstore/compactcas.cpp')
| -rw-r--r-- | src/zenstore/compactcas.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/zenstore/compactcas.cpp b/src/zenstore/compactcas.cpp index 15bea272b..730bdf143 100644 --- a/src/zenstore/compactcas.cpp +++ b/src/zenstore/compactcas.cpp @@ -307,7 +307,12 @@ bool CasContainerStrategy::HaveChunk(const IoHash& ChunkHash) { RwLock::SharedLockScope _(m_LocationMapLock); - return m_LocationMap.contains(ChunkHash); + if (auto KeyIt = m_LocationMap.find(ChunkHash); KeyIt != m_LocationMap.end()) + { + const BlockStoreLocation& Location = m_Locations[KeyIt->second].Get(m_PayloadAlignment); + return m_BlockStore.HasChunk(Location); + } + return false; } void |