How to use atts_since?

#1

How is atts_since used? Documentation talks about using rev-number, but that does not seem to be valid anymore, as atts_since parameter seems to require full revision id:s, like “integer-digest”.

Another issue with atts_since we have is that it seems to require exact revision-id of rev to which the attachment was added. For example rev-history:
1-a, 2-b, 3-c, 4-d

…If attachment was added at revpos 3, 3-c and then we request atts_since[“4-d”], it still includes attachment 3-c in reply. We have to use exactly atts_since[“3-c”] to avoid having 3-c data in reply.

#2

Revisions aren’t numbers, they’re strings. (Which doc said it’s a number? We’ll fix it.)

If attachment was added at revpos 3, 3-c and then we request atts_since[“4-d”], it still includes attachment 3-c in reply

That sounds like a bug; you can file an issue against Sync Gateway on Github.

Out of curiosity, what are you doing this for? atts_since is just an optimization for the replicator; I wouldn’t expect anything else to use it.

#3

I find the official docs quite scarce on this, so had to look from the wiki:

There the example is using only numbers.

We are trying to follow changes feed and download missing content on an embedded device. And right now it is hard to find a way to fill in the atts_since correctly. My first try was trying to fill in the current doc rev as string to it and I expected it to work - as now I effectively tell the server which is my newest version? (Maybe there is something about revision trees that I don’t get here? :slight_smile: )