Closed Bug 1403022 Opened 7 years ago Closed 7 years ago

Abort RepositorySession on BatchingUploader failures

Categories

(Firefox for Android Graveyard :: Android Sync, enhancement, P1)

enhancement

Tracking

(firefox58 fixed)

RESOLVED FIXED
Firefox 58
Tracking Status
firefox58 --- fixed

People

(Reporter: Grisha, Assigned: Grisha)

References

Details

Attachments

(1 file)

Split from Bug 1373254.
- Carry over patch from the parent bug, "abort the session in case of uploader failures; this will shutdownNow our work queues".
- See if it's feasible to remove recordUploadFailed flag, and be smarter about how we process failures. See https://bugzilla.mozilla.org/show_bug.cgi?id=1373254#c13
The main goal here is to ensure we're not doing a ton of unnecessary work in the unhappy cases - namely, when we fail to store a record.

Currently, we treat any remote store failure as a synchronization failure. However, since we don't abort the session, we continue on with the flow of records - which short-circuit in case we hit a 412, and fire off a series of onRecordStoreFailed callback in case we saw a record in the "failed" array.

However, currently _any_ store failure is considered a synchronization failure, and our current behaviour ensures that in case of a batching upload, we won't attempts to commit the batch under any circumstance if anything failed - be it a 412 or encountering a record in the "failed" array.

I don't see a strong reason to relax this behaviour. Instead, we should aim to do the least amount of work necessary once we determine that there has been a failure on the outer layers. That is, declare store as failed, abort the session.

We might consider relaxing this behaviour if we encounter a non-bookmark record in the "failed" array, since as far as data consistency goes, that situation is probably acceptable. I'll treat this as an optimization for the time being, and won't address this case here.
Assignee: nobody → gkruglov
Status: NEW → ASSIGNED
Comment on attachment 8912425 [details]
Bug 1403022 - Abort session on BatchingUploader failures

https://reviewboard.mozilla.org/r/183746/#review188952
Attachment #8912425 - Flags: review?(rnewman) → review+
Priority: -- → P1
Passes the tests, appears to work locally. Let's continue testing on Nightly.
Pushed by gkruglov@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/984d5493a4b3
Abort session on BatchingUploader failures r=rnewman
https://hg.mozilla.org/mozilla-central/rev/984d5493a4b3
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 58
Product: Android Background Services → Firefox for Android
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: