-
Notifications
You must be signed in to change notification settings - Fork 61
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
riofs - read after write failure (with any sort of newly created files) #124
Comments
Hello, I remember I added a few configuration parameters which control the caching, but I have to take a look at the code to give you the answer if it's possible to disable caching at all. |
I believe I'm seeing the same problem when trying to rsync to an RioFS mounted dir (via encfs):
This does not happen with sshfs. Happy to run other tests and/or send more debugging info. |
I believe this has nothing to do with caching. The reason is that riofs flushes the file on fuse release instead of flush (https://github.com/skoobe/riofs/blob/master/src/rfuse.c#L678 and https://github.com/skoobe/riofs/blob/master/src/rfuse.c#L1030). flush is inline (it blocks The proper thing to do would be flush the file on flush instead of release. It will also allow applications to know if the flush has failed (since close can return an error code but release is transparent to the application). It will also make the benchmark I make for https://github.com/kahing/goofys more realistic ;-) |
Well cache or not it would be really great if there'd be a config switch to tune upload behaviour. Such an asynchronous upload might be a great thing in general but it's bad for our use-case where we require the (small) files to be stored instantly on s3. I think I'm not the only one that whould be really happy if there'd be any option to make uploads more synchronous ... PS: As mentioned above I already tried some FUSE flags and I think I also tried to disable cache. |
Hello, |
Sure. Would a PHP or bash based PoC be ok for you? |
Bash would be better, thanks! |
Here's a simple testcase using openSSL to generate a dummy cert. It represents the issue, even though the files created here are really small. The files we first noted the issue had some KB more in size.
On a local filesystem While on riofs mounted volume (same region) The error message results from openSSL being unable to read the CSR file created by first command. Note that if we enhance above command with a sleep (1 second e.g.) it does actually work. So could you please help me to fix this somehow. I don't want to be using sleep as it's a really dirty hack ... A config switch that triggers synchronous behaviour for uploads would be fine aswell. Update: fixed typo in example code (4096 vs 8192 bit) |
Hi, just wanted to ask if you've found some time to look into this. |
Hi, just wanted to let you know that I'm now using the s3 API for some uploads and even then there is a delay on the riofs mount (file not found) while it's available on the API immediately. So this doesn't seem to be just an upload cache related issue. Any suggestions how to fix this? |
Flushing on release confuses me -- I expect flush on close like NFSv3:
|
@andrewgaul If I'm not mistaken (I haven't worked with FUSE for some time), FUSE calls "release()" when a file handle is closed. There are many other places where RioFS could be improved, unfortunately at this time I do not have any free time to work on this project. |
fuse does call release() when a file is closed, but that call is async, which means that close() will return before release() is done. The catch is that flush() can be called multiple times (dup(2)). |
Hi,
I just went through the other issues here and it seems that some people are dealing with the same issue I'm facing right now.
It seems that newly created files are not existing "on s3" once the write operation is complete which lets subsequent read operations fail. This sort of delay seems to affect all file operations like php file uploads, getimagesize() after upload etc. and bash operations aswell (dd,openssl etc.)
Is there a way to disable this asynchronous write behaviour of riofs?! I already tried to disable cache and tested various fuse options but nothing seems to work.
The only working solution here seems to be waiting for one or two seconds before running the next command that reads the file - which is a really dirty hack if you ask me.
Any suggestions/advice?! In fact the issue doesn't seem to affect s3fs though I'd prefer not to use that for various reasons. So I'd be happy if someone can help me to fix this
The text was updated successfully, but these errors were encountered: