housepower / clickhouse_sinker

Easily load data from kafka to ClickHouse
https://housepower.github.io/clickhouse_sinker
Apache License 2.0
515 stars 118 forks source link

Gracefull shutdown in kubernetes #118

Closed josepowera closed 3 years ago

josepowera commented 3 years ago

We expierienced that after POD restart in kubernetes OLD records were read (we added some fields therefore we had to restart pod to reread config task JSON and update clickhouse table fields).

Are OS signals (SIGHUP,...) handled the way to minimize data coruption (stoping kafka consume after first OS stop signal, waiting until all backpoll data is processed and zookeeper commit)?

yuzhichang commented 3 years ago

https://github.com/housepower/clickhouse_sinker/releases/tag/v1.8.6 stops task gracefully. Please have a try.

The normal procedure to handle schema change is: