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

Issue 2916133002: [Sync] Support commit only types. (Closed)

Created:
3 years, 6 months ago by skym
Modified:
3 years, 6 months ago
Reviewers:
Patrick Noland
CC:
chromium-reviews, sync-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[Sync] Support commit only types. The main differences of commit only types is that they do not have a progress marker, they use very few metadata fields of SyncEntity, they do not perform GetUpdates, and they delete themselves after commit confirmation. Also only supposed on USS/NonBlocking path. This CL updates internal sync logic to facilitate commit only types. With these changes user events should be entirely functional on the client. Can specify the flag --enable-features=SyncUserEvents and existing translate integration will start emitting. The difference between using the static CommitOnlyTypes.Has(...), vs a private boolean in worker vs processor is unfortunate. I think the CommitOnlyTypes.Has(...) approach is better whenever something has the model type, however, current unit tests are tightly coupled with PREFERENCES, which is why I created the |commit_only_| field. BUG=719041 Review-Url: https://codereview.chromium.org/2916133002 Cr-Commit-Position: refs/heads/master@{#477350} Committed: https://chromium.googlesource.com/chromium/src/+/c15b61bdf8133f14d7f715ee6e0dcc5ab65db57c

Patch Set 1 #

Patch Set 2 : Self review. #

Patch Set 3 : Added more checks to syncer unittest. #

Total comments: 10

Patch Set 4 : Updates for pnoland. #

Total comments: 4

Patch Set 5 : More updates for pnoland. #

Patch Set 6 : Undo unittest refactor for GetUpdatesCounters that checks commit data. #

Patch Set 7 : Rebase #

Patch Set 8 : Rebase again. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+314 lines, -74 lines) Patch
M components/sync/base/model_type.h View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M components/sync/driver/data_type_manager_impl.cc View 1 chunk +1 line, -0 lines 0 comments Download
M components/sync/engine_impl/cycle/nudge_tracker.cc View 1 chunk +1 line, -0 lines 0 comments Download
M components/sync/engine_impl/model_type_worker.cc View 4 chunks +18 lines, -4 lines 0 comments Download
M components/sync/engine_impl/model_type_worker_unittest.cc View 1 2 3 4 5 6 22 chunks +95 lines, -41 lines 0 comments Download
M components/sync/engine_impl/non_blocking_type_commit_contribution.h View 2 chunks +9 lines, -1 line 0 comments Download
M components/sync/engine_impl/non_blocking_type_commit_contribution.cc View 2 chunks +12 lines, -2 lines 0 comments Download
M components/sync/engine_impl/syncer.cc View 1 2 3 4 2 chunks +14 lines, -2 lines 0 comments Download
M components/sync/engine_impl/syncer_unittest.cc View 1 2 3 4 5 6 1 chunk +42 lines, -0 lines 0 comments Download
M components/sync/model/model_type_change_processor.cc View 1 chunk +2 lines, -1 line 0 comments Download
M components/sync/model_impl/shared_model_type_processor.h View 1 2 3 4 5 6 7 2 chunks +8 lines, -1 line 0 comments Download
M components/sync/model_impl/shared_model_type_processor.cc View 1 2 3 4 5 6 7 2 chunks +21 lines, -9 lines 0 comments Download
M components/sync/model_impl/shared_model_type_processor_unittest.cc View 1 2 3 4 5 6 7 4 chunks +58 lines, -11 lines 0 comments Download
M components/sync/syncable/model_type.cc View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M components/sync/test/engine/mock_connection_manager.cc View 1 2 3 4 5 6 1 chunk +4 lines, -1 line 0 comments Download
M components/sync/user_events/user_event_sync_bridge.cc View 1 chunk +9 lines, -1 line 0 comments Download
M components/sync/user_events/user_event_sync_bridge_unittest.cc View 1 chunk +13 lines, -0 lines 0 comments Download

Messages

Total messages: 40 (27 generated)
skym
PTAL
3 years, 6 months ago (2017-06-01 19:32:05 UTC) #5
Patrick Noland
https://codereview.chromium.org/2916133002/diff/40001/components/sync/engine_impl/model_type_worker_unittest.cc File components/sync/engine_impl/model_type_worker_unittest.cc (right): https://codereview.chromium.org/2916133002/diff/40001/components/sync/engine_impl/model_type_worker_unittest.cc#newcode1201 components/sync/engine_impl/model_type_worker_unittest.cc:1201: specifics.mutable_user_event(); Do you not want to put any data ...
3 years, 6 months ago (2017-06-01 21:34:40 UTC) #9
skym
Updates for pnoland. https://codereview.chromium.org/2916133002/diff/40001/components/sync/engine_impl/model_type_worker_unittest.cc File components/sync/engine_impl/model_type_worker_unittest.cc (right): https://codereview.chromium.org/2916133002/diff/40001/components/sync/engine_impl/model_type_worker_unittest.cc#newcode1201 components/sync/engine_impl/model_type_worker_unittest.cc:1201: specifics.mutable_user_event(); On 2017/06/01 21:34:40, Patrick Noland ...
3 years, 6 months ago (2017-06-01 22:43:20 UTC) #11
Patrick Noland
lgtm https://codereview.chromium.org/2916133002/diff/60001/components/sync/engine_impl/syncer.cc File components/sync/engine_impl/syncer.cc (right): https://codereview.chromium.org/2916133002/diff/60001/components/sync/engine_impl/syncer.cc#newcode117 components/sync/engine_impl/syncer.cc:117: ModelTypeSet add_for_commit = Intersection(*request_types, CommitOnlyTypes()); This name made ...
3 years, 6 months ago (2017-06-01 22:58:48 UTC) #13
skym
More updates for pnoland. https://codereview.chromium.org/2916133002/diff/60001/components/sync/engine_impl/syncer.cc File components/sync/engine_impl/syncer.cc (right): https://codereview.chromium.org/2916133002/diff/60001/components/sync/engine_impl/syncer.cc#newcode117 components/sync/engine_impl/syncer.cc:117: ModelTypeSet add_for_commit = Intersection(*request_types, CommitOnlyTypes()); ...
3 years, 6 months ago (2017-06-01 23:15:21 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2916133002/80001
3 years, 6 months ago (2017-06-01 23:16:09 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_tsan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_tsan_rel_ng/builds/87771)
3 years, 6 months ago (2017-06-01 23:41:53 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2916133002/100001
3 years, 6 months ago (2017-06-02 16:12:16 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/192213)
3 years, 6 months ago (2017-06-02 18:13:26 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2916133002/100001
3 years, 6 months ago (2017-06-02 18:19:05 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/192415)
3 years, 6 months ago (2017-06-02 20:33:31 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2916133002/140001
3 years, 6 months ago (2017-06-06 17:24:14 UTC) #37
commit-bot: I haz the power
3 years, 6 months ago (2017-06-06 18:39:10 UTC) #40
Message was sent while issue was closed.
Committed patchset #8 (id:140001) as
https://chromium.googlesource.com/chromium/src/+/c15b61bdf8133f14d7f715ee6e0d...

Powered by Google App Engine
This is Rietveld 408576698