| 103 | } |
| 104 | |
| 105 | void MergeTreeTransaction::removeOldPart(const StoragePtr & storage, const DataPartPtr & part_to_remove, MergeTreeTransaction * txn) |
| 106 | { |
| 107 | TransactionInfoContext transaction_context{storage->getStorageID(), part_to_remove->name}; |
| 108 | if (txn) |
| 109 | { |
| 110 | /// Lock part for removal and write current TID into version metadata file. |
| 111 | /// If server crash just after committing transactions |
| 112 | /// we will find this TID in version metadata and will finally remove part. |
| 113 | txn->removeOldPart(storage, part_to_remove, transaction_context); |
| 114 | return; |
| 115 | } |
| 116 | part_to_remove->version->setAndStoreNonTransactionalRemovalTID(transaction_context); |
| 117 | } |
| 118 | |
| 119 | void MergeTreeTransaction::addNewPartAndRemoveCovered(const StoragePtr & storage, const DataPartPtr & new_part, const DataPartsVector & covered_parts, MergeTreeTransaction * txn) |
| 120 | { |
no test coverage detected