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

Issue 1237493002: Sync: MutableEntry shouldn't track changes that have no actual impact on the stored data (Closed)

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

Description

Sync: MutableEntry shouldn't track changes that have no actual impact on the stored data This change optimizes MutableEntry and ModelNeutralMutableEntry methods that update sync data. Most of these methods compare new and old values and skip the update when the values match. However most of these methods still unconditionally register EntryKernel to be tracked in EntryKernelMutation list by making a TrackChangesTo call, which immediately makes a deep copy of EntryKernel. Then there is one more deep copy at the end of the transaction scope. This fix avoids the two unnecessary deep copies by calling TrackChangesTo only when necessary e.g. when the new value is actually different. In addition I used this as an opportunity to do a small code cleanup around marking MutableEntry instances as dirty. BUG=468144 Committed: https://crrev.com/193873c7e382f11bf09b6739d07ac82e9dd14fd7 Cr-Commit-Position: refs/heads/master@{#339162}

Patch Set 1 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+64 lines, -66 lines) Patch
M sync/syncable/model_neutral_mutable_entry.h View 1 chunk +1 line, -1 line 0 comments Download
M sync/syncable/model_neutral_mutable_entry.cc View 13 chunks +40 lines, -42 lines 0 comments Download
M sync/syncable/mutable_entry.cc View 8 chunks +23 lines, -23 lines 0 comments Download

Messages

Total messages: 13 (5 generated)
stanisc
PTAL!
5 years, 5 months ago (2015-07-14 20:24:33 UTC) #3
pavely
lgtm
5 years, 5 months ago (2015-07-15 20:13:12 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1237493002/20001
5 years, 5 months ago (2015-07-15 21:32:12 UTC) #6
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/74238)
5 years, 5 months ago (2015-07-15 21:52:06 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1237493002/20001
5 years, 5 months ago (2015-07-16 22:17:55 UTC) #10
commit-bot: I haz the power
Committed patchset #1 (id:20001)
5 years, 5 months ago (2015-07-16 23:19:05 UTC) #11
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/193873c7e382f11bf09b6739d07ac82e9dd14fd7 Cr-Commit-Position: refs/heads/master@{#339162}
5 years, 5 months ago (2015-07-16 23:20:02 UTC) #12
loyso (OOO)
5 years, 5 months ago (2015-07-17 00:57:11 UTC) #13
Message was sent while issue was closed.
A revert of this CL (patchset #1 id:20001) has been created in
https://codereview.chromium.org/1237843003/ by loyso@chromium.org.

The reason for reverting is: Causes crash
[19596:1287:0716/172955:FATAL:mutable_entry.cc(260)] Check failed:
kernel_->is_dirty(). 

in Builder Mac10.9 Tests (dbg) 


https://sheriff-o-matic.appspot.com/chromium/failure/sync_integration_tests%2....

Powered by Google App Engine
This is Rietveld 408576698