**How to reproduce**
Clickhouse server 20.13.1.5273
```
CREATE TABLE default.test
(
`key` UInt32,
`ts` DateTime CODEC(DoubleDelta, LZ4),
`db_time` DateTime DEFAULT now() COMMENT 'spout-ignore' CODEC(DoubleDelta, LZ4)
)
ENGINE = MergeTree
PARTITION BY toStartOfTenMinutes(db_time)
ORDER BY (key, ts)
TTL db_time + toIntervalHour(3)
SETTINGS index_granularity = 8192, merge_with_ttl_timeout = 3600, min_rows_for_compact_part = 1000000, min_bytes_for_compact_part = 200000000, in_memory_parts_enable_wal = 0;


INSERT INTO test(key, ts) SELECT number % 1000, now() + intDiv(number,1000) FROM numbers(500);

SELECT * FROM test;
500 rows in set. Elapsed: 0.003 sec.

DETACH TABLE test;

ATTACH TABLE test;

SELECT * FROM test;

0 rows in set. Elapsed: 0.002 sec.
```

**Expected behavior**
Clickhouse would flush parts on disk.
if (auto part_in_memory = asInMemoryPart(part))
        {
            auto flushed_part_path = part_in_memory->getRelativePathForPrefix("tmp_freeze");
            part_in_memory->flushToDisk(relative_data_path, flushed_part_path, metadata_snapshot);
            src_part_path = fs::path(relative_data_path) / flushed_part_path / "";
        }
        localBackup(part->volume->getDisk(), src_part_path, backup_part_path);
        part->volume->getDisk()->removeFileIfExists(fs::path(backup_part_path) / IMergeTreeDataPart::DELETE_ON_DESTROY_MARKER_FILE_NAME);
        part->is_frozen.store(true, std::memory_order_relaxed);
        result.push_back(PartitionCommandResultInfo{
            .partition_id = part->info.partition_id,
            .part_name = part->name,
            .backup_path = fs::path(part->volume->getDisk()->getPath()) / backup_path,
            .part_backup_path = fs::path(part->volume->getDisk()->getPath()) / backup_part_path,
            .backup_name = backup_name,
        });
        ++parts_processed;
    }
    LOG_DEBUG(log, "Freezed {} parts", parts_processed);
    return result;
}
PartitionCommandsResultInfo MergeTreeData::unfreezePartition(
    const ASTPtr & partition,
    const String & backup_name,
    ContextPtr local_context,
    TableLockHolder &)
{
    return unfreezePartitionsByMatcher(getPartitionMatcher(partition, local_context), backup_name, local_context);
}
PartitionCommandsResultInfo MergeTreeData::unfreezeAll(