astrada / google-drive-ocamlfuse

FUSE filesystem over Google Drive
https://astrada.github.io/google-drive-ocamlfuse/
MIT License
5.53k stars 351 forks source link

Upload caching #837

Open ferenczy opened 10 months ago

ferenczy commented 10 months ago

When uploading a file (writing it into the Google Drive directory), the application that's doing the file operation (e.g. cp, rsync, a file manager, etc.) reports the operation is finished in just a few seconds, then hangs for a long time (it's probably waiting for the confirmation that the operation has succeeded) and then finally exits. I guess, it's caused by some upload cache.

Example: copy a 120 MB file using rsync --progress. It shows a speed of 30 MB/s and 100% done in 4 seconds. Then it hangs for 110 seconds and then it exits.

That's not very convenient - I don't know what's the real progress of the upload (the application is reporting 100% after a few seconds), but the application is blocked until the upload is actually finished. I would rather disable the caching altogether, at least I'll know the real progress of the upload. So the question is: is it possible to disable the upload caching?

Feature request

An ideal solution would be as it's implemented in the original Google Drive client - the upload is cached, so the file is written very quickly (as quickly as a local temporary copy of the file is created), but the client doesn't block the application that's writing the file, it immediately confirms that the operation is done before the file is actually uploaded. Of course, there's an issue with what to do when the upload fails. The original client has a log of failed uploads that the user has to review. Such behavior would be my feature request.