Skip to content

Commit b6df18b

Browse files
authored
fix: increase Clickhouse db throughput (#569)
* bump version * increase
1 parent a4e3163 commit b6df18b

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

auction-server/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "auction-server"
3-
version = "0.32.1"
3+
version = "0.32.2"
44
edition = "2021"
55
license-file = "license.txt"
66

auction-server/src/kernel/analytics_db.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ pub struct ClickhouseInserter<T> {
1010
pub sender: mpsc::Sender<T>,
1111
}
1212

13-
const CHANNEL_SIZE: usize = 1000;
13+
const CHANNEL_SIZE: usize = 10_000;
1414
const DURATION_PERIOD: Duration = Duration::from_secs(1);
15-
const MAX_ROWS: u64 = 100;
16-
const MAX_BYTES: u64 = 1_048_576;
15+
const MAX_ROWS: u64 = 10_000;
16+
const MAX_BYTES: u64 = 10 * 1_048_576; // 10 MB
1717

1818
impl<T: Row + Serialize + Send + Sync + 'static> ClickhouseInserter<T> {
1919
async fn run(client: clickhouse::Client, table_name: String, mut rx: mpsc::Receiver<T>) {

0 commit comments

Comments
 (0)