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

Issue 2553143002: Create a strict order in ReadingListSpecifics (Closed)

Created:
4 years ago by Olivier
Modified:
4 years ago
Reviewers:
gambard, jif, pavely
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Create a strict order in ReadingListSpecifics To avoid sync ping-pong where two device disagree on the latest state, create a strict order for ReadingListSpecifice. // Entries are in increasing order if all the fields respect increasing order. // - URL must be the same. // - title must verify rhs.title.compare(lhs.title) >= 0 // - rhs.creation_time_us >= lhs.creation_time_us // - rhs.update_time_us >= lhs.update_time_us // - if rhs.update_time_us > lhs.update_time_us, rhs.state can be anything. // - if rhs.update_time_us == lhs.update_time_us, rhs.state >= lhs.state in // the order UNSEEN, UNREAD, READ. BUG=666232 Committed: https://crrev.com/f623a8a02f98adfb943529b9b25a6824bc62a97d Cr-Commit-Position: refs/heads/master@{#437251}

Patch Set 1 #

Patch Set 2 : for review #

Total comments: 20

Patch Set 3 : comments #

Total comments: 9

Patch Set 4 : order by field #

Total comments: 6

Patch Set 5 : title #

Patch Set 6 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+213 lines, -72 lines) Patch
M components/reading_list/ios/reading_list_entry.h View 1 2 3 4 5 1 chunk +12 lines, -9 lines 0 comments Download
M components/reading_list/ios/reading_list_entry.cc View 1 2 3 4 5 3 chunks +40 lines, -10 lines 0 comments Download
M components/reading_list/ios/reading_list_entry_unittest.cc View 1 2 1 chunk +35 lines, -13 lines 0 comments Download
M components/reading_list/ios/reading_list_model_impl.cc View 1 2 2 chunks +1 line, -6 lines 0 comments Download
M components/reading_list/ios/reading_list_store.h View 1 2 3 1 chunk +15 lines, -0 lines 0 comments Download
M components/reading_list/ios/reading_list_store.cc View 1 2 3 7 chunks +35 lines, -30 lines 0 comments Download
M components/reading_list/ios/reading_list_store_unittest.mm View 1 2 3 3 chunks +75 lines, -4 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 27 (11 generated)
Olivier
4 years ago (2016-12-06 16:11:11 UTC) #2
gambard
High level comment: I think this is working only because the sync mechanism is intelligent ...
4 years ago (2016-12-06 17:02:22 UTC) #3
Olivier
High level comment: When receiving data, you must ACK it to the change_processor, even if ...
4 years ago (2016-12-06 17:16:21 UTC) #4
Olivier
Hi pavely, I tried to add guards to avoid ping-pong between devices. Please take a ...
4 years ago (2016-12-06 17:34:05 UTC) #6
jif
lgtm https://codereview.chromium.org/2553143002/diff/40001/components/reading_list/ios/reading_list_entry.cc File components/reading_list/ios/reading_list_entry.cc (right): https://codereview.chromium.org/2553143002/diff/40001/components/reading_list/ios/reading_list_entry.cc#newcode333 components/reading_list/ios/reading_list_entry.cc:333: // Checks that the result entry respect the ...
4 years ago (2016-12-07 08:25:36 UTC) #7
gambard
https://codereview.chromium.org/2553143002/diff/40001/components/reading_list/ios/reading_list_entry.h File components/reading_list/ios/reading_list_entry.h (right): https://codereview.chromium.org/2553143002/diff/40001/components/reading_list/ios/reading_list_entry.h#newcode95 components/reading_list/ios/reading_list_entry.h:95: // If |other.UpdateTime()| >= |this.UpdateTime()|, all fields are copied ...
4 years ago (2016-12-07 10:28:49 UTC) #8
Olivier
I change the order to be field by field https://codereview.chromium.org/2553143002/diff/40001/components/reading_list/ios/reading_list_entry.cc File components/reading_list/ios/reading_list_entry.cc (right): https://codereview.chromium.org/2553143002/diff/40001/components/reading_list/ios/reading_list_entry.cc#newcode333 components/reading_list/ios/reading_list_entry.cc:333: ...
4 years ago (2016-12-07 12:00:21 UTC) #10
gambard
lgtm with one comment https://codereview.chromium.org/2553143002/diff/60001/components/reading_list/ios/reading_list_store.cc File components/reading_list/ios/reading_list_store.cc (right): https://codereview.chromium.org/2553143002/diff/60001/components/reading_list/ios/reading_list_store.cc#newcode443 components/reading_list/ios/reading_list_store.cc:443: return false; Why not returning ...
4 years ago (2016-12-07 13:49:54 UTC) #11
pavely
lgtm https://codereview.chromium.org/2553143002/diff/60001/components/reading_list/ios/reading_list_entry.cc File components/reading_list/ios/reading_list_entry.cc (right): https://codereview.chromium.org/2553143002/diff/60001/components/reading_list/ios/reading_list_entry.cc#newcode355 components/reading_list/ios/reading_list_entry.cc:355: // Both states are likely the same, but ...
4 years ago (2016-12-07 19:16:06 UTC) #12
Olivier
https://codereview.chromium.org/2553143002/diff/60001/components/reading_list/ios/reading_list_entry.cc File components/reading_list/ios/reading_list_entry.cc (right): https://codereview.chromium.org/2553143002/diff/60001/components/reading_list/ios/reading_list_entry.cc#newcode355 components/reading_list/ios/reading_list_entry.cc:355: // Both states are likely the same, but if ...
4 years ago (2016-12-08 08:04:08 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2553143002/80001
4 years ago (2016-12-08 08:05:40 UTC) #16
commit-bot: I haz the power
Failed to apply patch for components/reading_list/ios/reading_list_entry.cc: While running git apply --index -p1; error: patch failed: ...
4 years ago (2016-12-08 08:45:02 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2553143002/100001
4 years ago (2016-12-08 15:20:11 UTC) #21
Olivier
https://codereview.chromium.org/2553143002/diff/60001/components/reading_list/ios/reading_list_store.cc File components/reading_list/ios/reading_list_store.cc (right): https://codereview.chromium.org/2553143002/diff/60001/components/reading_list/ios/reading_list_store.cc#newcode443 components/reading_list/ios/reading_list_store.cc:443: return false; On 2016/12/07 13:49:54, gambard wrote: > Why ...
4 years ago (2016-12-08 15:23:23 UTC) #22
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years ago (2016-12-08 15:48:51 UTC) #25
commit-bot: I haz the power
4 years ago (2016-12-08 15:51:21 UTC) #27
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/f623a8a02f98adfb943529b9b25a6824bc62a97d
Cr-Commit-Position: refs/heads/master@{#437251}

Powered by Google App Engine
This is Rietveld 408576698