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

Issue 1393393007: [sql] Track uploads of diagnostic data to prevent duplication. (Closed)

Created:
5 years, 2 months ago by Scott Hess - ex-Googler
Modified:
5 years, 2 months ago
Reviewers:
pkotwicz, sky
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[sql] Track uploads of diagnostic data to prevent duplication. The ThumbnailDatabase error handler attempts to capture generic data about the error, which is then uploaded for diagnostics with DumpWithoutCrashing(). Database with errors which are not repaired upload new dumps repeatedly. This change adds a tracking file alongside the database file, which has the dual purpose of recording whether a previous dump was attempted, and also verifying that files can be created in the profile directory. If the profile directory is too broken to create files, then diagnostic data is unlikely to inform a fix. BUG=543321, 362505, 526614, 240396 Committed: https://crrev.com/c8cd2a161947886dab169caa0aa656230f2928ec Cr-Commit-Position: refs/heads/master@{#355632}

Patch Set 1 #

Patch Set 2 : missing FILE_PATH_LITERAL #

Total comments: 16

Patch Set 3 : Move sql::Connection methods with no changes. #

Patch Set 4 : Other changes from pkotwicz #

Total comments: 4

Patch Set 5 : Another comment tweak #

Total comments: 2

Patch Set 6 : Shift diagnostic generation and reporting to sql::Connection. #

Total comments: 13

Patch Set 7 : Collect{Error/Corruption}Info test #

Patch Set 8 : Mojo can't get the size, sigh. #

Total comments: 6

Patch Set 9 : review nits. #

Patch Set 10 : Bail out EVEN MORE. #

Patch Set 11 : Oh, mojo #

Unified diffs Side-by-side diffs Delta from patch set Stats (+423 lines, -186 lines) Patch
M components/history/core/browser/thumbnail_database.cc View 1 2 3 4 5 6 7 8 5 chunks +16 lines, -162 lines 0 comments Download
M sql/connection.h View 1 2 3 4 5 6 5 chunks +37 lines, -1 line 0 comments Download
M sql/connection.cc View 1 2 3 4 5 6 7 8 9 3 chunks +273 lines, -0 lines 0 comments Download
M sql/connection_unittest.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +97 lines, -23 lines 0 comments Download

Messages

Total messages: 43 (10 generated)
Scott Hess - ex-Googler
missing FILE_PATH_LITERAL
5 years, 2 months ago (2015-10-14 23:06:24 UTC) #1
Scott Hess - ex-Googler
I think I had you review the original code, so... I'm polishing this off both ...
5 years, 2 months ago (2015-10-14 23:35:13 UTC) #3
pkotwicz
LGTM https://codereview.chromium.org/1393393007/diff/20001/components/history/core/browser/thumbnail_database.cc File components/history/core/browser/thumbnail_database.cc (right): https://codereview.chromium.org/1393393007/diff/20001/components/history/core/browser/thumbnail_database.cc#newcode258 components/history/core/browser/thumbnail_database.cc:258: return; Nit - I think that this is ...
5 years, 2 months ago (2015-10-15 18:02:30 UTC) #4
Scott Hess - ex-Googler
Move sql::Connection methods with no changes.
5 years, 2 months ago (2015-10-15 21:08:25 UTC) #5
Scott Hess - ex-Googler
Other changes from pkotwicz
5 years, 2 months ago (2015-10-15 21:10:12 UTC) #6
Scott Hess - ex-Googler
For purposes of reviewing changes incrementally, moving the functions is in one patch, then editing ...
5 years, 2 months ago (2015-10-15 21:12:21 UTC) #7
Scott Hess - ex-Googler
https://codereview.chromium.org/1393393007/diff/60001/sql/connection.cc File sql/connection.cc (right): https://codereview.chromium.org/1393393007/diff/60001/sql/connection.cc#newcode290 sql/connection.cc:290: db_path.DirName().Append(FILE_PATH_LITERAL("sqlite-diag"))); Hmm. I am considering using this file to ...
5 years, 2 months ago (2015-10-15 21:24:44 UTC) #8
pkotwicz
Still LGTM https://codereview.chromium.org/1393393007/diff/20001/sql/connection.cc File sql/connection.cc (right): https://codereview.chromium.org/1393393007/diff/20001/sql/connection.cc#newcode1640 sql/connection.cc:1640: breadcrumb_path.AddExtension(FILE_PATH_LITERAL("new")); Fair enough https://codereview.chromium.org/1393393007/diff/20001/sql/connection.h File sql/connection.h (right): ...
5 years, 2 months ago (2015-10-15 23:31:06 UTC) #9
Scott Hess - ex-Googler
Another comment tweak
5 years, 2 months ago (2015-10-15 23:44:14 UTC) #10
Scott Hess - ex-Googler
Thanks for the review! Adding sky@ as owner on thumbnail_database.cc. This is my alternative to ...
5 years, 2 months ago (2015-10-15 23:46:24 UTC) #12
sky
https://codereview.chromium.org/1393393007/diff/80001/components/history/core/browser/thumbnail_database.cc File components/history/core/browser/thumbnail_database.cc (right): https://codereview.chromium.org/1393393007/diff/80001/components/history/core/browser/thumbnail_database.cc#newcode259 components/history/core/browser/thumbnail_database.cc:259: if (rand < kCorruptReportsPerMillion && db->RegisterIntentToUpload()) Naming is hard, ...
5 years, 2 months ago (2015-10-16 15:07:24 UTC) #13
Scott Hess - ex-Googler
https://codereview.chromium.org/1393393007/diff/80001/components/history/core/browser/thumbnail_database.cc File components/history/core/browser/thumbnail_database.cc (right): https://codereview.chromium.org/1393393007/diff/80001/components/history/core/browser/thumbnail_database.cc#newcode259 components/history/core/browser/thumbnail_database.cc:259: if (rand < kCorruptReportsPerMillion && db->RegisterIntentToUpload()) On 2015/10/16 15:07:24, ...
5 years, 2 months ago (2015-10-16 15:27:43 UTC) #14
pkotwicz
if (one_test && db->ShouldReportError()) { db->GoingToReportError(); ReportError(...); } sounds good to me. I think it ...
5 years, 2 months ago (2015-10-16 17:35:07 UTC) #15
Scott Hess - ex-Googler
On 2015/10/16 17:35:07, pkotwicz wrote: > if (one_test && db->ShouldReportError()) { > db->GoingToReportError(); > ReportError(...); ...
5 years, 2 months ago (2015-10-16 17:50:35 UTC) #16
pkotwicz
That sounds like a reasonable proposal. ReportError() and ReportCorrupt() should run at most once per ...
5 years, 2 months ago (2015-10-16 18:33:14 UTC) #17
Scott Hess - ex-Googler
Shift diagnostic generation and reporting to sql::Connection.
5 years, 2 months ago (2015-10-19 22:01:24 UTC) #19
Scott Hess - ex-Googler
On 2015/10/16 18:33:14, pkotwicz wrote: > That sounds like a reasonable proposal. ReportError() and ReportCorrupt() ...
5 years, 2 months ago (2015-10-19 22:23:41 UTC) #20
Scott Hess - ex-Googler
Collect{Error/Corruption}Info test
5 years, 2 months ago (2015-10-19 22:51:20 UTC) #21
Scott Hess - ex-Googler
On 2015/10/19 22:23:41, Scott Hess wrote: > I was thinking "Maybe I should test the ...
5 years, 2 months ago (2015-10-19 22:52:50 UTC) #22
Scott Hess - ex-Googler
Mojo can't get the size, sigh.
5 years, 2 months ago (2015-10-20 00:06:01 UTC) #23
pkotwicz
LGTM https://codereview.chromium.org/1393393007/diff/160001/components/history/core/browser/thumbnail_database.cc File components/history/core/browser/thumbnail_database.cc (right): https://codereview.chromium.org/1393393007/diff/160001/components/history/core/browser/thumbnail_database.cc#newcode139 components/history/core/browser/thumbnail_database.cc:139: uint64 rand = base::RandGenerator(1000000); Nit: Would it be ...
5 years, 2 months ago (2015-10-21 15:23:33 UTC) #24
sky
LGTM
5 years, 2 months ago (2015-10-21 15:28:08 UTC) #25
Scott Hess - ex-Googler
review nits.
5 years, 2 months ago (2015-10-22 00:16:05 UTC) #26
Scott Hess - ex-Googler
Thanks. https://codereview.chromium.org/1393393007/diff/160001/components/history/core/browser/thumbnail_database.cc File components/history/core/browser/thumbnail_database.cc (right): https://codereview.chromium.org/1393393007/diff/160001/components/history/core/browser/thumbnail_database.cc#newcode139 components/history/core/browser/thumbnail_database.cc:139: uint64 rand = base::RandGenerator(1000000); On 2015/10/21 15:23:33, pkotwicz ...
5 years, 2 months ago (2015-10-22 00:22:11 UTC) #27
Scott Hess - ex-Googler
Bail out EVEN MORE.
5 years, 2 months ago (2015-10-22 00:22:20 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1393393007/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1393393007/200001
5 years, 2 months ago (2015-10-22 00:22:54 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/129890)
5 years, 2 months ago (2015-10-22 01:16:18 UTC) #33
Scott Hess - ex-Googler
Oh, mojo
5 years, 2 months ago (2015-10-22 17:47:43 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1393393007/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1393393007/220001
5 years, 2 months ago (2015-10-22 17:48:20 UTC) #37
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/124410)
5 years, 2 months ago (2015-10-22 19:15:23 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1393393007/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1393393007/220001
5 years, 2 months ago (2015-10-22 19:30:16 UTC) #41
commit-bot: I haz the power
Committed patchset #11 (id:220001)
5 years, 2 months ago (2015-10-22 20:30:54 UTC) #42
commit-bot: I haz the power
5 years, 2 months ago (2015-10-22 20:31:51 UTC) #43
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/c8cd2a161947886dab169caa0aa656230f2928ec
Cr-Commit-Position: refs/heads/master@{#355632}

Powered by Google App Engine
This is Rietveld 408576698