mamba icon indicating copy to clipboard operation
mamba copied to clipboard

implement jlap format for incremental repodata patches

Open wolfv opened this issue 3 years ago • 1 comments

wolfv avatar Oct 17 '22 07:10 wolfv

I think the main difficulty (similar to zchunk) will be to have a proper "state-machine" for the different error cases. It is complicated by the fact that the idea of the jlap format is to be able to continue writing to the jlap file from a given offset.

  • no repodata json at all locally -> download repodata.json
  • repodata.json locally -> check if repodata.jlap exists on server
  • jlap does not exist on server -> update json
  • jlap does exist, but our local jlap / offset does not match server -> redownload entire jlap file
  • jlap exists, but -hash of repodata.json is not found in jlap file -> redownload repodata.json (& remove jlap file?)
  • jlap exists, from-hash exists, but at some point the hashes diverge -> redownload repodata.json (incorrect jlap file)
  • parse error of jlap file (e.g. missing required fields)

Maybe there are more cases but these are the ones that come to my mind right now. Probably we should have a dedicated error class for each case.

wolfv avatar Oct 18 '22 07:10 wolfv

TIL the jlap format from a post on discourse:

  • https://conda.discourse.group/t/how-we-reduced-condas-index-fetch-bandwidth-by-99/257

It sounds very interesting so I'll make sure to follow progress here...

dhirschfeld avatar Apr 23 '23 23:04 dhirschfeld

What’s the status of this PR?

jonashaag avatar Jul 02 '23 19:07 jonashaag