mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
Fix
This commit is contained in:
parent
cfda64e1a4
commit
11f3b06099
@ -68,9 +68,13 @@ void moveFileBetweenDisks(DiskPtr disk_from, ChangelogFileDescriptionPtr descrip
|
|||||||
|
|
||||||
/// a different thread could be trying to read from the file
|
/// a different thread could be trying to read from the file
|
||||||
/// we should make sure the source disk contains the file while read is in progress
|
/// we should make sure the source disk contains the file while read is in progress
|
||||||
description->withLock([&]{ description->disk = disk_to; });
|
description->withLock(
|
||||||
disk_from->removeFile(description->path);
|
[&]
|
||||||
|
{
|
||||||
|
description->disk = disk_to;
|
||||||
description->path = path_to;
|
description->path = path_to;
|
||||||
|
});
|
||||||
|
disk_from->removeFile(description->path);
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr auto DEFAULT_PREFIX = "changelog";
|
constexpr auto DEFAULT_PREFIX = "changelog";
|
||||||
|
Loading…
Reference in New Issue
Block a user