MB-19843: Modify the end_seqno in DCP stream request after checking for rollback
During a DCP stream request, we will update the end seqno when flags
DCP_ADD_STREAM_FLAG_LATEST/DCP_ADD_STREAM_FLAG_DISKONLY are used.
Currently in some cases when a rollback is required, the end_seqno could become
less than start_seqno before we check if a rollback is needed, resulting in
rejection of stream request.
Hence we should modify the end_seqno (if required as per the flags) only after
checking if a rollback is needed.
Change-Id: I23b112c16b9167023a990a5709ae6aae4838472e
Reviewed-on: http://review.couchbase.org/64796
Well-Formed: buildbot <build@couchbase.com>
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>