Skip to content
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

Deadlock with concurrent SELECT / DROP TABLE #4316

Closed
bgranvea opened this issue Feb 8, 2019 · 1 comment
Closed

Deadlock with concurrent SELECT / DROP TABLE #4316

bgranvea opened this issue Feb 8, 2019 · 1 comment
Assignees
Labels
bug Confirmed user-visible misbehaviour in official release

Comments

@bgranvea
Copy link
Contributor

bgranvea commented Feb 8, 2019

I get a random deadlock when performing concurrently a SELECT and a DROP TABLE on the same view. I've tested with Clickhouse 18.14.19 and 19.1.6.

To reproduce the problem, just launch these 2 scripts in different shells:

for i in {1..1000}; do echo $i; echo "drop table if exists test_view" | clickhouse-client; echo "create view test_view as select count(*),database,table from system.columns group by database,table" | clickhouse-client; done

for i in {1..1000}; do echo $i; echo "select * from test_view order by table" | clickhouse-client >/dev/null; done

I can see in system.processes my 2 queries which are still running:

select elapsed,query from system.processes limit 2 format Vertical

Row 1:
──────
elapsed: 502.919283347
query:   select * from test_view order by table

Row 2:
──────
elapsed: 502.918433233
query:   drop table if exists test_view

@bgranvea bgranvea added bug Confirmed user-visible misbehaviour in official release issue labels Feb 8, 2019
@alexey-milovidov alexey-milovidov self-assigned this Feb 8, 2019
@alexey-milovidov
Copy link
Member

There is fundamental issue with current implementation of table locks.
Nevertheless, we are going to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed user-visible misbehaviour in official release
Projects
None yet
Development

No branches or pull requests

3 participants