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

Issue 23486006: Track entries pending Doom in SimpleCache backend. (Closed)

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

Description

Track entries pending Doom in SimpleCache backend. Building on Philippe's recent work with doom operations on entries, this tracks entries which don't exist in the backend. The new SimpleBackendImpl::entries_pending_doom_ tracks entries that are in the process of being doomed. While entries are in this state, it is not legal to create a new active entry, instead the backend should wait until the doom is complete. There's still an outstanding issue of mass dooms (evictions, doombetween...) not using this new mechanism, which is to be fixed in a followup CL. R=rdsmith,pliard,ttuttle,pasko BUG=289542 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=222695

Patch Set 1 #

Total comments: 2

Patch Set 2 : add unit test, clean up #

Patch Set 3 : lose bad blank line #

Patch Set 4 : add unit test, fix bug #

Patch Set 5 : clean up entry #

Patch Set 6 : formatting and ordering #

Patch Set 7 : fixup comments #

Patch Set 8 : rebase only #

Total comments: 9

Patch Set 9 : temporarily disable test #

Patch Set 10 : remediation and test update #

Total comments: 8

Patch Set 11 : rebase only #

Total comments: 1

Patch Set 12 : partial remediation #

Patch Set 13 : add dcheck #

Total comments: 5

Patch Set 14 : add TODO #

Unified diffs Side-by-side diffs Delta from patch set Stats (+147 lines, -20 lines) Patch
M net/disk_cache/backend_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -1 line 0 comments Download
M net/disk_cache/entry_unittest.cc View 1 2 3 4 5 6 7 8 3 chunks +35 lines, -2 lines 0 comments Download
M net/disk_cache/simple/simple_backend_impl.h View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +17 lines, -2 lines 0 comments Download
M net/disk_cache/simple/simple_backend_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 7 chunks +76 lines, -7 lines 0 comments Download
M net/disk_cache/simple/simple_entry_impl.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -1 line 0 comments Download
M net/disk_cache/simple/simple_entry_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 7 chunks +13 lines, -7 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
gavinp
This is very early, and doesn't even lint yet, but it's a nice companion to ...
7 years, 3 months ago (2013-08-28 22:18:39 UTC) #1
Philippe
Thanks Gavin! The general approach looks good to me. I will let you polish and ...
7 years, 3 months ago (2013-08-29 10:16:16 UTC) #2
Philippe
https://codereview.chromium.org/23486006/diff/1/net/disk_cache/simple/simple_backend_impl.cc File net/disk_cache/simple/simple_backend_impl.cc (right): https://codereview.chromium.org/23486006/diff/1/net/disk_cache/simple/simple_backend_impl.cc#newcode299 net/disk_cache/simple/simple_backend_impl.cc:299: base::hash_map<uint64, Closure>::value_type(entry_hash, Closure())); On 2013/08/29 10:16:16, Philippe wrote: > ...
7 years, 3 months ago (2013-08-29 11:46:14 UTC) #3
gavinp
rdsmith, pliard, ttuttle: PTAL. clamy, pasko: FYI. This is now polished enough to review. It's ...
7 years, 3 months ago (2013-08-30 13:09:35 UTC) #4
Philippe
Thanks Gavin! LGTM modulo the tiny nits and the question about the backend lifetime. https://codereview.chromium.org/23486006/diff/32001/net/disk_cache/simple/simple_backend_impl.cc ...
7 years, 3 months ago (2013-08-30 13:33:14 UTC) #5
gavinp
Thanks for the review, Philippe! https://codereview.chromium.org/23486006/diff/32001/net/disk_cache/simple/simple_backend_impl.cc File net/disk_cache/simple/simple_backend_impl.cc (right): https://codereview.chromium.org/23486006/diff/32001/net/disk_cache/simple/simple_backend_impl.cc#newcode206 net/disk_cache/simple/simple_backend_impl.cc:206: if (backend_weak_ptr) { On ...
7 years, 3 months ago (2013-08-30 18:03:10 UTC) #6
Deprecated (see juliatuttle)
More comments later, but since I just noticed this: https://chromiumcodereview.appspot.com/23486006/diff/69001/net/disk_cache/simple/simple_backend_impl.cc File net/disk_cache/simple/simple_backend_impl.cc (right): https://chromiumcodereview.appspot.com/23486006/diff/69001/net/disk_cache/simple/simple_backend_impl.cc#newcode328 net/disk_cache/simple/simple_backend_impl.cc:328: ...
7 years, 3 months ago (2013-09-03 16:15:10 UTC) #7
Philippe
https://chromiumcodereview.appspot.com/23486006/diff/69001/net/disk_cache/simple/simple_backend_impl.cc File net/disk_cache/simple/simple_backend_impl.cc (right): https://chromiumcodereview.appspot.com/23486006/diff/69001/net/disk_cache/simple/simple_backend_impl.cc#newcode328 net/disk_cache/simple/simple_backend_impl.cc:328: it->second = ChainOperationIntoClosure(operation, callback, it->second); On 2013/09/03 16:15:11, ttuttle ...
7 years, 3 months ago (2013-09-03 16:24:33 UTC) #8
Philippe
https://chromiumcodereview.appspot.com/23486006/diff/69001/net/disk_cache/simple/simple_backend_impl.cc File net/disk_cache/simple/simple_backend_impl.cc (right): https://chromiumcodereview.appspot.com/23486006/diff/69001/net/disk_cache/simple/simple_backend_impl.cc#newcode328 net/disk_cache/simple/simple_backend_impl.cc:328: it->second = ChainOperationIntoClosure(operation, callback, it->second); On 2013/09/03 16:24:33, Philippe ...
7 years, 3 months ago (2013-09-03 16:25:58 UTC) #9
Randy Smith (Not in Mondays)
It looks to me as if this doesn't address the race in the case of ...
7 years, 3 months ago (2013-09-03 19:04:18 UTC) #10
Philippe
https://chromiumcodereview.appspot.com/23486006/diff/69001/net/disk_cache/simple/simple_backend_impl.cc File net/disk_cache/simple/simple_backend_impl.cc (right): https://chromiumcodereview.appspot.com/23486006/diff/69001/net/disk_cache/simple/simple_backend_impl.cc#newcode328 net/disk_cache/simple/simple_backend_impl.cc:328: it->second = ChainOperationIntoClosure(operation, callback, it->second); On 2013/09/03 19:04:19, rdsmith ...
7 years, 3 months ago (2013-09-04 08:55:48 UTC) #11
Philippe
https://codereview.chromium.org/23486006/diff/57001/net/disk_cache/simple/simple_entry_impl.h File net/disk_cache/simple/simple_entry_impl.h (right): https://codereview.chromium.org/23486006/diff/57001/net/disk_cache/simple/simple_entry_impl.h#newcode250 net/disk_cache/simple/simple_entry_impl.h:250: const base::WeakPtr<SimpleBackendImpl> backend_; FYI, I'm also doing this change ...
7 years, 3 months ago (2013-09-11 11:46:10 UTC) #12
gavinp
ttuttle: PTAL. Remediated, rebased, and description updated per rdsmith. What do y'all think? I have ...
7 years, 3 months ago (2013-09-11 15:25:57 UTC) #13
Philippe
Still LGTM https://chromiumcodereview.appspot.com/23486006/diff/110001/net/disk_cache/simple/simple_backend_impl.cc File net/disk_cache/simple/simple_backend_impl.cc (right): https://chromiumcodereview.appspot.com/23486006/diff/110001/net/disk_cache/simple/simple_backend_impl.cc#newcode320 net/disk_cache/simple/simple_backend_impl.cc:320: base::hash_map<uint64, std::vector<Closure> >::iterator it = I wonder ...
7 years, 3 months ago (2013-09-11 15:41:31 UTC) #14
Randy Smith (Not in Mondays)
Still/the changes LGTM.
7 years, 3 months ago (2013-09-11 16:11:19 UTC) #15
pasko
fly-by note without reviewing: I was just being nice to everyone and created a bug ...
7 years, 3 months ago (2013-09-11 16:21:33 UTC) #16
pliard
Thanks Egor for creating the bug and apologies for not doing it! On Wed, Sep ...
7 years, 3 months ago (2013-09-11 16:24:10 UTC) #17
pliard
Just FYI Gavin, please proceed with the commit when you are ready without waiting for ...
7 years, 3 months ago (2013-09-11 18:08:44 UTC) #18
Deprecated (see juliatuttle)
lgtm. https://codereview.chromium.org/23486006/diff/110001/net/disk_cache/entry_unittest.cc File net/disk_cache/entry_unittest.cc (right): https://codereview.chromium.org/23486006/diff/110001/net/disk_cache/entry_unittest.cc#newcode3032 net/disk_cache/entry_unittest.cc:3032: disk_cache::Entry* null = NULL; Is there a reason ...
7 years, 3 months ago (2013-09-11 19:03:20 UTC) #19
gavinp
Thanks everyone! Should go into CQ shortly. https://codereview.chromium.org/23486006/diff/110001/net/disk_cache/simple/simple_backend_impl.cc File net/disk_cache/simple/simple_backend_impl.cc (right): https://codereview.chromium.org/23486006/diff/110001/net/disk_cache/simple/simple_backend_impl.cc#newcode320 net/disk_cache/simple/simple_backend_impl.cc:320: base::hash_map<uint64, std::vector<Closure> ...
7 years, 3 months ago (2013-09-11 19:20:52 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gavinp@chromium.org/23486006/57002
7 years, 3 months ago (2013-09-11 19:22:08 UTC) #21
commit-bot: I haz the power
7 years, 3 months ago (2013-09-12 01:50:50 UTC) #22
Message was sent while issue was closed.
Change committed as 222695

Powered by Google App Engine
This is Rietveld 408576698