Closed
Bug 1382845
Opened 8 years ago
Closed 8 years ago
We should cancel mNetworkTriggerTimer when we start reading data from the cache
Categories
(Core :: Networking, enhancement)
Core
Networking
Tracking
()
RESOLVED
FIXED
mozilla56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: valentin, Assigned: valentin)
References
(Blocks 1 open bug)
Details
(Whiteboard: [necko-active])
Attachments
(1 file, 1 obsolete file)
1.58 KB,
patch
|
michal
:
review+
|
Details | Diff | Splinter Review |
(In reply to Michal Novotny (:michal) from bug 1376970 comment #4)
> This is IMO wrong. In case of delayed race, mRaceCacheWithNetwork is false
> until we hit the network, but what if it happens after OnCacheEntryAvailable
> is called? Imagine following scenario:
>
> 1) MaybeRaceCacheWithNetwork triggers the network with a delay, so
> mRaceCacheWithNetwork==false, mRaceDelay!=0
> 2) cache wins before the mRaceDelay time elapsed, so mRaceCacheWithNetwork
> is still false and we won't set mFirstResponseSource in ReadFromCache
> 3) mRaceDelay time elapsed and nsHttpChannel was notified by the timer,
> TriggerNetwork(0) is called but mRaceCacheWithNetwork is not set again,
> because mOnCacheAvailableCalled is already true.
> 4) Now we start network request when cache already started delivering data,
> mRaceCacheWithNetwork is false and mFirstResponseSource is RESPONSE_PENDING
> :-/
>
> We should either change what mRaceCacheWithNetwork means or check it
> together with mRaceDelay.
To avoid this situation occurring, we should mNetworkTriggerTimer when we start reading from the cache.
Assignee | ||
Comment 1•8 years ago
|
||
I also changed ReportRcwnStats as mRaceCacheWithNetwork isn't necessarily true when mRaceDelay is.
MozReview-Commit-ID: HOnWemy2YCY
Attachment #8888547 -
Flags: review?(michal.novotny)
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → valentin.gosu
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•8 years ago
|
||
Your patch in bug 1382852 has a better fix for the telemetry issue
Attachment #8888550 -
Flags: review?(michal.novotny)
Assignee | ||
Updated•8 years ago
|
Attachment #8888547 -
Attachment is obsolete: true
Attachment #8888547 -
Flags: review?(michal.novotny)
Updated•8 years ago
|
Attachment #8888550 -
Flags: review?(michal.novotny) → review+
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Whiteboard: [necko-active]
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a4c46cc48c78
We should cancel mNetworkTriggerTimer when we start reading data from the cache. r=michal
Keywords: checkin-needed
![]() |
||
Comment 4•8 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in
before you can comment on or make changes to this bug.
Description
•