Bug 890040 - Protect against orphans in Android health report uploader. r=rnewman

This does two main things.  First, it tracks sets of obsolete document
IDs and retries obsoletes and deletes.  Second, it tracks document IDs
that are attempted to be written to the server for obsolescence or
deletion without waiting for a server response to prevent orphaning
documents on successful upload and failed response.

The ObsoleteDocumentTracker uses a JSON map to maintain obsolete
document IDs and priority values.  That's not the right data
structure; Bug 894194 tracks improving it.
This commit is contained in:
Nick Alexander
2013-07-15 19:44:21 -07:00
parent e99dfcbf6a
commit c67c11a426
14 changed files with 390 additions and 159 deletions

View File

@@ -340,7 +340,7 @@ public class SyncConfiguration implements CredentialsSource {
try {
ExtendedJSONObject o = ExtendedJSONObject.parseJSONObject(json);
Map<String, Boolean> map = new HashMap<String, Boolean>();
for (Entry<String, Object> e : o.entryIterable()) {
for (Entry<String, Object> e : o.entrySet()) {
String key = e.getKey();
Boolean value = (Boolean) e.getValue();
map.put(key, value);