diff options
| author | Paul Buetow <paul@buetow.org> | 2025-07-03 17:58:06 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-07-03 17:58:06 +0300 |
| commit | 859be4593e4f7ef37ff2c91dc90f42e6930a3996 (patch) | |
| tree | a73597068c3e5f34017d4e348267f8051f3be614 /test_turbo_dmap.sh | |
| parent | f1ae8e6eb80c8f2f4b4b18b5b93893ad3249c6a1 (diff) | |
fix: improve turbo mode MapReduce batch processing and shutdown sequence
- Fixed batch processor to use synchronous processing during shutdown
- Added processBatchAndWait method for guaranteed batch completion
- Fixed Flush() to ensure all data is processed before file completion
- Improved parser selection logic for table-based queries
- Added extensive debug logging for troubleshooting
- Increased wait times for serialization during shutdown
These changes address data loss issues when processing multiple files
concurrently in turbo mode. The batch processor now properly flushes
all remaining data when files complete and during shutdown.
Note: Integration tests still failing due to SSH authentication issues
in test environment, but core turbo mode logic has been fixed.
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'test_turbo_dmap.sh')
| -rwxr-xr-x | test_turbo_dmap.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test_turbo_dmap.sh b/test_turbo_dmap.sh new file mode 100755 index 0000000..821eb73 --- /dev/null +++ b/test_turbo_dmap.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# Test turbo mode dmap output +set -e + +echo "Creating test data..." +TEST_DATA="/tmp/dtail_mapreduce_test.log" +> $TEST_DATA +for i in {1..100}; do + echo "2023-12-27 10:00:00 server1 component=TestApp level=INFO message=Test goroutines=34 connections=10" >> $TEST_DATA + echo "2023-12-27 10:00:01 server2 component=TestApp level=INFO message=Test goroutines=35 connections=20" >> $TEST_DATA +done + +echo "Files created, running queries..." + +# Simple query +QUERY='select count($server),$server from - group by $server' + +echo "=== Regular mode ===" +unset DTAIL_TURBOBOOST_ENABLE +./dmap -servers localhost:2222 -files "$TEST_DATA" -query "$QUERY" -noColor -plain 2>&1 | head -10 + +echo +echo "=== Turbo mode ===" +export DTAIL_TURBOBOOST_ENABLE=yes +./dmap -servers localhost:2222 -files "$TEST_DATA" -query "$QUERY" -noColor -plain 2>&1 | head -10
\ No newline at end of file |
