-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Sort tempfile logic opens up extra files #6945
Comments
I don't think we have good reason for this. If we do, we should have a test covering it. :) |
So, don't hesitate to remove it |
Did a bit of thinking about this...
If anyone has other ideas please let me know. |
Started a thread with the rust-ctrlc component here with a proposal that would remove the file-descriptor overhead. |
As part of investigating this issue, found that we're using extra file descriptors to mange our tempfile logic for batched-sort operations. This is a problem because some of the GNU compatibility tests run with ulimit enforcing strict limits on the number of files that sort can open.
Looking at the open files when starting a batched sort, I see...
It's the last two of these that are problematic. These two pipes are created when we set up the Tempfile logic...
To fix this, I propose to just simplify this logic and just remove the Tempdir altogether. Just put any temporary files directly into
/tmp
(which is what GNU-sort does) and have the OS do the cleanup automatically rather than create a dedicated folder for them. We can then remove this code above that uses thectrlc
crate.I don't know the history on this, so maybe there's a good reason to use a separate folder - If so, please let me know!
The text was updated successfully, but these errors were encountered: