Skip to content

Flaky 00992_system_parts_race_condition_zookeeper_long (with Analyzer) #57418

@Algunenano

Description

@Algunenano

CI run: https://s3.amazonaws.com/clickhouse-test-reports/57404/8cdc7b42c8a532dc65ce312af18246a688382997/stateless_tests__release__analyzer_.html

Looking at the logs there seems to be 2 queries "stuck":

  • ALTER TABLE alter_table0 DROP COLUMN h;
  • ALTER TABLE alter_table0 ADD COLUMN h String DEFAULT '0';

The reality is that they aren't stuck, the first one is waiting for something and the second one is waiting for the first one:

  • First one (log 0000000015): 5 -> 6
2023.12.01 03:01:05.037304 [ 573419 ] {004fa445-c653-417c-85c9-71236aeb3501} <Debug> test_uswjce34.alter_table0 (ReplicatedMergeTreeQueue): Pulling 1 entries to queue: log-0000000015 - log-0000000015
2023.12.01 03:01:05.037725 [ 573419 ] {004fa445-c653-417c-85c9-71236aeb3501} <Trace> test_uswjce34.alter_table0 (ReplicatedMergeTreeQueue): Insert entry queue-0000000015 to queue with type MUTATE_PART with virtual parts [-5_0_0_1_5]
2023.12.01 03:01:05.111725 [ 1074 ] {} <Information> test_uswjce34.alter_table0 (ReplicatedMergeTreeQueue): Loading 1 mutation entries: 0000000015 - 0000000015
2023.12.01 03:01:05.112455 [ 436057 ] {fe21b12f-7d9f-46e6-9e57-d8aecf39089c} <Debug> test_uswjce34.alter_table0 (2e48ed67-b04b-405a-9cd8-4ba92d160f88): Created log entry log-0000000036 to update table metadata to version 6, created a mutation 0000000015 (data versions: -3 = 4; -4 = 1; -5 = 13; -6 = 13; -7 = 13; 0 = 13; 4 = 13; 5 = 1; 6 = 14; 7 = 14; )
2023.12.01 03:01:05.112544 [ 1074 ] {} <Trace> test_uswjce34.alter_table0 (ReplicatedMergeTreeQueue): Adding mutation 0000000015 for 10 partitions (data versions: -3 = 4; -4 = 1; -5 = 13; -6 = 13; -7 = 13; 0 = 13; 4 = 13; 5 = 1; 6 = 14; 7 = 14; )
2023.12.01 03:01:05.112592 [ 1074 ] {} <Trace> test_uswjce34.alter_table0 (ReplicatedMergeTreeQueue): Adding mutation 0000000015 with alter version 6 to the queue
2023.12.01 03:01:05.127531 [ 436057 ] {fe21b12f-7d9f-46e6-9e57-d8aecf39089c} <Debug> test_uswjce34.alter_table0 (2e48ed67-b04b-405a-9cd8-4ba92d160f88): Waiting for r1 to apply mutation 0000000015
2023.12.01 03:06:02.089793 [ 574002 ] {3361aff5-cd45-4372-b591-cbe79e3f7096} <Information> test_uswjce34.alter_table0 (2e48ed67-b04b-405a-9cd8-4ba92d160f88): Killing mutation 0000000015
2023.12.01 03:06:02.096127 [ 574002 ] {3361aff5-cd45-4372-b591-cbe79e3f7096} <Debug> test_uswjce34.alter_table0 (ReplicatedMergeTreeQueue): Removed mutation 0000000015 from ZooKeeper.
2023.12.01 03:06:02.097975 [ 574002 ] {3361aff5-cd45-4372-b591-cbe79e3f7096} <Debug> test_uswjce34.alter_table0 (ReplicatedMergeTreeQueue): Removed alter 6 because mutation 0000000015 were killed.
2023.12.01 03:06:02.097991 [ 574002 ] {3361aff5-cd45-4372-b591-cbe79e3f7096} <Debug> test_uswjce34.alter_table0 (ReplicatedMergeTreeQueue): Removed mutation 0000000015 from local state.
  • Second one (log 0000000046): 6 -> 7
2023.12.01 03:01:05.140915 [ 445389 ] {016ab449-b039-4769-8659-1a81ab4e4456} <Debug> test_uswjce34.alter_table0 (2e48ed67-b04b-405a-9cd8-4ba92d160f88): Created log entry log-0000000046 to update table metadata to version 7
2023.12.01 03:01:05.140962 [ 445389 ] {016ab449-b039-4769-8659-1a81ab4e4456} <Debug> test_uswjce34.alter_table0 (2e48ed67-b04b-405a-9cd8-4ba92d160f88): Waiting for r1 to pull log-0000000046 to queue
2023.12.01 03:01:05.147330 [ 840 ] {} <Trace> test_uswjce34.alter_table0 (ReplicatedMergeTreeQueue): Insert entry queue-0000000046 to queue with type ALTER_METADATA with virtual parts []
2023.12.01 03:01:05.147639 [ 445389 ] {016ab449-b039-4769-8659-1a81ab4e4456} <Debug> test_uswjce34.alter_table0 (2e48ed67-b04b-405a-9cd8-4ba92d160f88): Looking for node corresponding to log-0000000046 in r1 queue
2023.12.01 03:01:05.147644 [ 958 ] {} <Trace> test_uswjce34.alter_table0 (ReplicatedMergeTreeQueue): Cannot execute alter metadata queue-0000000046 with version 7 because another alter 6 must be executed before

Not sure why the first mutation hasn't been applied and the test ends up killing it and failing

Metadata

Metadata

Assignees

Labels

analyzerIssues and pull-requests related to new analyzerflaky testflaky test found by CI

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions