From a4eb3cc769c13312fdd4b7aaa20659e408f734b7 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Wed, 2 Jul 2025 22:28:05 +0300 Subject: feat: make turbo mode configurable via config file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- internal/mapr/server/aggregate.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/mapr/server') 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 -- cgit v1.2.3