Merge branch 'cassandra-2.2' into cassandra-3.0

This commit is contained in:
Robert Stupp 2017-02-09 20:38:17 +01:00
commit a696ab33ba
6 changed files with 10 additions and 5 deletions

View File

@ -50,6 +50,7 @@ Merged from 2.2:
* Fix leak on skipped SSTables in sstableupgrade (CASSANDRA-12899)
* Avoid blocking gossip during pending range calculation (CASSANDRA-12281)
Merged from 2.1:
* Upgrade netty version to fix memory leak with client encryption (CASSANDRA-13114)
* cqlsh copy-from: sort user type fields in csv (CASSANDRA-12959)

View File

@ -399,7 +399,7 @@
<dependency groupId="com.addthis.metrics" artifactId="reporter-config3" version="3.0.0" />
<dependency groupId="org.mindrot" artifactId="jbcrypt" version="0.3m" />
<dependency groupId="io.airlift" artifactId="airline" version="0.6" />
<dependency groupId="io.netty" artifactId="netty-all" version="4.0.23.Final" />
<dependency groupId="io.netty" artifactId="netty-all" version="4.0.44.Final" />
<dependency groupId="com.google.code.findbugs" artifactId="jsr305" version="2.0.2" />
<dependency groupId="com.clearspring.analytics" artifactId="stream" version="2.5.2" />
<dependency groupId="com.datastax.cassandra" artifactId="cassandra-driver-core" version="3.0.1" classifier="shaded" />

Binary file not shown.

Binary file not shown.

View File

@ -551,15 +551,19 @@ public abstract class Message
public void exceptionCaught(final ChannelHandlerContext ctx, Throwable cause)
throws Exception
{
// Provide error message to client in case channel is still open
UnexpectedChannelExceptionHandler handler = new UnexpectedChannelExceptionHandler(ctx.channel(), false);
ErrorMessage errorMessage = ErrorMessage.fromException(cause, handler);
if (ctx.channel().isOpen())
{
UnexpectedChannelExceptionHandler handler = new UnexpectedChannelExceptionHandler(ctx.channel(), false);
ChannelFuture future = ctx.writeAndFlush(ErrorMessage.fromException(cause, handler));
ChannelFuture future = ctx.writeAndFlush(errorMessage);
// On protocol exception, close the channel as soon as the message have been sent
if (cause instanceof ProtocolException)
{
future.addListener(new ChannelFutureListener() {
public void operationComplete(ChannelFuture future) {
future.addListener(new ChannelFutureListener()
{
public void operationComplete(ChannelFuture future)
{
ctx.close();
}
});