You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
make ch parallel view processing configurable (#223)
### TL;DR
Added configuration option to enable parallel view processing for ClickHouse connections.
### What changed?
- Added a new configuration flag `enableParallelViewProcessing` for all ClickHouse storage types (orchestrator, main, and staging)
- Modified the ClickHouse connection setup to make parallel view processing optional instead of always enabled
- Added the corresponding configuration binding in the root command
### How to test?
1. Run the application with the new flag to enable parallel view processing:
```
--storage-orchestrator-clickhouse-enableParallelViewProcessing=true
--storage-main-clickhouse-enableParallelViewProcessing=true
--storage-staging-clickhouse-enableParallelViewProcessing=true
```
2. Verify that the ClickHouse connections are established with the `parallel_view_processing` setting when the flag is enabled
3. Verify that the setting is not applied when the flag is disabled (default behavior)
### Why make this change?
Parallel view processing in ClickHouse can improve query performance for certain workloads, but it's not always desirable for all environments or use cases. Making this setting configurable allows users to enable it only when beneficial for their specific workload patterns, providing more flexibility in optimizing ClickHouse performance.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Added new configuration options to enable or disable parallel view processing for Clickhouse storage in orchestrator, main, and staging environments. These can be set via command-line flags or configuration files.
- **Improvements**
- Parallel view processing in Clickhouse is now configurable, allowing greater flexibility in storage settings.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Copy file name to clipboardExpand all lines: cmd/root.go
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -82,6 +82,7 @@ func init() {
82
82
rootCmd.PersistentFlags().Int("storage-orchestrator-clickhouse-maxOpenConns", 30, "Clickhouse max open connections for orchestrator storage")
83
83
rootCmd.PersistentFlags().Int("storage-orchestrator-clickhouse-maxIdleConns", 30, "Clickhouse max idle connections for orchestrator storage")
84
84
rootCmd.PersistentFlags().Bool("storage-orchestrator-clickhouse-disableTLS", false, "Clickhouse disableTLS for orchestrator storage")
85
+
rootCmd.PersistentFlags().Bool("storage-orchestrator-clickhouse-enableParallelViewProcessing", false, "Clickhouse enableParallelViewProcessing for orchestrator storage")
85
86
rootCmd.PersistentFlags().String("storage-staging-clickhouse-host", "", "Clickhouse host for staging storage")
86
87
rootCmd.PersistentFlags().String("storage-main-clickhouse-host", "", "Clickhouse host for main storage")
87
88
rootCmd.PersistentFlags().String("storage-main-clickhouse-username", "", "Clickhouse username for main storage")
@@ -91,13 +92,15 @@ func init() {
91
92
rootCmd.PersistentFlags().Int("storage-main-clickhouse-maxOpenConns", 30, "Clickhouse max open connections for main storage")
92
93
rootCmd.PersistentFlags().Int("storage-main-clickhouse-maxIdleConns", 30, "Clickhouse max idle connections for main storage")
93
94
rootCmd.PersistentFlags().Bool("storage-main-clickhouse-disableTLS", false, "Clickhouse disableTLS for main storage")
95
+
rootCmd.PersistentFlags().Bool("storage-main-clickhouse-enableParallelViewProcessing", false, "Clickhouse enableParallelViewProcessing for main storage")
94
96
rootCmd.PersistentFlags().String("storage-staging-clickhouse-username", "", "Clickhouse username for staging storage")
95
97
rootCmd.PersistentFlags().String("storage-staging-clickhouse-password", "", "Clickhouse password for staging storage")
96
98
rootCmd.PersistentFlags().Bool("storage-staging-clickhouse-asyncInsert", false, "Clickhouse async insert for staging storage")
97
99
rootCmd.PersistentFlags().Int("storage-staging-clickhouse-maxRowsPerInsert", 100000, "Clickhouse max rows per insert for staging storage")
98
100
rootCmd.PersistentFlags().Int("storage-staging-clickhouse-maxOpenConns", 30, "Clickhouse max open connections for staging storage")
99
101
rootCmd.PersistentFlags().Int("storage-staging-clickhouse-maxIdleConns", 30, "Clickhouse max idle connections for staging storage")
100
102
rootCmd.PersistentFlags().Bool("storage-staging-clickhouse-disableTLS", false, "Clickhouse disableTLS for staging storage")
103
+
rootCmd.PersistentFlags().Bool("storage-staging-clickhouse-enableParallelViewProcessing", false, "Clickhouse enableParallelViewProcessing for staging storage")
0 commit comments