Sync_Gateway is going loop infinite when PouchDB intially tries to replicae documents from couchbase via syncgateway

SyncGW Release version: 1.1.1-10
Couchbase Release version: 4.0.0-4047

  1. Client requests the list of docs “since=0”.
  2. Sync GW responds with list of changes and last_seq as “371875::372157”

Below sync gateway output for the client request

GET
http://13.9.4.28:8080/pttdata/_changes?timeout=25000&style=all_docs&since=0&limit=100&_nonce=1448256264603

{“seq”:“362546”,“id”:“co11_s919591803622_Contact.doc”,“changes”:[{“rev”:“6-8379d536b2859d2b6669149283a9aadd”}]}
,{“seq”:“362816”,“id”:“co11_s919591803623_Contact.doc”,“changes”:[{“rev”:“3-deb937bf0cee4e0c0a0e37fd7ba433ea”}]}
,{“seq”:“369575”,“id”:“co11_s919591803621_Contact.doc”,“changes”:[{“rev”:“7-fa8837db4a0056594493fe424538f5d0”}]}
,{“seq”:“371557”,“id”:“s919591803633_ClientProfile.doc”,“changes”:[{“rev”:“12-737881cacba0b632ce275758f7ebca89”}]}
,{“seq”:“371632”,“id”:“s919591803621_ContactPresence.doc”,“changes”:[{“rev”:“42-36ddafcddca723a3c97e34454b2e2cc2”}]}
,{“seq”:“371875::371926”,“id”:“s919591803623_ContactPresence.doc”,“changes”:[{“rev”:“20-8fdf291fadb1db16daa9db0ad8406ba4”}]}
,{“seq”:“371875::372028”,“id”:“dc1k1ugvxt9sbxh_CCallLog”,“changes”:[{“rev”:“89-08eaf6a1e7e8421e71d14b3fb67a7f43”}]}
,{“seq”:“371875::372054”,“id”:“dc1k1ugvxt9sbxh_CAlertLog”,“changes”:[{“rev”:“48-43e51e3be56d91cd668dd377ffe94412”}]}
,{“seq”:“371875::372119”,“id”:“s919591803621_Location.doc”,“changes”:[{“rev”:“104-48223a30a399e60accb3e7416ece4adc”}]}
,{“seq”:“371875::372142”,“id”:“s919591803622_Location.doc”,“changes”:[{“rev”:“66-96f677efdf49593e01ce8c6801f69613”}]}
,{“seq”:“371875::372157”,“id”:“s919591803622_ContactPresence.doc”,“changes”:[{“rev”:“38-ecb957965c1a6d7f1791117971e43a17”}]}
],
“last_seq”:“371875::372157”}

  1. Client requests again with the last seq number

GET
http://13.9.4.28:8080/pttdata/_changes?timeout=25000&style=all_docs&since=371875%3A%3A372157&limit=100&_nonce=1448256265344

200 OK Response

{“seq”:“371875::371926”,“id”:“s919591803623_ContactPresence.doc”,“changes”:[{“rev”:“20-8fdf291fadb1db16daa9db0ad8406ba4”}]}
,{“seq”:“371875::372028”,“id”:“dc1k1ugvxt9sbxh_CCallLog”,“changes”:[{“rev”:“89-08eaf6a1e7e8421e71d14b3fb67a7f43”}]}
,{“seq”:“371875::372054”,“id”:“dc1k1ugvxt9sbxh_CAlertLog”,“changes”:[{“rev”:“48-43e51e3be56d91cd668dd377ffe94412”}]}
,{“seq”:“371875::372119”,“id”:“s919591803621_Location.doc”,“changes”:[{“rev”:“104-48223a30a399e60accb3e7416ece4adc”}]}
,{“seq”:“371875::372142”,“id”:“s919591803622_Location.doc”,“changes”:[{“rev”:“66-96f677efdf49593e01ce8c6801f69613”}]}
,{“seq”:“371875::372157”,“id”:“s919591803622_ContactPresence.doc”,“changes”:[{“rev”:“38-ecb957965c1a6d7f1791117971e43a17”}]}
],
“last_seq”:“371875::372157”

Sync Gw logs as below
2015-11-22T23:26:54.195-06:00 HTTP: #523919: GET /pttdata/_changes?timeout=25000&style=all_docs&since=371875%3A%3A372157&limit=100&_nonce=1448256410641 (as 919591803633)
2015-11-22T23:26:54.195-06:00 Changes: MultiChangesFeed({*}, {Since:371875::372157 Limit:100 Conflicts:true IncludeDocs:false Wait:false Continuous:false Terminator:0xc217607ce0 HeartbeatMs:0 TimeoutMs:25000}) … (to 919591803633)

  1. With the last_seq in (3), client is in loop requesting GET similar to (3).

Question is why sync GW is responding with a list of documents starting with 371875 when client has specifically requested “371875::372157". Expectation is to return the doc with just one value i.e
{“seq”:“371875::372157”,“id”:“s919591803622_ContactPresence.doc”,“changes”:[{“rev”:“38-ecb957965c1a6d7f1791117971e43a17”}]}