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

Issue 299963002: sync: Implement NonBlockingTypeProcessorCore (Closed)

Created:
6 years, 7 months ago by rlarocque
Modified:
6 years, 6 months ago
Reviewers:
Nicolas Zea
CC:
chromium-reviews, tim+watch_chromium.org, haitaol+watch_chromium.org, albertb+watch_chromium.org, maniscalco+watch_chromium.org, maniscalco, pavely
Visibility:
Public.

Description

sync: Implement NonBlockingTypeProcessorCore Introduces the second half of the non-blocking sync engine. For now, most of the classes invovled are never instantiated outside of tests. Adds NonBlockingTypeProcessorCore, the sync thread component of non-blocking sync. It coordinates between the sync server and the NonBlockingTypeProcessor that lives on the model thread. The SyncThreadSyncEntity exists to help it handle keep track of the in-flight sync entities. The NonBlockingTypeProcessorCore interacts with the sync thread components by implementing both the UpdateHandler and CommitContributor interfaces. This allows it to take part in commit and update operations that are managed by the syncer. As part of its implementation of the CommitContributor interface, the NonBlockingTypeProcessorCore introduces a NonBlockingTypeProcessorCommitContribution class to manage its contribution to a commit request and associated it with the response. This CL includes a large amount of test framework code to help test the NonBlockingTypeProcessorCore. Makes the SyncEntityToValue function in proto_value_conversions.h public to enable more informative debug messages. BUG=351005 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=275187

Patch Set 1 #

Total comments: 77

Patch Set 2 : Rebase #

Patch Set 3 : Some fixes #

Patch Set 4 : One more tiny fix #

Patch Set 5 : Initial sync done support; Update tests + non_unique_name fixes #

Patch Set 6 : Small comment fix #

Total comments: 19

Patch Set 7 : More review fixes #

Total comments: 2

Patch Set 8 : Last round of fixes #

Patch Set 9 : Rebase #

Patch Set 10 : Unbreak some tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2162 lines, -60 lines) Patch
M sync/engine/model_thread_sync_entity.cc View 1 chunk +1 line, -1 line 0 comments Download
M sync/engine/non_blocking_sync_common.h View 1 2 3 4 5 6 2 chunks +7 lines, -0 lines 0 comments Download
M sync/engine/non_blocking_sync_common.cc View 1 2 3 4 5 6 7 1 chunk +11 lines, -4 lines 0 comments Download
A sync/engine/non_blocking_type_commit_contribution.h View 1 2 3 4 5 6 1 chunk +66 lines, -0 lines 0 comments Download
A sync/engine/non_blocking_type_commit_contribution.cc View 1 2 3 4 5 6 1 chunk +119 lines, -0 lines 0 comments Download
M sync/engine/non_blocking_type_processor.cc View 1 2 3 4 4 chunks +10 lines, -1 line 0 comments Download
M sync/engine/non_blocking_type_processor_core.h View 1 2 3 4 5 6 5 chunks +49 lines, -10 lines 0 comments Download
M sync/engine/non_blocking_type_processor_core.cc View 1 2 3 4 5 6 5 chunks +218 lines, -24 lines 0 comments Download
A sync/engine/non_blocking_type_processor_core_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +961 lines, -0 lines 0 comments Download
A sync/engine/non_blocking_type_processor_interface.h View 1 chunk +31 lines, -0 lines 0 comments Download
A + sync/engine/non_blocking_type_processor_interface.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M sync/engine/non_blocking_type_processor_unittest.cc View 1 2 3 4 13 chunks +50 lines, -13 lines 0 comments Download
A sync/engine/sync_thread_sync_entity.h View 1 chunk +155 lines, -0 lines 0 comments Download
A sync/engine/sync_thread_sync_entity.cc View 1 2 3 4 5 6 7 8 9 1 chunk +242 lines, -0 lines 0 comments Download
A sync/engine/sync_thread_sync_entity_unittest.cc View 1 chunk +164 lines, -0 lines 0 comments Download
M sync/protocol/proto_value_conversions.h View 2 chunks +5 lines, -0 lines 0 comments Download
M sync/protocol/proto_value_conversions.cc View 2 chunks +4 lines, -0 lines 0 comments Download
M sync/sessions/model_type_registry.cc View 1 2 3 chunks +57 lines, -4 lines 0 comments Download
M sync/sync_core.gypi View 2 chunks +6 lines, -0 lines 0 comments Download
M sync/sync_tests.gypi View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 27 (0 generated)
rlarocque
Here's part two. It's slightly bigger than the first. If it's any consolation, more than ...
6 years, 7 months ago (2014-05-24 00:08:51 UTC) #1
Nicolas Zea
https://codereview.chromium.org/299963002/diff/1/sync/engine/non_blocking_sync_common.h File sync/engine/non_blocking_sync_common.h (right): https://codereview.chromium.org/299963002/diff/1/sync/engine/non_blocking_sync_common.h#newcode17 sync/engine/non_blocking_sync_common.h:17: static const int64 kUncommittedVersion = -1; Any reason this ...
6 years, 6 months ago (2014-05-28 23:56:15 UTC) #2
rlarocque
Some of your comments will require a bit more work to address. In particular, I ...
6 years, 6 months ago (2014-05-29 20:54:51 UTC) #3
rlarocque
The latest uploads include some tests for update response handling in NonBlockingTypeProcessorCore. Those tests exposed ...
6 years, 6 months ago (2014-05-30 17:05:56 UTC) #4
Nicolas Zea
https://codereview.chromium.org/299963002/diff/1/sync/engine/non_blocking_type_commit_contribution.cc File sync/engine/non_blocking_type_commit_contribution.cc (right): https://codereview.chromium.org/299963002/diff/1/sync/engine/non_blocking_type_commit_contribution.cc#newcode60 sync/engine/non_blocking_type_commit_contribution.cc:60: LOG(ERROR) << "Server reports conflict for our commit message."; ...
6 years, 6 months ago (2014-06-02 20:27:16 UTC) #5
rlarocque
Uploaded new patch and responded to some comments. PTAL. https://codereview.chromium.org/299963002/diff/1/sync/engine/non_blocking_type_commit_contribution.cc File sync/engine/non_blocking_type_commit_contribution.cc (right): https://codereview.chromium.org/299963002/diff/1/sync/engine/non_blocking_type_commit_contribution.cc#newcode60 sync/engine/non_blocking_type_commit_contribution.cc:60: ...
6 years, 6 months ago (2014-06-02 21:39:13 UTC) #6
Nicolas Zea
LGTM with the final comments addressed https://codereview.chromium.org/299963002/diff/90001/sync/engine/non_blocking_type_processor.cc File sync/engine/non_blocking_type_processor.cc (right): https://codereview.chromium.org/299963002/diff/90001/sync/engine/non_blocking_type_processor.cc#newcode191 sync/engine/non_blocking_type_processor.cc:191: !data_type_state_.initial_sync_done && data_type_state.initial_sync_done; ...
6 years, 6 months ago (2014-06-03 21:01:03 UTC) #7
Nicolas Zea
https://codereview.chromium.org/299963002/diff/1/sync/engine/non_blocking_type_processor_core_unittest.cc File sync/engine/non_blocking_type_processor_core_unittest.cc (right): https://codereview.chromium.org/299963002/diff/1/sync/engine/non_blocking_type_processor_core_unittest.cc#newcode127 sync/engine/non_blocking_type_processor_core_unittest.cc:127: bool WillCommit(); On 2014/06/02 21:39:13, rlarocque wrote: > On ...
6 years, 6 months ago (2014-06-03 21:03:00 UTC) #8
rlarocque
Uploaded patches to address comments and rebase. https://codereview.chromium.org/299963002/diff/90001/sync/engine/sync_thread_sync_entity.cc File sync/engine/sync_thread_sync_entity.cc (right): https://codereview.chromium.org/299963002/diff/90001/sync/engine/sync_thread_sync_entity.cc#newcode131 sync/engine/sync_thread_sync_entity.cc:131: NOTREACHED() << ...
6 years, 6 months ago (2014-06-03 21:14:33 UTC) #9
rlarocque
The CQ bit was checked by rlarocque@chromium.org
6 years, 6 months ago (2014-06-03 21:14:45 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/299963002/130001
6 years, 6 months ago (2014-06-03 21:15:56 UTC) #11
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_dbg on tryserver.chromium ...
6 years, 6 months ago (2014-06-04 00:14:08 UTC) #12
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-04 00:40:51 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: android_dbg on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg/builds/191586)
6 years, 6 months ago (2014-06-04 00:40:52 UTC) #14
rlarocque
The CQ bit was checked by rlarocque@chromium.org
6 years, 6 months ago (2014-06-04 17:43:14 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/299963002/150001
6 years, 6 months ago (2014-06-04 17:44:51 UTC) #16
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_chromium_gn_compile_rel on tryserver.chromium ...
6 years, 6 months ago (2014-06-04 20:46:09 UTC) #17
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-04 20:51:29 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_chromium_gn_compile_rel/builds/10531) linux_chromium_gn_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_gn_rel/builds/13359)
6 years, 6 months ago (2014-06-04 20:51:30 UTC) #19
rlarocque
The CQ bit was checked by rlarocque@chromium.org
6 years, 6 months ago (2014-06-04 22:25:25 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/299963002/150001
6 years, 6 months ago (2014-06-04 22:27:49 UTC) #21
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_chromium_gn_compile_rel on tryserver.chromium ...
6 years, 6 months ago (2014-06-04 22:33:25 UTC) #22
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-04 22:48:42 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_chromium_gn_compile_rel/builds/10610)
6 years, 6 months ago (2014-06-04 22:48:43 UTC) #24
rlarocque
The CQ bit was checked by rlarocque@chromium.org
6 years, 6 months ago (2014-06-05 17:44:46 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/299963002/150001
6 years, 6 months ago (2014-06-05 17:46:16 UTC) #26
commit-bot: I haz the power
6 years, 6 months ago (2014-06-05 18:05:46 UTC) #27
Message was sent while issue was closed.
Change committed as 275187

Powered by Google App Engine
This is Rietveld 408576698