For some reasons when we delete a MergeTree Part in atomic way something may go wrong - and leave the `delete_tmp_*` folder or it's part on disk. This may lead to a disk space consumption over time.

It's suggested to delete this folders at least at server start-up. Current solution with `clearOldTemporaryDirectories()` doesn't work because this method is called periodically from a thread without any locks or advisory on folders - it may cause the race conditions.
bool renameTempPartAndReplace(
        MutableDataPartPtr & part,
        MergeTreeTransaction * txn,
        SimpleIncrement * increment,
        Transaction * out_transaction,
        DataPartsLock & lock,
        DataPartsVector * out_covered_parts = nullptr,
        MergeTreeDeduplicationLog * deduplication_log = nullptr,
        std::string_view deduplication_token = std::string_view());
    
    
    
    void removePartsFromWorkingSetImmediatelyAndSetTemporaryState(const DataPartsVector & remove);
    
    
    
    
    void removePartsFromWorkingSet(MergeTreeTransaction * txn, const DataPartsVector & remove, bool clear_without_timeout, DataPartsLock * acquired_lock = nullptr);
    void removePartsFromWorkingSet(MergeTreeTransaction * txn, const DataPartsVector & remove, bool clear_without_timeout, DataPartsLock & acquired_lock);
    
    
    void removePartsInRangeFromWorkingSet(MergeTreeTransaction * txn, const MergeTreePartInfo & drop_range, DataPartsLock & lock);
    
    
    
    DataPartsVector removePartsInRangeFromWorkingSetAndGetPartsToRemoveFromZooKeeper(
        MergeTreeTransaction * txn, const MergeTreePartInfo & drop_range, DataPartsLock & lock);
    
    void restoreAndActivatePart(const DataPartPtr & part, DataPartsLock * acquired_lock = nullptr);