moby/daemon/logger/journald
Cory Snider 987fe37ed1 d/logger/journald: quit waiting when logger closes
If a reader has caught up to the logger and is waiting for the next
message, it should stop waiting when the logger is closed. Otherwise
the reader will unnecessarily wait the full closedDrainTimeout for no
log messages to arrive.

This case was overlooked when the journald reader was recently
overhauled to be compatible with systemd 255, and the reader tests only
failed when a logical race happened to settle in such a way to exercise
the bugged code path. It was only after implicit flushing on close was
added to the journald test harness that the Follow tests would
repeatably fail due to this bug. (No new regression tests are needed.)

Signed-off-by: Cory Snider <csnider@mirantis.com>
2024-01-30 17:57:12 -05:00
..
internal d/logger/journald: log journal-remote cmd output 2024-01-30 14:50:57 -05:00
doc.go logger/journald: simplify build constraints 2022-07-25 16:37:59 -04:00
journald.go remove pre-go1.17 build-tags 2023-05-19 20:38:51 +02:00
journald_test.go remove pre-go1.17 build-tags 2023-05-19 20:38:51 +02:00
read.go d/logger/journald: quit waiting when logger closes 2024-01-30 17:57:12 -05:00
read_test.go d/logger/journald: sync logger on close in tests 2024-01-30 17:18:46 -05:00