Prefetch the whole data after the request with range completed
Feature request:
When download a file with range, after a while, the following requests with other range may be sent to proxy. So, prefetch the whole data will be very useful to save more time cost.
Currently, the requests with diff range are different task, we need merge them into a same task.
Use case:
Desire: request 1: http://example.com/file/a.tar.gz, range: 1024-4096, task id: task-1 request 2: http://example.com/file/a.tar.gz, range: 4096-8192, task id: task-1 request 3: http://example.com/file/a.tar.gz, range: 0-, task id: task-1
- All request with same url, different range, use same task.
- The daemon should download the special range first after start a peer task.
Expect this feature. It will improve the efficiency of remote random read produced by lazy-pull snapshotter (like Nydus) a lot.
#1078 implements this feature. TODO: prefetch the whole url after ranged request done.