Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Issue 2791493003: Fix incorrect computation of LastModified in SimpleCache, (Closed)

Created:
3 years, 8 months ago by Maks Orlovich
Modified:
3 years, 8 months ago
Reviewers:
asanka, jkarlin
CC:
chromium-reviews, cbentzel+watch_chromium.org, gavinp+disk_chromium.org, net-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix incorrect computation of LastModified in SimpleCache, avoid making useless syscalls[1]. Those particular ones seem to typically be ultra cheap, but why do them when not needed? The code was written to use simple_util::GetMTime because at the time it was more precise than File::GetInfo when it came to timestamps; trouble is, path_ is the cache directory, not the cache entry file (see e.g. GetFilenameFromFileIndex), so this is the last modified timestamp for the wrong thing; and as far as I can see File::GetInfo is as precise these days. As far as I can see w/grep and codesearch, nothing ultimately uses DiskCache::Entry::GetLastModified() outside tests, so the biggest impact was likely that SyncOpenEntryAge stat collected was bogus. [1] Those were the looks up of info on the cache directory we saw when looking at syscall trace on Windows. BUG=714143 Review-Url: https://codereview.chromium.org/2791493003 Cr-Commit-Position: refs/heads/master@{#466674} Committed: https://chromium.googlesource.com/chromium/src/+/2cac5e68544bf2f5fbaec00f62ffe0c6e7957598

Patch Set 1 #

Patch Set 2 : Deflake on Windows, by: #

Total comments: 4

Patch Set 3 : Apply review feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+55 lines, -4 lines) Patch
M net/disk_cache/backend_unittest.cc View 1 2 1 chunk +54 lines, -0 lines 0 comments Download
M net/disk_cache/simple/simple_synchronous_entry.cc View 1 2 1 chunk +1 line, -4 lines 0 comments Download

Messages

Total messages: 43 (26 generated)
Maks Orlovich
A bit worried about the test here, lots of opportunities for flakiness and platform-sensitivity.
3 years, 8 months ago (2017-03-31 17:02:14 UTC) #4
Maks Orlovich
On 2017/03/31 17:02:14, Maks Orlovich wrote: > A bit worried about the test here, lots ...
3 years, 8 months ago (2017-03-31 17:36:37 UTC) #7
asanka
lgtm
3 years, 8 months ago (2017-04-01 02:19:30 UTC) #8
morlovich
Now this failure is actually my fault: DiskCacheBackendTest.SimpleLastModified (run #1): [ RUN ] DiskCacheBackendTest.SimpleLastModified e:\b\c\b\win\src\net\disk_cache\backend_unittest.cc(4074): ...
3 years, 8 months ago (2017-04-02 13:09:57 UTC) #13
Maks Orlovich
On 2017/04/02 13:09:57, morlovich wrote: > Now this failure is actually my fault: > > ...
3 years, 8 months ago (2017-04-03 17:12:41 UTC) #14
Maks Orlovich
I think the test is fixed now (though I still don't really like it), PTAL.
3 years, 8 months ago (2017-04-03 20:34:06 UTC) #17
Maks Orlovich
Sorry, but ping on the test change?
3 years, 8 months ago (2017-04-10 13:19:58 UTC) #20
Maks Orlovich
On 2017/04/10 13:19:58, Maks Orlovich wrote: > Sorry, but ping on the test change? Sorry, ...
3 years, 8 months ago (2017-04-17 14:33:28 UTC) #21
jkarlin
drive by lgtm w/ comments https://codereview.chromium.org/2791493003/diff/20001/net/disk_cache/backend_unittest.cc File net/disk_cache/backend_unittest.cc (right): https://codereview.chromium.org/2791493003/diff/20001/net/disk_cache/backend_unittest.cc#newcode4002 net/disk_cache/backend_unittest.cc:4002: TEST_F(DiskCacheBackendTest, SimpleLastModified) { Please ...
3 years, 8 months ago (2017-04-21 13:48:34 UTC) #23
Maks Orlovich
(Also rebased for patch3, since it wouldn't build otherwise) https://codereview.chromium.org/2791493003/diff/20001/net/disk_cache/backend_unittest.cc File net/disk_cache/backend_unittest.cc (right): https://codereview.chromium.org/2791493003/diff/20001/net/disk_cache/backend_unittest.cc#newcode4002 net/disk_cache/backend_unittest.cc:4002: ...
3 years, 8 months ago (2017-04-21 15:12:52 UTC) #27
jkarlin
slgtm
3 years, 8 months ago (2017-04-21 16:39:07 UTC) #28
asanka
lgtm
3 years, 8 months ago (2017-04-21 19:23:50 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2791493003/40001
3 years, 8 months ago (2017-04-24 13:03:46 UTC) #34
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/428643)
3 years, 8 months ago (2017-04-24 15:03:31 UTC) #36
Maks Orlovich
On 2017/04/24 15:03:31, commit-bot: I haz the power wrote: > Try jobs failed on following ...
3 years, 8 months ago (2017-04-24 15:18:38 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2791493003/40001
3 years, 8 months ago (2017-04-24 15:19:24 UTC) #39
commit-bot: I haz the power
3 years, 8 months ago (2017-04-24 17:40:34 UTC) #43
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/2cac5e68544bf2f5fbaec00f62ff...

Powered by Google App Engine
This is Rietveld 408576698