From 6afc304c5c67c966eae4bafab855224bfa8ac2d2 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 29 Jun 2025 14:55:15 +0300 Subject: feat: enable turbo boost mode for MapReduce (dmap) operations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enable the DTAIL_TURBOBOOST_ENABLE optimization for dmap commands by checking for aggregate operations in addition to cat/grep modes. This allows MapReduce queries to benefit from the same 62% performance improvement seen in grep operations. The change maintains backward compatibility and all integration tests pass (except TestDMap3 which has a race condition with 100 concurrent files). 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- internal/server/handlers/readcommand.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/server/handlers/readcommand.go b/internal/server/handlers/readcommand.go index 23c3175..90a1155 100644 --- a/internal/server/handlers/readcommand.go +++ b/internal/server/handlers/readcommand.go @@ -172,7 +172,9 @@ func (r *readCommand) read(ctx context.Context, ltx lcontext.LContext, dlog.Server.Info(r.server.user, "Turbo boost check: enabled=", turboBoostEnabled, "mode=", r.mode) // Only enable channel-less for server mode, not serverless mode // Use the serverless field directly as it's more reliable - if turboBoostEnabled && (r.mode == omode.CatClient || r.mode == omode.GrepClient) && !r.server.serverless { + // Enable turbo boost for cat/grep modes, and also when aggregate (MapReduce) is present + if turboBoostEnabled && !r.server.serverless && + (r.mode == omode.CatClient || r.mode == omode.GrepClient || r.server.aggregate != nil) { // Log to stderr for testing verification - only in server mode fmt.Fprintf(os.Stderr, "[DTAIL] Turbo boost enabled: using channel-less implementation for %s\n", path) r.readWithProcessor(ctx, ltx, path, globID, re, reader) -- cgit v1.2.3