>
>The goal is to never write partial lines. So if the process is sent a
>signal to exit while a partial line have been received, simply exit
>without writing anything to file.
One of the goals is not to write a partial line if it can be avoided;
but it defers to the more important goal of not losing any data.
Your suggestion goes against that more important goal.
>I would vote for simply dropping it. And as we are shutting down, the
>whole thing is a kind of race anyway, so the first part of the line
>could just as well have been not received at all, so I think we can
>safely just throw it away without even waiting for it.
Nope. Not happening.
Certainly, on shutdown, it doesn't matter whether you get that last
log line or not. But loggers don't only get killed on shutdown. There
are other, good, reasons why you would want to kill (and restart) an
s6-log process, and not losing any data is important in these cases.
--
Laurent
Received on Fri May 26 2023 - 11:02:24 CEST