summaryrefslogtreecommitdiff
path: root/internal/io/fs
AgeCommit message (Collapse)Author
2026-04-10Fix known-hosts trust deadlock, host key stat, and optional nozstd buildPaul Buetow
- stdout logger: release mutex while waiting on pause resume so prompt callbacks can log (fixes hang after trusting new hosts; known_hosts was written but Resume never ran). - known hosts callback: stop borrowing the SSH dial throttle channel (could block or interact badly with parallel handshakes). - host key path: use errors.Is(..., fs.ErrNotExist) for RootedPath.Stat wrapped errors; stat errors now fail fast instead of mis-read. - public key path: same ErrNotExist check for authorized_keys miss. - Build: optional DTAIL_NO_ZSTD=yes / nozstd tag for CGO-free builds; split zstd readers into tagged files. - Docs/examples: firewalld note for port 2222, log prune timer+script, SSHBindAddress note, dserver unit disabled-by-default comment; firewalld helper script example. - Regression test for stdout pause/mutex behavior. Made-with: Cursor
2026-03-19task 260: harden ssh server key file access with OpenRootPaul Buetow
2026-03-19task 261: harden server reads with OpenRootPaul Buetow
2026-03-13Stop stale query work promptly on generation cancelPaul Buetow
2026-03-10Refactor server-side config singleton readsPaul Buetow
2026-03-08task: add optimized file-reader processor tests (task 376)Paul Buetow
2026-03-08task: propagate dropped processing and flush errors (task 379)Paul Buetow
2026-03-08task: close compressed readers in file read paths (task 377)Paul Buetow
2026-03-08task: harden truncate signal lifecycle in processor readers (task 372)Paul Buetow
2026-03-03Apply go fix build tag modernizationPaul Buetow
2025-07-02perf: implement tiered buffer pooling to reduce allocationsPaul Buetow
- Add scanner_pool.go with tiered buffer pools (1MB, 64KB, 4KB) - Modify readWithProcessorOptimized to use pooled scanner buffers - Update tailWithProcessorOptimized to pool 64KB read buffers - Increase BytesBuffer pool initial capacity from 128B to 4KB - Add buffer_pool_test.go to benchmark pooling effectiveness This reduces memory allocations by ~36% in turbo mode by reusing buffers instead of allocating new ones for each file operation. All integration tests pass. šŸ¤– Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-01fix: resolve turbo mode race condition and improve TestDCat2Paul Buetow
- Fixed race condition in periodicTruncateCheck by using context cancellation - Added turbo mode support to TestDCat2 server configuration - Removed problematic wait for pending files in readCommand.Start - Fixed potential panic when truncate channel is closed while goroutine is running The test now properly enables turbo mode on both client and server, preventing the timeout issues that occurred when only the client had turbo mode enabled. šŸ¤– Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-30fix: ensure complete data transmission in turbo mode for dtail operationsPaul Buetow
This commit fixes integration test failures in turbo mode where data was not being fully transmitted before the connection closed. The main issue was that readWithTurboProcessor was returning too quickly without ensuring all data had been written to the network stream. Key changes: - Add comprehensive trace logging to track data flow in turbo mode - Fix turbo channel draining mechanism in baseHandler.Read() to wait for all data - Add proper flushing in TurboNetworkWriter with channel drain synchronization - Increase flush timeout from 10 to 100 iterations for turbo mode data volumes - Fix color formatting in serverless mode by processing lines individually - Add synchronization delays to ensure data transmission completes The fixes ensure that all data is properly transmitted before connection closure, resolving TestDcat integration test failures when DTAIL_TURBOBOOST_ENABLE is set. šŸ¤– Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-29fix: respect MaxLineLength in turbo boost mode for integration testsPaul Buetow
The optimized line reader now properly handles the MaxLineLength configuration which is set to 1024 bytes in integration test mode. This ensures that long lines are split consistently between regular and turbo boost modes. - Cache MaxLineLength value to avoid repeated config lookups - Split lines that exceed MaxLineLength even when they contain newlines - Handle EOF cases properly when lines exceed the limit - Reset warning flag when normal lines are encountered All dcat and dgrep integration tests now pass with DTAIL_TURBOBOOST_ENABLE=yes šŸ¤– Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-28feat: implement channel-less grep for 62% performance improvementPaul Buetow
- Add LineProcessor interface for direct line processing without channels - Implement channel-less file reading in readfile_processor.go - Add optimized reader with 256KB buffering for efficient I/O - Create GrepLineProcessor for direct writing without intermediate channels - Fix serverless mode hanging due to stdin pipe detection - Fix base64 decoding bug (was counting characters instead of arguments) - Fix message output formatting by adding proper newline handling Performance improvements: - Channel-based: 9.00s → Channel-less: 3.42s (62% faster on 100MB files) - Removed channel synchronization overhead and context switching - Reduced memory allocations with buffer pooling Environment variables: - DTAIL_CHANNELLESS_GREP=yes - Enable channel-less implementation - DTAIL_OPTIMIZED_READER=yes - Use optimized buffered reader Known limitation: Inverted grep with context (--invert with --before/--after) not fully implemented in channel-less mode. šŸ¤– Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
2024-03-29lint warningsPaul Buetow
2022-07-15gofmt permission file headersPaul Buetow
2022-02-15minor fix, add missing newlines to server messagesPaul Buetow
2021-12-06Refactor local context filter method to reduce its cognitive complexityPaul Buetow
2021-12-05buffer line.Line for performancePaul Buetow
2021-12-04refactorPaul Buetow
2021-12-04Refactor LContext handling to reduce cognitive method complexity.Paul Buetow
2021-12-04Refactor read method to reduce its Cognitive Complexity.Paul Buetow
2021-11-03Add integration test for long line splitting - Also fixed a bug regarding ↵Paul Buetow
this along the way
2021-11-02Bugfix: Dealing correctly with files without newline characters, also add ↵Paul Buetow
more tests
2021-10-31add dmap integration test with stdin input pipePaul Buetow
2021-10-30add support to read from stdin pipe in serverless mode, e.g. grep foo.log | ↵Paul Buetow
dmap "select from ...."
2021-10-27Fix --shutdownAfter client switchPaul Buetow
2021-10-24Fix deadlock around aggregating data + server max concurrent file read limiterPaul Buetow
2021-10-14add dgrep context integration testsPaul Buetow
2021-10-14Merging grep context from masterPaul Buetow
2021-10-10add another dmap test - reading 100 source files at oncePaul Buetow
fix a data race when reading multiple files on one server from the same session at once
2021-10-10vetting and linting and some code restylingPaul Buetow
2021-10-06enable faster shutdown - useful for dgrep/dmap and dcat commandsPaul Buetow
2021-10-02add dcat testPaul Buetow
2021-10-02move args to config packagePaul Buetow
logger package rewrite as dlog
2021-10-02add spartan modePaul Buetow
2021-10-02mapreduce tables are in colors now tooPaul Buetow
2021-08-281. Major performance gain by not checking for file truncation aftterPaul Buetow
each bytes read. 2. Introduce field separator to the protocol package.
2021-08-28use a byte.Buffer in the file readerPaul Buetow
2021-08-21read files bytewise for more control of whats happening - change transport ↵Paul Buetow
protocol for more control over newlines
2020-12-29Make Linux ACL support optional, as it requires CGo and makes the binary ↵Paul Buetow
less portable
2020-12-27make lint happyPaul Buetow
2020-09-04server side support for new regex packagePaul Buetow
2020-03-04can tail probe with a given timeout and then write a mapreduce resultPaul Buetow
2020-02-07Introduce drun command, refactor code to use context packagePaul Bütow