| 151 | } |
| 152 | |
| 153 | static MergeTreeTransactionPtr tryGetTransactionForMutation(const MergeTreeMutationEntry & mutation, LoggerPtr log = nullptr) |
| 154 | { |
| 155 | chassert(!mutation.tid.isEmpty()); |
| 156 | if (mutation.tid.isNonTransactional()) |
| 157 | return {}; |
| 158 | |
| 159 | auto txn = TransactionLog::instance().tryGetRunningTransaction(mutation.tid.getHash()); |
| 160 | if (txn) |
| 161 | return txn; |
| 162 | |
| 163 | if (log) |
| 164 | LOG_WARNING(log, "Cannot find transaction {} which had started mutation {}, probably it finished", mutation.tid, mutation.file_name); |
| 165 | |
| 166 | return {}; |
| 167 | } |
| 168 | |
| 169 | static bool supportTransaction(const Disks & disks, LoggerPtr log) |
| 170 | { |
no test coverage detected