bugdavfs2 - Bugs: bug #60047, file_refresh==0 and dir_refresh==0...

 
 

bug #60047: file_refresh==0 and dir_refresh==0 do not do not work as expected

Submitted by:  None
Submitted on:  Fri 12 Feb 2021 03:36:44 PM UTC  
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 12 Feb 2021 03:36:44 PM UTC, original submission:  

Setting dir_refresh or file_refresh to 0 does not ensure that a new GET/PROPFIND request is sent every time the file or
directory is opened. Instead the effective refresh interval is on average 0.5 seconds, because the refresh/retry is only
performed if the current time is greater than the refresh/retry deadline (not greater or equal) and the clock resolution
is 1 second.

In cache.c most time comparisons use the following logic:
    if (time(NULL) > deadline) {
         // do
    }
or
    if (time(NULL) <= deadline) {
        // skip
    }
so actions are only carried out once the time is one second past the deadline.

The attached patch only changes the comparisons in dav_statfs, update_directory and update_cache_file affected by the
dir_refresh and file_refresh variable but leaves over comparisons with the same pattern unchanged.

Note if the server does not support etags, the If-Modified-Since conditional GET request still only has 1 second
resolution.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #50858:  file_refresh_0_not_working.patch added by None (2KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

 

 

Follows 1 latest change.

Date Changed by Updated Field Previous Value => Replaced by
2021-02-12 None Attached File- => Added file_refresh_0_not_working.patch, #50858

Back to the top


Powered by Savane 3.7