-
Notifications
You must be signed in to change notification settings - Fork 844
Address pipe remove on reload and add pipe reuse #6017
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -966,7 +966,7 @@ LogObjectManager::_solve_filename_conflicts(LogObject *log_object, int maxConfli | |
| // roll old filename so the new object can use the filename | ||
| // it requested (previously we used to rename the NEW file | ||
| // but now we roll the OLD file), or if the log object writes | ||
| // to a pipe, just remove the file if it was open as a pipe | ||
| // to a pipe, just don't roll | ||
|
|
||
| bool roll_file = true; | ||
|
|
||
|
|
@@ -988,7 +988,6 @@ LogObjectManager::_solve_filename_conflicts(LogObject *log_object, int maxConfli | |
| roll_file = false; | ||
| } else { | ||
| if (S_ISFIFO(s.st_mode)) { | ||
| unlink(filename); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Testing this out locally, removing the unlink seems to get the behavior that addresses the concerns @ema raised. However, do we have to worry about the comment at line 974: It seems to indicate that the unlink is intentional so that the metadata is correct. Maybe the comment is incorrect though?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what does the meta data files say about the fifo in your testing?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reading through the code, I see that the meta file is only used for log rolling which is not applicable to pipes. We don't even instantiate a BaseLogFile (which creates and maintains the meta file) for pipes: In any case, the comment about unlinking the pipe to maintain the metadata for it seems to be a mistaken comment (assuming by metadata the author meant the meta file). @ericcarlschwartz : I'll create a new PR with the close() call and manage the PR from there. Thanks! |
||
| roll_file = false; | ||
| } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can a file be a regular file and a fifo?