File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -182,12 +182,21 @@ impl GC {
182
182
break ;
183
183
}
184
184
185
- // If the task has no content length, skip it.
185
+ // If the task has downloaded finished, task has the content length, evicted space is the
186
+ // content length. If the task has started and did not download the data, and content
187
+ // length is 0, evicted space is 0.
186
188
let task_space = match task. content_length ( ) {
187
189
Some ( content_length) => content_length,
188
190
None => {
189
- error ! ( "task {} has no content length" , task. id) ;
190
- continue ;
191
+ // If the task has no content length, skip it.
192
+ if !task. is_failed ( ) {
193
+ error ! ( "task {} has no content length" , task. id) ;
194
+ continue ;
195
+ }
196
+
197
+ // If the task has started and did not download the data, and content length is 0.
198
+ info ! ( "task {} is failed, has no content length" , task. id) ;
199
+ 0
191
200
}
192
201
} ;
193
202
You can’t perform that action at this time.
0 commit comments