Print

Print


@osschar commented on this pull request.



> @@ -115,6 +115,11 @@ int IOFile::initCachedStat(const char* path)
    {
       res = GetInput()->Fstat(tmpStat);
       TRACEIO(Debug, trace_pfx << "got stat from client res = " << res << ", size = " << tmpStat.st_size);
+      // The mtime / atime / ctime for cached responses come from the file on disk in the cache hit case.
+      // To avoid weirdness when two subsequent stat queries can give wildly divergent times (one from the
+      // origin, one from the cache), set the times to "now" so we effectively only report the *time as the
+      // cache service sees it.
+      tmpStat.st_ctime = tmpStat.st_mtime = tmpStat.st_atime = time(NULL);

I missed this is for the fail case, res != 0 ... git snipped the diff in change view.
This makes my comments above orthogonal to this change -- the change here is ok.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/xrootd/xrootd/pull/1919#pullrequestreview-1308167583
You are receiving this because you are subscribed to this thread.

Message ID: <[log in to unmask]>

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1