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

Issue 124323002: IndexedDB: Fix cursor prefetching edge cases (Closed)

Created:
6 years, 11 months ago by jsbell
Modified:
6 years, 11 months ago
Reviewers:
dgrogan
CC:
chromium-reviews, jsbell, jam, alecflett, joi+watch-content_chromium.org, darin-cc_chromium.org, cmumford, dgrogan
Visibility:
Public.

Description

IndexedDB: Fix cursor prefetching edge cases Cursor prefetch caches must be discarded when other requests are made to ensure proper request sequencing. Two edge cases were handled improperly if new records was written just ahead of the cursor. * A reset occurring before the prefetch results were received would be ignored; since the newly records weren't in the prefetch data, the cursor wouldn't see them. * A reset occurring after the results are received would back up the cursor to before the new records, even though the prefetch itself is a "continue" and advanced past them already. The fix is to reset the cache on receipt if necessary, and to ensure the reset state accounts for the implicit advance. BUG=331570 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=243344 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=243421

Patch Set 1 #

Total comments: 2

Patch Set 2 : Simplified, added unit test #

Patch Set 3 : Fix test-only leak found by valgrind #

Unified diffs Side-by-side diffs Delta from patch set Stats (+83 lines, -8 lines) Patch
M content/browser/indexed_db/indexed_db_cursor.cc View 1 4 chunks +12 lines, -4 lines 0 comments Download
M content/child/indexed_db/indexed_db_dispatcher.h View 1 1 chunk +4 lines, -3 lines 0 comments Download
M content/child/indexed_db/webidbcursor_impl.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/child/indexed_db/webidbcursor_impl.cc View 1 chunk +8 lines, -0 lines 0 comments Download
M content/child/indexed_db/webidbcursor_impl_unittest.cc View 1 2 4 chunks +58 lines, -1 line 0 comments Download

Messages

Total messages: 12 (0 generated)
jsbell
FYI - needs unit tests in addition the layout test can land blink-side. (Similar to ...
6 years, 11 months ago (2014-01-03 23:04:00 UTC) #1
jsbell
https://codereview.chromium.org/124323002/diff/1/content/browser/indexed_db/indexed_db_cursor.cc File content/browser/indexed_db/indexed_db_cursor.cc (right): https://codereview.chromium.org/124323002/diff/1/content/browser/indexed_db/indexed_db_cursor.cc#newcode162 content/browser/indexed_db/indexed_db_cursor.cc:162: transaction_->ScheduleTask( I haven't convinced myself one way or another ...
6 years, 11 months ago (2014-01-03 23:05:11 UTC) #2
jsbell
https://codereview.chromium.org/124323002/diff/1/content/browser/indexed_db/indexed_db_cursor.cc File content/browser/indexed_db/indexed_db_cursor.cc (right): https://codereview.chromium.org/124323002/diff/1/content/browser/indexed_db/indexed_db_cursor.cc#newcode162 content/browser/indexed_db/indexed_db_cursor.cc:162: transaction_->ScheduleTask( On 2014/01/03 23:05:11, jsbell wrote: > I haven't ...
6 years, 11 months ago (2014-01-06 17:51:55 UTC) #3
jsbell
dgrogan@ - please take a look? Layout tests which more clearly demonstrate the problem are ...
6 years, 11 months ago (2014-01-06 18:48:26 UTC) #4
dgrogan
lgtm
6 years, 11 months ago (2014-01-06 22:43:50 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jsbell@chromium.org/124323002/140001
6 years, 11 months ago (2014-01-06 22:55:52 UTC) #6
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=242300
6 years, 11 months ago (2014-01-07 12:00:31 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jsbell@chromium.org/124323002/140001
6 years, 11 months ago (2014-01-07 17:29:45 UTC) #8
commit-bot: I haz the power
Change committed as 243344
6 years, 11 months ago (2014-01-07 18:52:49 UTC) #9
jsbell
Reverted due to a test-only leak. Fixed, resubmitting.
6 years, 11 months ago (2014-01-07 20:25:23 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jsbell@chromium.org/124323002/370001
6 years, 11 months ago (2014-01-07 20:25:57 UTC) #11
commit-bot: I haz the power
6 years, 11 months ago (2014-01-07 22:55:07 UTC) #12
Message was sent while issue was closed.
Change committed as 243421

Powered by Google App Engine
This is Rietveld 408576698