New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set force_restore_data in stress tests #28296
Conversation
CI report [1]: <details> ``` $ pigz -cd clickhouse-server.log.gz | fgrep 'Application: DB::Exception:' -m1 2021.08.25 11:34:10.208309 [ 9275 ] {} <Error> Application: DB::Exception: The local set of parts of table test_96v1zj.dst_10 doesn't look like the set of parts in ZooKeeper: 4.00 rows of 4.00 total rows in filesystem are suspicious. There are 1 unexpected parts with 4 rows (0 of them is not just-written with 0 rows), 0 missing parts (with 0 blocks).: Cannot attach table `test_96v1zj`.`dst_10` from metadata file /var/lib/clickhouse/metadata/test_96v1zj/dst_10.sql from query ATTACH TABLE test_96v1zj.dst_10 (`p` UInt64, `k` UInt64, `v` UInt64) ENGINE = ReplicatedMergeTree('/test/01154_move_partition_long_test_96v1zj/dst', '10') PARTITION BY p % 10 ORDER BY k SETTINGS index_granularity = 8192: while loading database `test_96v1zj` from path /var/lib/clickhouse/metadata/test_96v1zj ``` </details> [1]: https://clickhouse-test-reports.s3.yandex.net/27881/e8d87053c04e8e30bb35fa46298abb521818731f/stress_test_(undefined).html#fail1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This situation should not happen in stress test.
We should fix the root cause.
Indeed, but there problem here is DROP fails in the middle, Maybe replica should set some flag in dropReplica (not under replica_path), and later attach can check it, and attach table in read-only mode if it set? @alesapin what do you think? Logs
Keeper
|
Fixed such issues for ReplicatedMergeTree engine - #30826 |
…f parts in ZooKeeper" error If during removing replica_path from zookeeper, some error occurred (zookeeper goes away), then it may not remove everything from zookeeper. And on DETACH/ATTACH (or server restart, like stress tests does in the analysis from this comment [1]), it will trigger an error: The local set of parts of table test_1.alter_table_4 doesn't look like the set of parts in ZooKeeper: [1]: ClickHouse#28296 (comment) Fix this, by removing "metadata" at first, and only after this everything else, this will avoid this error, since on ATTACH such table will be marked as read-only. v2: forget to remove remote_replica_path itself v3: fix test_drop_replica by adding a check for remote_replica_path existence
CI reports]:
1
2
Changelog category (leave one):