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

Issue 12094113: Migrate invalidator client IDs out of sync (Closed)

Created:
7 years, 10 months ago by rlarocque
Modified:
7 years, 10 months ago
CC:
chromium-reviews, Raghu Simha, haitaol1, akalin, tim (not reviewing)
Visibility:
Public.

Description

Migrate invalidator client IDs out of sync We want to store invalidator client IDs somewhere other than the sync DB. Unfortunately, changing in the ID would require us to clear any existing client state, which is something we'd prefer to avoid. This commit makes the SyncInvalidationListener copy its sync-assigned client ID to the InvalidationStateTracker when it is initialized. When we decide to fully separate the sync and notifier IDs, the clients that have run through this code path will find that their notifier client ID has already been initialized correctly. This allows us to avoid clearing their client state. It's impossible to guarantee that all clients will hit this code path. Fortunately, we don't have to. The goal of this patch is to avoid deleting the state of too many clients all at once. It's not a big problem if we have to clear the state of a few stragglers that haven't hit the migration path yet. BUG=124142 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=180907

Patch Set 1 #

Patch Set 2 : Remove unnecessary changes #

Total comments: 6

Patch Set 3 : Rebase (the right branch, this time) #

Patch Set 4 : Review-related changes #

Total comments: 6

Patch Set 5 : More fixes from review #

Patch Set 6 : Fix sync_client compile errors #

Unified diffs Side-by-side diffs Delta from patch set Stats (+94 lines, -2 lines) Patch
M chrome/browser/sync/invalidations/invalidator_storage.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/sync/invalidations/invalidator_storage.cc View 1 2 3 4 3 chunks +15 lines, -0 lines 0 comments Download
M chrome/browser/sync/invalidations/invalidator_storage_unittest.cc View 3 chunks +16 lines, -2 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M sync/notifier/fake_invalidation_state_tracker.h View 1 2 chunks +3 lines, -0 lines 0 comments Download
M sync/notifier/fake_invalidation_state_tracker.cc View 1 1 chunk +9 lines, -0 lines 0 comments Download
M sync/notifier/invalidation_state_tracker.h View 1 1 chunk +6 lines, -0 lines 0 comments Download
M sync/notifier/sync_invalidation_listener.cc View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M sync/notifier/sync_invalidation_listener_unittest.cc View 1 2 3 4 3 chunks +17 lines, -0 lines 0 comments Download
M sync/tools/null_invalidation_state_tracker.h View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M sync/tools/null_invalidation_state_tracker.cc View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
rlarocque
This is modeled after the bootstrap data migration. Let's hope this works equally well. For ...
7 years, 10 months ago (2013-02-01 23:26:46 UTC) #1
tim (not reviewing)
The CL to migrate invalidation state also included the code that would read from the ...
7 years, 10 months ago (2013-02-05 20:04:33 UTC) #2
rlarocque
On 2013/02/05 20:04:33, timsteele wrote: > The CL to migrate invalidation state also included the ...
7 years, 10 months ago (2013-02-05 21:35:56 UTC) #3
rlarocque
https://codereview.chromium.org/12094113/diff/2001/chrome/browser/sync/invalidations/invalidator_storage.cc File chrome/browser/sync/invalidations/invalidator_storage.cc (right): https://codereview.chromium.org/12094113/diff/2001/chrome/browser/sync/invalidations/invalidator_storage.cc#newcode269 chrome/browser/sync/invalidations/invalidator_storage.cc:269: pref_service_->GetString(prefs::kInvalidatorInvalidatorClientId) : ""; On 2013/02/05 20:04:33, timsteele wrote: > ...
7 years, 10 months ago (2013-02-05 21:36:56 UTC) #4
tim (not reviewing)
LGTM % nits. https://codereview.chromium.org/12094113/diff/10001/chrome/browser/sync/invalidations/invalidator_storage.cc File chrome/browser/sync/invalidations/invalidator_storage.cc (right): https://codereview.chromium.org/12094113/diff/10001/chrome/browser/sync/invalidations/invalidator_storage.cc#newcode270 chrome/browser/sync/invalidations/invalidator_storage.cc:270: std::string(); nit - indent 4 spaces ...
7 years, 10 months ago (2013-02-05 22:05:28 UTC) #5
rlarocque
https://codereview.chromium.org/12094113/diff/10001/chrome/browser/sync/invalidations/invalidator_storage.cc File chrome/browser/sync/invalidations/invalidator_storage.cc (right): https://codereview.chromium.org/12094113/diff/10001/chrome/browser/sync/invalidations/invalidator_storage.cc#newcode270 chrome/browser/sync/invalidations/invalidator_storage.cc:270: std::string(); On 2013/02/05 22:05:28, timsteele wrote: > nit - ...
7 years, 10 months ago (2013-02-05 22:16:45 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/12094113/11011
7 years, 10 months ago (2013-02-05 22:42:28 UTC) #7
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 10 months ago (2013-02-05 23:32:07 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/12094113/4005
7 years, 10 months ago (2013-02-06 00:12:04 UTC) #9
commit-bot: I haz the power
7 years, 10 months ago (2013-02-06 06:51:39 UTC) #10
Message was sent while issue was closed.
Change committed as 180907

Powered by Google App Engine
This is Rietveld 408576698