diff options
| -rw-r--r-- | CHANGELOG.md | 2 | ||||
| -rw-r--r-- | src/zenstore/filecas.cpp | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 98b9612b4..ffc0dcec8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,11 +6,13 @@ - Bugfix: Use validation of payload size/existance in all chunk fetch operations in file cas - Bugfix: Fixed deadlock in oplog snapshot - Bugifx: Validate that we can actually fetch the payload when checking attachments in response to a `/prep` call +- Bugfix: Add missing exclusive ShardLock during compact in filecas - Improvement: In project store oplog validate, make sure we can reach all the payloads - Improvement: Add threading to oplog validate request - Improvement: For `/chunkinfos` and `/files` requests we will not fill in the `size` or `rawsize` in the response for chunks that are not found - Improvement: For `/chunkinfos` and `/files` requests we will not fill in the `size` or `rawsize` in the response for chunks that are are invalid compressed buffers when `rawsize` is requested - Improvement: Tweaked how small chunks are batch-read info memory for different use cases. Project store `/chunkinfos` call execution time is 2x to 3x times faster +- Improvement: Add warning log when filecas fails to open a file it expects to be present ## 5.5.13 - Bugfix: Fix inconsistencies in filecas due to failing to remove payload file during GC causing "Missing Chunk" errors diff --git a/src/zenstore/filecas.cpp b/src/zenstore/filecas.cpp index 3cee9f076..f64427807 100644 --- a/src/zenstore/filecas.cpp +++ b/src/zenstore/filecas.cpp @@ -513,6 +513,10 @@ FileCasStrategy::SafeOpenChunk(const IoHash& ChunkHash, uint64 ExpectedSize) m_CasLog.Append({.Key = ChunkHash, .Flags = FileCasIndexEntry::kTombStone, .Size = ChunkSize}); } } + else + { + ZEN_WARN("FileCasStrategy::IterateChunks failed to get payload for '{}'", ChunkPath); + } return {}; } @@ -1232,6 +1236,8 @@ public: FileCasStrategy::ShardingHelper Name(m_FileCasStrategy.m_RootDirectory, ChunkHash); const std::filesystem::path ChunkPath = Name.ShardedPath.ToPath(); { + RwLock::ExclusiveLockScope HashLock(m_FileCasStrategy.LockForHash(ChunkHash)); + RwLock::SharedLockScope __(m_FileCasStrategy.m_Lock); if (auto It = m_FileCasStrategy.m_Index.find(ChunkHash); It != m_FileCasStrategy.m_Index.end()) { @@ -1263,7 +1269,6 @@ public: // Target file may be open for read, attempt to move it to a temp file and mark it delete on close IoBuffer OldChunk; { - RwLock::SharedLockScope HashLock(m_FileCasStrategy.LockForHash(ChunkHash)); OldChunk = IoBufferBuilder::MakeFromFile(ChunkPath); } if (OldChunk) |