mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-27 13:40:37 -10:00
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
These files are managed in the android-sync repo. Do not modify directly, or your changes will be lost.