Skip to content

Kafka cleanup #10656

Merged
alexey-milovidov merged 7 commits intoClickHouse:masterfrom
azat:kafka-consumer-hang
May 6, 2020
Merged

Kafka cleanup #10656
alexey-milovidov merged 7 commits intoClickHouse:masterfrom
azat:kafka-consumer-hang

Conversation

@azat
Copy link
Copy Markdown
Member

@azat azat commented May 4, 2020

Changelog category (leave one):

  • Non-significant (changelog entry is not required)

This PR contains:

Cc: @filimonov
Cc: @abyss7
Cc: @vavrusa

@blinkov blinkov added the pr-not-for-changelog This PR should not be mentioned in the changelog label May 4, 2020
@alexey-milovidov alexey-milovidov merged commit 4df7dd8 into ClickHouse:master May 6, 2020
@azat azat deleted the kafka-consumer-hang branch May 7, 2020 07:16
@filimonov
Copy link
Copy Markdown
Contributor

Thank @azat, I have some theory about how to workaround that
Since we a test now I can try to play with that.

@azat
Copy link
Copy Markdown
Member Author

azat commented May 9, 2020

I have some theory about how to workaround that

Great!

FWIW I was thinking about adding RD_KAFKA_DESTROY_F_NO_CONSUMER_CLOSE support to cppkafka and use it during shutdown, that should fix everything but will make it less graceful (I guess this is acceptable in this particular case).

@filimonov
Copy link
Copy Markdown
Contributor

My first attempts to use the test dont hang... :/ i've played a bit with timeout, but no success yet

@azat
Copy link
Copy Markdown
Member Author

azat commented May 9, 2020

Hm, can you share logs (stderr, clickhouse*.log), so I can take a look (or/and compare with mine)?


std::atomic<bool> stub = {false};
copyData(*in, *block_io.out, &stub);
copyData(*in, *block_io.out, &stream_cancelled);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

missed that. We can't cancel during copyData, as it's not aware of commits and other kafka-related stuff.
It will be cancelled on underlying layer (kafka buffer)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yep, I already thought about this, but forgot, thanks!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

But better to add some comment, to avoid further errors

filimonov pushed a commit to filimonov/ClickHouse that referenced this pull request Jun 8, 2020
filimonov pushed a commit to filimonov/ClickHouse that referenced this pull request Jun 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-docs-needed pr-not-for-changelog This PR should not be mentioned in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants