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

Issue 278153002: sync: Improve handling of bad UniquePositions (Closed)

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

Description

sync: Improve handling of bad UniquePositions Makes the client assign a valid position to incoming bookmarks if the server has not populated the required fields. This code should never be triggered unless there is a bug in the server. This risks reordering users' bookmarks, but that's probably preferable to a crash. Detects bookmarks that do not have valid position information during database load. If these corrupted bookmarks are detected, the entire database is declared to be corrupt. Sync will then re-download all of the user's data, which should fix the problem. BUG=367247 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=270308

Patch Set 1 #

Patch Set 2 : Testing receipt of invalid position updates #

Total comments: 12

Patch Set 3 : Fix bug + nits #

Total comments: 2

Patch Set 4 : Fix comment #

Patch Set 5 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+204 lines, -14 lines) Patch
M sync/engine/syncer_util.h View 1 2 chunks +6 lines, -3 lines 0 comments Download
M sync/engine/syncer_util.cc View 1 2 4 chunks +6 lines, -6 lines 0 comments Download
A sync/engine/syncer_util_unittest.cc View 1 2 1 chunk +127 lines, -0 lines 0 comments Download
M sync/internal_api/public/base/unique_position.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M sync/internal_api/public/base/unique_position.cc View 1 2 3 3 chunks +10 lines, -1 line 0 comments Download
M sync/sync_tests.gypi View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M sync/syncable/directory_backing_store.cc View 1 chunk +10 lines, -0 lines 0 comments Download
M sync/syncable/directory_unittest.cc View 2 chunks +37 lines, -0 lines 0 comments Download
M sync/syncable/syncable_unittest.cc View 2 chunks +3 lines, -4 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
rlarocque
Please review.
6 years, 7 months ago (2014-05-12 18:56:52 UTC) #1
maniscalco
LGTM with some nits. https://codereview.chromium.org/278153002/diff/20001/sync/engine/syncer_util.cc File sync/engine/syncer_util.cc (right): https://codereview.chromium.org/278153002/diff/20001/sync/engine/syncer_util.cc#newcode282 sync/engine/syncer_util.cc:282: LOG(ERROR) << "Update is missing ...
6 years, 7 months ago (2014-05-12 19:21:49 UTC) #2
rlarocque
You just saved us from a lot of flaky tests. Thanks! I've fixed the bug ...
6 years, 7 months ago (2014-05-12 20:26:13 UTC) #3
maniscalco
https://codereview.chromium.org/278153002/diff/20001/sync/engine/syncer_util.cc File sync/engine/syncer_util.cc (right): https://codereview.chromium.org/278153002/diff/20001/sync/engine/syncer_util.cc#newcode282 sync/engine/syncer_util.cc:282: LOG(ERROR) << "Update is missing requirements for bookmark position." ...
6 years, 7 months ago (2014-05-12 20:35:59 UTC) #4
rlarocque
On 2014/05/12 20:35:59, maniscalco wrote: > https://codereview.chromium.org/278153002/diff/20001/sync/engine/syncer_util.cc > File sync/engine/syncer_util.cc (right): > > https://codereview.chromium.org/278153002/diff/20001/sync/engine/syncer_util.cc#newcode282 > ...
6 years, 7 months ago (2014-05-12 22:17:22 UTC) #5
maniscalco
LGTM. One comment nit. https://codereview.chromium.org/278153002/diff/40001/sync/internal_api/public/base/unique_position.cc File sync/internal_api/public/base/unique_position.cc (right): https://codereview.chromium.org/278153002/diff/40001/sync/internal_api/public/base/unique_position.cc#newcode42 sync/internal_api/public/base/unique_position.cc:42: // Users random data for ...
6 years, 7 months ago (2014-05-12 23:37:59 UTC) #6
rlarocque
https://codereview.chromium.org/278153002/diff/40001/sync/internal_api/public/base/unique_position.cc File sync/internal_api/public/base/unique_position.cc (right): https://codereview.chromium.org/278153002/diff/40001/sync/internal_api/public/base/unique_position.cc#newcode42 sync/internal_api/public/base/unique_position.cc:42: // Users random data for all but the last ...
6 years, 7 months ago (2014-05-12 23:47:39 UTC) #7
rlarocque
The CQ bit was checked by rlarocque@chromium.org
6 years, 7 months ago (2014-05-12 23:47:45 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/278153002/60001
6 years, 7 months ago (2014-05-12 23:48:55 UTC) #9
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-12 23:48:57 UTC) #10
commit-bot: I haz the power
No LGTM from a valid reviewer yet. Only full committers are accepted. Even if an ...
6 years, 7 months ago (2014-05-12 23:48:57 UTC) #11
rlarocque
+Tim for full super star committer approval.
6 years, 7 months ago (2014-05-12 23:55:53 UTC) #12
tim (not reviewing)
lgtm
6 years, 7 months ago (2014-05-13 22:43:52 UTC) #13
rlarocque
The CQ bit was checked by rlarocque@chromium.org
6 years, 7 months ago (2014-05-13 22:45:35 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/278153002/80001
6 years, 7 months ago (2014-05-13 22:56:41 UTC) #15
commit-bot: I haz the power
6 years, 7 months ago (2014-05-14 02:58:25 UTC) #16
Message was sent while issue was closed.
Change committed as 270308

Powered by Google App Engine
This is Rietveld 408576698