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

Issue 980003002: Disk cache: Re-initialize stats counters if they are zero on-disk. (Closed)

Created:
5 years, 9 months ago by rvargas (doing something else)
Modified:
5 years, 9 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, gavinp+disk_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Disk cache: Re-initialize stats counters if they are zero on-disk. Stats are saved to disk every five minutes. If a client is initializing the cache, and it crashes before saving the stats for the first time, the next run will see an empty stats storage, and will discard the cache because it may indicate that the storage address was invalid. Now, we check the contents to see if the storage was empty and re-initialize things as needed. BUG=none TEST=net_unittests Committed: https://crrev.com/4f2eab7cd613d87c79a192bfc5183f79483d95bf Cr-Commit-Position: refs/heads/master@{#319204}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Fix typo #

Unified diffs Side-by-side diffs Delta from patch set Stats (+98 lines, -3 lines) Patch
M net/disk_cache/blockfile/stats.h View 2 chunks +2 lines, -1 line 0 comments Download
M net/disk_cache/blockfile/stats.cc View 1 1 chunk +12 lines, -2 lines 0 comments Download
A net/disk_cache/blockfile/stats_unittest.cc View 1 chunk +83 lines, -0 lines 0 comments Download
M net/net.gypi View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 9 (3 generated)
rvargas (doing something else)
5 years, 9 months ago (2015-03-05 00:57:27 UTC) #2
ramant (doing other things)
lgtm https://codereview.chromium.org/980003002/diff/1/net/disk_cache/blockfile/stats.cc File net/disk_cache/blockfile/stats.cc (right): https://codereview.chromium.org/980003002/diff/1/net/disk_cache/blockfile/stats.cc#newcode115 net/disk_cache/blockfile/stats.cc:115: // The sorage is empty which means that ...
5 years, 9 months ago (2015-03-05 01:09:35 UTC) #3
rvargas (doing something else)
Thanks! https://codereview.chromium.org/980003002/diff/1/net/disk_cache/blockfile/stats.cc File net/disk_cache/blockfile/stats.cc (right): https://codereview.chromium.org/980003002/diff/1/net/disk_cache/blockfile/stats.cc#newcode115 net/disk_cache/blockfile/stats.cc:115: // The sorage is empty which means that ...
5 years, 9 months ago (2015-03-05 02:23:50 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/980003002/20001
5 years, 9 months ago (2015-03-05 02:25:03 UTC) #7
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 9 months ago (2015-03-05 03:35:19 UTC) #8
commit-bot: I haz the power
5 years, 9 months ago (2015-03-05 03:36:03 UTC) #9
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/4f2eab7cd613d87c79a192bfc5183f79483d95bf
Cr-Commit-Position: refs/heads/master@{#319204}

Powered by Google App Engine
This is Rietveld 408576698