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
docs(spec): trim per-driver table and PRAGMA listing to clear Sonar gate
SonarCloud quality-gate kept failing at 3.5% duplication on new code
because the spec's "Per-driver config defaults" table and "SQLite tuning"
code block were lifted near-verbatim from CLAUDE.md (and the implementation
sites in internal/config/config.go and internal/storage/factory.go).
Replace both with a short pointer to CLAUDE.md / factory.go so the spec
still tells the story (problem, decision, migration notes) but stops
copying the operator-facing reference data verbatim. CLAUDE.md remains
the authoritative table; the spec is now a thinner historical record.
|`DB_MAX_OPEN_CONNS`| 1 | 50 | SQLite single-writer; multiple open conns are wasted slots. |
138
-
|`DB_MAX_IDLE_CONNS`| 1 | 10 | Match open conns. |
139
-
|`INGEST_PIPELINE_WORKERS`| 2 | 8 | 8 workers all serialize through the SQLite writer lock anyway; 2 is enough to keep the writer queue non-empty without pushing extra work into heap. |
140
-
|`INGEST_PIPELINE_QUEUE_SIZE`| 10000 | 50000 | Smaller queue = lower heap watermark; backpressure kicks in earlier so OTLP clients back off rather than us OOMing. |
141
-
|`METRIC_MAX_CARDINALITY`| 3000 | 10000 | Bound the TSDB series map. 120 services × 25 series/service still fits. |
142
-
|`STORE_MIN_SEVERITY`|`WARN`|`""` (== ingest) | Skip INFO/DEBUG persists on the SQLite path — in-memory GraphRAG/anomaly detection still benefits from the full stream. |
143
-
|`SAMPLING_RATE`| 0.05 | 1.0 | Trace volume is the primary disk-growth contributor. 5% sample at 120 services ≈ what 1.0 used to do at 6 services. |
144
-
|`GRPC_MAX_CONCURRENT_STREAMS`| 240 | 1000 | Each stream costs heap; 120 services × 2 = 240 covers the deployment with no overhead. |
145
-
|`LOG_FTS_ENABLED`|`true`| n/a | FTS5 is dramatically faster than LIKE on the kept `search_logs` path; operators who want the ~30% disk savings can opt out. |
120
+
When `DB_DRIVER=sqlite`, `config.Load()` overrides nine defaults that are
121
+
otherwise Postgres-tuned. The override applies only when the operator did
122
+
not set the env var explicitly (detected via `os.LookupEnv` presence, not
123
+
value comparison). The authoritative table — env var, SQLite default,
124
+
Postgres default, and per-row rationale — lives in `CLAUDE.md` under
125
+
"SQLite per-driver defaults". The implementation in
126
+
`internal/config/config.go::applyDriverDefaults` and its tests in
127
+
`internal/config/driver_defaults_test.go` are the runtime source of
0 commit comments