mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-19 04:42:37 +00:00
Backport #72386 to 24.10: fix finalize/cancel write buffers
This commit is contained in:
parent
f66e8b8047
commit
6c0af11f41
@ -74,6 +74,7 @@ void StorageObjectStorageSink::finalizeBuffers()
|
||||
catch (...)
|
||||
{
|
||||
/// Stop ParallelFormattingOutputFormat correctly.
|
||||
cancelBuffers();
|
||||
releaseBuffers();
|
||||
throw;
|
||||
}
|
||||
|
@ -561,7 +561,7 @@ void StorageMemory::restoreDataImpl(const BackupPtr & backup, const String & dat
|
||||
temp_data_file.emplace(temporary_disk);
|
||||
auto out = std::make_unique<WriteBufferFromFile>(temp_data_file->getAbsolutePath());
|
||||
copyData(*in, *out);
|
||||
out.reset();
|
||||
out->finalize();
|
||||
in = createReadBufferFromFileBase(temp_data_file->getAbsolutePath(), {});
|
||||
}
|
||||
std::unique_ptr<ReadBufferFromFileBase> in_from_file{static_cast<ReadBufferFromFileBase *>(in.release())};
|
||||
|
Loading…
Reference in New Issue
Block a user