Skip to content

Fix for the hang during deletion of engine=Kafka#10910

Merged
alexey-milovidov merged 5 commits intoClickHouse:masterfrom
filimonov:kafka_drop_hang_fix
May 17, 2020
Merged

Fix for the hang during deletion of engine=Kafka#10910
alexey-milovidov merged 5 commits intoClickHouse:masterfrom
filimonov:kafka_drop_hang_fix

Conversation

@filimonov
Copy link
Copy Markdown
Contributor

@filimonov filimonov commented May 14, 2020

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

Changelog category (leave one):

  • Bug Fix

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fix for the hang which was happening sometimes during DROP of table engine=Kafka (or during server restarts).

Detailed description / Documentation draft:
In general, it looks like the shutdown sequence was a bit incorrect, and librdkafka is very restrictive in that part.

Kudos to @azat for test case (#10656)

Fixes #7260 #10740

Copy link
Copy Markdown
Member

@azat azat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test passed in my env multiple times

@filimonov
Copy link
Copy Markdown
Contributor Author

Integration test failure is relevant (will fix that)

Copy link
Copy Markdown
Member

@azat azat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After latest changes test (test_storage_kafka/test.py::test_kafka_consumer_hang) passed in my env too (multiple times), plus now code looks cleaner!

@alexey-milovidov
Copy link
Copy Markdown
Member

alexey-milovidov commented May 17, 2020

Stress test shows use-after-free, need to investigate.

Copy link
Copy Markdown
Member

@alexey-milovidov alexey-milovidov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix LGTM.

@alexey-milovidov
Copy link
Copy Markdown
Member

#10970

@alexey-milovidov alexey-milovidov merged commit 0fd0711 into ClickHouse:master May 17, 2020
@abyss7 abyss7 added the pr-bugfix Pull request with bugfix, not backported by default label May 17, 2020
nikitamikhaylov pushed a commit to nikitamikhaylov/ClickHouse that referenced this pull request May 22, 2020
Fix for the hang during deletion of engine=Kafka

(cherry picked from commit 0fd0711)
nikitamikhaylov added a commit that referenced this pull request May 23, 2020
* Merge pull request #10910 from filimonov/kafka_drop_hang_fix

Fix for the hang during deletion of engine=Kafka

(cherry picked from commit 0fd0711)

* Merge pull request #10986 from ClickHouse/try-fix-use-after-free-mergetree

Try to fix use-after-free error in MergeTree

(cherry picked from commit 073dc2e)

* Merge pull request #11048 from filimonov/kafka_missed_data_during_drop

Fixes the potential missed data during termination of Kafka engine table

(cherry picked from commit b82c633)

* Merge pull request #11109 from ClickHouse/less_verbose_logging

Less verbose logging in mutation finalization task

(cherry picked from commit 1906762)

* Merge pull request #11074 from Jokser/memory-leak-in-register-disk-s3

Fix memory leak in registerDiskS3

(cherry picked from commit 4a237fa)

* Merge pull request #11038 from Enmk/parseDateTime64BestEffort_fix

Fixed parseDateTime64BestEffort implementation

(cherry picked from commit 5a0f356)

Co-authored-by: alexey-milovidov <[email protected]>
Co-authored-by: alesapin <[email protected]>
Co-authored-by: Vitaly Baranov <[email protected]>
filimonov pushed a commit to filimonov/ClickHouse that referenced this pull request Jun 8, 2020
Fix for the hang during deletion of engine=Kafka

(cherry picked from commit 0fd0711)
filimonov pushed a commit to filimonov/ClickHouse that referenced this pull request Jun 8, 2020
Fix for the hang during deletion of engine=Kafka

(cherry picked from commit 0fd0711)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-bugfix Pull request with bugfix, not backported by default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kafka: drop Kafka table sometimes hangs

6 participants