maindavfs2 - Support: sr #109244, How to know when a file was...

 
 

sr #109244: How to know when a file was actually finished uploading to server

Submitter:  None
Submitted:  Tue 31 Jan 2017 09:27:14 AM UTC
Votes: 99
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  In Progress
Privacy:  Public Assigned to:  _71007
Originator Email:  -email is unavailable- Open/Closed:  Closed
Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 27 Nov 2018 05:47:40 PM UTC, comment #4: 

Please send your contributions to this tracker (and not to me by email):

"in fact we are accessing OpenOffice files in Alfresco through NFS today, and we plan to move to WebDAV"
Please don't do it. davfs2 can't use all the features of WebDAV because it is restricted by the file system interface. It misses some file system capabilities because it is restricted by the WebDAV protocol. davfs2 wants to make WebDAV available for applications without builtin WebDAV support, but has to make compromises.

If you can use a real network file system then don't use davfs2.

"OpenOffice or LibreOffice"
This two applications have builtin WebDAV support. It should be better suited then davfs2 (and meets the original goals of WebDAV). The LibreOffice team will surely welcome feed back from people that use the WebDAV capabilities of LibreOffice.

Werner

- <_71007>
Tue 20 Nov 2018 11:36:25 AM UTC, comment #3: 

First:
davfs2 will only try to upload a file after the file is closed by the application. It can't do incremental uploads after a write without a close.

When you set delay_upload to 0 then davfs2 will only return an answer to the kernel after the upload has finished. If the upload fails it will return an error. But notice: it only returns an error if the upoad fails permanently. If it is just some momentary network failure it will return ok. Another open question is: how will your application react? It just migth ignore it, because if the "close" fails it can't do anything anyway.

Werner

- <_71007>
Mon 19 Nov 2018 04:23:18 PM UTC, comment #2: 

Hello,

You wrote:
"the file is first written to the local cache and only when it is closed it is transfered to the server."

Is it possible to enable sync transfert, so when a application writes the file and the HTTP server refuses it, this could be relayed to the writing application by an I/O error ?

Greetings,
 Alain

Alain Viret <nvir>
Wed 01 Feb 2017 05:34:09 PM UTC, comment #1: 

By default davfs2 transfers files to the server asynchronously. Because of this it is not well suited for your task of measuring upload speed. A tool like curl is probably better suited,

If you for some reason must use davfs2 you can

  • set option "delay_upload 0": davfs2 will now upload the file as soon as it is closed. But note: the file is first written to the local cache and only when it is closed it is transfered to the server.
  • set option "debug http": davfs2 will write all HTTP-request lines and all final response lines into your log facility. You can use the time stamps of these log entries to calculate transfer time.


ls stucks forever:
davfs2 is single threaded and so it will not respond as long it is uploading some file. But nothing should stuck forever. If this really happens then something is going wrong.

- <_71007>
Tue 31 Jan 2017 09:27:14 AM UTC, original submission:  

I need to measure upload speed of our webdav server, So I've mounted a number of davfs2 folders. However I see that if it takes for example 4 seconds to copy 100 files of 1MB to such folder, in reality when I check it on Server side, it may take about 2 minutes. Moreover, when I try to just `ls` on my davfs2 in between (before it actually uploads to server), `ls` stucks forever. Can you probably help with some idea, how to know when actually all files are uploaded?

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by nvir (Voted in favor of this item)
  • -email is unavailable- added by nvir (Posted a comment)
  • -email is unavailable- added by _71007 (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 99 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-12-26 _71007 Open/ClosedOpen Closed
    2018-11-19 nvir Carbon-Copy- Added nvir
    2017-02-01 _71007 StatusNone In Progress
        Assigned toNone _71007

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code