@@ -43,6 +43,9 @@ type Config struct {
4343 // Reconcile TTL on already-existing tables, not just newly created ones.
4444 ReconcileTableTTL bool
4545
46+ // Set 8,192-token text index dictionary blocks on the seeded tables.
47+ SetTextIndexBlockSize bool
48+
4649 // TLS settings
4750 TLSCAFile string
4851 TLSCertFile string
@@ -69,6 +72,7 @@ func loadConfig() (*Config, error) {
6972 MetricsTTL : getEnv ("HYPERDX_OTEL_EXPORTER_METRICS_TTL" , tablesTTL ),
7073 SessionsTTL : getEnv ("HYPERDX_OTEL_EXPORTER_SESSIONS_TTL" , tablesTTL ),
7174 ReconcileTableTTL : getEnv ("HYPERDX_OTEL_EXPORTER_RECONCILE_TABLE_TTL" , "false" ) == "true" ,
75+ SetTextIndexBlockSize : getEnv ("HYPERDX_OTEL_EXPORTER_SET_TEXT_INDEX_BLOCK_SIZE" , "true" ) != "false" ,
7276 TLSCAFile : getEnv ("CLICKHOUSE_TLS_CA_FILE" , "" ),
7377 TLSCertFile : getEnv ("CLICKHOUSE_TLS_CERT_FILE" , "" ),
7478 TLSKeyFile : getEnv ("CLICKHOUSE_TLS_KEY_FILE" , "" ),
@@ -919,8 +923,10 @@ func main() {
919923 os .Exit (1 )
920924 }
921925
922- // Non-fatal so it can't block startup; older servers keep 512-token blocks.
923- if supportsTextIndexTableSettings (chMajor , chMinor ) {
926+ // On by default; HYPERDX_OTEL_EXPORTER_SET_TEXT_INDEX_BLOCK_SIZE=false lets
927+ // operators who manage these tables opt out. Non-fatal so it can't block
928+ // startup; older servers keep 512-token blocks.
929+ if cfg .SetTextIndexBlockSize && supportsTextIndexTableSettings (chMajor , chMinor ) {
924930 if err := setTextIndexBlockSize (ctx , db , cfg .Database ); err != nil {
925931 log .Printf ("WARNING: text index block size: %v" , err )
926932 }
0 commit comments