```
2021-09-24 11:42:36 00975_move_partition_merge_tree:                                        [ FAIL ] 5.16 sec. - result differs with reference: 
2021-09-24 11:42:36 --- /usr/share/clickhouse-test/queries/0_stateless/00975_move_partition_merge_tree.reference	2021-09-24 10:24:23.000000000 +0200
2021-09-24 11:42:36 +++ /tmp/clickhouse-test/0_stateless/00975_move_partition_merge_tree.stdout	2021-09-24 11:42:36.846796510 +0200
2021-09-24 11:42:36 @@ -1,4 +1,4 @@
2021-09-24 11:42:36  10000000
2021-09-24 11:42:36  0
2021-09-24 11:42:36 -5000000
2021-09-24 11:42:36 +8145635
2021-09-24 11:42:36  5000000
2021-09-24 11:42:36 
2021-09-24 11:42:36 
```

``` sql
select check_name, test_name, check_start_time, test_status, report_url, commit_sha　from `gh-data`.checks　where　test_status not in ['OK', 'SUCCESS', 'SKIPPED', 'XFAIL', 'XERROR'] and　test_name = '00975_move_partition_merge_tree'　and check_start_time >= now() - interval 30 day order by check_start_time desc FORMAT Markdown
```
| check_name | test_name | check_start_time | test_status | report_url | commit_sha |
|:-|:-|-:|:-|:-|:-|
| Functional stateless tests (ubsan) | 00975_move_partition_merge_tree | 2021-09-24 09:31:40 | FAIL | https://clickhouse-test-reports.s3.yandex.net/0/e617aeb7a56a18765f2fd227d66c1b6f425336b2/functional_stateless_tests_(ubsan).html | e617aeb7a56a18765f2fd227d66c1b6f425336b2 |
| Functional stateless tests (release) | 00975_move_partition_merge_tree | 2021-09-23 14:02:23 | FAIL | https://clickhouse-test-reports.s3.yandex.net/0/23f865c7222fe61922c0e5c6032cf61ee978cd1c/functional_stateless_tests_(release).html | 23f865c7222fe61922c0e5c6032cf61ee978cd1c |
| Functional stateless tests (ubsan) | 00975_move_partition_merge_tree | 2021-09-22 21:27:21 | FAIL | https://clickhouse-test-reports.s3.yandex.net/28582/4f802d1cea543dcfeb1b9efdb5fca0491a0c3fd0/functional_stateless_tests_(ubsan).html | 4f802d1cea543dcfeb1b9efdb5fca0491a0c3fd0 |
| Functional stateless tests (address) | 00975_move_partition_merge_tree | 2021-09-22 20:16:52 | FAIL | https://clickhouse-test-reports.s3.yandex.net/0/be256cc9edafeb9278b21d3ff9c5504dfaeed389/functional_stateless_tests_(address).html | be256cc9edafeb9278b21d3ff9c5504dfaeed389 |
| Functional stateless tests (address) | 00975_move_partition_merge_tree | 2021-09-22 15:01:44 | FAIL | https://clickhouse-test-reports.s3.yandex.net/29258/eb1053d93129c482523eda5fa95997128eafbcfb/functional_stateless_tests_(address).html | eb1053d93129c482523eda5fa95997128eafbcfb |
| Functional stateless tests (release, wide parts enabled) | 00975_move_partition_merge_tree | 2021-09-22 11:54:59 | FLAKY | https://clickhouse-test-reports.s3.yandex.net/29021/666d07b9bb2fcc17e435f647746ebfbfd9685fbd/functional_stateless_tests_(release,_wide_parts_enabled).html | 666d07b9bb2fcc17e435f647746ebfbfd9685fbd |
| Functional stateless tests (release, DatabaseOrdinary) | 00975_move_partition_merge_tree | 2021-09-21 21:47:11 | FAIL | https://clickhouse-test-reports.s3.yandex.net/0/5ef411677a9c5c0a3fe42c9a104e71b75f89218b/functional_stateless_tests_(release,_databaseordinary).html | 5ef411677a9c5c0a3fe42c9a104e71b75f89218b |
| Functional stateless tests (release, wide parts enabled) | 00975_move_partition_merge_tree | 2021-09-21 09:06:00 | FLAKY | https://clickhouse-test-reports.s3.yandex.net/29216/7e346ec6ecf4cff8d40acdd79c02419df0e5660d/functional_stateless_tests_(release,_wide_parts_enabled).html | 7e346ec6ecf4cff8d40acdd79c02419df0e5660d |
| Functional stateless tests (address) | 00975_move_partition_merge_tree | 2021-09-20 23:53:46 | FAIL | https://clickhouse-test-reports.s3.yandex.net/29140/892a4c48c4aab6dfdf0ab463fff6c15d25589730/functional_stateless_tests_(address).html | 892a4c48c4aab6dfdf0ab463fff6c15d25589730 |
| Functional stateless tests (release) | 00975_move_partition_merge_tree | 2021-09-20 19:35:49 | FAIL | https://clickhouse-test-reports.s3.yandex.net/29140/496bedb0f5728d87c10754bab154e851bdb282eb/functional_stateless_tests_(release).html | 496bedb0f5728d87c10754bab154e851bdb282eb |
| Functional stateless tests (release, wide parts enabled) | 00975_move_partition_merge_tree | 2021-09-20 19:10:35 | FAIL | https://clickhouse-test-reports.s3.yandex.net/0/c5556b5e04e0f99bd49839413378ece3f5100644/functional_stateless_tests_(release,_wide_parts_enabled).html | c5556b5e04e0f99bd49839413378ece3f5100644 |
| Functional stateless tests (ubsan) | 00975_move_partition_merge_tree | 2021-09-19 23:25:21 | FAIL | https://clickhouse-test-reports.s3.yandex.net/26231/c9843c79215f9b78a191fe4dcd5230a58fa73798/functional_stateless_tests_(ubsan).html | c9843c79215f9b78a191fe4dcd5230a58fa73798 |
| Functional stateless tests (release, wide parts enabled) | 00975_move_partition_merge_tree | 2021-09-19 23:01:19 | FLAKY | https://clickhouse-test-reports.s3.yandex.net/26231/c9843c79215f9b78a191fe4dcd5230a58fa73798/functional_stateless_tests_(release,_wide_parts_enabled).html | c9843c79215f9b78a191fe4dcd5230a58fa73798 |
| Functional stateless tests (address) | 00975_move_partition_merge_tree | 2021-09-17 22:04:36 | FAIL | https://clickhouse-test-reports.s3.yandex.net/29132/9fb73af891e5cb3324808ce619242c9e83bade5f/functional_stateless_tests_(address).html | 9fb73af891e5cb3324808ce619242c9e83bade5f |
| Functional stateless tests (release, wide parts enabled) | 00975_move_partition_merge_tree | 2021-09-17 17:44:01 | FAIL | https://clickhouse-test-reports.s3.yandex.net/0/db516e8c9142aedeb2a9d5ba8ed9b5ee0063bf31/functional_stateless_tests_(release,_wide_parts_enabled).html | db516e8c9142aedeb2a9d5ba8ed9b5ee0063bf31 |
| Functional stateless tests (address) | 00975_move_partition_merge_tree | 2021-09-17 16:03:03 | FAIL | https://clickhouse-test-reports.s3.yandex.net/21320/4ca2193da851b4e5efbff46697f3e6bd6306f6b4/functional_stateless_tests_(address).html | 4ca2193da851b4e5efbff46697f3e6bd6306f6b4 |
| Functional stateless tests (release, wide parts enabled) | 00975_move_partition_merge_tree | 2021-09-17 14:59:43 | FAIL | https://clickhouse-test-reports.s3.yandex.net/28803/cfd51467713a2d6f701f13374d9652cb98652ff1/functional_stateless_tests_(release,_wide_parts_enabled).html | cfd51467713a2d6f701f13374d9652cb98652ff1 |
| Functional stateless tests (release, wide parts enabled) | 00975_move_partition_merge_tree | 2021-09-17 13:43:42 | FAIL | https://clickhouse-test-reports.s3.yandex.net/29057/89f2b9fa71bced77eae206155e46edb261b8ca2e/functional_stateless_tests_(release,_wide_parts_enabled).html | 89f2b9fa71bced77eae206155e46edb261b8ca2e |
| Functional stateless tests (address) | 00975_move_partition_merge_tree | 2021-09-17 12:39:47 | FAIL | https://clickhouse-test-reports.s3.yandex.net/28955/f97f5c5c75a1db578efebcd0e7a8ae56781eca25/functional_stateless_tests_(address).html | f97f5c5c75a1db578efebcd0e7a8ae56781eca25 |
| Functional stateless tests (release) | 00975_move_partition_merge_tree | 2021-08-30 18:59:30 | FAIL | https://clickhouse-test-reports.s3.yandex.net/28359/6906e1d8edd8466b144c4e51f846d99f7c6ab9b6/functional_stateless_tests_(release).html | 6906e1d8edd8466b144c4e51f846d99f7c6ab9b6 |
| Functional stateless tests (release, wide parts enabled) | 00975_move_partition_merge_tree | 2021-08-27 10:42:15 | FAIL | https://clickhouse-test-reports.s3.yandex.net/0/44390a88ecaee77b577fabefb301c68054912f11/functional_stateless_tests_(release,_wide_parts_enabled).html | 44390a88ecaee77b577fabefb301c68054912f11 |
| Functional stateless tests (release) | 00975_move_partition_merge_tree | 2021-08-25 16:52:08 | FAIL | https://clickhouse-test-reports.s3.yandex.net/0/4685fb42268f17e55bf23574f18caa191395c61e/functional_stateless_tests_(release).html | 4685fb42268f17e55bf23574f18caa191395c61e |

: MergeTreeData(
        table_id_,
        relative_data_path_,
        metadata_,
        context_,
        date_column_name,
        merging_params_,
        std::move(storage_settings_),
        false,      
        attach)
    , reader(*this)
    , writer(*this)
    , merger_mutator(*this,
        getContext()->getSettingsRef().background_merges_mutations_concurrency_ratio *
        getContext()->getSettingsRef().background_pool_size)
{
    loadDataParts(has_force_restore_data_flag);
    if (!attach && !getDataParts().empty())
        throw Exception("Data directory for table already containing data parts - probably it was unclean DROP table or manual intervention. You must either clear directory by hand or use ATTACH TABLE instead of CREATE TABLE if you need to use that parts.", ErrorCodes::INCORRECT_DATA);
    increment.set(getMaxBlockNumber());
    loadMutations();
    loadDeduplicationLog();
}
void StorageMergeTree::startup()
{
    clearOldPartsFromFilesystem();
    clearOldWriteAheadLogs();
    clearEmptyParts();