ClickHouse / ClickHouse/clickhouse-rs

Improve inserter delivery guarantees

Open
#212 11 comments 2 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
559
Forks
172
Avg merge
1d 19h
Merged PRs (30d)
3

Description

I am using the [inserter](https://docs.rs/clickhouse/latest/clickhouse/inserter/struct.Inserter.html) to periodically write batches of messages from a Kafka topic into ClickHouse. I wonder what happens to the data when an error happens on write/commit. It seems like the internal buffer is dropped and the unfinished binary data stream is aborted.
This essentially means, that any data is lost on error. Is this true? What are some best practices to guarantee data delivery or how would I best implement a retry mechanism?

Contributor guide

Open the contributing guide

Research direction

Start with the linked Inserter documentation and trace the write/commit behavior described in the issue. Determine whether buffered data is lost when a write or commit fails, then document the observed delivery guarantees and retry guidance for batches read from Kafka and written to ClickHouse.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
databases
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.