@osschar commented on this pull request.


In src/XrdPfc/XrdPfcIOFile.cc:

> @@ -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, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <xrootd/xrootd/pull/1919/review/1308167583@github.com>

[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/xrootd/xrootd/pull/1919#pullrequestreview-1308167583", "url": "https://github.com/xrootd/xrootd/pull/1919#pullrequestreview-1308167583", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

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