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

Issue 256090: Disk cache: Add a method to cancel pending sparse operations.... (Closed)

Created:
11 years, 2 months ago by rvargas (doing something else)
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com, tim (not reviewing), Paweł Hajdan Jr.
Visibility:
Public.

Description

Disk cache: Add a method to cancel pending sparse operations. The sparse IO methods require exclusive use of the cache entry and they complain when that requirement is violated. When the user cancels a request and reissues another one to the same entry, we may be waiting for the previous operation to finish when we receive a new IO request, so we fail. This CL add a way for the HTTP cache to cancel IO operations and get a notification when the disk cache is able to operate on that entry again. BUG=23862 TEST=unittests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=28475

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 21

Patch Set 3 : '' #

Total comments: 1

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+285 lines, -9 lines) Patch
M net/disk_cache/disk_cache.h View 1 2 3 2 chunks +32 lines, -0 lines 0 comments Download
M net/disk_cache/entry_impl.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M net/disk_cache/entry_impl.cc View 1 2 1 chunk +14 lines, -0 lines 0 comments Download
M net/disk_cache/entry_unittest.cc View 1 2 1 chunk +47 lines, -0 lines 0 comments Download
M net/disk_cache/mem_entry_impl.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M net/disk_cache/mem_entry_impl.cc View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M net/disk_cache/sparse_control.h View 1 2 5 chunks +12 lines, -0 lines 0 comments Download
M net/disk_cache/sparse_control.cc View 1 2 5 chunks +41 lines, -1 line 0 comments Download
M net/http/http_cache.cc View 1 2 7 chunks +36 lines, -4 lines 0 comments Download
M net/http/http_cache_unittest.cc View 1 2 8 chunks +94 lines, -4 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
rvargas (doing something else)
Wan-Teh: Please review the http cache. Nicolas: Please review the disk cache.
11 years, 2 months ago (2009-10-07 18:34:27 UTC) #1
Nicolas Sylvain
LGTM http://codereview.chromium.org/256090/diff/4001/5003 File net/disk_cache/sparse_control.cc (right): http://codereview.chromium.org/256090/diff/4001/5003#newcode733 Line 733: if (i == abort_callbacks_.size() - 1) maybe ...
11 years, 2 months ago (2009-10-07 20:36:45 UTC) #2
wtc
LGTM. Nice comments and unit tests as usual! http://codereview.chromium.org/256090/diff/4001/5008 File net/disk_cache/disk_cache.h (right): http://codereview.chromium.org/256090/diff/4001/5008#newcode224 Line 224: ...
11 years, 2 months ago (2009-10-08 02:20:03 UTC) #3
rvargas (doing something else)
Thanks for all the comments. I'll address everything with a new snapshot, but before doing ...
11 years, 2 months ago (2009-10-08 03:03:05 UTC) #4
darin (slow to review)
http://codereview.chromium.org/256090/diff/4001/5008 File net/disk_cache/disk_cache.h (right): http://codereview.chromium.org/256090/diff/4001/5008#newcode226 Line 226: virtual void CancelSparseIO() = 0; what happened to ...
11 years, 2 months ago (2009-10-08 06:46:26 UTC) #5
wtc
http://codereview.chromium.org/256090/diff/4001/5008 File net/disk_cache/disk_cache.h (right): http://codereview.chromium.org/256090/diff/4001/5008#newcode234 Line 234: // true OK although another IO operation cannot ...
11 years, 2 months ago (2009-10-08 18:45:19 UTC) #6
rvargas (doing something else)
http://codereview.chromium.org/256090/diff/4001/5008 File net/disk_cache/disk_cache.h (right): http://codereview.chromium.org/256090/diff/4001/5008#newcode226 Line 226: virtual void CancelSparseIO() = 0; On 2009/10/08 06:46:26, ...
11 years, 2 months ago (2009-10-08 20:42:53 UTC) #7
rvargas (doing something else)
New version with all the changes. http://codereview.chromium.org/256090/diff/4001/5006 File net/disk_cache/mem_entry_impl.h (right): http://codereview.chromium.org/256090/diff/4001/5006#newcode72 Line 72: virtual int ...
11 years, 2 months ago (2009-10-08 21:36:48 UTC) #8
wtc
11 years, 2 months ago (2009-10-08 21:48:49 UTC) #9
LGTM.

http://codereview.chromium.org/256090/diff/5012/4011
File net/disk_cache/disk_cache.h (right):

http://codereview.chromium.org/256090/diff/5012/4011#newcode224
Line 224: // finishes, but that event will happen sooner when this method is
used.
"that event" is not clear.

Maybe change
  that event will happen sooner
to
  the operation will finish sooner

Powered by Google App Engine
This is Rietveld 408576698