Avoid a fatal error in PartManager.
This commit is contained in:
parent
5cd6b2d853
commit
4b00266a5b
|
@ -170,6 +170,7 @@ void FileLoadManager::cancel(QueryId query_id) {
|
||||||
}
|
}
|
||||||
on_error_impl(it->second, Status::Error(-1, "Canceled"));
|
on_error_impl(it->second, Status::Error(-1, "Canceled"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileLoadManager::update_local_file_location(QueryId query_id, const LocalFileLocation &local) {
|
void FileLoadManager::update_local_file_location(QueryId query_id, const LocalFileLocation &local) {
|
||||||
if (stop_flag_) {
|
if (stop_flag_) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -311,7 +311,7 @@ Result<Part> PartsManager::start_part() {
|
||||||
}
|
}
|
||||||
|
|
||||||
Status PartsManager::set_known_prefix(int64 size, bool is_ready) {
|
Status PartsManager::set_known_prefix(int64 size, bool is_ready) {
|
||||||
if (!known_prefix_flag_ || size < static_cast<size_t>(known_prefix_size_)) {
|
if (!known_prefix_flag_ || size < known_prefix_size_ || (size == 0 && !part_status_.empty())) {
|
||||||
CHECK(is_upload_);
|
CHECK(is_upload_);
|
||||||
return Status::Error("FILE_UPLOAD_RESTART");
|
return Status::Error("FILE_UPLOAD_RESTART");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user