Closed Bug 1215106 Opened 9 years ago Closed 8 years ago

DownloadContentService: Implement failure counters

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(firefox46 fixed)

RESOLVED FIXED
Firefox 46
Tracking Status
firefox46 --- fixed

People

(Reporter: sebastian, Assigned: sebastian)

References

Details

Attachments

(1 file)

The DownloadContentService tries to be smart and groups errors into recoverable and unrecoverable errors. Some of the errors are hard to classify: It could be a temporary error -> Recoverable: We want to retry -> However if this error is happening all the time then it might actually be an unrecoverable error.

Counting failures is an easy way out. If the number of failures for a given content passes a to be defined threshold then stop trying. As soon as the content changes in the catalog (bug 1200291) we can try again.

For this to work we will also need to implement a back-off strategy. We do not want to use all our retries in a short period of time.
Assignee: nobody → s.kaspari
Status: NEW → ASSIGNED
Depends on: 1233785
Comment on attachment 8700582 [details]
MozReview Request: Bug 1215106 - DownloadContentService: Mark content as permanently failed after multiple errors of the same type. r?rnewman

https://reviewboard.mozilla.org/r/28771/#review25759

::: mobile/android/base/java/org/mozilla/gecko/dlc/catalog/DownloadContentCatalog.java:127
(Diff revision 1)
> +        if (content.getFailures() == MAX_FAILURES_UNTIL_PERMANENTLY_FAILED) {

Paranoia: >=.
Attachment #8700582 - Flags: review?(rnewman) → review+
(In reply to Richard Newman [:rnewman] from comment #2)
> :::
> mobile/android/base/java/org/mozilla/gecko/dlc/catalog/
> DownloadContentCatalog.java:127
> (Diff revision 1)
> > +        if (content.getFailures() == MAX_FAILURES_UNTIL_PERMANENTLY_FAILED) {
> 
> Paranoia: >=.

Heh. I usually share this paranoia but here I've been trusting the tests. Nevertheless I'll change it to >=. :)
https://hg.mozilla.org/integration/fx-team/rev/cf91309b02e19b37899d3e305fa5a51eafe6708f
Bug 1215106 - DownloadContentService: Mark content as permanently failed after multiple errors of the same type. r=rnewman
https://hg.mozilla.org/mozilla-central/rev/cf91309b02e1
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 46
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: