**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.
{
    BackupEntries backup_entries;
    std::map<DiskPtr, std::shared_ptr<TemporaryFileOnDisk>> temp_dirs;
    for (const auto & part : data_parts)
    {
        auto disk = part->volume->getDisk();
        auto temp_dir_it = temp_dirs.find(disk);
        if (temp_dir_it == temp_dirs.end())
            temp_dir_it = temp_dirs.emplace(disk, std::make_shared<TemporaryFileOnDisk>(disk, "tmp/backup_")).first;
        auto temp_dir_owner = temp_dir_it->second;
        fs::path temp_dir = temp_dir_owner->getPath();
        fs::path part_dir = part->getFullRelativePath();
        fs::path temp_part_dir = temp_dir / part->relative_path;
        disk->createDirectories(temp_part_dir);
        for (const auto & [filepath, checksum] : part->checksums.files)
        {
            String relative_filepath = fs::path(part->relative_path) / filepath;
            String hardlink_filepath = temp_part_dir / filepath;
            disk->createHardLink(part_dir / filepath, hardlink_filepath);
            UInt128 file_hash{checksum.file_hash.first, checksum.file_hash.second};
            backup_entries.emplace_back(
                relative_filepath,