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

Issue 56113003: Implement new invalidations ack tracking system (Closed)

Created:
7 years, 1 month ago by rlarocque
Modified:
7 years ago
CC:
chromium-reviews, tim+watch_chromium.org, chromium-apps-reviews_chromium.org, rsimha+watch_chromium.org, haitaol+watch_chromium.org, extensions-reviews_chromium.org
Visibility:
Public.

Description

Implement new invalidations ack tracking system Enable the new invalidation ack tracking API. This system allows the invalidations system to remember invalidations that have not been acted upon yet across browser restarts. New features include: - Supports saving multiple invalidation payloads per ObjectID. - Supports tracking lost or dropped invalidations. - Remembers "unknown version" invalidations across restarts. - Can send multiple payloads in a single callback. - Does not periodically ping unacked invalidations. A series of commits prior to this one have put much of the framework in place already. This CL does not change the types and signatures of client-facing APIs very much, but it does enable perviously disbaled behavior. This CL includes updates to the client code to allow them to support the new semantics with (hopefully) few changes to externally visible behavior. Most of the big changes are in the classes and tests associated with the internals of Invalidations. Large parts of the SyncInvalidationListener and InvalidatorStorage have been rewritten. BUG=233437 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=237421

Patch Set 1 #

Patch Set 2 : Fixes and cleanups #

Patch Set 3 : Fix DEPS #

Patch Set 4 : Rebase #

Total comments: 29

Patch Set 5 : Rebase #

Patch Set 6 : Review fixes #

Total comments: 4

Patch Set 7 : More review fixes #

Total comments: 9

Patch Set 8 : Add include #

Patch Set 9 : Fix issues in policy code #

Patch Set 10 : Revert InitAckHandler() changes #

Patch Set 11 : Modify drive TODO comment + rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1224 lines, -2622 lines) Patch
M chrome/browser/drive/drive_notification_manager.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -6 lines 0 comments Download
M chrome/browser/extensions/api/push_messaging/DEPS View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/push_messaging/push_messaging_apitest.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/api/push_messaging/push_messaging_invalidation_handler.h View 3 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/push_messaging/push_messaging_invalidation_handler.cc View 1 2 3 4 3 chunks +26 lines, -7 lines 0 comments Download
M chrome/browser/extensions/api/push_messaging/push_messaging_invalidation_handler_unittest.cc View 5 chunks +43 lines, -20 lines 0 comments Download
M chrome/browser/invalidation/fake_invalidation_service.h View 3 chunks +10 lines, -17 lines 0 comments Download
M chrome/browser/invalidation/fake_invalidation_service.cc View 3 chunks +20 lines, -37 lines 0 comments Download
M chrome/browser/invalidation/invalidation_service.h View 2 chunks +0 lines, -6 lines 0 comments Download
M chrome/browser/invalidation/invalidation_service_android.h View 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/browser/invalidation/invalidation_service_android.cc View 1 2 3 4 2 chunks +1 line, -7 lines 0 comments Download
M chrome/browser/invalidation/invalidator_storage.h View 1 2 3 4 3 chunks +5 lines, -26 lines 0 comments Download
M chrome/browser/invalidation/invalidator_storage.cc View 1 2 3 4 5 4 chunks +47 lines, -245 lines 0 comments Download
M chrome/browser/invalidation/invalidator_storage_unittest.cc View 1 2 3 4 5 4 chunks +36 lines, -438 lines 0 comments Download
M chrome/browser/invalidation/p2p_invalidation_service.h View 2 chunks +0 lines, -4 lines 0 comments Download
M chrome/browser/invalidation/p2p_invalidation_service.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/invalidation/ticl_invalidation_service.h View 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/browser/invalidation/ticl_invalidation_service.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +1 line, -10 lines 0 comments Download
M chrome/browser/policy/cloud/DEPS View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/policy/cloud/cloud_policy_invalidator.h View 1 2 3 4 5 6 7 2 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/policy/cloud/cloud_policy_invalidator.cc View 1 2 3 4 5 6 7 8 5 chunks +18 lines, -6 lines 0 comments Download
M chrome/browser/policy/cloud/cloud_policy_invalidator_unittest.cc View 1 2 3 4 5 6 7 8 9 10 24 chunks +75 lines, -64 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host_core.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/glue/sync_backend_host_core.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/glue/sync_backend_host_impl.h View 1 2 3 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host_impl.cc View 1 2 3 2 chunks +2 lines, -8 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_android.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 4 1 chunk +1 line, -3 lines 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 4 2 chunks +3 lines, -9 lines 0 comments Download
M sync/engine/sync_scheduler.h View 1 2 3 4 2 chunks +1 line, -1 line 0 comments Download
M sync/internal_api/public/base/invalidation.h View 7 8 9 1 chunk +30 lines, -7 lines 0 comments Download
M sync/internal_api/public/base/invalidation.cc View 1 7 8 9 2 chunks +6 lines, -8 lines 0 comments Download
M sync/internal_api/public/base/model_type_test_util.cc View 1 chunk +1 line, -0 lines 0 comments Download
M sync/internal_api/sync_manager_impl.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -2 lines 0 comments Download
D sync/notifier/ack_tracker.h View 1 chunk +0 lines, -111 lines 0 comments Download
D sync/notifier/ack_tracker.cc View 1 chunk +0 lines, -221 lines 0 comments Download
D sync/notifier/ack_tracker_unittest.cc View 1 chunk +0 lines, -352 lines 0 comments Download
M sync/notifier/fake_invalidation_handler.h View 1 chunk +1 line, -0 lines 0 comments Download
M sync/notifier/fake_invalidation_state_tracker.h View 1 chunk +4 lines, -14 lines 0 comments Download
M sync/notifier/fake_invalidation_state_tracker.cc View 2 chunks +9 lines, -50 lines 0 comments Download
M sync/notifier/fake_invalidator.h View 2 chunks +0 lines, -3 lines 0 comments Download
M sync/notifier/fake_invalidator.cc View 1 2 3 4 5 6 2 chunks +2 lines, -5 lines 0 comments Download
M sync/notifier/invalidation_handler.h View 1 chunk +2 lines, -1 line 0 comments Download
M sync/notifier/invalidation_notifier.h View 6 chunks +2 lines, -10 lines 0 comments Download
M sync/notifier/invalidation_notifier.cc View 3 chunks +4 lines, -10 lines 0 comments Download
M sync/notifier/invalidation_notifier_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M sync/notifier/invalidation_state_tracker.h View 1 2 3 4 5 3 chunks +7 lines, -44 lines 0 comments Download
M sync/notifier/invalidation_state_tracker.cc View 1 chunk +0 lines, -24 lines 0 comments Download
M sync/notifier/invalidator.h View 2 chunks +0 lines, -5 lines 0 comments Download
M sync/notifier/invalidator_registrar_unittest.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M sync/notifier/invalidator_test_template.h View 1 chunk +0 lines, -1 line 0 comments Download
M sync/notifier/mock_ack_handler.h View 1 chunk +1 line, -1 line 0 comments Download
M sync/notifier/non_blocking_invalidator.h View 3 chunks +1 line, -5 lines 0 comments Download
M sync/notifier/non_blocking_invalidator.cc View 8 chunks +6 lines, -27 lines 0 comments Download
M sync/notifier/non_blocking_invalidator_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M sync/notifier/object_id_invalidation_map.h View 1 chunk +3 lines, -0 lines 0 comments Download
M sync/notifier/object_id_invalidation_map.cc View 1 chunk +9 lines, -0 lines 0 comments Download
M sync/notifier/p2p_invalidator.h View 1 chunk +0 lines, -2 lines 0 comments Download
M sync/notifier/p2p_invalidator.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M sync/notifier/p2p_invalidator_unittest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M sync/notifier/sync_invalidation_listener.h View 1 2 3 4 5 6 9 chunks +34 lines, -31 lines 0 comments Download
M sync/notifier/sync_invalidation_listener.cc View 1 2 3 4 5 6 7 8 9 14 chunks +118 lines, -174 lines 0 comments Download
M sync/notifier/sync_invalidation_listener_unittest.cc View 22 chunks +424 lines, -314 lines 0 comments Download
M sync/notifier/unacked_invalidation_set.h View 2 chunks +5 lines, -1 line 0 comments Download
A sync/notifier/unacked_invalidation_set_test_util.h View 1 chunk +25 lines, -0 lines 0 comments Download
A sync/notifier/unacked_invalidation_set_test_util.cc View 1 2 3 4 5 1 chunk +181 lines, -0 lines 0 comments Download
M sync/notifier/unacked_invalidation_set_unittest.cc View 4 chunks +4 lines, -176 lines 0 comments Download
M sync/sessions/nudge_tracker.h View 1 chunk +3 lines, -1 line 0 comments Download
M sync/sessions/nudge_tracker_unittest.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M sync/sync_internal_api.gypi View 1 chunk +1 line, -0 lines 0 comments Download
M sync/sync_notifier.gypi View 3 chunks +2 lines, -3 lines 0 comments Download
M sync/sync_tests.gypi View 1 2 3 4 5 6 7 8 9 10 3 chunks +4 lines, -5 lines 0 comments Download
M sync/test/engine/mock_connection_manager.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -12 lines 0 comments Download
M sync/tools/null_invalidation_state_tracker.h View 1 1 chunk +4 lines, -13 lines 0 comments Download
M sync/tools/null_invalidation_state_tracker.cc View 1 2 chunks +6 lines, -32 lines 0 comments Download
M sync/tools/sync_client.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M sync/tools/sync_listen_notifications.cc View 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 23 (0 generated)
rlarocque
Here's the final patch in this series. Although it touches a lot of files, most ...
7 years, 1 month ago (2013-11-11 21:10:11 UTC) #1
rlarocque
+Pavel. Pavel might have to maintain some of this code in the future. He should ...
7 years, 1 month ago (2013-11-14 20:20:13 UTC) #2
tim (not reviewing)
Still reviewing SyncInvalidationListener. From what I can tell and your description, the rest of the ...
7 years, 1 month ago (2013-11-18 21:59:05 UTC) #3
rlarocque
https://codereview.chromium.org/56113003/diff/130001/chrome/browser/drive/drive_notification_manager.cc File chrome/browser/drive/drive_notification_manager.cc (right): https://codereview.chromium.org/56113003/diff/130001/chrome/browser/drive/drive_notification_manager.cc#newcode79 chrome/browser/drive/drive_notification_manager.cc:79: // TODO: Acknowledge only after fetch completes. On 2013/11/18 ...
7 years, 1 month ago (2013-11-19 00:35:48 UTC) #4
tim (not reviewing)
7 years, 1 month ago (2013-11-20 03:21:56 UTC) #5
tim (not reviewing)
https://codereview.chromium.org/56113003/diff/130001/sync/internal_api/public/base/invalidation.cc File sync/internal_api/public/base/invalidation.cc (right): https://codereview.chromium.org/56113003/diff/130001/sync/internal_api/public/base/invalidation.cc#newcode115 sync/internal_api/public/base/invalidation.cc:115: ack_handler_ = handler; At the very least, this shouldn't ...
7 years, 1 month ago (2013-11-20 18:27:04 UTC) #6
tim (not reviewing)
https://codereview.chromium.org/56113003/diff/130001/sync/notifier/sync_invalidation_listener.cc File sync/notifier/sync_invalidation_listener.cc (right): https://codereview.chromium.org/56113003/diff/130001/sync/notifier/sync_invalidation_listener.cc#newcode356 sync/notifier/sync_invalidation_listener.cc:356: EmitInvalidations(object_id_invalidation_map); On 2013/11/20 18:27:04, timsteele wrote: > Add a ...
7 years, 1 month ago (2013-11-20 18:27:43 UTC) #7
akalin
took a look. couple of comments, but other than that I think I'll leave the ...
7 years, 1 month ago (2013-11-21 04:31:35 UTC) #8
rlarocque
I think the latest upload addresses all of your comments. I'm a bit unsure since ...
7 years, 1 month ago (2013-11-21 20:09:26 UTC) #9
tim (not reviewing)
Changes I reviewed & commented on LGTM. https://codereview.chromium.org/56113003/diff/130001/sync/notifier/sync_invalidation_listener.cc File sync/notifier/sync_invalidation_listener.cc (right): https://codereview.chromium.org/56113003/diff/130001/sync/notifier/sync_invalidation_listener.cc#newcode211 sync/notifier/sync_invalidation_listener.cc:211: invalidation_state_tracker_.Call( On ...
7 years, 1 month ago (2013-11-22 01:24:53 UTC) #10
rlarocque
Thanks for the review. https://codereview.chromium.org/56113003/diff/130001/sync/notifier/sync_invalidation_listener.cc File sync/notifier/sync_invalidation_listener.cc (right): https://codereview.chromium.org/56113003/diff/130001/sync/notifier/sync_invalidation_listener.cc#newcode211 sync/notifier/sync_invalidation_listener.cc:211: invalidation_state_tracker_.Call( On 2013/11/22 01:24:54, timsteele ...
7 years, 1 month ago (2013-11-22 21:03:31 UTC) #11
rlarocque
Hi Everyone, Remember https://codereview.chromium.org/23441042, the CL that refactored the invalidations types? It's time for another ...
7 years, 1 month ago (2013-11-22 21:20:36 UTC) #12
satorux1
chrome/browser/drive/drive_notification_manager.cc lgtm https://codereview.chromium.org/56113003/diff/600001/chrome/browser/drive/drive_notification_manager.cc File chrome/browser/drive/drive_notification_manager.cc (right): https://codereview.chromium.org/56113003/diff/600001/chrome/browser/drive/drive_notification_manager.cc#newcode79 chrome/browser/drive/drive_notification_manager.cc:79: // TODO: Acknowledge only after fetch completes. ...
7 years ago (2013-11-25 01:57:45 UTC) #13
Joao da Silva
policy lgtm. Steve should have a look too though https://codereview.chromium.org/56113003/diff/600001/chrome/browser/policy/cloud/cloud_policy_invalidator.h File chrome/browser/policy/cloud/cloud_policy_invalidator.h (right): https://codereview.chromium.org/56113003/diff/600001/chrome/browser/policy/cloud/cloud_policy_invalidator.h#newcode171 chrome/browser/policy/cloud/cloud_policy_invalidator.h:171: ...
7 years ago (2013-11-25 10:11:18 UTC) #14
rlarocque
https://codereview.chromium.org/56113003/diff/600001/chrome/browser/drive/drive_notification_manager.cc File chrome/browser/drive/drive_notification_manager.cc (right): https://codereview.chromium.org/56113003/diff/600001/chrome/browser/drive/drive_notification_manager.cc#newcode79 chrome/browser/drive/drive_notification_manager.cc:79: // TODO: Acknowledge only after fetch completes. See crbug.com/320878. ...
7 years ago (2013-11-25 19:34:23 UTC) #15
Steve Condie
policy code LGTM after minor comments https://codereview.chromium.org/56113003/diff/600001/chrome/browser/policy/cloud/cloud_policy_invalidator.cc File chrome/browser/policy/cloud/cloud_policy_invalidator.cc (right): https://codereview.chromium.org/56113003/diff/600001/chrome/browser/policy/cloud/cloud_policy_invalidator.cc#newcode338 chrome/browser/policy/cloud/cloud_policy_invalidator.cc:338: // Cancel any ...
7 years ago (2013-11-25 19:57:28 UTC) #16
rlarocque
Uploaded some fixes from client-specific reviews. Also reverted a change I made in response to ...
7 years ago (2013-11-25 21:51:24 UTC) #17
dcheng
chrome/browser/extensions/api/push_messaging/* LGTM
7 years ago (2013-11-26 03:19:05 UTC) #18
rlarocque
Thanks for the reviews, everyone! I've made a few changes following the reviews: - I've ...
7 years ago (2013-11-26 17:59:17 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/56113003/780001
7 years ago (2013-11-26 20:59:13 UTC) #20
commit-bot: I haz the power
Retried try job too often on mac_rel for step(s) telemetry_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_rel&number=193586
7 years ago (2013-11-26 21:45:34 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/56113003/780001
7 years ago (2013-11-26 21:47:50 UTC) #22
commit-bot: I haz the power
7 years ago (2013-11-26 22:46:37 UTC) #23
Message was sent while issue was closed.
Change committed as 237421

Powered by Google App Engine
This is Rietveld 408576698