1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/daemon/logger/loggerutils
Paweł Gronowski 7493342926 daemon/logger: Share buffers by sync.Pool
Marshalling log messages by json-file and local drivers involved
serializing the message into a shared buffer. This caused a regression
resulting in log corruption with recent changes where Log may be called
from multiple goroutines at the same time.

Solution is to use a sync.Pool to manage the buffers used for the
serialization. Also removed the MarshalFunc, which the driver had to
expose to the LogFile so that it can marshal the message. This is now
moved entirely to the driver.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2022-05-27 16:44:06 +02:00
..
cache api/types: hostconfig: fix LogMode enum 2021-08-06 19:05:58 +02:00
file_unix.go daemon/logger: rotate log files, never truncate 2022-05-19 15:22:22 -04:00
file_windows.go daemon/logger: rotate log files, never truncate 2022-05-19 15:22:22 -04:00
file_windows_test.go daemon/logger: rotate log files, never truncate 2022-05-19 15:22:22 -04:00
follow.go daemon/logger: follow LogFile without file watches 2022-05-19 15:22:22 -04:00
log_tag.go Add canonical import comment 2018-02-05 16:51:57 -05:00
log_tag_test.go Add canonical import comment 2018-02-05 16:51:57 -05:00
logfile.go daemon/logger: Share buffers by sync.Pool 2022-05-27 16:44:06 +02:00
logfile_race_test.go daemon/logger: add test to detect data races 2022-03-03 14:56:25 -05:00
logfile_test.go daemon/logger: Share buffers by sync.Pool 2022-05-27 16:44:06 +02:00
sharedtemp.go daemon/logger: fix refcounting decompressed files 2022-05-19 15:22:22 -04:00
sharedtemp_test.go daemon/logger: fix refcounting decompressed files 2022-05-19 15:22:22 -04:00