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

Unified Diff: delta_performer.cc

Issue 3785008: AU: Don't send no-op operations in the delta payload. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: fix comment Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « delta_diff_generator_unittest.cc ('k') | delta_performer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: delta_performer.cc
diff --git a/delta_performer.cc b/delta_performer.cc
index 5bb5d0a7a40e8be940b802b83a9edd1f38cf69f0..134316e0e63c0007e12ed8d1b05a64bbd579303c 100644
--- a/delta_performer.cc
+++ b/delta_performer.cc
@@ -119,10 +119,10 @@ bool DeltaPerformer::IsIdempotentOperation(
if (op.src_extents_size() == 0) {
return true;
}
- // TODO(adlr): detect other types of idempotent operations. For example,
- // a MOVE may move a block onto itself.
-
- // When in doubt, it's safe to declare an op non-idempotent.
+ // When in doubt, it's safe to declare an op non-idempotent. Note that we
+ // could detect other types of idempotent operations here such as a MOVE that
+ // moves blocks onto themselves. However, we rely on the server to not send
+ // such operations at all.
ExtentRanges src_ranges;
src_ranges.AddRepeatedExtents(op.src_extents());
const uint64_t block_count = src_ranges.blocks();
« no previous file with comments | « delta_diff_generator_unittest.cc ('k') | delta_performer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698