-
Notifications
You must be signed in to change notification settings - Fork 824
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
fd_write: Flush on every write to a file #3820
Conversation
I want to write a test. Is there any way to examine the state of the env at some point during execution (and not after the execution)? |
Can the flush be done only for stout/stderr, that would avoid the slowdown of flush for regular file @mucinoab Also, for testing, maybe you try some test that use both stdout and stderr and try to mix both output without/without flushing? |
@ptitSeb I mean surely this can be done but then we'll just be waiting for the next issue of someone writing maybe a logger and flushing all the logs to a file before uploading it to some api and not getting all the logs uploaded because wasmer didn't find it suitable to flush the data to the file despite the developer explicitly calling flush. I think it's not a matter of performance penalization issue as much as program behavior correctness. |
Aside from what was commented, tests are missing. We need to test that this works as we want |
I would prefer that we separate issue. This is issue is specifically about The fix have to only touch |
you would need to rebase also. |
Done |
Description
Previously we were only flushing the writes until we closed the file, now every write flushes.
This unfortunately will penalize performance, I am open to suggestions on how can this be avoided or minimized.
cc @theduke @syrusakbary @ibrahim-akrab
Fixes #3790
Fixes #3814
/claim #3790