Skip to content

Commit

Permalink
fix settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Amogh-Bharadwaj committed May 20, 2024
1 parent 36c2f7b commit 430729f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
13 changes: 7 additions & 6 deletions flow/connectors/clickhouse/clickhouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ import (
)

const (
PeerDBClickhouseQueryMaxMemoryUsage int = 0
PeerDBClickhouseMaxBlockSize int = 10240
PeerDBClickhouseMaxInsertBlockSize int = 10240
PeerDBClickhouseMaxInsertThreads int = 2
PeerDBClickhouseMemoryOvercommitRatioDenominator int = 0
PeerDBClickhouseMaxMemoryUsageForUser int = 0
PeerDBClickhouseQueryMaxMemoryUsage int = 64000000000
PeerDBClickhouseMaxBlockSize int = 10240
PeerDBClickhouseMaxInsertBlockSize int = 10240
PeerDBClickhouseMaxInsertThreads int = 1
PeerDBClickhouseMemoryOvercommitRatioDenominator int = 0
PeerDBClickhouseMemoryOvercommitRatioDenominatorUser int = 0
PeerDBClickhouseMaxMemoryUsageForUser int = 64000000000
)

type ClickhouseConnector struct {
Expand Down
13 changes: 7 additions & 6 deletions flow/connectors/clickhouse/qrep_avro_sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ import (
)

var ClickhouseQuerySettings = clickhouse.Settings{
"max_memory_usage": PeerDBClickhouseQueryMaxMemoryUsage,
"max_block_size": PeerDBClickhouseMaxBlockSize,
"max_insert_block_size": PeerDBClickhouseMaxInsertBlockSize,
"max_insert_threads": PeerDBClickhouseMaxInsertThreads,
"memory_overcommit_ratio_denominator": PeerDBClickhouseMemoryOvercommitRatioDenominator,
"max_memory_usage_for_user": PeerDBClickhouseMaxMemoryUsageForUser,
"max_memory_usage": PeerDBClickhouseQueryMaxMemoryUsage,
"max_block_size": PeerDBClickhouseMaxBlockSize,
"max_insert_block_size": PeerDBClickhouseMaxInsertBlockSize,
"max_insert_threads": PeerDBClickhouseMaxInsertThreads,
"memory_overcommit_ratio_denominator": PeerDBClickhouseMemoryOvercommitRatioDenominator,
"memory_overcommit_ratio_denominator_for_user": PeerDBClickhouseMemoryOvercommitRatioDenominatorUser,
"max_memory_usage_for_user": PeerDBClickhouseMaxMemoryUsageForUser,
}

type ClickhouseAvroSyncMethod struct {
Expand Down

0 comments on commit 430729f

Please sign in to comment.