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

Issue 111005: Bypass the cache for the second or later HttpCache::Transaction...

Created:
11 years, 7 months ago by tyoshino-do-not-use
Modified:
9 years, 7 months ago
Reviewers:
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Removing reviewers not to distract them by this suspended review. I have no time to finish this CL now. Original reviewer: darin, rvargas, wtc Let pending transactions on an HttpCache's ActiveEntry timeout after certain time passed since queued. On timeout, we check if the writer transcation is suspended due to some error such as SSL certification problem. If so, bypass the cache. We put a task with 5s delay into MessageLoop for each pending request to invoke timeout. Motivation: By this change, we can avoid waiting the user with unuseful status message "waiting for cache" instead of showing the SSL interstitial page when the user open two windows for the same SSL-enabled URL with a bad certificate. BUG=6697

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Total comments: 2

Patch Set 7 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+75 lines, -3 lines) Patch
M chrome/browser/tab_contents/tab_contents.cc View 1 chunk +3 lines, -1 line 0 comments Download
M net/base/load_states.h View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M net/http/http_cache.cc View 1 2 3 4 5 6 8 chunks +55 lines, -1 line 0 comments Download
M net/http/http_network_transaction.h View 5 6 1 chunk +1 line, -0 lines 0 comments Download
M net/http/http_network_transaction.cc View 1 2 3 4 5 6 3 chunks +12 lines, -1 line 0 comments Download

Messages

Total messages: 12 (0 generated)
tyoshino-do-not-use
Hi wtc, I'm not sure if this approach is good or not. I'd like you ...
11 years, 7 months ago (2009-05-07 23:33:41 UTC) #1
wtc
Darin, Ricardo, Could you look at Takeshi's proposed solution to http://crbug.com/6697? I'm not sure if ...
11 years, 7 months ago (2009-05-07 23:55:14 UTC) #2
darin (slow to review)
I would rather see us use a time-based heuristic. If the transaction has been stuck ...
11 years, 7 months ago (2009-05-08 00:00:43 UTC) #3
rvargas (doing something else)
On 2009/05/08 00:00:43, darin wrote: > I would rather see us use a time-based heuristic. ...
11 years, 7 months ago (2009-05-08 00:05:52 UTC) #4
darin (slow to review)
Yeah, good point. I think it is reasonable to restrict this to the case where ...
11 years, 7 months ago (2009-05-08 05:46:51 UTC) #5
tyoshino-do-not-use
Thanks for comments. Ready for another look. If this approach looks good for you, I ...
11 years, 7 months ago (2009-05-14 00:51:12 UTC) #6
rvargas (doing something else)
On 2009/05/14 00:51:12, tyoshino wrote: > Thanks for comments. Ready for another look. If this ...
11 years, 7 months ago (2009-05-14 23:35:12 UTC) #7
darin (slow to review)
i have more comments... i'm not so sure about this new state. i need to ...
11 years, 7 months ago (2009-05-18 17:30:19 UTC) #8
tyoshino-do-not-use
Thank you for comments and sorry for not responding for a week. rvargas: I think ...
11 years, 6 months ago (2009-06-02 09:38:07 UTC) #9
rvargas (doing something else)
The problem with this approach is that you are taking a pointer to the current ...
11 years, 6 months ago (2009-06-03 18:52:12 UTC) #10
tyoshino-do-not-use
Thank you. On 2009/06/03 18:52:12, rvargas wrote: > The problem with this approach is that ...
11 years, 6 months ago (2009-06-24 16:55:49 UTC) #11
rvargas (doing something else)
11 years, 6 months ago (2009-06-24 18:18:00 UTC) #12
On 2009/06/24 16:55:49, tyoshino wrote:
> Thank you.
> 
> On 2009/06/03 18:52:12, rvargas wrote:
> > The problem with this approach is that you are taking a pointer to the
current
> > active entry and sending it to five seconds in the future. At that time, you
> > access the entry, but there is no guarantee that this entry is alive.
> > 
> 
> OK. I'll leave that task to cache_ and try to get rid of holding pointers.
> 
> > If what we want is to restrict the cache bypass to a particular instance
when
> an
> > action is taking too long (waiting for user action), maybe we can start the
> > timer when we start that action, cancel it when it finishes, and if it
> triggers,
> > send back a notification to the cache so that all pending transactions are
> > notified that we've been waiting a long time on something.
> 
> So, it'll be like this:
> - Trans A becomes writer
> - Trans B, C, D come and pend
> - After passing t sec, trans A tells cache to let incoming trans to bypass the
> cache
> - Trans B, C, D bypass the cache
> - Trans E, F, G comes after the notification from A and A is still suspended.
> The cache immediately tell them to bypass the cache
> - Trans E, F, G bypass the cache
> 
> Am I understanding correctly?

Yes, I think that's the correct approach. And just to keep going:

- The user allows transaction A to continue
- Transactions H and I come to the cache, and because A is not waiting for the
user anymore, H and I are added to the pending queue, waiting for A to finish.

> 
> Sorry for taking too long time for this...

no problem.

Powered by Google App Engine
This is Rietveld 408576698