LoadAllChunks starts a process of loading all chunks of this file as quickly as possible. The contents are immediately discarded, so it is assumed that the fetcher is a caching fetcher.
()
| 124 | // as quickly as possible. The contents are immediately discarded, so |
| 125 | // it is assumed that the fetcher is a caching fetcher. |
| 126 | func (fr *FileReader) LoadAllChunks() { |
| 127 | // TODO: ask the underlying blobserver to do this if it would |
| 128 | // prefer. Some blobservers (like blobpacked) might not want |
| 129 | // to do this at all. |
| 130 | go fr.loadAllChunksSync(context.Background()) |
| 131 | } |
| 132 | |
| 133 | func (fr *FileReader) loadAllChunksSync(ctx context.Context) { |
| 134 | gate := syncutil.NewGate(20) // num readahead chunk loads at a time |
no test coverage detected