[ 
https://issues.apache.org/jira/browse/CASSANDRA-11082?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15138147#comment-15138147
 ] 

fujian edited comment on CASSANDRA-11082 at 2/9/16 12:58 AM:
-------------------------------------------------------------

The case is corner but it can happen if I write one driver to send lots of 
requests without read any response.
so it is one protect method to prevent similar cases though it is very hard to 
happen such as slow clients.
In other words, it is best practice for safe system though it is low ratio to 
happen.

there are three solutions for it:
(1) just check isWritable() and if the value is false, drop the response. it is 
safe but it is rude.
(2) just check isWritable() and if the value is false, close the channel. if 
use this solution, if the high water mark is set low it maybe be confused with 
big data response.
(3) just check isWritable() and if the value is false, set AutoRead to false so 
that the client can slow down and can't send request at last.

[~tjake]  [~slebresne] WDYT? And Can I apply one patch for the solution? 3ks.

Jian




was (Author: fujian1115):
The case is corner but it can happen if I write one driver to send lots of 
requests without read any response.
so it is one protect method to prevent similar cases though it is very hard to 
happen such as slow clients.

there are three solutions for it:
(1) just check isWritable() and if the value is false, drop the response. it is 
safe but it is rude.
(2) just check isWritable() and if the value is false, close the channel. if 
use this solution, if the high water mark is set low it maybe be confused with 
big data response.
(3) just check isWritable() and if the value is false, set AutoRead to false so 
that the client can slow down and can't send request at last.

[~tjake]  [~slebresne] WDYT? And Can I apply one patch for the solution? 3ks.

Jian



> netty's level hadn't prevent OOM when receiver handle slow.
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-11082
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11082
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Streaming and Messaging
>            Reporter: fujian
>
> as we know, netty will OOM when received client is slow.
> due to  if receiver can't handle response fast so that cassandra server can't 
> flush data. it will cause channeloutbuffer with big size.
> we see the cassandra had configure write high/low water level, but I can't 
> found any code to judge iswritable. so it will have possible OOM
> why cassandra hadn't handle this case?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to