Closed Bug 1262647 Opened 8 years ago Closed 8 years ago
chunkify returns an empty list for the last chunk
Hit this in staging where tried to chunkify locales and got  for the last chunk see https://gist.github.com/rail/74437aaa63835af095d1b4c3ba7d1f30
chunkify([x for x in range(35)], 10, 10) is one of the examples
in staging we tried 35 locales with 10 chunks. But I don't think this is limited to a small subset of total locales against 10 chunks. afaict we are missing locales after we run chunkify for a variety of total locales: https://gist.github.com/lundjordan/db7dec7885b3d10b6cf9400c3b8268ae oddly, 89 locales with 10 chunks works and that is what we have been using in our betas in production.. :)
debugging the 35 locales 10 chunk case, it seems that chunkify does the right thing for the first few chunks.. it takes the 35locales/10chunks remainder (5) and distributes one locale on each of the first 5 chunks ('big_chunk's). so it knows to put 4 locales in first 5 chunks, and 3 locales in the remaining. However, after the 6 chunk (one chunk greater than the first 5 big_chunks), things start to fall apart and we lose locales to holes in index/splicing. my head hurts however trying to figure out why..
jinx, I have something to show too! :)
restarted releaserunner on bm83 and bm85
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.