Fix lock order inversion

This commit is contained in:
kssenii 2023-03-01 21:40:28 +01:00
parent 04557b9678
commit c272f4befb

View File

@ -1016,6 +1016,7 @@ FileSegmentsHolderPtr FileCache::getSnapshot()
{ {
assertInitialized(); assertInitialized();
auto cache_lock = cache_guard.lock();
auto lock = metadata.lock(); auto lock = metadata.lock();
performDelayedRemovalOfDeletedKeysFromMetadata(lock); performDelayedRemovalOfDeletedKeysFromMetadata(lock);