PartsManager: bugfix
GitOrigin-RevId: fd8235abdef01c1a384a44b3040ba76c9f4e0c08
This commit is contained in:
parent
4bfa015e84
commit
674a99324b
@ -62,6 +62,10 @@ Status PartsManager::init(int64 size, bool is_size_final, size_t part_size, cons
|
||||
|
||||
if (part_size != 0) {
|
||||
part_size_ = part_size;
|
||||
if (use_part_count_limit_ && (size_ + part_size_ - 1) / part_size_ > MAX_PART_COUNT) {
|
||||
return Status::Error(PSLICE() << "Should restart load with bigger part_size " << tag("part_size_", part_size_)
|
||||
<< tag("size", size_));
|
||||
}
|
||||
} else {
|
||||
// TODO choose part_size_ depending on size
|
||||
part_size_ = 64 * (1 << 10);
|
||||
|
Loading…
Reference in New Issue
Block a user