summaryrefslogtreecommitdiff
path: root/payload_generator/graph_utils.h
diff options
context:
space:
mode:
authorGilad Arnold <garnold@chromium.org>2015-05-13 18:59:32 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-05-19 20:29:13 +0000
commit46bd4e20c20d6cb1a2f18d39237b9345d576669e (patch)
tree4204498d276d91248008b532d08ca7090bbd1315 /payload_generator/graph_utils.h
parent14c0f1b1e2ada315b3ee63084435b899e51c5bc5 (diff)
update_engine: Fix splitting and merging of operation.
As previously implemented, these features retained the original operation type, thus potentially violating an invariant of the delta format by which an operation must have the minimum possible size. This could take form in either direction; in one case, we've seen this fail payload verification when a large REPLACE_BZ was split into small operations and the compressed blob of one was larger than the size of the written blocks (i.e. compression was disadvantageous). Instead, when splitting and merging operations we now choose an optimal operation type among REPLACE and REPLACE_BZ. This means that every split/merged data blob is compressed and its size compared to its uncompressed form, storing the smaller of the two and setting the operation type accordingly. This also refactors unit tests and adds more test cases to ensure that operation types are chosen optimally and that the conversion is correct in both directions. Finally, this re-enables the splitting of REPLACE_BZ operations, which was disabled (CL:270581) to prevent payload breakages. BUG=chromium:487595 TEST=Unit tests Change-Id: Ib348b76a96eba6dd612cafa412e1231c43389f96 Reviewed-on: https://chromium-review.googlesource.com/271277 Trybot-Ready: Gilad Arnold <garnold@chromium.org> Tested-by: Gilad Arnold <garnold@chromium.org> Reviewed-by: Don Garrett <dgarrett@chromium.org> Reviewed-by: David Zeuthen <zeuthen@chromium.org> Commit-Queue: Gilad Arnold <garnold@chromium.org>
Diffstat (limited to 'payload_generator/graph_utils.h')
0 files changed, 0 insertions, 0 deletions