mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Add missing sync of underlying files
This commit is contained in:
parent
fa329808e5
commit
06e8065ee6
@ -562,6 +562,7 @@ void debugIncreaseOOMScore()
|
||||
{
|
||||
DB::WriteBufferFromFile buf("/proc/self/oom_score_adj");
|
||||
buf.write(new_score.c_str(), new_score.size());
|
||||
buf.close();
|
||||
}
|
||||
catch (const Poco::Exception & e)
|
||||
{
|
||||
|
@ -217,6 +217,7 @@ namespace
|
||||
/// Write the file.
|
||||
WriteBufferFromFile out{tmp_file_path.string()};
|
||||
out.write(file_contents.data(), file_contents.size());
|
||||
out.close();
|
||||
|
||||
/// Rename.
|
||||
std::filesystem::rename(tmp_file_path, file_path);
|
||||
@ -274,6 +275,7 @@ namespace
|
||||
writeStringBinary(name, out);
|
||||
writeUUIDText(id, out);
|
||||
}
|
||||
out.close();
|
||||
}
|
||||
|
||||
|
||||
|
@ -50,6 +50,7 @@ struct Test
|
||||
{
|
||||
DB::WriteBufferFromFile wb(filename);
|
||||
wb.write(reinterpret_cast<const char *>(&store), sizeof(store));
|
||||
wb.close();
|
||||
}
|
||||
|
||||
{
|
||||
|
@ -97,6 +97,7 @@ void run(String part_path, String date_column, String dest_path)
|
||||
Poco::File(new_tmp_part_path_str + "checksums.txt").setWriteable();
|
||||
WriteBufferFromFile checksums_out(new_tmp_part_path_str + "checksums.txt", 4096);
|
||||
checksums.write(checksums_out);
|
||||
checksums.close();
|
||||
|
||||
Poco::File(new_tmp_part_path).renameTo(new_part_path.toString());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user