Skip to content

feat: HTTP TableBatcher with auto-flush triggers#406

Open
catinspace-au wants to merge 1 commit intoClickHouse:mainfrom
hyperi-io:hyperi/batching
Open

feat: HTTP TableBatcher with auto-flush triggers#406
catinspace-au wants to merge 1 commit intoClickHouse:mainfrom
hyperi-io:hyperi/batching

Conversation

@catinspace-au
Copy link
Copy Markdown
Contributor

Independent of other PRs -- can merge in any order.

TableBatcher with three flush triggers: max rows, max bytes, max
period. Background tokio task for timer flush. Thread-safe via
Arctokio::sync::Mutex.

API mirrors the Go client Batch interface -- append(), flush(), send().

New TableBatcher<T> wraps Inserter<T> with a shared buffer and background
flush task. Callers use append/flush/send without managing timers manually.
Flushes on max_bytes, max_rows, or period thresholds (whichever fires first).

API mirrors the ClickHouse Go client's Batch interface.

Requires the `batcher` feature flag (implies `inserter`).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant