Changed to rename cache files when renaming large files (#2135)

This commit is contained in:
Takeshi Nakatani 2023-03-21 14:15:34 +09:00 committed by GitHub
parent 18495c44aa
commit 9648eba5bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -1518,11 +1518,14 @@ static int rename_large_object(const char* from, const char* to)
}
s3fscurl.DestroyCurlHandle();
// Rename cache file
FdManager::get()->Rename(from, to);
// Remove file
result = s3fs_unlink(from);
// Stats
StatCache::getStatCacheData()->DelStat(to);
FdManager::DeleteCacheFile(to);
return result;
}