Skip to content

Fix for the hang during deletion of engine=Kafka (one more time)#11145

Merged
alexey-milovidov merged 4 commits intoClickHouse:masterfrom
filimonov:kafka_drop_hung3
May 25, 2020
Merged

Fix for the hang during deletion of engine=Kafka (one more time)#11145
alexey-milovidov merged 4 commits intoClickHouse:masterfrom
filimonov:kafka_drop_hung3

Conversation

@filimonov
Copy link
Copy Markdown
Contributor

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:
Continuation of #10910
After #10910 it still can hang, but chances get lower and the test stopped detecting that.
librdkafka have a flag that should prevent that, so I've added it to cppkafka (mfontanini/cppkafka#247)
But after extra testing, I've found that there are scenarios when that flag don't work (confluentinc/librdkafka#2898) and we still need to get back to queue draining after unsubscribe.

Fixes #7260 #10740

Thanks to @azat for help & inspiration.

…nother hang case, which has no straigt solutions and can be workarounded currenly only by draining the consumer queue, so destructor is back
@blinkov blinkov added the pr-bugfix Pull request with bugfix, not backported by default label May 22, 2020
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.

LGTM (squashing before merging is preferable)

But

Fix for the hang during deletion of engine=Kafka (one more time) #11145

"one more time" looks icky, let's change PR title (and the commit subject) so that it will include "RD_KAFKA_DESTROY_F_NO_CONSUMER_CLOSE" and "get back poll" or something similar

Besides commit subject is too long (I guess you missed newline between subject and description)

@alexey-milovidov alexey-milovidov merged commit 73a0ef6 into ClickHouse:master May 25, 2020
KochetovNicolai pushed a commit that referenced this pull request Jun 8, 2020
)

* Added flag for safer rdkafka destruction, but more testing detected another hang case, which has no straigt solutions and can be workarounded currenly only by draining the consumer queue, so destructor is back

* After review fixes

* After review fixes2

* After review fixes3

(cherry picked from commit 73a0ef6)
filimonov added a commit to filimonov/ClickHouse that referenced this pull request Jun 8, 2020
…ckHouse#11145)

* Added flag for safer rdkafka destruction, but more testing detected another hang case, which has no straigt solutions and can be workarounded currenly only by draining the consumer queue, so destructor is back

* After review fixes

* After review fixes2

* After review fixes3

(cherry picked from commit 73a0ef6)
filimonov added a commit to filimonov/ClickHouse that referenced this pull request Jun 8, 2020
…ckHouse#11145)

* Added flag for safer rdkafka destruction, but more testing detected another hang case, which has no straigt solutions and can be workarounded currenly only by draining the consumer queue, so destructor is back

* After review fixes

* After review fixes2

* After review fixes3

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

Labels

no-docs-needed 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