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

Issue 11411041: sync: Retry soon when server returns conflict (Closed)

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

Description

sync: Retry soon when server returns conflict When the server gives us a conflict response, we ought to fetch updates in order to figure out what the server is complaining about, resolve any conflicts locally, then re-commit. The current syncer, although not intentionally built to handle this scenario, does the right thing. It considers the server's return code to be indicative of a transient error, so it backs off then retries later. The retry sync cycle will fetch updates, resolve conflicts, and recommit, which is exactly what we want. Unfortunately, the backoff can take five minutes. This commit reduces the time spent unnecessarily backing off. It's not the cleanest solution, but its implementation is easy and safe. BUG=157955 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=169158

Patch Set 1 #

Total comments: 1

Patch Set 2 : Update comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -17 lines) Patch
M sync/engine/backoff_delay_provider.cc View 1 1 chunk +12 lines, -0 lines 0 comments Download
M sync/engine/backoff_delay_provider_unittest.cc View 2 chunks +8 lines, -0 lines 0 comments Download
M sync/engine/process_commit_response_command.cc View 1 chunk +3 lines, -15 lines 0 comments Download
M sync/internal_api/public/util/syncer_error.h View 2 chunks +1 line, -1 line 0 comments Download
M sync/internal_api/public/util/syncer_error.cc View 2 chunks +1 line, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
rlarocque
Here's the simpler version of the server conflict handling patch. Please review.
8 years, 1 month ago (2012-11-16 20:30:01 UTC) #1
rlarocque
I had forgotten about this. Ping?
8 years, 1 month ago (2012-11-21 21:32:46 UTC) #2
tim (not reviewing)
LGTM with nit https://codereview.chromium.org/11411041/diff/1/sync/engine/backoff_delay_provider.cc File sync/engine/backoff_delay_provider.cc (right): https://codereview.chromium.org/11411041/diff/1/sync/engine/backoff_delay_provider.cc#newcode103 sync/engine/backoff_delay_provider.cc:103: // things. There's no need to ...
8 years, 1 month ago (2012-11-21 21:37:17 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/11411041/7001
8 years, 1 month ago (2012-11-21 21:45:05 UTC) #4
commit-bot: I haz the power
8 years, 1 month ago (2012-11-21 23:27:56 UTC) #5
Change committed as 169158

Powered by Google App Engine
This is Rietveld 408576698