Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Issue 9305001: sync: Remove the remaining conflict sets code (Closed)

Created:
8 years, 10 months ago by rlarocque
Modified:
8 years, 10 months ago
Reviewers:
Nicolas Zea, akalin
CC:
chromium-reviews, Raghu Simha, ncarter (slow), tim (not reviewing)
Visibility:
Public.

Description

sync: Remove the remaining conflict sets code Conflict sets were intended to help us deal with updates that could corrupt the directory tree if applied. This could happen, for example, when the server sends us a new item in a directory that has been deleted locally. Due to a bug, the code to deal with conflict sets was never run. It seems that the consequences of this weren't as bad as one would expect. By this point, it's not worth fixing, since we are a few weeks away from adding code to handle conflict sets entirely on the server side. Over a series of commits, we have removed lots of dead code related to conflict set handling. The only remaining function of conflict sets code was to prevent items that were in both a "conflict set" and a "simple conflict" state from being processed as simple conflicts. If those items had been processed as simple conflicts, there is a small chance we could accidentally apply them, or do other bad things. The code that detects conflict sets is overkill for our current needs, because it was built with the idea that we had to gather information about these conflict sets in order to resolve them. Now that this requirement has been removed, I have been able to greatly simplify the implementation of conflict set detection by moving it to the update application code. Since this was the last remaining purpose of the conflict set processing code, it is now safe to entirely remove the concept of conflict sets. Other changes: - Removed ConflictProgress::EraseNonBlockingConflictingItemById(); the function was never used. - Added some unit tests for the new functionality. BUG=107816 TEST=sync_unit_tests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=122894

Patch Set 1 #

Patch Set 2 : Additional comments #

Total comments: 40

Patch Set 3 : Review updates and renames #

Total comments: 38

Patch Set 4 : More renames, refactors and fixes #

Total comments: 13

Patch Set 5 : More test related changes #

Patch Set 6 : Remove failing assertion. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+557 lines, -785 lines) Patch
M chrome/browser/sync/engine/apply_updates_command_unittest.cc View 1 2 3 4 13 chunks +295 lines, -22 lines 0 comments Download
D chrome/browser/sync/engine/build_and_process_conflict_sets_command.h View 1 chunk +0 lines, -64 lines 0 comments Download
D chrome/browser/sync/engine/build_and_process_conflict_sets_command.cc View 1 chunk +0 lines, -238 lines 0 comments Download
D chrome/browser/sync/engine/build_and_process_conflict_sets_command_unittest.cc View 1 chunk +0 lines, -52 lines 0 comments Download
M chrome/browser/sync/engine/conflict_resolver.cc View 1 2 3 4 5 4 chunks +46 lines, -77 lines 0 comments Download
M chrome/browser/sync/engine/process_commit_response_command.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/engine/resolve_conflicts_command_unittest.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/engine/syncer.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/sync/engine/syncer.cc View 1 2 3 6 chunks +5 lines, -14 lines 0 comments Download
M chrome/browser/sync/engine/syncer_types.h View 1 2 2 chunks +25 lines, -12 lines 0 comments Download
M chrome/browser/sync/engine/syncer_unittest.cc View 1 2 3 4 7 chunks +4 lines, -87 lines 0 comments Download
M chrome/browser/sync/engine/syncer_util.cc View 1 2 3 4 chunks +10 lines, -9 lines 0 comments Download
M chrome/browser/sync/engine/update_applicator.h View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/sync/engine/update_applicator.cc View 1 2 3 5 chunks +22 lines, -11 lines 0 comments Download
M chrome/browser/sync/internal_api/debug_info_event_listener.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/sync/profile_sync_service_harness.cc View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/sync/protocol/client_debug_info.proto View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/sync/sessions/session_state.h View 1 2 3 4 3 chunks +38 lines, -35 lines 0 comments Download
M chrome/browser/sync/sessions/session_state.cc View 1 2 3 4 5 chunks +37 lines, -111 lines 0 comments Download
M chrome/browser/sync/sessions/session_state_unittest.cc View 1 2 3 4 3 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/sync/sessions/status_controller.h View 1 2 3 4 1 chunk +8 lines, -8 lines 0 comments Download
M chrome/browser/sync/sessions/status_controller.cc View 1 2 3 4 2 chunks +7 lines, -5 lines 0 comments Download
M chrome/browser/sync/sessions/status_controller_unittest.cc View 1 2 3 4 4 chunks +29 lines, -8 lines 0 comments Download
M chrome/browser/sync/sessions/sync_session.cc View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/sync/sessions/sync_session_unittest.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/test/integration/two_client_sessions_sync_test.cc View 1 2 3 6 chunks +11 lines, -11 lines 0 comments Download
M chrome/chrome.gyp View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 19 (0 generated)
rlarocque
Fred: Please look over the new test cases. I'm not sure I'm using the right ...
8 years, 10 months ago (2012-01-31 19:12:16 UTC) #1
akalin
some initial test comments. i'll take a more detailed pass after you add the test ...
8 years, 10 months ago (2012-02-01 01:10:24 UTC) #2
Nicolas Zea
Some comments. http://codereview.chromium.org/9305001/diff/2001/chrome/browser/sync/engine/conflict_resolver.cc File chrome/browser/sync/engine/conflict_resolver.cc (right): http://codereview.chromium.org/9305001/diff/2001/chrome/browser/sync/engine/conflict_resolver.cc#newcode364 chrome/browser/sync/engine/conflict_resolver.cc:364: bool ConflictResolver::ResolveConflicts(syncable::WriteTransaction* trans, I think it would ...
8 years, 10 months ago (2012-02-01 19:16:19 UTC) #3
rlarocque
This second diff ended up being bigger than I expected. One reason for this is ...
8 years, 10 months ago (2012-02-02 00:32:56 UTC) #4
akalin
More test comments http://codereview.chromium.org/9305001/diff/9001/chrome/browser/sync/engine/apply_updates_command_unittest.cc File chrome/browser/sync/engine/apply_updates_command_unittest.cc (left): http://codereview.chromium.org/9305001/diff/9001/chrome/browser/sync/engine/apply_updates_command_unittest.cc#oldcode169 chrome/browser/sync/engine/apply_updates_command_unittest.cc:169: EXPECT_EQ(2, status->update_progress()->AppliedUpdatesSize()) comment this test, too ...
8 years, 10 months ago (2012-02-02 01:34:38 UTC) #5
Nicolas Zea
Couple more comments/renames http://codereview.chromium.org/9305001/diff/9001/chrome/browser/sync/engine/conflict_resolver.cc File chrome/browser/sync/engine/conflict_resolver.cc (right): http://codereview.chromium.org/9305001/diff/9001/chrome/browser/sync/engine/conflict_resolver.cc#newcode82 chrome/browser/sync/engine/conflict_resolver.cc:82: // both UNSYNCED and UNAPPLIED_UDPATEs. are ...
8 years, 10 months ago (2012-02-02 21:53:41 UTC) #6
rlarocque
Lots more changes in this next patch. Hopefully this is the last big update. Highlights: ...
8 years, 10 months ago (2012-02-03 22:31:15 UTC) #7
Nicolas Zea
Sorry for the delay, forgot this was on my plate. LGTM
8 years, 10 months ago (2012-02-09 01:54:58 UTC) #8
akalin
LGTM after comments http://codereview.chromium.org/9305001/diff/10010/chrome/browser/sync/engine/apply_updates_command_unittest.cc File chrome/browser/sync/engine/apply_updates_command_unittest.cc (right): http://codereview.chromium.org/9305001/diff/10010/chrome/browser/sync/engine/apply_updates_command_unittest.cc#newcode155 chrome/browser/sync/engine/apply_updates_command_unittest.cc:155: EXPECT_TRUE(dir.good()); if dir is bad, probably ...
8 years, 10 months ago (2012-02-10 23:11:53 UTC) #9
rlarocque
Thanks for the reviews. http://codereview.chromium.org/9305001/diff/10010/chrome/browser/sync/engine/apply_updates_command_unittest.cc File chrome/browser/sync/engine/apply_updates_command_unittest.cc (right): http://codereview.chromium.org/9305001/diff/10010/chrome/browser/sync/engine/apply_updates_command_unittest.cc#newcode155 chrome/browser/sync/engine/apply_updates_command_unittest.cc:155: EXPECT_TRUE(dir.good()); On 2012/02/10 23:11:54, akalin ...
8 years, 10 months ago (2012-02-11 00:02:16 UTC) #10
akalin
On 2012/02/11 00:02:16, rlarocque wrote: > Thanks for the reviews. > > http://codereview.chromium.org/9305001/diff/10010/chrome/browser/sync/engine/apply_updates_command_unittest.cc > File ...
8 years, 10 months ago (2012-02-13 22:24:34 UTC) #11
rlarocque
On 2012/02/13 22:24:34, akalin wrote: > On 2012/02/11 00:02:16, rlarocque wrote: > > Thanks for ...
8 years, 10 months ago (2012-02-14 00:01:59 UTC) #12
akalin
are you still planning to land this?
8 years, 10 months ago (2012-02-15 23:14:20 UTC) #13
rlarocque
On 2012/02/15 23:14:20, akalin wrote: > are you still planning to land this? That was ...
8 years, 10 months ago (2012-02-16 03:22:23 UTC) #14
rlarocque
On 2012/02/16 03:22:23, rlarocque wrote: > On 2012/02/15 23:14:20, akalin wrote: > > are you ...
8 years, 10 months ago (2012-02-18 00:33:46 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/9305001/34001
8 years, 10 months ago (2012-02-21 20:26:40 UTC) #16
commit-bot: I haz the power
Try job failure for 9305001-34001 (retry) on mac_rel for step "compile" (clobber build). It's a ...
8 years, 10 months ago (2012-02-21 21:11:54 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/9305001/34001
8 years, 10 months ago (2012-02-21 21:18:33 UTC) #18
commit-bot: I haz the power
8 years, 10 months ago (2012-02-21 22:49:28 UTC) #19
Change committed as 122894

Powered by Google App Engine
This is Rietveld 408576698