[ DCP ] How to get futur changes/mutations only?


#1

Hello,

We are experimenting a bit with DCP / UPR (couchbase CE v3.01) and are a bit confused about the way we should ask for futur mutations only

We are looking for something like the “Backfill” option used with TAP

The DCP “doc” (https://github.com/couchbaselabs/dcp-documentation/blob/master/documentation/commands/stream-request.md) , says that “Stream Request” can use the “Start By Seqno” option, but how can we set it to the current/futur Seqno ?

We have been playing with “Branor/couchbase-dcp-consumer” and “couchbaselabs/python-dcp-client” : Any help would be appreciated

(We know that DCP is still not open to the outside world, but we are sure this functionality could be a game changer, and want to make sure we are ready when it does)

Regards,

Xavier


#2

There are operations to obtain the current sequence numbers for each vbucket in order to pass them on to the “start by seqno” request option: https://github.com/couchbaselabs/dcp-documentation/blob/master/documentation/commands/failover-log.md

The failover log is also very important during failure handling to determine the operations you are potentially ahead of a replica. Once we make it “public” of course we’re going to provide slightly higher level commands to send those requests and more documentation around what to do in certain cases.


#3

Thank you Michael,

I could be wrong, but I don’t find any “operation” that gives the current sequence numbers for each vbucket in the link you point to

Did you mean : https://github.com/couchbaselabs/dcp-documentation/blob/master/documentation/commands/stats-vbucket-seqno.md

Regards,

Xavier


#4

No, I’m referring to the failover log which you can use to get all seqnos for each vbucket (you need to ask all 1024 for the first time, most likely): https://github.com/couchbaselabs/dcp-documentation/blob/master/documentation/commands/failover-log.md