Files
firefox/mobile/android/services
Grigory Kruglov dd41766931 Bug 1336001 - Refactor BatchingUploader's state-holder objects to fix threading problems r=rnewman
Previous state:
- Two threads were racing to get to batchMeta - one to reset its state, and the other to
read its internal state to construct a network request, and then to update its internal state.
- This resulted in data corruption when payloads had to be split into multiple batches.

A core problem was that there is a lot of state shared across thread boundaries. Specifically,
BatchMeta is being written and read both by record consumer threads running off of a thread pool,
and by the network worker thread(s).

This patch refactors BatchMeta and scheduling of network runnables to ensure that cross-thread access
is minimized, and "who owns/accesses what" is explicit.

- PayloadDispatcher owns scheduling payload runnables and any data they need to share between each other.
- UploaderMeta owns information that's necessary to process incoming records.


MozReview-Commit-ID: 9hFs3fXGaGM
2017-02-22 11:26:35 -08:00
..

These files are managed in the android-sync repo. Do not modify directly, or your changes will be lost.