Skip to content

Commit

Permalink
DO NOT SHIP Notes to myself.
Browse files Browse the repository at this point in the history
  • Loading branch information
macneale4 committed Jan 23, 2025
1 parent e702487 commit 7f8a70c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions go/libraries/doltcore/remotestorage/chunk_fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ func fetcherRPCDownloadLocsThread(ctx context.Context, reqCh chan *remotesapi.Ge
})
eg.Go(func() error {
for {
// NM4 - Where there responses come back - resp is an rpc struct. NM4.
resp, err := stream.Recv()
if err == io.EOF {
close(resCh)
Expand Down Expand Up @@ -306,6 +307,7 @@ func getMissingChunks(req *remotesapi.GetDownloadLocsRequest, resp *remotesapi.G
numRequested := len(req.ChunkHashes)
numResponded := 0
for _, loc := range resp.Locs {
// NM4 - Looky here.
hgr := loc.Location.(*remotesapi.DownloadLoc_HttpGetRange).HttpGetRange
numResponded += len(hgr.Ranges)
}
Expand Down Expand Up @@ -368,6 +370,7 @@ func (d downloads) Add(resp *remotesapi.DownloadLoc) {
d.refreshes[path] = refresh
}
for _, r := range gr.Ranges {
// NM4 - this is where the offset is read!! do something here or nearby.
d.ranges.Insert(gr.Url, r.Hash, r.Offset, r.Length)
}
}
Expand Down

0 comments on commit 7f8a70c

Please sign in to comment.