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

Issue 414953002: Make client tag IDs consistent in sync fake server (Closed)

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

Description

Make client tag IDs consistent in sync fake server Modifies the sync fake server so it derives the IDs for client-tagged items based on their model type and unique client tag. This fixes a race where two clients could simultaneously commit two client-tagged items with version == 0, and the two committed items would be assigned different IDs. The correct behavior, and that of the real sync server, is to assign the same IDs to items that have the same client tags. BUG=396859 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=285415

Patch Set 1 #

Total comments: 4

Patch Set 2 : Simplify unique client entity creation #

Patch Set 3 : Change FakeServer ID separator #

Total comments: 2

Patch Set 4 : Add comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -31 lines) Patch
M sync/test/fake_server/fake_server.cc View 1 1 chunk +1 line, -7 lines 0 comments Download
M sync/test/fake_server/fake_server_entity.cc View 1 2 3 1 chunk +5 lines, -1 line 0 comments Download
M sync/test/fake_server/unique_client_entity.h View 1 1 chunk +6 lines, -8 lines 0 comments Download
M sync/test/fake_server/unique_client_entity.cc View 1 2 chunks +7 lines, -15 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
rlarocque
Patrick, please review. Nick, we'll need your approval to get past the CQ.
6 years, 5 months ago (2014-07-23 22:59:04 UTC) #1
pval...(no longer on Chromium)
https://codereview.chromium.org/414953002/diff/1/sync/test/fake_server/fake_server.cc File sync/test/fake_server/fake_server.cc (left): https://codereview.chromium.org/414953002/diff/1/sync/test/fake_server/fake_server.cc#oldcode339 sync/test/fake_server/fake_server.cc:339: if (entities_.find(client_entity.id_string()) != entities_.end()) { Looking back at this, ...
6 years, 5 months ago (2014-07-23 23:54:16 UTC) #2
rlarocque
I've made the update you suggested. I've also noticed that I seem to have broken ...
6 years, 5 months ago (2014-07-24 00:18:40 UTC) #3
rlarocque
I found the problem that was breaking integration tests. It turns out that the separator ...
6 years, 5 months ago (2014-07-24 00:57:32 UTC) #4
rlarocque
I changed the separator to '_'. According to my reading of the modp_base64 source, this ...
6 years, 5 months ago (2014-07-24 17:42:02 UTC) #5
pval...(no longer on Chromium)
lgtm https://codereview.chromium.org/414953002/diff/40001/sync/test/fake_server/fake_server_entity.cc File sync/test/fake_server/fake_server_entity.cc (right): https://codereview.chromium.org/414953002/diff/40001/sync/test/fake_server/fake_server_entity.cc#newcode29 sync/test/fake_server/fake_server_entity.cc:29: // The separator used when formatting IDs. Can ...
6 years, 5 months ago (2014-07-24 18:10:18 UTC) #6
rlarocque
https://codereview.chromium.org/414953002/diff/40001/sync/test/fake_server/fake_server_entity.cc File sync/test/fake_server/fake_server_entity.cc (right): https://codereview.chromium.org/414953002/diff/40001/sync/test/fake_server/fake_server_entity.cc#newcode29 sync/test/fake_server/fake_server_entity.cc:29: // The separator used when formatting IDs. On 2014/07/24 ...
6 years, 5 months ago (2014-07-24 18:31:17 UTC) #7
maniscalco
lgtm
6 years, 5 months ago (2014-07-24 20:34:30 UTC) #8
rlarocque
The CQ bit was checked by rlarocque@chromium.org
6 years, 5 months ago (2014-07-24 20:35:32 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/414953002/60001
6 years, 5 months ago (2014-07-24 20:36:18 UTC) #10
commit-bot: I haz the power
6 years, 5 months ago (2014-07-24 23:53:25 UTC) #11
Message was sent while issue was closed.
Change committed as 285415

Powered by Google App Engine
This is Rietveld 408576698