|
Fix the false-positive detection of commit errors
When exiting from a sync cycle, the SyncScheduler will look at the results of
the previous cycle and use them to determine when the next sync job should
run. Part of this is detecting whether or not the job failed.
Right now, we assume that num_unsynced_handles > 0 implies that we failed to
commit everything we should have. That's wrong, because that information was
calculated at the beginning of the job and doesn't get updated following the
commit. So num_unsynced_handles > 0 actually implies that we probably tried to
commit something, but it doesn't necessarily mean the commit failed.
Because of that faulty logic, we assume that every sync cycle that commits
something has in fact failed. We schedule another job soon after to clean up
the failure.
This commit attempts to fix that issue. It moves the logic for detecting the
failure into SyncSession::ExperiencedTransientError() which will act as an
interpreter for the session's state. This should make it more difficult to
misinterprent the session's state information in the future. The function's
definition uses a different, hopefully better, set of tests to determine
whether or not the sync cycle failed to make progress.
This commit also changes the way the MIGRATION_DONE "error" code is handled.
We don't want MIGRATION_DONE to trigger a backoff, which is what it would do
given how we defined ExperiencedTransientError(). The fix is to change the way
we deal with this value, so it does not increment the consecutive error
counter.
BUG= 94670
TEST=
Total comments: 11
Total comments: 1
Total comments: 4
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+458 lines, -200 lines) |
Patch |
 |
M |
chrome/browser/automation/testing_automation_provider.h
|
View
|
1
2
3
4
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/automation/testing_automation_provider.cc
|
View
|
1
2
3
4
|
5 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/engine/clear_data_command.cc
|
View
|
1
2
3
4
|
3 chunks |
+16 lines, -6 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/engine/download_updates_command.cc
|
View
|
1
2
3
4
|
4 chunks |
+9 lines, -3 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/engine/post_commit_message_command.cc
|
View
|
1
2
3
4
|
1 chunk |
+13 lines, -5 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/engine/sync_scheduler.cc
|
View
|
1
2
3
4
|
3 chunks |
+5 lines, -20 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/engine/syncer_proto_util.h
|
View
|
1
2
3
4
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/engine/syncer_proto_util.cc
|
View
|
1
2
3
4
|
8 chunks |
+73 lines, -25 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/glue/sync_backend_host.h
|
View
|
1
2
3
4
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/glue/sync_backend_host.cc
|
View
|
1
2
3
4
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/internal_api/sync_manager.h
|
View
|
1
2
3
4
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/internal_api/syncapi_unittest.cc
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/js/js_sync_manager_observer.h
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/js/js_sync_manager_observer.cc
|
View
|
1
2
3
4
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/js/js_sync_manager_observer_unittest.cc
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/profile_sync_service.h
|
View
|
1
2
3
4
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/profile_sync_service.cc
|
View
|
1
2
3
4
|
4 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/profile_sync_service_harness.h
|
View
|
1
2
3
4
|
3 chunks |
+28 lines, -5 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/profile_sync_service_harness.cc
|
View
|
1
2
3
4
|
17 chunks |
+92 lines, -33 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/profile_sync_service_mock.h
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/protocol/sync_protocol_error.h
|
View
|
1
2
3
4
|
3 chunks |
+21 lines, -7 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/protocol/sync_protocol_error.cc
|
View
|
1
2
3
4
|
3 chunks |
+12 lines, -6 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/sessions/session_state.h
|
View
|
1
2
3
4
|
3 chunks |
+9 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/sessions/status_controller.h
|
View
|
1
2
3
4
|
2 chunks |
+20 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/sessions/status_controller.cc
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/sessions/sync_session.h
|
View
|
1
2
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/sessions/sync_session.cc
|
View
|
1
2
3
4
|
1 chunk |
+64 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/sessions/test_util.cc
|
View
|
1
2
3
4
|
1 chunk |
+6 lines, -11 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/sync_ui_util.cc
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/test/integration/migration_errors_test.cc
|
View
|
1
2
3
4
|
1 chunk |
+7 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/test/integration/performance/sync_timing_helper.cc
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/test/integration/single_client_apps_sync_test.cc
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/test/integration/single_client_bookmarks_sync_test.cc
|
View
|
1
2
3
4
|
6 chunks |
+7 lines, -7 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/test/integration/single_client_extensions_sync_test.cc
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/test/integration/single_client_passwords_sync_test.cc
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/test/integration/single_client_preferences_sync_test.cc
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/test/integration/single_client_search_engines_sync_test.cc
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/test/integration/single_client_themes_sync_test.cc
|
View
|
1
2
3
4
|
5 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/test/integration/single_client_typed_urls_sync_test.cc
|
View
|
1
2
3
4
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/test/integration/sync_errors_test.cc
|
View
|
1
2
3
4
|
4 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/test/integration/sync_test.h
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/test/integration/sync_test.cc
|
View
|
1
2
3
4
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/test/integration/two_client_apps_sync_test.cc
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/test/integration/two_client_autofill_sync_test.cc
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/test/integration/two_client_extensions_sync_test.cc
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/test/integration/two_client_passwords_sync_test.cc
|
View
|
1
2
3
4
|
4 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/test/integration/two_client_preferences_sync_test.cc
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/test/integration/two_client_search_engines_sync_test.cc
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/test/integration/two_client_themes_sync_test.cc
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
Total messages: 17 (0 generated)
|