Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I can't see why they don't just restart the cursor at the beginning when the collection goes up a size in the middle of an iteration.

Encode the size of the collection in the first 8 bits of the cursor value, and when the client gives you an cursor value with the first 8 bits set to a smaller size than the current size of the collection, start it over from scratch with the new size as the top 8 bits.

If the collection has shrunk, no big deal, just keep going from where the client was because of the mentioned properties of using a reversed bit set.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: