New issue
Advanced search Search tips

Issue 674702 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 704726
Owner:
Closed: Apr 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

Downloads sometimes result in SavePageResult::ALREADY_EXISTS

Project Member Reported by dewittj@chromium.org, Dec 15 2016

Issue description

According to UMA (https://goto.google.com/lzpoo) we are failing around 1.5% of downloads with "ALREADY_EXISTS" result, which only happens when we try to save a page to the model with the same offline ID as an already existing page.  Due to the design of the model - offline IDs are random int64_t - this should only happen with 1/1e32 probability.


 
The histogram implies this behavior started in 55.0.2883.18

I believe the flow is this:
- User clicks download, ultimately resulting in a call to OfflinePageDownloadBridge::SavePageIfNotNavigatedAway
- That function always schedules a request with the RC, and grabs the request ID.
- That function also asks recent tab helper to save a page with the same request ID.

If for some reason they both complete, then ALREADY_EXISTS would be the result.

Interestingly, due to the archiver design, we will overwrite the file with the contents of the second download invisibly.
looks like https://crrev.com/02d38c0b50c55dadb98039dbc58a70ad2c7c8a15 is the offending commit.
Owner: petewil@chromium.org
Status: Assigned (was: Untriaged)
Might be a duplicate, but has additional info.
This might be saving a page over a page of the same name failing.  Now that we save each page to a GUID name, we should see a marked decrease.  

Comment 5 by chili@chromium.org, Feb 7 2017

Labels: Hotlist-Fixit
Labels: -Hotlist-Fixit
This is likely a longer investigation, and perhaps not a good candidate for the fixit.
Mergedinto: 704726
Status: Duplicate (was: Assigned)
 http://crbug.com/704726  will fix this.

Sign in to add a comment