Better streaming gffset debug.
GitOrigin-RevId: bb0f5beea36151840685c8c0e33e6ff553e0d9e5
This commit is contained in:
parent
bc3e312a1c
commit
399d13040d
@ -524,6 +524,7 @@ void photo_delete_thumbnail(Photo &photo) {
|
||||
for (size_t i = 0; i < photo.photos.size(); i++) {
|
||||
if (photo.photos[i].type == 't') {
|
||||
photo.photos.erase(photo.photos.begin() + i);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -35,14 +35,15 @@ void PartsManager::set_streaming_offset(int64 offset) {
|
||||
};
|
||||
if (offset < 0 || need_check_ || (!unknown_size_flag_ && get_size() < offset)) {
|
||||
streaming_offset_ = 0;
|
||||
LOG(ERROR) << "Ignore streaming_offset (1)";
|
||||
LOG(ERROR) << "Ignore streaming_offset " << offset << ", need_check_ = " << need_check_
|
||||
<< ", unknown_size_flag_ = " << unknown_size_flag_ << ", size = " << get_size();
|
||||
return;
|
||||
}
|
||||
|
||||
auto part_i = offset / part_size_;
|
||||
if (use_part_count_limit_ && part_i >= MAX_PART_COUNT) {
|
||||
streaming_offset_ = 0;
|
||||
LOG(ERROR) << "Ignore streaming_offset (2)";
|
||||
LOG(ERROR) << "Ignore streaming_offset " << offset << " in part " << part_i;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -54,6 +55,7 @@ void PartsManager::set_streaming_offset(int64 offset) {
|
||||
part_status_.resize(part_count_, PartStatus::Empty);
|
||||
}
|
||||
}
|
||||
|
||||
void PartsManager::set_streaming_limit(int64 limit) {
|
||||
streaming_limit_ = limit;
|
||||
streaming_ready_size_ = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user