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

Issue 1548843002: Fix GetCommitIds local deletion case resulting in orphaning of directory entries (Closed)

Created:
5 years ago by stanisc
Modified:
4 years, 11 months ago
Reviewers:
Nicolas Zea
CC:
chromium-reviews, tim+watch_chromium.org, pvalenzuela+watch_chromium.org, maxbogue+watch_chromium.org, plaree+watch_chromium.org, zea+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix GetCommitIds local deletion case resulting in orphaning of directory entries This fixes filtering of commits in the case when a hierarchy of bookmarks gets deleted and there is a conflict in the middle of the hierarchy. Before the fix the folder above the conflicting entry would be still committed and then subsequently deleted and that would leave the conflicting entry orphaned and unreachable on both the clint and the server. The fix provides a better implementation of FilterUnreadyEntries which removes not only entries that are in direct conflict themselves but also all other entries dependent on them. For conflicting deleted entries it removes all deleted folders above them. For conflicting non-deleted folders it removes all entries below (prior to the fix that was done in the ordering part of the algorithm). I've included a new unit test that reproduces the bug condition and verifies the fix. BUG=569775 Committed: https://crrev.com/15dfe4497acc9320e7453e38edec62acbf237716 Cr-Commit-Position: refs/heads/master@{#367565}

Patch Set 1 #

Patch Set 2 : Fixed GetCommitIds logic for deleted items #

Patch Set 3 : Use int64_t #

Total comments: 8

Patch Set 4 : Addressed CR feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+312 lines, -61 lines) Patch
M sync/engine/get_commit_ids.cc View 1 2 3 10 chunks +140 lines, -61 lines 0 comments Download
M sync/engine/syncer_unittest.cc View 1 2 3 2 chunks +172 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (7 generated)
stanisc
PTAL!
4 years, 11 months ago (2015-12-29 20:13:41 UTC) #5
Nicolas Zea
https://codereview.chromium.org/1548843002/diff/60001/sync/engine/get_commit_ids.cc File sync/engine/get_commit_ids.cc (right): https://codereview.chromium.org/1548843002/diff/60001/sync/engine/get_commit_ids.cc#newcode197 sync/engine/get_commit_ids.cc:197: for (std::vector<int64_t>::const_iterator iter = nit: use auto? (here and ...
4 years, 11 months ago (2015-12-31 02:12:03 UTC) #6
stanisc
Addressed CR feedback. PTAL! https://codereview.chromium.org/1548843002/diff/60001/sync/engine/get_commit_ids.cc File sync/engine/get_commit_ids.cc (right): https://codereview.chromium.org/1548843002/diff/60001/sync/engine/get_commit_ids.cc#newcode197 sync/engine/get_commit_ids.cc:197: for (std::vector<int64_t>::const_iterator iter = On ...
4 years, 11 months ago (2016-01-04 22:00:48 UTC) #7
Nicolas Zea
LGTM!
4 years, 11 months ago (2016-01-05 01:35:25 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1548843002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1548843002/80001
4 years, 11 months ago (2016-01-05 17:42:28 UTC) #10
commit-bot: I haz the power
Committed patchset #4 (id:80001)
4 years, 11 months ago (2016-01-05 17:49:22 UTC) #12
commit-bot: I haz the power
4 years, 11 months ago (2016-01-05 17:50:12 UTC) #14
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/15dfe4497acc9320e7453e38edec62acbf237716
Cr-Commit-Position: refs/heads/master@{#367565}

Powered by Google App Engine
This is Rietveld 408576698