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

Issue 13731002: Cache Backend Proxy to intercept all cache events from the IO thread. (Closed)

Created:
7 years, 8 months ago by pasko-google - do not use
Modified:
7 years, 8 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, gavinp+disk_chromium.org, felipeg_google
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Cache Backend Proxy to intercept all cache events from the IO thread. Added a build flag to link with the tracing backend, tests may use it without a flag. Recording the actual event trace is TBD. Added a test that runs on both BackendImpl and SimpleBackendImpl. BUG=173384 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=193652 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=193958 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=194173

Patch Set 1 #

Patch Set 2 : added destructor #

Total comments: 49

Patch Set 3 : addressed review comments from patch set 2 #

Patch Set 4 : removed the USE_TRACING_CACHE_BACKEND check from tests #

Patch Set 5 : uploading again, some net.gyp changes were not picked up #

Patch Set 6 : actually picking up the net.gyp change #

Total comments: 10

Patch Set 7 : addressed comments in patch set 6 #

Patch Set 8 : rebased #

Patch Set 9 : disable integrity checking on the Simple Backend test #

Patch Set 10 : disable the test on windows #

Total comments: 4

Patch Set 11 : memset0 SimpleFileHeader #

Patch Set 12 : trivial net.gyp merge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+475 lines, -3 lines) Patch
M net/disk_cache/backend_unittest.cc View 1 2 3 4 5 6 7 8 9 3 chunks +51 lines, -0 lines 0 comments Download
M net/disk_cache/cache_creator.cc View 1 2 3 4 5 6 7 2 chunks +10 lines, -2 lines 0 comments Download
M net/disk_cache/disk_cache_test_base.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M net/disk_cache/simple/simple_disk_format.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M net/disk_cache/simple/simple_disk_format.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -0 lines 0 comments Download
A net/disk_cache/tracing_cache_backend.h View 1 2 3 4 5 6 1 chunk +81 lines, -0 lines 0 comments Download
A net/disk_cache/tracing_cache_backend.cc View 1 2 3 4 5 6 1 chunk +317 lines, -0 lines 0 comments Download
M net/net.gyp View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +8 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
pasko-google - do not use
7 years, 8 months ago (2013-04-05 17:26:25 UTC) #1
rvargas (doing something else)
https://codereview.chromium.org/13731002/diff/5001/net/disk_cache/backend_unittest.cc File net/disk_cache/backend_unittest.cc (right): https://codereview.chromium.org/13731002/diff/5001/net/disk_cache/backend_unittest.cc#newcode2699 net/disk_cache/backend_unittest.cc:2699: #ifdef USE_TRACING_CACHE_BACKEND This has no relation with the active ...
7 years, 8 months ago (2013-04-05 19:25:13 UTC) #2
pasko-google - do not use
Ricardo, I am responding now with no changes in code, addressing the bigger discussions. I ...
7 years, 8 months ago (2013-04-08 15:37:40 UTC) #3
rvargas (doing something else)
https://codereview.chromium.org/13731002/diff/5001/net/disk_cache/tracing_cache_backend.cc File net/disk_cache/tracing_cache_backend.cc (right): https://codereview.chromium.org/13731002/diff/5001/net/disk_cache/tracing_cache_backend.cc#newcode216 net/disk_cache/tracing_cache_backend.cc:216: key, entry, BindCompletion(BackendIO::OP_CREATE, start_time, key, entry, On 2013/04/08 15:37:40, ...
7 years, 8 months ago (2013-04-08 18:28:34 UTC) #4
pasko-google - do not use
https://codereview.chromium.org/13731002/diff/5001/net/disk_cache/in_flight_backend_io.h File net/disk_cache/in_flight_backend_io.h (right): https://codereview.chromium.org/13731002/diff/5001/net/disk_cache/in_flight_backend_io.h#newcode108 net/disk_cache/in_flight_backend_io.h:108: private: On 2013/04/05 19:25:13, rvargas wrote: > nit: move ...
7 years, 8 months ago (2013-04-09 11:53:16 UTC) #5
rvargas (doing something else)
Almost there https://codereview.chromium.org/13731002/diff/5001/net/disk_cache/tracing_cache_backend.cc File net/disk_cache/tracing_cache_backend.cc (right): https://codereview.chromium.org/13731002/diff/5001/net/disk_cache/tracing_cache_backend.cc#newcode192 net/disk_cache/tracing_cache_backend.cc:192: return base::Bind(&TracingCacheBackend::BackendOpComplete, On 2013/04/09 11:53:17, pasko wrote: ...
7 years, 8 months ago (2013-04-09 18:54:01 UTC) #6
pasko-google - do not use
https://codereview.chromium.org/13731002/diff/5001/net/disk_cache/tracing_cache_backend.cc File net/disk_cache/tracing_cache_backend.cc (right): https://codereview.chromium.org/13731002/diff/5001/net/disk_cache/tracing_cache_backend.cc#newcode192 net/disk_cache/tracing_cache_backend.cc:192: return base::Bind(&TracingCacheBackend::BackendOpComplete, On 2013/04/09 18:54:01, rvargas wrote: > On ...
7 years, 8 months ago (2013-04-10 17:06:38 UTC) #7
rvargas (doing something else)
lgtm
7 years, 8 months ago (2013-04-11 01:28:26 UTC) #8
pasko-google - do not use
Ricardo, thank you for review. I made an additional one-line change to disable the integrity ...
7 years, 8 months ago (2013-04-11 13:00:25 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pasko@google.com/13731002/35001
7 years, 8 months ago (2013-04-11 13:01:09 UTC) #10
commit-bot: I haz the power
Retried try job too often on linux_chromeos for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_chromeos&number=102291
7 years, 8 months ago (2013-04-11 14:57:41 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pasko@google.com/13731002/35001
7 years, 8 months ago (2013-04-11 15:13:11 UTC) #12
commit-bot: I haz the power
Change committed as 193652
7 years, 8 months ago (2013-04-11 15:49:46 UTC) #13
Reid Kleckner
Looks like the valgrind bot detected some uninitialized reads: http://build.chromium.org/p/chromium.memory.fyi/builders/Linux%20Tests%20%28valgrind%29%281%29/builds/22778 http://build.chromium.org/p/chromium.memory.fyi/builders/Linux%20Tests%20%28valgrind%29%281%29/builds/22778/steps/memory%20test%3A%20net/logs/stdio I haven't analyzed it ...
7 years, 8 months ago (2013-04-11 16:56:30 UTC) #14
pasko-google - do not use
Thanks! I am looking into this. On 2013/04/11 16:56:30, Reid Kleckner wrote: > Looks like ...
7 years, 8 months ago (2013-04-11 17:36:57 UTC) #15
pasko-google - do not use
the serialization issue is resolved in another change: https://codereview.chromium.org/14204002 disabled the test on windows to ...
7 years, 8 months ago (2013-04-12 14:57:30 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pasko@google.com/13731002/54001
7 years, 8 months ago (2013-04-12 15:01:21 UTC) #17
commit-bot: I haz the power
Change committed as 193958
7 years, 8 months ago (2013-04-12 17:12:09 UTC) #18
rvargas (doing something else)
https://codereview.chromium.org/13731002/diff/54001/net/disk_cache/backend_unittest.cc File net/disk_cache/backend_unittest.cc (right): https://codereview.chromium.org/13731002/diff/54001/net/disk_cache/backend_unittest.cc#newcode2703 net/disk_cache/backend_unittest.cc:2703: // File renaming is flaky on Windows, disable all ...
7 years, 8 months ago (2013-04-12 17:39:30 UTC) #19
Reid Kleckner
This change still fails on the valgrind bots: http://build.chromium.org/p/chromium.memory.fyi/builders/Linux%20Tests%20%28valgrind%29%281%29/builds/22832 Syscall param pwrite64(buf) points to uninitialised ...
7 years, 8 months ago (2013-04-12 19:41:58 UTC) #20
pasko-google - do not use
On 2013/04/12 19:41:58, Reid Kleckner wrote: > This change still fails on the valgrind bots: ...
7 years, 8 months ago (2013-04-15 11:10:55 UTC) #21
pasko-google - do not use
Committed patchset #12 manually as r194173 (presubmit successful).
7 years, 8 months ago (2013-04-15 13:15:39 UTC) #22
pasko-google - do not use
https://codereview.chromium.org/13731002/diff/54001/net/disk_cache/backend_unittest.cc File net/disk_cache/backend_unittest.cc (right): https://codereview.chromium.org/13731002/diff/54001/net/disk_cache/backend_unittest.cc#newcode2703 net/disk_cache/backend_unittest.cc:2703: // File renaming is flaky on Windows, disable all ...
7 years, 8 months ago (2013-04-15 19:13:54 UTC) #23
rvargas (doing something else)
7 years, 8 months ago (2013-04-15 20:14:15 UTC) #24
Message was sent while issue was closed.
https://codereview.chromium.org/13731002/diff/54001/net/disk_cache/backend_un...
File net/disk_cache/backend_unittest.cc (right):

https://codereview.chromium.org/13731002/diff/54001/net/disk_cache/backend_un...
net/disk_cache/backend_unittest.cc:2703: // File renaming is flaky on Windows,
disable all Simple Backend Tests there.
On 2013/04/15 19:13:54, pasko wrote:
> On 2013/04/12 17:39:30, rvargas wrote:
> > I know Windows is not your priority, but I'm not convinced by this
> explanation.
> > Could you clarify that for me / file the appropriate bugs to track and fix
> > whatever is broken?
> 
> It could be the problem with Windows ReplaceFile() that fails when the target
> file does not exist. This is fixable, but as you said: Windows is not a
priority
> right now for the simple cache.
> 
> We use the atomic rename on the index file because on Linux/Android/MacOS it
is
> guaranteed to remain either on the old version or on the new one. Modulo OS
bugs
> and network filesystems, of course.
> 
> AFAIR There is a problem that Windows XP sometimes cannot rename a file to the
> target file if the latter was recently open, especially with antivirus
software
> running on the machine. ReplaceFile() happens to see the target file as open
and
> fails to replace it. I did not find a good place to point to as a proof of
this.
> It is rather my suspicion that we may end up fighting flakiness for a lot
longer
> than needed for the simple cache.
> 
> I am OK to disable the simple cache backend tests on Windows by any means you
> prefer. 

I have not looked into the failures that you mention, but, especially in the
context of this CL, they seem suspicious.

We have chromium code (implemented for all platforms) to perform file updates. I
have not been following the simple cache enough to know what are you guys using
or where are you getting issues though.

As for the solution, if you guys say that the simple cache cannot run on Windows
yet (I doubt it can anyways, knowing that it has paths that have not been
implemented) then #ifdef on the block of tests is a better solution than
DISABLE_xx... and maybe do nothing from the test framework level so that we
don't litter the test files with ifdefs.

DISABLED should not be used for code that simply has not been written yet
(unless we're talking about a few days, which doesn't seem to be the case here).

Powered by Google App Engine
This is Rietveld 408576698