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

Issue 13933029: Add SimpleCache index file heuristics (Closed)

Created:
7 years, 8 months ago by felipeg
Modified:
7 years, 8 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, gavinp+disk_chromium.org
Visibility:
Public.

Description

Add SimpleCache index file heuristics We restore the index from enumerating the entries on disk when the dir mtime doesnt match the index file mtime. Using the mtime we can reliably detect the stale index on every new entry that has been added or an old entry deleted on disk, since the index file must always the last file created (renamed) in the directory. BUG=233536 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=195197

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 6

Patch Set 5 : #

Total comments: 12

Patch Set 6 : #

Patch Set 7 : #

Total comments: 4

Patch Set 8 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -5 lines) Patch
M net/disk_cache/simple/simple_entry_impl.cc View 1 2 3 4 5 2 chunks +7 lines, -2 lines 0 comments Download
M net/disk_cache/simple/simple_index.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M net/disk_cache/simple/simple_index.cc View 1 2 3 4 5 6 7 3 chunks +26 lines, -3 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
gavinp
Should we add UMA in this CL as well? https://codereview.chromium.org/13933029/diff/3002/net/disk_cache/simple/simple_entry_impl.cc File net/disk_cache/simple/simple_entry_impl.cc (right): https://codereview.chromium.org/13933029/diff/3002/net/disk_cache/simple/simple_entry_impl.cc#newcode52 net/disk_cache/simple/simple_entry_impl.cc:52: ...
7 years, 8 months ago (2013-04-19 09:30:17 UTC) #1
pasko-google - do not use
Top level, did not look into the code yet: Please send out CLs by mail ...
7 years, 8 months ago (2013-04-19 10:07:55 UTC) #2
gavinp
On 2013/04/19 10:07:55, pasko wrote: > Top level, did not look into the code yet: ...
7 years, 8 months ago (2013-04-19 10:09:26 UTC) #3
felipeg
UMA will come in a separate CL. https://chromiumcodereview.appspot.com/13933029/diff/3002/net/disk_cache/simple/simple_entry_impl.cc File net/disk_cache/simple/simple_entry_impl.cc (right): https://chromiumcodereview.appspot.com/13933029/diff/3002/net/disk_cache/simple/simple_entry_impl.cc#newcode52 net/disk_cache/simple/simple_entry_impl.cc:52: index->Insert(key); On ...
7 years, 8 months ago (2013-04-19 10:14:05 UTC) #4
gavinp
lgtm https://codereview.chromium.org/13933029/diff/12001/net/disk_cache/simple/simple_entry_impl.cc File net/disk_cache/simple/simple_entry_impl.cc (right): https://codereview.chromium.org/13933029/diff/12001/net/disk_cache/simple/simple_entry_impl.cc#newcode69 net/disk_cache/simple/simple_entry_impl.cc:69: // way we never leak files. CreationOperationComplete will ...
7 years, 8 months ago (2013-04-19 11:30:17 UTC) #5
pasko-google - do not use
https://chromiumcodereview.appspot.com/13933029/diff/12001/net/disk_cache/simple/simple_index.cc File net/disk_cache/simple/simple_index.cc (right): https://chromiumcodereview.appspot.com/13933029/diff/12001/net/disk_cache/simple/simple_index.cc#newcode204 net/disk_cache/simple/simple_index.cc:204: index_file_entries = SimpleIndexFile::LoadFromDisk(index_filename); It is a little hard to ...
7 years, 8 months ago (2013-04-19 11:43:24 UTC) #6
felipeg
https://chromiumcodereview.appspot.com/13933029/diff/12001/net/disk_cache/simple/simple_entry_impl.cc File net/disk_cache/simple/simple_entry_impl.cc (right): https://chromiumcodereview.appspot.com/13933029/diff/12001/net/disk_cache/simple/simple_entry_impl.cc#newcode69 net/disk_cache/simple/simple_entry_impl.cc:69: // way we never leak files. CreationOperationComplete will remove ...
7 years, 8 months ago (2013-04-19 12:20:29 UTC) #7
gavinp
wait for Egor's LGTM, you have mine if you do that and update the description ...
7 years, 8 months ago (2013-04-19 12:23:13 UTC) #8
felipeg
https://chromiumcodereview.appspot.com/13933029/diff/11002/net/disk_cache/simple/simple_index.cc File net/disk_cache/simple/simple_index.cc (right): https://chromiumcodereview.appspot.com/13933029/diff/11002/net/disk_cache/simple/simple_index.cc#newcode203 net/disk_cache/simple/simple_index.cc:203: bool force_index_flush = false; On 2013/04/19 12:23:13, gavinp wrote: ...
7 years, 8 months ago (2013-04-19 12:55:58 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/felipeg@chromium.org/13933029/4007
7 years, 8 months ago (2013-04-19 12:56:33 UTC) #10
felipeg_google
ptal again On Fri, Apr 19, 2013 at 2:56 PM, <commit-bot@chromium.org> wrote: > CQ is ...
7 years, 8 months ago (2013-04-19 12:58:17 UTC) #11
pasko-google - do not use
lgtm Thanks, now easier to read, at least for me
7 years, 8 months ago (2013-04-19 13:05:56 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/felipeg@chromium.org/13933029/4007
7 years, 8 months ago (2013-04-19 13:08:29 UTC) #13
commit-bot: I haz the power
7 years, 8 months ago (2013-04-19 15:05:50 UTC) #14
Message was sent while issue was closed.
Change committed as 195197

Powered by Google App Engine
This is Rietveld 408576698