MCPcopy Create free account
hub / github.com/ByConity/ByConity / commitMetadata

Function commitMetadata

src/Databases/MySQL/MaterializeMetadata.cpp:227–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

225}
226
227void commitMetadata(const std::function<void()> & function, const String & persistent_tmp_path, const String & persistent_path)
228{
229 try
230 {
231 function();
232 fs::rename(persistent_tmp_path, persistent_path);
233 }
234 catch (...)
235 {
236 fs::remove(persistent_tmp_path);
237 throw;
238 }
239}
240
241void MaterializeMetadata::transaction(const MySQLReplication::Position & position, const std::function<void()> & fun)
242{

Callers 1

transactionMethod · 0.85

Calls 2

renameFunction · 0.85
removeFunction · 0.85

Tested by

no test coverage detected