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

Issue 11441026: [Sync] Add support for loading, updating and querying delete journals in (Closed)

Created:
8 years ago by haitaol1
Modified:
7 years, 11 months ago
CC:
chromium-reviews, Raghu Simha, haitaol1, akalin, tim (not reviewing)
Visibility:
Public.

Description

[Sync] Add support for loading, updating and querying delete journals in Directory. Delete journals keeps deleted metas until the persistence of the deletes in native model is confirmed. When an entry is deleted in sync model, a copy is added to delete journals in memory and saved in database later. Next time when the client restarts, if some native data doesn't match with sync data but matches with a delete journal, it's safe to assume that it's because native delete was not persisted and the native data should be deleted. This helps prevent back-from-dead problem due to native model and sync model get out-of-sync. BUG=121928 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=175248

Patch Set 1 #

Patch Set 2 : rebase and update #

Total comments: 8

Patch Set 3 : delete journal type from both local and server specifics #

Patch Set 4 : #

Total comments: 26

Patch Set 5 : #

Total comments: 2

Patch Set 6 : #

Patch Set 7 : move delete journal to its own class #

Patch Set 8 : make IsDeleteJournalEnabled() public #

Total comments: 8

Patch Set 9 : rebase and update #

Total comments: 8

Patch Set 10 : #

Total comments: 10

Patch Set 11 : #

Patch Set 12 : #

Patch Set 13 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+603 lines, -98 lines) Patch
M sync/sync.gyp View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
A sync/syncable/delete_journal.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +103 lines, -0 lines 0 comments Download
A sync/syncable/delete_journal.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +144 lines, -0 lines 0 comments Download
M sync/syncable/directory.h View 1 2 3 4 5 6 7 8 6 chunks +10 lines, -10 lines 0 comments Download
M sync/syncable/directory.cc View 1 2 3 4 5 6 7 8 9 11 chunks +27 lines, -7 lines 0 comments Download
M sync/syncable/directory_backing_store.h View 1 2 3 4 5 6 7 8 4 chunks +22 lines, -5 lines 0 comments Download
M sync/syncable/directory_backing_store.cc View 1 2 3 4 5 6 7 8 7 chunks +99 lines, -56 lines 0 comments Download
M sync/syncable/directory_backing_store_unittest.cc View 1 2 3 4 5 6 7 8 9 10 9 chunks +20 lines, -12 lines 0 comments Download
M sync/syncable/entry_kernel.h View 1 2 3 4 5 6 7 8 2 chunks +13 lines, -0 lines 0 comments Download
M sync/syncable/in_memory_directory_backing_store.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M sync/syncable/in_memory_directory_backing_store.cc View 1 2 3 4 5 6 2 chunks +3 lines, -0 lines 0 comments Download
M sync/syncable/invalid_directory_backing_store.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M sync/syncable/invalid_directory_backing_store.cc View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M sync/syncable/mutable_entry.cc View 1 2 3 4 5 6 7 8 1 chunk +12 lines, -1 line 0 comments Download
M sync/syncable/on_disk_directory_backing_store.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M sync/syncable/on_disk_directory_backing_store.cc View 1 2 3 4 5 6 4 chunks +9 lines, -3 lines 0 comments Download
M sync/syncable/syncable_base_transaction.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M sync/syncable/syncable_unittest.cc View 1 2 3 4 5 6 7 8 9 4 chunks +127 lines, -3 lines 0 comments Download
M sync/syncable/syncable_write_transaction.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M sync/test/test_directory_backing_store.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M sync/test/test_directory_backing_store.cc View 1 2 3 4 5 6 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
tim (not reviewing)
Couple comments. Also, were you planning on adding the DeleteJournal wrapper to this CL or ...
8 years ago (2012-12-13 02:48:10 UTC) #1
haitaol1
Added delete_journal.h/cc in 11533008 (delete dead bookmarks using journal) https://codereview.chromium.org/11441026/diff/2001/sync/syncable/directory.cc File sync/syncable/directory.cc (right): https://codereview.chromium.org/11441026/diff/2001/sync/syncable/directory.cc#newcode251 sync/syncable/directory.cc:251: ...
8 years ago (2012-12-13 21:34:21 UTC) #2
tim (not reviewing)
https://codereview.chromium.org/11441026/diff/8001/sync/syncable/directory.cc File sync/syncable/directory.cc (right): https://codereview.chromium.org/11441026/diff/8001/sync/syncable/directory.cc#newcode249 sync/syncable/directory.cc:249: void Directory::UpdateDeleteJournals(BaseTransaction* trans, UpdateDeleteJournals sounds a bit more general ...
8 years ago (2012-12-13 23:41:30 UTC) #3
haitaol1
https://codereview.chromium.org/11441026/diff/8001/sync/syncable/directory.cc File sync/syncable/directory.cc (right): https://codereview.chromium.org/11441026/diff/8001/sync/syncable/directory.cc#newcode249 sync/syncable/directory.cc:249: void Directory::UpdateDeleteJournals(BaseTransaction* trans, On 2012/12/13 23:41:30, timsteele wrote: > ...
8 years ago (2012-12-14 19:22:38 UTC) #4
tim (not reviewing)
Ok, I'm getting the hang of this now! Thanks for bearing with me ... https://codereview.chromium.org/11441026/diff/8001/sync/syncable/directory.cc ...
8 years ago (2012-12-14 20:12:38 UTC) #5
haitaol1
https://codereview.chromium.org/11441026/diff/8001/sync/syncable/directory.cc File sync/syncable/directory.cc (right): https://codereview.chromium.org/11441026/diff/8001/sync/syncable/directory.cc#newcode105 sync/syncable/directory.cc:105: STLDeleteElements(&dirty_metas); It doesn't need to be deleted because it's ...
8 years ago (2012-12-14 23:15:36 UTC) #6
haitaol1
Moved delete journal code to delete_journal.h/cc. PTAL
8 years ago (2012-12-17 21:05:53 UTC) #7
tim (not reviewing)
Looking good, nice comments in delete_journal.h. https://codereview.chromium.org/11441026/diff/29001/sync/syncable/delete_journal.cc File sync/syncable/delete_journal.cc (right): https://codereview.chromium.org/11441026/diff/29001/sync/syncable/delete_journal.cc#newcode27 sync/syncable/delete_journal.cc:27: // Should be ...
8 years ago (2012-12-21 03:30:40 UTC) #8
haitaol1
https://codereview.chromium.org/11441026/diff/29001/sync/syncable/delete_journal.cc File sync/syncable/delete_journal.cc (right): https://codereview.chromium.org/11441026/diff/29001/sync/syncable/delete_journal.cc#newcode27 sync/syncable/delete_journal.cc:27: // Should be sufficient to check server type only ...
7 years, 11 months ago (2013-01-03 19:40:49 UTC) #9
tim (not reviewing)
Few more comments. https://codereview.chromium.org/11441026/diff/35001/sync/syncable/delete_journal.cc File sync/syncable/delete_journal.cc (right): https://codereview.chromium.org/11441026/diff/35001/sync/syncable/delete_journal.cc#newcode23 sync/syncable/delete_journal.cc:23: return delete_journals_.size(); Shouldn't you be using ...
7 years, 11 months ago (2013-01-04 15:35:46 UTC) #10
haitaol1
https://codereview.chromium.org/11441026/diff/35001/sync/syncable/delete_journal.cc File sync/syncable/delete_journal.cc (right): https://codereview.chromium.org/11441026/diff/35001/sync/syncable/delete_journal.cc#newcode23 sync/syncable/delete_journal.cc:23: return delete_journals_.size(); Require a transaction param now. On 2013/01/04 ...
7 years, 11 months ago (2013-01-04 18:49:20 UTC) #11
tim (not reviewing)
After addressing comments below, this LGTM! https://codereview.chromium.org/11441026/diff/39001/sync/syncable/delete_journal.cc File sync/syncable/delete_journal.cc (right): https://codereview.chromium.org/11441026/diff/39001/sync/syncable/delete_journal.cc#newcode113 sync/syncable/delete_journal.cc:113: void DeleteJournal::AddJournalBatch(BaseTransaction* trans, ...
7 years, 11 months ago (2013-01-04 18:54:14 UTC) #12
haitaol1
https://codereview.chromium.org/11441026/diff/39001/sync/syncable/delete_journal.cc File sync/syncable/delete_journal.cc (right): https://codereview.chromium.org/11441026/diff/39001/sync/syncable/delete_journal.cc#newcode113 sync/syncable/delete_journal.cc:113: void DeleteJournal::AddJournalBatch(BaseTransaction* trans, On 2013/01/04 18:54:14, timsteele wrote: > ...
7 years, 11 months ago (2013-01-04 19:06:14 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haitaol@chromium.org/11441026/44001
7 years, 11 months ago (2013-01-04 19:38:48 UTC) #14
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 11 months ago (2013-01-04 19:55:29 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haitaol@chromium.org/11441026/57001
7 years, 11 months ago (2013-01-04 20:02:00 UTC) #16
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 11 months ago (2013-01-04 20:16:26 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haitaol@chromium.org/11441026/57003
7 years, 11 months ago (2013-01-04 21:29:53 UTC) #18
commit-bot: I haz the power
7 years, 11 months ago (2013-01-05 01:15:53 UTC) #19
Message was sent while issue was closed.
Change committed as 175248

Powered by Google App Engine
This is Rietveld 408576698