PartsManager bugfix: do not set bits in bitmask for empty parts

GitOrigin-RevId: 5fec69b1e1aed975edb7d9901206262abc7151d3
This commit is contained in:
Arseny Smirnov 2018-12-28 16:16:14 +03:00
parent 89d5d680d6
commit 5a741ce08d

View File

@ -234,7 +234,9 @@ Status PartsManager::on_part_ok(int32 id, size_t part_size, size_t actual_size)
pending_count_--;
part_status_[id] = PartStatus::Ready;
bitmask_.set(id);
if (actual_size != 0) {
bitmask_.set(id);
}
ready_size_ += narrow_cast<int64>(actual_size);
VLOG(files) << "Transferred part " << id << " of size " << part_size << ", total ready size = " << ready_size_;