Details
-
Task
-
Resolution: Fixed
-
Major
-
master
-
None
Description
For safe failover and stream resumption, the client must include the manifest UID they last received.
recap: DCP transmits collection create/drop/flush using a DCP system event message, that message encodes the UID of manifest which introduced/removed/flushed the collection. The client must store the UID so they can safely resume the stream.
The main scenario the UID assists with is failover following a collection drop or flush.
- On vbucket A the client observed a collection drop(X), and in response to the collection drop the client is free to discard all data associated with collection X.
- Failover occurs, and the client must connect and resume from vbucket A'
- vbucket A' has yet to drop X, so is free to accept mutations for X.
- Allowing the client to connect to A' can mean we now stream X mutations, but the client dropped X and should not see any more X mutations.
By requiring the manifest UID we can temp fail the stream-request to A', which should be short lived because of the way failover is intending to bring vbuckets up-to-speed with the latest manifest.
This task covers
- Adding a new "MANFIEST_AHEAD" error to memcache protocol (for stream-request)
- Code for the stream-request command, so clients can encode the UID (planning on using the new collections JSON doc for carrying the UID value).
- Code for checking the stream-request against the vbucket's manifest
- protocol docs updated so clients can work with the protocol.