Repository navigation
Conversation
CurtizJ
force-pushed
the
randomize-detach-attach
branch
from
October 15, 2022 20:33
fd71ed5 to
0db7bb1
Compare
CurtizJ
commented
Oct 17, 2022
| @@ -1,3 +1,7 @@ | |||
| -- Tags: no-random-detach | |||
| -- Tag no-random-detach: flag is_frozen is not persisted. | |||
| @@ -1,4 +1,5 @@ | |||
| -- Tags: no-parallel | |||
| -- Tags: no-parallel, no-random-detach | |||
| -- Tag no-random-detach: it's a bug, will be fixed in https://github.com/ClickHouse/ClickHouse/pull/41145 | |||
Member
Author
There was a problem hiding this comment.
The bug is that after TRUNCATE or DROP PARTITION a new part with the same name (and path) may appear, but marks/uncompressed cache is not dropped, which leads to reading of wrong data. Most likely will be fixed after #41145.
CurtizJ
commented
Oct 20, 2022
| # Tags: replica, no-replicated-database, no-parallel | ||
| # Tags: replica, no-replicated-database, no-randon-detach | ||
| # Tag no-replicated-database: Fails due to additional replicas or shards | ||
| # Tag no-random-detach: it's a bug, will be fixed in https://github.com/ClickHouse/ClickHouse/pull/42509 |
CurtizJ
commented
Oct 21, 2022
| -- Tags: zookeeper, no-random-detach | ||
| -- Tag no-random-detach: "The local set of parts of table | ||
| -- doesn't look like the set of parts in ZooKeeper" | ||
| -- after DROP PARTITION and restart https://github.com/ClickHouse/ClickHouse/issues/37664 |
Member
|
What a nice feature! |
Member
|
We need this! |
alexey-milovidov
added a commit
that referenced
this pull request
Feb 5, 2026
Add `reattach_tables_before_query_execution` and `reattach_tables_before_query_execution_probability` settings that enable randomly detaching and reattaching tables used in a query before its execution. This is a testing-only feature designed to find bugs related to table reattachment. Before executing a query, the system collects all tables referenced in the AST, and for each eligible table (stores data on disk, supports detaching, has no action locks or dependencies), it performs a DETACH followed by ATTACH. Changes: - Add `supportsDetachingTables` virtual method to `IDatabase` (returns false for `DatabaseDictionary`, `DatabaseReplicated`, `DatabaseSQLite`) - Add `has`/`hasAny` methods to `ActionLocksManager` for checking existing locks - Add table collection visitor and reattach logic in `executeQuery` - Fix off-by-one in `MergeTreeDeduplicationLog::dropOutdatedLogs` and add `sync` call in shutdown - Add `no-random-detach` tag to tests incompatible with this feature - Add `--no-random-detach` and `--reattach-tables-probability` options to `clickhouse-test` - Add `02461_reattach_tables` test Continuation of #42336 Co-Authored-By: Claude Opus 4.6 <[email protected]>
1 task done
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
Randomly execute
DETACH/ATTACHqueries for all tables that are used in query from test before its execution.