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

Issue 371029: Remove unique naming. (Closed)

Created:
11 years, 1 month ago by chron_chromium.org
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Remove unique naming from syncer! This reduces the complexity. Modify the index to store things with parent id and metahandle instead of parent id and name. Add a template function for extracting name from proto buffers. Refactor some unit tests to work without unique naming. Remove path calls since they make no sense without unique names. Remove find by parentID and names. Remove unique name resolution from conflict resolver. Remove syncable name class. TEST=included unit tests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=32583

Patch Set 1 #

Patch Set 2 : Now unit tests pass. #

Patch Set 3 : Ready for review! #

Total comments: 108

Patch Set 4 : Fixes from code review. #

Total comments: 6

Patch Set 5 : Ready and about to go in! #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1157 lines, -2644 lines) Patch
M chrome/browser/sync/engine/apply_updates_command_unittest.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/engine/build_and_process_conflict_sets_command.cc View 1 2 3 4 8 chunks +15 lines, -69 lines 0 comments Download
M chrome/browser/sync/engine/build_commit_command.cc View 1 2 2 chunks +9 lines, -11 lines 0 comments Download
A chrome/browser/sync/engine/conflict_resolution_view.h View 1 2 0 chunks +-1 lines, --1 lines 0 comments Download
M chrome/browser/sync/engine/conflict_resolver.h View 1 2 3 3 chunks +0 lines, -28 lines 0 comments Download
M chrome/browser/sync/engine/conflict_resolver.cc View 1 2 3 11 chunks +18 lines, -258 lines 0 comments Download
M chrome/browser/sync/engine/get_commit_ids_command.h View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/sync/engine/process_commit_response_command.cc View 1 2 3 4 3 chunks +7 lines, -27 lines 0 comments Download
M chrome/browser/sync/engine/process_updates_command.cc View 1 2 3 4 2 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/sync/engine/syncapi.cc View 1 2 3 5 chunks +10 lines, -32 lines 0 comments Download
M chrome/browser/sync/engine/syncer.h View 3 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/sync/engine/syncer.cc View 1 2 3 6 chunks +5 lines, -12 lines 0 comments Download
M chrome/browser/sync/engine/syncer_proto_util.h View 1 2 3 1 chunk +5 lines, -4 lines 0 comments Download
M chrome/browser/sync/engine/syncer_proto_util.cc View 1 2 3 3 chunks +12 lines, -10 lines 0 comments Download
M chrome/browser/sync/engine/syncer_proto_util_unittest.cc View 1 2 3 1 chunk +40 lines, -21 lines 0 comments Download
M chrome/browser/sync/engine/syncer_types.h View 1 2 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/browser/sync/engine/syncer_unittest.cc View 1 2 3 77 chunks +699 lines, -1225 lines 0 comments Download
M chrome/browser/sync/engine/syncer_util.h View 1 3 chunks +2 lines, -11 lines 0 comments Download
M chrome/browser/sync/engine/syncer_util.cc View 1 2 3 10 chunks +8 lines, -90 lines 0 comments Download
A chrome/browser/sync/engine/update_applicator.h View 1 2 0 chunks +-1 lines, --1 lines 0 comments Download
A chrome/browser/sync/engine/update_applicator.cc View 1 2 0 chunks +-1 lines, --1 lines 0 comments Download
M chrome/browser/sync/engine/verify_updates_command.cc View 1 2 3 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/sync/syncable/directory_backing_store.cc View 1 3 chunks +2 lines, -50 lines 0 comments Download
M chrome/browser/sync/syncable/syncable.h View 1 2 3 16 chunks +21 lines, -275 lines 0 comments Download
M chrome/browser/sync/syncable/syncable.cc View 1 2 3 22 chunks +52 lines, -331 lines 0 comments Download
M chrome/browser/sync/syncable/syncable_columns.h View 1 chunk +1 line, -4 lines 0 comments Download
M chrome/browser/sync/syncable/syncable_unittest.cc View 1 2 3 17 chunks +132 lines, -159 lines 0 comments Download
M chrome/chrome.gyp View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/test/sync/engine/mock_server_connection.h View 4 chunks +3 lines, -6 lines 0 comments Download
M chrome/test/sync/engine/mock_server_connection.cc View 3 chunks +5 lines, -7 lines 0 comments Download
A chrome/test/sync/engine/test_syncable_utils.h View 1 2 1 chunk +38 lines, -0 lines 0 comments Download
A chrome/test/sync/engine/test_syncable_utils.cc View 1 2 1 chunk +60 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
chron_chromium.org
Hi Tim! This will not go in until after branch.
11 years, 1 month ago (2009-11-11 22:05:11 UTC) #1
its_nick_at_chromium_org
Excellent. I plan to review this as well. - nick On Wed, Nov 11, 2009 ...
11 years, 1 month ago (2009-11-12 02:26:20 UTC) #2
ncarter (slow)
This is a substantial accomplishment. Great work. http://codereview.chromium.org/371029/diff/2056/2061 File chrome/browser/sync/engine/conflict_resolver.cc (right): http://codereview.chromium.org/371029/diff/2056/2061#newcode46 Line 46: // ...
11 years, 1 month ago (2009-11-13 00:18:14 UTC) #3
ncarter (slow)
http://codereview.chromium.org/371029/diff/2056/2066 File chrome/browser/sync/engine/syncapi.cc (right): http://codereview.chromium.org/371029/diff/2056/2066#newcode420 Line 420: DCHECK(entry_->Put(syncable::NON_UNIQUE_NAME, name)); On 2009/11/13 00:18:14, nick wrote: > ...
11 years, 1 month ago (2009-11-13 00:22:09 UTC) #4
chron_chromium.org
Thanks for the review. I've changed callbacks to closures and made all other fixes. http://codereview.chromium.org/371029/diff/2056/2061 ...
11 years, 1 month ago (2009-11-13 23:21:25 UTC) #5
ncarter (slow)
You're in the queue behind Tim. - nick On Mon, Nov 16, 2009 at 11:23 ...
11 years, 1 month ago (2009-11-17 08:01:41 UTC) #6
chron
Haha, thanks! I'll give tim's cl a pass too. On Nov 17, 2009, at 3:01 ...
11 years, 1 month ago (2009-11-17 14:23:56 UTC) #7
tim (not reviewing)
http://codereview.chromium.org/371029/diff/1017/1025 File chrome/browser/sync/engine/process_commit_response_command.cc (right): http://codereview.chromium.org/371029/diff/1017/1025#newcode124 Line 124: // This is important to activate conflict resolution. ...
11 years, 1 month ago (2009-11-17 17:33:19 UTC) #8
ncarter (slow)
11 years, 1 month ago (2009-11-18 00:52:29 UTC) #9
LGTM

http://codereview.chromium.org/371029/diff/2056/2078
File chrome/browser/sync/syncable/directory_backing_store.cc (right):

http://codereview.chromium.org/371029/diff/2056/2078#newcode40
Line 40: static const int32 kCurrentDBVersion = 68;
On 2009/11/13 23:21:26, chron_chromium.org wrote:
> On 2009/11/13 00:18:14, nick wrote:
> > When we push this, the version number bump from the resulting download will
> > cause a traffic spike of getupdates-from-timestamp-zeroes.  Which may be
fine.
> 
> > It will be smoothed out by the average time until browser restart.
> > 
> > Let's talk it out.  How hard would the column-dropping migration be? 
> > http://www.sqlite.org/faq.html#q11
> 
> I think the risk factors are a bit high for the column migration, it tends to
be
> error prone. At least for this migration it isn't really worth it. The browser
> smoothing I think should be fine; cosmo has indicated they don't care about
> reads that much either. We can talk more though.

Sounds fine.

http://codereview.chromium.org/371029/diff/1017/1025
File chrome/browser/sync/engine/process_commit_response_command.cc (right):

http://codereview.chromium.org/371029/diff/1017/1025#newcode344
Line 344: if (!server_name.empty() &&  old_name != server_name) {
Extra space here.

http://codereview.chromium.org/371029/diff/1017/1026
File chrome/browser/sync/engine/process_updates_command.cc (right):

http://codereview.chromium.org/371029/diff/1017/1026#newcode160
Line 160: &update_entry)) << update_entry;
Indentation is off inside this block.

Powered by Google App Engine
This is Rietveld 408576698