diff options
author | Daniel Zheng <zhengdaniel@google.com> | 2024-04-19 13:43:45 -0700 |
---|---|---|
committer | Daniel Zheng <zhengdaniel@google.com> | 2024-04-23 12:51:17 -0700 |
commit | 65481161771d9f4dee1c7eb8e15fdf5f5b8000df (patch) | |
tree | 44d6f36e6a1130dae50fc0fd7c8bca61387038f3 | |
parent | ecbd6b01413e775ff614b1363aa72416c04a90e4 (diff) | |
download | update_engine-master.tar.gz |
v2 does not use op buffer count, so this estimation overhead should only
be updated for v3
Test: th
Change-Id: Ib9ad838abd03839db390b0dbd126c1a477803eea
-rw-r--r-- | payload_generator/delta_diff_generator.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/payload_generator/delta_diff_generator.cc b/payload_generator/delta_diff_generator.cc index 426efbc8..4abff92f 100644 --- a/payload_generator/delta_diff_generator.cc +++ b/payload_generator/delta_diff_generator.cc @@ -146,7 +146,9 @@ class PartitionProcessor : public base::DelegateSimpleThread::Delegate { // add a 1% overhead to our estimation cow_info_->cow_size = cow_info_->cow_size * 1.01; - cow_info_->op_count_max = std::max(int(cow_info_->op_count_max), 25); + if (config_.target.dynamic_partition_metadata->cow_version() >= 3) { + cow_info_->op_count_max = std::max(int(cow_info_->op_count_max), 25); + } // ops buffer size == 0 for v2 version of cow format LOG(INFO) << "Estimated COW size for partition: " << new_part_.name << " " << cow_info_->cow_size |