MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / commitAlterTable

Method commitAlterTable

src/Databases/DatabaseOrdinary.cpp:761–774  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

759}
760
761void DatabaseOrdinary::commitAlterTable(const StorageID &, const String & table_metadata_tmp_path, const String & table_metadata_path, const String & /*statement*/, ContextPtr /*query_context*/)
762{
763 auto db_disk = getDisk();
764 try
765 {
766 /// rename atomically replaces the old file with the new one.
767 db_disk->replaceFile(table_metadata_tmp_path, table_metadata_path);
768 }
769 catch (...)
770 {
771 db_disk->removeFileIfExists(table_metadata_tmp_path);
772 throw;
773 }
774}
775
776void registerDatabaseOrdinary(DatabaseFactory & factory);
777void registerDatabaseOrdinary(DatabaseFactory & factory)

Callers

nothing calls this directly

Calls 2

replaceFileMethod · 0.45
removeFileIfExistsMethod · 0.45

Tested by

no test coverage detected