092f2d6aed
inotify event is trigged immediately there's data written to disk. But at the time that the inotify event is received, the json line might not fully saved to disk. If the json decoder tries to decode in such case, an io.UnexpectedEOF will be trigged. We used to retry for several times to mitigate the io.UnexpectedEOF error. But there are still flaky tests caused by the partial log entries. The daemon knows exactly when there are new log entries emitted. We can use the pubsub package to notify all the log readers instead of inotify. Signed-off-by: Shijiang Wei <mountkin@gmail.com> try to fix broken test. will squash once tests pass Signed-off-by: Shijiang Wei <mountkin@gmail.com> |
||
---|---|---|
.. | ||
publisher.go | ||
publisher_test.go |