mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +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
|
||||
/// we should make sure the source disk contains the file while read is in progress
|
||||
description->withLock([&]{ description->disk = disk_to; });
|
||||
disk_from->removeFile(description->path);
|
||||
description->withLock(
|
||||
[&]
|
||||
{
|
||||
description->disk = disk_to;
|
||||
description->path = path_to;
|
||||
});
|
||||
disk_from->removeFile(description->path);
|
||||
}
|
||||
|
||||
constexpr auto DEFAULT_PREFIX = "changelog";
|
||||
|
Loading…
Reference in New Issue
Block a user