Skip to content

Commit

Permalink
fix TestRestoreRBAC and improve clickhouse-go connection pool setti…
Browse files Browse the repository at this point in the history
…ngs to allow properly SYSTEM SHUTDOWN + need_rebuild_list.mark behavior for 20.4-22.3 versions
  • Loading branch information
Slach committed Jan 24, 2024
1 parent 3661ce9 commit a037207
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/clickhouse/clickhouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ func (ch *ClickHouse) Connect() error {
"send_timeout": int(timeout.Seconds()),
},
MaxOpenConns: ch.Config.MaxConnections,
ConnMaxLifetime: timeout,
MaxIdleConns: 0,
ConnMaxLifetime: 0, // don't change it, it related to SYSTEM SHUTDOWN behavior for properly rebuild RBAC lists on 20.4-22.3
MaxIdleConns: 1,
DialTimeout: timeout,
ReadTimeout: timeout,
}
Expand Down
1 change: 1 addition & 0 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,7 @@ func DefaultConfig() *Config {
BackupMutations: true,
RestoreAsAttach: false,
CheckPartsColumns: true,
MaxConnections: int(downloadConcurrency),
},
AzureBlob: AzureBlobConfig{
EndpointSchema: "https",
Expand Down

0 comments on commit a037207

Please sign in to comment.