summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/engine/conflict_resolver.h
diff options
context:
space:
mode:
authorrlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-19 23:24:23 +0000
committerrlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-19 23:24:23 +0000
commit2282bd59af40ed835d48df67557aa1e9a80f22e3 (patch)
tree3544eeb9a990fb294b595d48495ae44b58f6ecab /chrome/browser/sync/engine/conflict_resolver.h
parent565758b5f9723fca2b71bb2dc411199d866042a6 (diff)
downloadchromium_src-2282bd59af40ed835d48df67557aa1e9a80f22e3.zip
chromium_src-2282bd59af40ed835d48df67557aa1e9a80f22e3.tar.gz
chromium_src-2282bd59af40ed835d48df67557aa1e9a80f22e3.tar.bz2
Remove code related to counting conflicts
There used to be a bug which caused us to count conflicts incorrectly. We would count each conflict or conflict set once (by adding two to the count), then decrement it by one. The problem is that the increment happened only whent he conflict resolution function was called for the worker to which the conflict belonged, while the decrement would be carried out by each worker. This meant that the conflict never got very high. Fixing issue 97832 brought this code back from the dead. The number of workers involved in a sync cycle was greatly reduced. So the counts actually could exceed 2 and the extra-special, tough conflict resolution code could get triggered. This side-effect was completely unintentional. We've decided that we would like to go back to the old, bug-induced behaviour. This commit removes the buggy counting code and the special case, called only on high count conflict processing functions. This should restore the old behaviour that we've grown attached to. This change also obsoletes issue 46621. The code to be tested by that unit test has been deleted. BUG=107816, 97832, 46621 TEST= Review URL: http://codereview.chromium.org/8976008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115037 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/engine/conflict_resolver.h')
-rw-r--r--chrome/browser/sync/engine/conflict_resolver.h26
1 files changed, 0 insertions, 26 deletions
diff --git a/chrome/browser/sync/engine/conflict_resolver.h b/chrome/browser/sync/engine/conflict_resolver.h
index c622794..38e418e 100644
--- a/chrome/browser/sync/engine/conflict_resolver.h
+++ b/chrome/browser/sync/engine/conflict_resolver.h
@@ -46,23 +46,11 @@ class ConflictResolver {
sessions::StatusController* status);
private:
- // We keep a map to record how often we've seen each conflict set. We use this
- // to screen out false positives caused by transient server or client states,
- // and to allow us to try to make smaller changes to fix situations before
- // moving onto more drastic solutions.
- typedef std::string ConflictSetCountMapKey;
- typedef std::map<ConflictSetCountMapKey, int> ConflictSetCountMap;
- typedef std::map<syncable::Id, int> SimpleConflictCountMap;
-
enum ProcessSimpleConflictResult {
NO_SYNC_PROGRESS, // No changes to advance syncing made.
SYNC_PROGRESS, // Progress made.
};
- // Get a key for the given set. NOTE: May reorder set contents. The key is
- // currently not very efficient, but will ease debugging.
- ConflictSetCountMapKey GetSetKey(ConflictSet* conflict_set);
-
void IgnoreLocalChanges(syncable::MutableEntry* entry);
void OverwriteServerChanges(syncable::WriteTransaction* trans,
syncable::MutableEntry* entry);
@@ -76,20 +64,6 @@ class ConflictResolver {
const sessions::ConflictProgress& progress,
sessions::StatusController* status);
- bool ProcessConflictSet(syncable::WriteTransaction* trans,
- ConflictSet* conflict_set,
- int conflict_count);
-
- // Returns true if we're stuck.
- template <typename InputIt>
- bool LogAndSignalIfConflictStuck(syncable::BaseTransaction* trans,
- int attempt_count,
- InputIt start, InputIt end,
- sessions::StatusController* status);
-
- ConflictSetCountMap conflict_set_count_map_;
- SimpleConflictCountMap simple_conflict_count_map_;
-
DISALLOW_COPY_AND_ASSIGN(ConflictResolver);
};