Closed Bug 1689208 Opened 5 years ago Closed 5 years ago

RaceCacheWithNetwork is racing on 5G cellular networks

Categories

(Core :: Networking: Cache, defect, P2)

defect

Tracking

()

RESOLVED FIXED
87 Branch
Tracking Status
firefox87 --- fixed

People

(Reporter: acreskey, Assigned: valentin)

Details

(Whiteboard: [necko-triaged])

Attachments

(2 files)

There is logic in place so that we don't RaceCacheWithNetwork when the user is on a cellular network (to avoid excess data usage).
See Bug 1377570.

However on 5G cellular networks, the network type is not being correctly identified, and is reported as nsINetworkLinkService::LINK_TYPE_UNKNOWN.

I can see this in logs via an instrumented build that I made:

nsHttpChannel::MaybeRaceCacheWithNetwork: netLinkType 0

See the link type enumeration here.

Further logs have shown that we are in fact racing cache with network when on 5G cellular.

Thanks for the report. This is a good point.
I think we should:

  1. Make geckoview code report a 5G network when necessary
  2. Not race for UNKNOWN network types on Android (doesn't seem like a huge loss)
Assignee: nobody → valentin.gosu
Severity: -- → S3
Priority: -- → P2
Whiteboard: [necko-triaged]

(In reply to Valentin Gosu [:valentin] (he/him) from comment #1)

Thanks for the report. This is a good point.
I think we should:

  1. Make geckoview code report a 5G network when necessary
  2. Not race for UNKNOWN network types on Android (doesn't seem like a huge loss)

I think not racing for UNKNOWN on Android is a great future-proof solution.
(And of course Android devices don't have slow platter drives, so in the unlikely event of a wifi or wired connection being identified as UNKNOWN, the loss is small).
And great to see a same day patch.

Pushed by valentin.gosu@gmail.com: https://hg.mozilla.org/integration/autoland/rev/edeb8bba12e8 Add LINK_TYPE_5G to nsINetworkLinkService and report it on Android r=necko-reviewers,kershaw https://hg.mozilla.org/integration/autoland/rev/924b2e399c4b Don't race for LINK_TYPE_UNKNOWN on Android r=necko-reviewers,kershaw
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: