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

Submitter:  None
Submitted:  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
* Mandatory Fields

Add a New Comment Rich Markup
   

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

 

There are 0 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.

 

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.13-758e.
Corresponding source code