Update LRUFileCache.cpp

This commit is contained in:
Kseniia Sumarokova 2022-07-19 14:41:31 +02:00 committed by GitHub
parent 5ad4e9d28f
commit af7acb1782
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -841,7 +841,9 @@ void LRUFileCache::loadCacheInfoIntoMemory(std::lock_guard<std::mutex> & cache_l
/// cache_base_path / key_prefix / key / offset
if (!files.empty())
throw Exception(ErrorCodes::LOGICAL_ERROR, "Cache already initialized");
throw Exception(
REMOTE_FS_OBJECT_CACHE_ERROR,
"Cache already initialized: this can be result of a first attempt during cache initialization. Please, check log for error messages");
fs::directory_iterator key_prefix_it{cache_base_path};
for (; key_prefix_it != fs::directory_iterator(); ++key_prefix_it)