Skip to content

Commit

Permalink
rename: clickhouse batch timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
dennis-tra committed Feb 20, 2025
1 parent 76b3d42 commit db523b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions cmd/nebula/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ var rootConfig = &config.Root{
ApplyMigrations: true,
ClickHouseMigrationsTableEngine: "TinyLog",
ClickHouseClusterName: "",
ClickHouseBatchTimeout: 2 * time.Second,
ClickHouseBatchInterval: 2 * time.Second,
ClickHouseBatchSize: 10_000,
AgentVersionsCacheSize: 200,
ProtocolsCacheSize: 100,
Expand Down Expand Up @@ -306,8 +306,8 @@ func main() {
Name: "clickhouse-batch-timeout",
Usage: "The maximum time to hold records in memory before flushing the data to clickhouse",
EnvVars: []string{"NEBULA_CLICKHOUSE_BATCH_TIMEOUT"},
Value: rootConfig.Database.ClickHouseBatchTimeout,
Destination: &rootConfig.Database.ClickHouseBatchTimeout,
Value: rootConfig.Database.ClickHouseBatchInterval,
Destination: &rootConfig.Database.ClickHouseBatchInterval,
Category: flagCategoryClickhouse,
},
},
Expand Down
4 changes: 2 additions & 2 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ type Database struct {
ClickHouseBatchSize int

// The maximum time to hold records in memory before flushing the data to clickhouse
ClickHouseBatchTimeout time.Duration
ClickHouseBatchInterval time.Duration

// The cache size to hold agent versions in memory to skip database queries.
AgentVersionsCacheSize int
Expand Down Expand Up @@ -324,7 +324,7 @@ func (cfg *Database) ClickHouseClientConfig() *db.ClickHouseClientConfig {
MigrationsTableEngine: cfg.ClickHouseMigrationsTableEngine,
ApplyMigrations: cfg.ApplyMigrations,
BatchSize: cfg.ClickHouseBatchSize,
BatchTimeout: cfg.ClickHouseBatchTimeout,
BatchTimeout: cfg.ClickHouseBatchInterval,
NetworkID: cfg.NetworkID,
PersistNeighbors: cfg.PersistNeighbors,
MeterProvider: cfg.MeterProvider,
Expand Down

0 comments on commit db523b1

Please sign in to comment.