summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-06-29 15:27:49 +0300
committerPaul Buetow <paul@buetow.org>2025-06-29 15:27:49 +0300
commit2140ed9dcbd180cd5e810eaabd2f3c2fbce55a57 (patch)
tree56f835836929e8fe3236a507e6421ae75133ae0f
parent6afc304c5c67c966eae4bafab855224bfa8ac2d2 (diff)
feat: enable turbo boost mode for tail (dtail) operations
Enable the DTAIL_TURBOBOOST_ENABLE optimization for dtail commands. The infrastructure was already fully implemented with specialized tailWithProcessorOptimized() for continuous streaming, but the mode check was preventing it from being used. This completes turbo boost support for all dtail commands (dcat, dgrep, dmap, dtail), providing up to 62% performance improvement for high-volume log streaming scenarios. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
-rw-r--r--internal/server/handlers/readcommand.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/server/handlers/readcommand.go b/internal/server/handlers/readcommand.go
index 90a1155..566d400 100644
--- a/internal/server/handlers/readcommand.go
+++ b/internal/server/handlers/readcommand.go
@@ -172,9 +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
- // Enable turbo boost for cat/grep modes, and also when aggregate (MapReduce) is present
+ // Enable turbo boost for cat/grep/tail 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) {
+ (r.mode == omode.CatClient || r.mode == omode.GrepClient || r.mode == omode.TailClient || 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)