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-04 18:10:12.166000000

Uploaded patch set 3.

-------------------------------------
author: Cory Peck
date: 2016-03-04 18:10:37.206000000

Patch Set 3: Verified+1

-------------------------------------
author: Estrella Humphrey
date: 2016-03-05 18:44:41.633000000

Patch Set 3: Code-Review-1

(5 comments)

Line:116, src/main/java/com/couchbase/client/core/endpoint/dcp/DCPConnection.java -> please prefix with //FIXME and give more detail so that the "hack" is easier to find later (FIXME and TODO are de facto standards that IntelliJ can list)

Line:145, src/main/java/com/couchbase/client/core/endpoint/dcp/DCPHandler.java -> please prefix with //FIXME that the "hack" is easier to find later (FIXME and TODO are de facto standards that IntelliJ can list)

Line:172, src/main/java/com/couchbase/client/core/endpoint/dcp/DCPHandler.java -> any particular case where the opCode would be OP_GET_FAILOVER_LOG and not a GetFailoverLogRequest?

Line:281, src/main/java/com/couchbase/client/core/endpoint/dcp/DCPHandler.java -> should that be part of a separate commit? or at least mentioned in commit message

Line:292, src/main/java/com/couchbase/client/core/endpoint/dcp/DCPHandler.java -> idem, extraReleased being removed: was it a bug? should this be part of a separate commit?

-------------------------------------
author: Cory Peck
date: 2016-03-05 20:45:48.526000000

Patch Set 3:

(2 comments)

Line:172, src/main/java/com/couchbase/client/core/endpoint/dcp/DCPHandler.java -> now it is not nessesary, yes. I was left from one intermediate solution. I will cleanup

Line:281, src/main/java/com/couchbase/client/core/endpoint/dcp/DCPHandler.java -> right, I will move it

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

Change has been successfully cherry-picked as 3fb03139f0438bad2ff1e3497065552a22b42677

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