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

Issue 19309002: sync: Add pre-commit update avoidance mode + flag (Closed)

Created:
7 years, 5 months ago by rlarocque
Modified:
7 years, 5 months ago
CC:
chromium-reviews, tim+watch_chromium.org, rsimha+watch_chromium.org, haitaol+watch_chromium.org, albertb+watch_chromium.org
Visibility:
Public.

Description

sync: Add pre-commit update avoidance mode + flag This CL allows the syncer to avoid requesting updates from the server prior to a commit if the nudge tracker determines that such a request is not necessary. In general, the nudge tracker will consider such a request to be unnecessary unless the sync cycle was triggered by a local refresh request or an invalidation, or invalidations are disabled. This behavior is enabled only if explicitly requested by the client or the server. The client can enable this mode with the command-line flag '--sync-enable-get-update-avoidance'. The server can toggle it on or off with the 'pre_commit_update_avoidance' experiment. Unless at least one of these flags are set, this CL will have no effect on syncer behavior. When this experimental mode is enabled, the SyncScheduler will use the "short poll" interval rather than the "long poll". This should help clients keep in sync with each other even if the experiment breaks. Also included in this CL are some extensions to the python test server to enable manual testing of the pre_commit_update_avoidance experiment node. BUG=147685 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=212746

Patch Set 1 #

Total comments: 8

Patch Set 2 : Review fixes #

Patch Set 3 : Rebase + other fixes #

Patch Set 4 : Rename some variables #

Total comments: 10

Patch Set 5 : Fix nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+221 lines, -14 lines) Patch
M chrome/browser/sync/glue/sync_backend_host.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/common/chrome_switches.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_switches.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M sync/engine/sync_scheduler_impl.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M sync/engine/sync_scheduler_unittest.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M sync/engine/syncer.cc View 1 2 3 4 1 chunk +11 lines, -8 lines 0 comments Download
M sync/engine/syncer_unittest.cc View 1 chunk +1 line, -0 lines 0 comments Download
M sync/internal_api/internal_components_factory_impl.cc View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M sync/internal_api/public/internal_components_factory.h View 1 2 3 4 2 chunks +11 lines, -0 lines 0 comments Download
M sync/internal_api/public/util/experiments.h View 1 chunk +1 line, -0 lines 0 comments Download
M sync/internal_api/sync_manager_impl.cc View 1 2 3 1 chunk +11 lines, -0 lines 0 comments Download
M sync/internal_api/test/test_internal_components_factory.cc View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M sync/protocol/experiments_specifics.proto View 2 chunks +6 lines, -0 lines 0 comments Download
M sync/protocol/proto_value_conversions.cc View 1 chunk +1 line, -0 lines 0 comments Download
M sync/sessions/data_type_tracker.h View 1 chunk +4 lines, -0 lines 0 comments Download
M sync/sessions/data_type_tracker.cc View 1 2 3 4 1 chunk +11 lines, -1 line 0 comments Download
M sync/sessions/nudge_tracker.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M sync/sessions/nudge_tracker.cc View 1 chunk +10 lines, -0 lines 0 comments Download
M sync/sessions/nudge_tracker_unittest.cc View 4 chunks +64 lines, -1 line 0 comments Download
M sync/sessions/sync_session_context.h View 1 2 3 4 3 chunks +19 lines, -0 lines 0 comments Download
M sync/sessions/sync_session_context.cc View 1 2 3 2 chunks +5 lines, -1 line 0 comments Download
M sync/sessions/sync_session_unittest.cc View 1 chunk +1 line, -0 lines 0 comments Download
M sync/test/engine/syncer_command_test.h View 1 chunk +1 line, -0 lines 0 comments Download
M sync/tools/testserver/chromiumsync.py View 1 3 chunks +29 lines, -1 line 0 comments Download
M sync/tools/testserver/sync_testserver.py View 2 chunks +15 lines, -1 line 0 comments Download

Messages

Total messages: 9 (0 generated)
rlarocque
zea: Please review. raz: Please skim and let me know if there's anything you'd like ...
7 years, 5 months ago (2013-07-15 23:56:29 UTC) #1
Nicolas Zea
https://codereview.chromium.org/19309002/diff/1/sync/engine/syncer.cc File sync/engine/syncer.cc (right): https://codereview.chromium.org/19309002/diff/1/sync/engine/syncer.cc#newcode68 sync/engine/syncer.cc:68: || session->context()->should_fetch_updates_before_commit()) { || on previous line https://codereview.chromium.org/19309002/diff/1/sync/sessions/nudge_tracker.h File ...
7 years, 5 months ago (2013-07-16 00:24:32 UTC) #2
rlarocque
Patch updated. PTAL. https://codereview.chromium.org/19309002/diff/1/sync/engine/syncer.cc File sync/engine/syncer.cc (right): https://codereview.chromium.org/19309002/diff/1/sync/engine/syncer.cc#newcode68 sync/engine/syncer.cc:68: || session->context()->should_fetch_updates_before_commit()) { On 2013/07/16 00:24:32, ...
7 years, 5 months ago (2013-07-16 01:08:26 UTC) #3
rlarocque
I talked to Raz. He also thinks that using "Experiment" as part of the name ...
7 years, 5 months ago (2013-07-18 00:10:15 UTC) #4
rlarocque
Hi Tim, could you take a look at this while Nicolas is out?
7 years, 5 months ago (2013-07-19 19:28:03 UTC) #5
tim (not reviewing)
LGTM with nits. https://codereview.chromium.org/19309002/diff/20001/sync/engine/sync_scheduler_unittest.cc File sync/engine/sync_scheduler_unittest.cc (right): https://codereview.chromium.org/19309002/diff/20001/sync/engine/sync_scheduler_unittest.cc#newcode153 sync/engine/sync_scheduler_unittest.cc:153: false, // force enable pre-commit GU ...
7 years, 5 months ago (2013-07-19 20:11:36 UTC) #6
rlarocque
https://codereview.chromium.org/19309002/diff/20001/sync/engine/sync_scheduler_unittest.cc File sync/engine/sync_scheduler_unittest.cc (right): https://codereview.chromium.org/19309002/diff/20001/sync/engine/sync_scheduler_unittest.cc#newcode153 sync/engine/sync_scheduler_unittest.cc:153: false, // force enable pre-commit GU avoidance experiment On ...
7 years, 5 months ago (2013-07-19 20:35:46 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/19309002/34001
7 years, 5 months ago (2013-07-19 20:41:17 UTC) #8
commit-bot: I haz the power
7 years, 5 months ago (2013-07-20 05:35:37 UTC) #9
Message was sent while issue was closed.
Change committed as 212746

Powered by Google App Engine
This is Rietveld 408576698