Skip to content

Commit

Permalink
[BugFix] Fix incorrect directory replacement in datacache for old per…
Browse files Browse the repository at this point in the history
…sistent cache data. (#52969)

Signed-off-by: GavinMar <[email protected]>
  • Loading branch information
GavinMar authored Nov 18, 2024
1 parent f28f98a commit bc35b4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions be/src/block_cache/datacache_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ void DataCacheUtils::clean_residual_datacache(const std::string& disk_path) {
}

Status DataCacheUtils::change_disk_path(const std::string& old_disk_path, const std::string& new_disk_path) {
std::filesystem::path new_path(old_disk_path);
std::filesystem::path old_path(new_disk_path);
std::filesystem::path old_path(old_disk_path);
std::filesystem::path new_path(new_disk_path);
if (std::filesystem::exists(old_path)) {
if (DiskInfo::disk_id(old_path.c_str()) != DiskInfo::disk_id(new_path.c_str())) {
LOG(ERROR) << "fail to rename the old dataache directory [" << old_path.string() << "] to the new one ["
Expand Down

0 comments on commit bc35b4f

Please sign in to comment.