Missing document in changes feed when using a compound sequence number as since parameter
SebastianSingle99 opened this issue · 2 comments
I already have created a couchbase thread here https://forums.couchbase.com/t/strange-sequence-number-and-changes-feed-issue/27974/3
Sync Gateway version
2.8.0
Operating system
centos7
Expected behavior
The changes feed should return changes consistently when using the since-parameter.
Actual behaviour
If I use a compound sequence number as since-parameter there is one document missing in the changes feed.
Reproduction
curl -X GET "http://localhost:4984/default/_changes?limit=564&since=9921" -H "accept: application/json" -u <my-test-user:password>
{"results":[
{"seq":9922,"id":...}
,{"seq":"9941:7755","id":...}
.... 560 more documents with "9941:...."
,{"seq":"9941:9926","id":...}
,{"seq":9941,"id":...}
],
"last_seq":"9941"}
The change with “9941” is the document that doesn’t get replicated. My changes feed has 562 “9941:<>” changes and then the “9941”-change itself.
If I use the first compound sequence number “9941:7755” as since-parameter I get this:
curl -X GET "http://localhost:4984/default/_changes?limit=564&since=9941:7755" -H "accept: application/json" -u <my-test-user:password>
{"results":[
{"seq":"9941:7756","id":...}
,{"seq":"9941:7757","id":...}
....
,{"seq":"9941:9926","id":...}
,{"seq":9967,"id":...}
,{"seq":9980,"id":...}
,{"seq":9989,"id":...}
],
"last_seq":"9989"}
The change “9941” is missing and should be between “9941:9926” and “9967”. It looks like the changes-endpoint has a bug If I use a compound sequence number as since-parameter.
Thanks for filing the issue, I've opened up a corresponding Jira issue to track: https://issues.couchbase.com/browse/CBG-1163
I'm in the process of trying to reproduce the bug, and I'll leave an update on here with any further progress.
Thanks
Ben
I've reproduced the issue in a test with dynamic channel access grants.
User updates that grant access to additional channels don't show the issue.
Working on a fix.