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

Issue 6812004: sync: Make nudge + config jobs reliable in SyncerThread2 (Closed)

Created:
9 years, 8 months ago by lipalani1
Modified:
9 years, 7 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

sync: Make nudge + config jobs reliable in SyncerThread2 We save nudges that are received during config. And execute them when mode changes to normal. We also save nudge and config jobs that fail due to any reason. Then we execute them either during exponential backoff or when we get connection. In short we are making the nudges and configs reliable. BUG=77820 TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=81701

Patch Set 1 #

Patch Set 2 : Fixing lint. #

Patch Set 3 : Fix a bug. #

Total comments: 8

Patch Set 4 : Fixing bugs. #

Patch Set 5 : Fixing a typo. #

Total comments: 14

Patch Set 6 : Fixing CR feedback. #

Total comments: 16

Patch Set 7 : Fixed CR feedback. #

Patch Set 8 : Fix CR feedback and all the unittests. #

Total comments: 48

Patch Set 9 : Fixing CR feedback. #

Total comments: 30

Patch Set 10 : Fixing CR feedback. #

Total comments: 2

Patch Set 11 : Fixing a bug with polling. #

Total comments: 14

Patch Set 12 : Fixing CR feedback. #

Total comments: 30

Patch Set 13 : Fixing CR feedback. #

Total comments: 35

Patch Set 14 : Fixing CR feedback. #

Patch Set 15 : Fixed a comment(it is the only change in this patch) #

Total comments: 1

Patch Set 16 : Fix sync backend host to call configure on right thread. #

Total comments: 8

Patch Set 17 : Fixing CR feedback. #

Patch Set 18 : Removing the test flag. #

Patch Set 19 : upload before commit. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+905 lines, -208 lines) Patch
M chrome/browser/sync/engine/mock_model_safe_workers.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/sync/engine/mock_model_safe_workers.cc View 1 2 3 4 5 6 7 8 9 1 chunk +15 lines, -0 lines 0 comments Download
M chrome/browser/sync/engine/syncer_thread2.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +122 lines, -35 lines 0 comments Download
M chrome/browser/sync/engine/syncer_thread2.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 chunks +351 lines, -159 lines 0 comments Download
M chrome/browser/sync/engine/syncer_thread2_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 chunks +158 lines, -5 lines 0 comments Download
A chrome/browser/sync/engine/syncer_thread2_whitebox_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +235 lines, -0 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/sync/glue/sync_backend_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +9 lines, -2 lines 0 comments Download
M chrome/browser/sync/profile_sync_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/sync/sessions/sync_session.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +9 lines, -6 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 41 (0 generated)
lipalani1
I still have to test it. Instead of going through the diffs it might make ...
9 years, 8 months ago (2011-04-07 01:02:39 UTC) #1
lipalani1
Fixed a bug. This is the latest.
9 years, 8 months ago (2011-04-07 01:06:30 UTC) #2
tim (not reviewing)
I think this approach is good, but I'm OCD about trying to keep the code ...
9 years, 8 months ago (2011-04-07 06:13:07 UTC) #3
lipalani1
Let me know how this sounds... http://codereview.chromium.org/6812004/diff/4001/chrome/browser/sync/engine/syncer_thread2.cc File chrome/browser/sync/engine/syncer_thread2.cc (right): http://codereview.chromium.org/6812004/diff/4001/chrome/browser/sync/engine/syncer_thread2.cc#newcode191 chrome/browser/sync/engine/syncer_thread2.cc:191: SyncerThread::JobProcessDecision SyncerThread::ShouldRunConfigureJob() { ...
9 years, 8 months ago (2011-04-07 18:35:45 UTC) #4
tim (not reviewing)
As we discussed, consider a canary job type or bool so that the subtlety of ...
9 years, 8 months ago (2011-04-07 20:52:58 UTC) #5
lipalani
this actually this looks pretty good. Does not have any of the messiness I was ...
9 years, 8 months ago (2011-04-07 20:59:52 UTC) #6
lipalani1
Fixed couple of bugs and added CR feedback. In particular: 1. A nudge is never ...
9 years, 8 months ago (2011-04-07 23:04:20 UTC) #7
lipalani1
Still havent cleaned up the ScheduleSyncSessionJob to make sure jobs are created in one place ...
9 years, 8 months ago (2011-04-07 23:05:59 UTC) #8
lipalani1
Fixed a typo!! I still have to write unit tests. I plan to do it ...
9 years, 8 months ago (2011-04-07 23:08:46 UTC) #9
lipalani1
Biggest change here: 1. got rid of the bool variables and moved to the original ...
9 years, 8 months ago (2011-04-08 03:16:21 UTC) #10
tim (not reviewing)
had a few comments on an older patchset that still apply. i'll look at the ...
9 years, 8 months ago (2011-04-08 03:37:46 UTC) #11
tim (not reviewing)
Hey Lingesh, please address the comments here and from last night. I'll take a look ...
9 years, 8 months ago (2011-04-08 18:08:04 UTC) #12
lipalani1
I will send the next CR with the unit tests. However let me know if ...
9 years, 8 months ago (2011-04-08 18:40:23 UTC) #13
tim (not reviewing)
http://codereview.chromium.org/6812004/diff/4005/chrome/browser/sync/engine/syncer_thread2.cc File chrome/browser/sync/engine/syncer_thread2.cc (right): http://codereview.chromium.org/6812004/diff/4005/chrome/browser/sync/engine/syncer_thread2.cc#newcode219 chrome/browser/sync/engine/syncer_thread2.cc:219: // let us retry once more. if the timer ...
9 years, 8 months ago (2011-04-08 20:57:41 UTC) #14
lipalani1
Fixed CR feedback. Added unit tests for DecideOnJob function. Now working on adding integration tests ...
9 years, 8 months ago (2011-04-08 23:45:59 UTC) #15
lipalani1
OK this patch has all the functionalities and all the unit tests and has CR ...
9 years, 8 months ago (2011-04-09 03:08:56 UTC) #16
tim (not reviewing)
please bear with me here! http://codereview.chromium.org/6812004/diff/1011/chrome/browser/sync/engine/mock_model_safe_workers.h File chrome/browser/sync/engine/mock_model_safe_workers.h (right): http://codereview.chromium.org/6812004/diff/1011/chrome/browser/sync/engine/mock_model_safe_workers.h#newcode33 chrome/browser/sync/engine/mock_model_safe_workers.h:33: static MockModelSafeWorkerRegistrar* SetPassiveTypes( s/SetPassiveTypes/WithPassiveTypes ...
9 years, 8 months ago (2011-04-09 23:52:58 UTC) #17
lipalani
Hi thanks this is great. In retrospect I should have moved the new type of ...
9 years, 8 months ago (2011-04-11 16:20:38 UTC) #18
lipalani1
Fixing CR feedback. Both integration and unit tests pass. http://codereview.chromium.org/6812004/diff/1011/chrome/browser/sync/engine/mock_model_safe_workers.h File chrome/browser/sync/engine/mock_model_safe_workers.h (right): http://codereview.chromium.org/6812004/diff/1011/chrome/browser/sync/engine/mock_model_safe_workers.h#newcode33 chrome/browser/sync/engine/mock_model_safe_workers.h:33: ...
9 years, 8 months ago (2011-04-12 02:33:00 UTC) #19
tim (not reviewing)
Getting there, starting to look much better! http://codereview.chromium.org/6812004/diff/1011/chrome/browser/sync/engine/syncer_thread2.cc File chrome/browser/sync/engine/syncer_thread2.cc (right): http://codereview.chromium.org/6812004/diff/1011/chrome/browser/sync/engine/syncer_thread2.cc#newcode227 chrome/browser/sync/engine/syncer_thread2.cc:227: if (job.purpose ...
9 years, 8 months ago (2011-04-12 06:09:28 UTC) #20
lipalani1
Fixed CR feedback. Currently doing manual testing with new profile, old profile, enabling/disabling types and ...
9 years, 8 months ago (2011-04-13 00:07:29 UTC) #21
lipalani
actually just found a small issue. ignore this. another CR to follow. On Tue, Apr ...
9 years, 8 months ago (2011-04-13 00:15:14 UTC) #22
lipalani1
All good. Please review.
9 years, 8 months ago (2011-04-13 00:49:02 UTC) #23
tim (not reviewing)
http://codereview.chromium.org/6812004/diff/12001/chrome/browser/sync/engine/syncer_thread2.cc File chrome/browser/sync/engine/syncer_thread2.cc (right): http://codereview.chromium.org/6812004/diff/12001/chrome/browser/sync/engine/syncer_thread2.cc#newcode225 chrome/browser/sync/engine/syncer_thread2.cc:225: pending_nudge_->session->Coalesce(*(job.session.get())); still here. http://codereview.chromium.org/6812004/diff/12001/chrome/browser/sync/engine/syncer_thread2.cc#newcode677 chrome/browser/sync/engine/syncer_thread2.cc:677: wait_interval_->had_nudge = false; hmm.. ...
9 years, 8 months ago (2011-04-13 19:49:06 UTC) #24
tim (not reviewing)
On 2011/04/13 19:49:06, timsteele wrote: > http://codereview.chromium.org/6812004/diff/12001/chrome/browser/sync/engine/syncer_thread2.cc > File chrome/browser/sync/engine/syncer_thread2.cc (right): > > http://codereview.chromium.org/6812004/diff/12001/chrome/browser/sync/engine/syncer_thread2.cc#newcode225 > ...
9 years, 8 months ago (2011-04-13 19:50:09 UTC) #25
lipalani1
Fixing CR feedback. http://codereview.chromium.org/6812004/diff/16001/chrome/browser/sync/engine/syncer_thread2.cc File chrome/browser/sync/engine/syncer_thread2.cc (right): http://codereview.chromium.org/6812004/diff/16001/chrome/browser/sync/engine/syncer_thread2.cc#newcode177 chrome/browser/sync/engine/syncer_thread2.cc:177: On 2011/04/13 19:49:07, timsteele wrote: > ...
9 years, 8 months ago (2011-04-13 20:31:59 UTC) #26
tim (not reviewing)
http://codereview.chromium.org/6812004/diff/16002/chrome/browser/sync/engine/syncer_thread2.cc File chrome/browser/sync/engine/syncer_thread2.cc (right): http://codereview.chromium.org/6812004/diff/16002/chrome/browser/sync/engine/syncer_thread2.cc#newcode101 chrome/browser/sync/engine/syncer_thread2.cc:101: DoPendingJobIfPossible(true); // set canary to true so this wont ...
9 years, 8 months ago (2011-04-13 21:40:18 UTC) #27
lipalani1
Fixing CR feedback. http://codereview.chromium.org/6812004/diff/16002/chrome/browser/sync/engine/syncer_thread2.cc File chrome/browser/sync/engine/syncer_thread2.cc (right): http://codereview.chromium.org/6812004/diff/16002/chrome/browser/sync/engine/syncer_thread2.cc#newcode101 chrome/browser/sync/engine/syncer_thread2.cc:101: DoPendingJobIfPossible(true); // set canary to true ...
9 years, 8 months ago (2011-04-13 22:45:13 UTC) #28
tim (not reviewing)
almost done, mostly just style now. http://codereview.chromium.org/6812004/diff/20001/chrome/browser/sync/engine/syncer_thread2.cc File chrome/browser/sync/engine/syncer_thread2.cc (right): http://codereview.chromium.org/6812004/diff/20001/chrome/browser/sync/engine/syncer_thread2.cc#newcode122 chrome/browser/sync/engine/syncer_thread2.cc:122: VLOG(1) << " ...
9 years, 8 months ago (2011-04-13 23:31:54 UTC) #29
lipalani1
Fixed the feeback. The function Docanaryjob has been poked a little. It does not check ...
9 years, 8 months ago (2011-04-14 00:51:07 UTC) #30
lipalani1
Fixed the feeback. The function Docanaryjob has been poked a little. It does not check ...
9 years, 8 months ago (2011-04-14 22:53:06 UTC) #31
tim (not reviewing)
just one clarification below, then should be good to go http://codereview.chromium.org/6812004/diff/20001/chrome/browser/sync/engine/syncer_thread2.h File chrome/browser/sync/engine/syncer_thread2.h (right): http://codereview.chromium.org/6812004/diff/20001/chrome/browser/sync/engine/syncer_thread2.h#newcode147 ...
9 years, 8 months ago (2011-04-14 23:09:44 UTC) #32
tim (not reviewing)
I also updated the patch title.
9 years, 8 months ago (2011-04-14 23:12:31 UTC) #33
Raghu Simha
http://codereview.chromium.org/6812004/diff/25001/chrome/test/live_sync/live_sync_test.cc File chrome/test/live_sync/live_sync_test.cc (right): http://codereview.chromium.org/6812004/diff/25001/chrome/test/live_sync/live_sync_test.cc#newcode181 chrome/test/live_sync/live_sync_test.cc:181: cl->AppendSwitch(switches::kNewSyncerThread); I'm not sure if you meant to permanently ...
9 years, 8 months ago (2011-04-14 23:19:15 UTC) #34
lipalani
oh sorry it will be removed. i am running the try bot now thats why ...
9 years, 8 months ago (2011-04-14 23:23:58 UTC) #35
lipalani1
Fixing the syncbackend host.
9 years, 8 months ago (2011-04-14 23:30:32 UTC) #36
tim (not reviewing)
some nits, but one legit question keeping me from approving the cl... setting server_connection_ok_ to ...
9 years, 8 months ago (2011-04-15 00:21:43 UTC) #37
lipalani1
Mac and Linux has passed with the connection set to false. waiting on windows. Rest ...
9 years, 8 months ago (2011-04-15 01:24:39 UTC) #38
lipalani1
Please review this one as well. I removed the kNewSyncerFlag which Previously I was passing ...
9 years, 8 months ago (2011-04-15 01:30:33 UTC) #39
tim (not reviewing)
The moment we've all been waiting for: LGTM
9 years, 8 months ago (2011-04-15 02:29:42 UTC) #40
lipalani
9 years, 8 months ago (2011-04-15 04:22:09 UTC) #41
wohoo.

all the bots pass as well. submitting.

On Thu, Apr 14, 2011 at 7:29 PM, <tim@chromium.org> wrote:

> The moment we've all been waiting for: LGTM
>
>
> http://codereview.chromium.org/6812004/
>

Powered by Google App Engine
This is Rietveld 408576698