couchbase/sync_gateway — pull request #364 by snej (2014-07-10 06:02:22+00:00)
Title: Fix infinite loops in changes feed by reordering new channels' items

When a user gets access to a channel at sequence m, the pre-existing
items in that channel now appear in the feed right before sequence m,
with sequence IDs of the form "m:n" where n is the actual sequence # of
the item. This allows the changes feed to pick up where it left off,
avoiding infinite loops.
It does mean that public sequence IDs can now be strings, not just
numbers. But clients should not mind, since the IDs are opaque to them.
Fixes #314 (again!)