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

Issue 23694004: sync: Remove IDs from OrderedCommitSet (Closed)

Created:
7 years, 3 months ago by rlarocque
Modified:
7 years, 3 months ago
Reviewers:
Nicolas Zea
CC:
chromium-reviews, tim+watch_chromium.org, rsimha+watch_chromium.org, haitaol+watch_chromium.org
Visibility:
Public.

Description

sync: Remove IDs from OrderedCommitSet Remove the IDs from OrderedCommitSet in order to add a new member, AddCommitItems(). Removing the IDs from this class would have been a good idea on its own. There hasn't been any need to track both IDs and metahandles for quite some time, and storing redundant information always carries the risk that the two copies will disagree with each other. It is particularly risky in this case because the entries' IDs will be changed when a commit response is successful. The AddCommitItems() function would have needed to have an inconvenient signature if it had to pass in both the handles and IDs of all the entries being added to the set. It's much easier to implement now that we only need to pass in the entries' metahandles. The new member function is not used in this commit. It will be used in a future commit that allows us to run GetCommitIdsCommand on a single model type at a time. BUG=278484 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=221154

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+103 lines, -111 lines) Patch
M sync/engine/build_commit_command.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M sync/engine/commit.cc View 1 chunk +4 lines, -4 lines 0 comments Download
M sync/engine/get_commit_ids_command.cc View 4 chunks +3 lines, -13 lines 0 comments Download
M sync/engine/process_commit_response_command.h View 1 chunk +1 line, -1 line 0 comments Download
M sync/engine/process_commit_response_command.cc View 5 chunks +10 lines, -8 lines 0 comments Download
M sync/engine/process_commit_response_command_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M sync/engine/syncer_unittest.cc View 5 chunks +17 lines, -16 lines 0 comments Download
M sync/sessions/ordered_commit_set.h View 5 chunks +9 lines, -14 lines 0 comments Download
M sync/sessions/ordered_commit_set.cc View 6 chunks +12 lines, -9 lines 0 comments Download
M sync/sessions/ordered_commit_set_unittest.cc View 2 chunks +44 lines, -43 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
rlarocque
Please review. I plan to remove OrderedCommitSet eventually, so this will seem a bit pointless ...
7 years, 3 months ago (2013-08-28 22:15:31 UTC) #1
Nicolas Zea
LGTM, although the commit message makes it sound a bit like you're advocating removing ID's ...
7 years, 3 months ago (2013-09-03 22:45:00 UTC) #2
rlarocque
On 2013/09/03 22:45:00, Nicolas Zea wrote: > LGTM, although the commit message makes it sound ...
7 years, 3 months ago (2013-09-03 22:50:58 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/23694004/1
7 years, 3 months ago (2013-09-03 22:51:57 UTC) #4
commit-bot: I haz the power
7 years, 3 months ago (2013-09-04 04:51:05 UTC) #5
Message was sent while issue was closed.
Change committed as 221154

Powered by Google App Engine
This is Rietveld 408576698