[
https://issues.apache.org/jira/browse/CASSANDRA-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13137990#comment-13137990
]
Melvin Wang commented on CASSANDRA-3005:
----------------------------------------
by dropping you mean 'putting an earlier message to the end of the queue',
right? deque uses a lock when multiple threads trying to add messages to the
end of the queue, while concurrentLinkedQueue is a lock-free implementation.
Another point is that we want to drop messages (because they are timed out) at
two places:
1) where we send the message out to network
2) where we add messages.
The reason for this has been discussed some time ago, which is simply to
prevent a backed-up queue hurting the system by having the system process
already timed out messages.
For deque, there will be contention when we sending messages out to network
while we are trying to examine and remove timed out messages( when adding
messages)
Based on this consideration, I tried to use a lock-free implementation. I'll be
boarding now. Will talk more after couple of hours.
> OutboundTcpConnection's sending queue grows unboundedly without any
> backpressure logic
> --------------------------------------------------------------------------------------
>
> Key: CASSANDRA-3005
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3005
> Project: Cassandra
> Issue Type: Improvement
> Reporter: Melvin Wang
> Assignee: Melvin Wang
> Attachments: 3005-v3.txt, c3005-v2, c3005-v4, c3005.patch
>
>
> OutboundTcpConnection's sending queue unconditionally queues up the request
> and process them in sequence. Thinking about tagging the message coming in
> with timestamp and drop them before actually sending it if the message stays
> in the queue for too long, which is defined by the message's own time out
> value.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira