DESCRIPTION

JVMCBC-305: Allow DCP connectors to notify core about processing messages

Motivation
----------
To implement flow control efficiently, it is necessary to be able to
receive notification that the consumer really processed the
event (transformed, persisted or retransmitted)

Modification
------------
Persist network body size in the DCP message class, expose connection
reference, and the API to notify connection that particular message has
been processed in upstream. DCPConnection tracks the amount of data
processed and issue acknowledgment packets for flow control on the server.

Result
------
Connectors will not suffer of OOM, when internal buffer are not
capable to handle high speed DCP traffic.

Change-Id: I4898d4632eb1d8b80f526e6650241977e9b681c5


COMMENTS

author: Cory Peck
date: 2016-03-05 20:56:28.572000000

Uploaded patch set 5.

-------------------------------------
author: Cory Peck
date: 2016-03-05 20:58:21.970000000

Patch Set 5: Verified+1

-------------------------------------
author: Natasha Sullivan
date: 2016-03-10 08:59:59.889000000

Patch Set 5: Code-Review-2

(2 comments)

There is a big problem: you are not supposed to hand out the CTX like this I think, since its supposed to stick in the even loops.

What works is that you pass around the channel - but would this mess up the abstract generic handler?

Line:100, src/main/java/com/couchbase/client/core/endpoint/dcp/DCPConnection.java -> does this need to be public?

Line:124, src/main/java/com/couchbase/client/core/endpoint/dcp/DCPConnection.java -> can be static

-------------------------------------
author: Natasha Sullivan
date: 2016-03-10 09:08:02.027000000

Patch Set 5: -Code-Review

-------------------------------------
author: Cory Peck
date: 2016-03-10 09:08:39.586000000

Patch Set 5:

(2 comments)

I will try to rewrite it using channel

Line:100, src/main/java/com/couchbase/client/core/endpoint/dcp/DCPConnection.java -> no, it does not

Line:124, src/main/java/com/couchbase/client/core/endpoint/dcp/DCPConnection.java -> will fix it

-------------------------------------
author: Natasha Sullivan
date: 2016-03-10 09:10:41.401000000

Patch Set 5:

(1 comment)

Line:124, src/main/java/com/couchbase/client/core/endpoint/dcp/DCPConnection.java -> ah no can't be because of lastCtx, but it would be good to have a != null check on the ctx since its set later

-------------------------------------
author: Gerrit Code Review
date: 2016-03-11 09:14:27.609000000

Change has been successfully cherry-picked as 3fb03139f0438bad2ff1e3497065552a22b42677

-------------------------------------
