summaryrefslogtreecommitdiff
path: root/internal/io/fs
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-06-16 18:30:37 +0300
committerPaul Buetow <paul@buetow.org>2025-06-16 18:30:37 +0300
commit5fd4e5d21ce51bd9004f4a994fcacbe62010342d (patch)
tree4bb8f687287ae74c990c303a6bbffb5dadf33efb /internal/io/fs
parent4d4de161f6b4b9564a4d4a57c8efc78d837407ca (diff)
reduce polling interval to fix DTail integration test race condition
- Decrease chunked reader polling from 100ms to 10ms for better responsiveness - Fixes race condition where rapid consecutive writes were being missed - DTail integration test now passes consistently with 1-second write intervals 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'internal/io/fs')
-rw-r--r--internal/io/fs/chunkedreader.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/io/fs/chunkedreader.go b/internal/io/fs/chunkedreader.go
index b7c90d4..5f16c12 100644
--- a/internal/io/fs/chunkedreader.go
+++ b/internal/io/fs/chunkedreader.go
@@ -60,11 +60,11 @@ func (cr *ChunkedReader) ProcessLines(ctx context.Context, rawLines chan *bytes.
return nil
} else {
// In tailing mode - EOF means wait and try again
- // This mimics the original behavior of sleeping 100ms on EOF
+ // Use shorter polling interval for better responsiveness to rapid writes
select {
case <-ctx.Done():
return ctx.Err()
- case <-time.After(100 * time.Millisecond):
+ case <-time.After(10 * time.Millisecond):
// Continue reading after brief pause
continue
}