| 225 | } |
| 226 | |
| 227 | void 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 | |
| 241 | void MaterializeMetadata::transaction(const MySQLReplication::Position & position, const std::function<void()> & fun) |
| 242 | { |
no test coverage detected