New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 843057 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Typed URLs should sync less often (or never) for page title changes

Project Member Reported by mastiz@chromium.org, May 15 2018

Issue description

We've received user reports (https://bugs.chromium.org/p/chromium/issues/detail?id=838323) that, according to our investigations, involve a browser committing type URLs at a very high rate, due to the page updating the title on a regular basis.

Because typed URLs use a nudge delay of 200ms, this hammers the sync servers, leading quickly to 429 HTTP responses (Too Many Requests).

Our first hypothesis is that the page in question might stay in loading state indefinitely, which would break the currently existing logic that prevents title updates from being synced: https://cs.chromium.org/chromium/src/chrome/browser/history/history_tab_helper.cc?l=189&rcl=7768dd454d5dd64a64c4d5c1d98a532c816628be

Assuming that's relevant, it seems like the logic didn't change with the recent USS migration, and we've always reacted to title updates (in the old components/history/core/browser/typed_url_syncable_service.cc).
 
Project Member

Comment 1 by bugdroid1@chromium.org, May 23 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2e4f63c9b4af9b28f2987a8679f95b9e0683f72f

commit 2e4f63c9b4af9b28f2987a8679f95b9e0683f72f
Author: Mikel Astiz <mastiz@chromium.org>
Date: Wed May 23 08:12:39 2018

Avoid too many title changes in history

Pages can use Javascript to update the title, which is an event that,
from history's perspective, we added support for quite recently in
https://chromium-review.googlesource.com/847697

We're mostly interested during page load, and the first few seconds
after loading has completed (just in case). However, some pages stay for
very long (even indefinitely) in loading state, so we should guard
against too many updates hammering history, which as side effect can
trigger sync.

We cap the max number of title updates per navigation, i.e. with a
shared counter for the full timespan during which title updates are
propagated to history (loading state and the few seconds after loaded).

Bug:  843057 
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I3eb8c4157b951ea2aae941510719256bd26491d7
Reviewed-on: https://chromium-review.googlesource.com/1060055
Commit-Queue: Mikel Astiz <mastiz@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561001}
[modify] https://crrev.com/2e4f63c9b4af9b28f2987a8679f95b9e0683f72f/chrome/browser/history/history_tab_helper.cc
[modify] https://crrev.com/2e4f63c9b4af9b28f2987a8679f95b9e0683f72f/chrome/browser/history/history_tab_helper.h
[add] https://crrev.com/2e4f63c9b4af9b28f2987a8679f95b9e0683f72f/chrome/browser/history/history_tab_helper_unittest.cc
[modify] https://crrev.com/2e4f63c9b4af9b28f2987a8679f95b9e0683f72f/chrome/test/BUILD.gn
[modify] https://crrev.com/2e4f63c9b4af9b28f2987a8679f95b9e0683f72f/components/history/core/browser/history_constants.cc
[modify] https://crrev.com/2e4f63c9b4af9b28f2987a8679f95b9e0683f72f/components/history/core/browser/history_constants.h
[modify] https://crrev.com/2e4f63c9b4af9b28f2987a8679f95b9e0683f72f/ios/chrome/browser/history/history_tab_helper.h
[modify] https://crrev.com/2e4f63c9b4af9b28f2987a8679f95b9e0683f72f/ios/chrome/browser/history/history_tab_helper.mm

Comment 2 by mastiz@chromium.org, May 23 2018

Status: Fixed (was: Assigned)

Sign in to add a comment