summaryrefslogtreecommitdiff
path: root/internal/mapr/server
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-07-02 22:28:05 +0300
committerPaul Buetow <paul@buetow.org>2025-07-02 22:28:05 +0300
commita4eb3cc769c13312fdd4b7aaa20659e408f734b7 (patch)
treee80d3da40af872f43e7698c13fd339286dfd2391 /internal/mapr/server
parent17ee5e62c2b1037c21cb36f2677d2c538e2542cb (diff)
feat: make turbo mode configurable via config file
Add TurboModeEnable setting to server configuration with environment variable override. The DTAIL_TURBOBOOST_ENABLE environment variable takes precedence over config file setting. Turbo mode is automatically disabled for MapReduce operations to prevent data accuracy issues. - Add TurboModeEnable boolean to ServerConfig struct - Update config initializer to check environment variable for backward compatibility - Replace direct env var checks with config.Server.TurboModeEnable throughout codebase - Enable turbo mode in example config file (dtail.json.example) - Add property to JSON schema with descriptive documentation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'internal/mapr/server')
-rw-r--r--internal/mapr/server/aggregate.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/mapr/server/aggregate.go b/internal/mapr/server/aggregate.go
index 1f735ac..f055b9d 100644
--- a/internal/mapr/server/aggregate.go
+++ b/internal/mapr/server/aggregate.go
@@ -141,7 +141,7 @@ func (a *Aggregate) nextLine() (line *line.Line, ok bool, noMoreChannels bool) {
a.linesCh = newLinesCh
// In turbo mode, synchronously put the channel back to avoid race conditions
- if config.Env("DTAIL_TURBOBOOST_ENABLE") {
+ if config.Server.TurboModeEnable {
select {
case a.NextLinesCh <- oldLinesCh:
// Successfully put back