feat(log): make log file can be opened with truncated or appended - #300
Merged
Conversation
YanniHu1996
approved these changes
Jul 20, 2026
YanniHu1996
approved these changes
Jul 20, 2026
GabriFedi97
reviewed
Jul 21, 2026
litaocdl
force-pushed
the
dev/299
branch
3 times, most recently
from
July 22, 2026 07:14
6ada221 to
233cd49
Compare
…or appended Signed-off-by: Tao Li <tao.li@enterprisedb.com>
Signed-off-by: Tao Li <tao.li@enterprisedb.com>
Signed-off-by: Tao Li <tao.li@enterprisedb.com>
…com> Signed-off-by: Tao Li <tao.li@enterprisedb.com> Co-authored-by: Gabriele Fedi <gabriele.fedi@enterprisedb.com> Signed-off-by: Tao Li <tao.li@enterprisedb.com>
GabriFedi97
approved these changes
Jul 23, 2026
The append-by-default and truncate options only reshape how a regular file is opened; for a FIFO destination both O_APPEND and O_TRUNC are ignored by the kernel, which the flag help and SetTruncateDestination doc both promise. Nothing exercised that path, even though a FIFO is the destination type this logging setup is most often pointed at. Add specs that open a FIFO destination in both append and truncate modes and confirm the open succeeds without blocking or panicking. Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
armru
approved these changes
Jul 23, 2026
GabriFedi97
approved these changes
Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch make the log file opened with os.O_APPEND flag by default. Provides
user options in go and cli to overwrite this default to O_TRUNC.
Closes #299