mirror of https://github.com/apache/cassandra
Merge branch 'cassandra-2.2' into cassandra-3.0
This commit is contained in:
commit
dc32ed80d7
|
|
@ -20,6 +20,7 @@
|
||||||
* Nodetool listsnapshots output is missing a newline, if there are no snapshots (CASSANDRA-13568)
|
* Nodetool listsnapshots output is missing a newline, if there are no snapshots (CASSANDRA-13568)
|
||||||
* sstabledump reports incorrect usage for argument order (CASSANDRA-13532)
|
* sstabledump reports incorrect usage for argument order (CASSANDRA-13532)
|
||||||
Merged from 2.2:
|
Merged from 2.2:
|
||||||
|
* Uncaught exceptions in Netty pipeline (CASSANDRA-13649)
|
||||||
* Prevent integer overflow on exabyte filesystems (CASSANDRA-13067)
|
* Prevent integer overflow on exabyte filesystems (CASSANDRA-13067)
|
||||||
* Fix queries with LIMIT and filtering on clustering columns (CASSANDRA-11223)
|
* Fix queries with LIMIT and filtering on clustering columns (CASSANDRA-11223)
|
||||||
* Fix potential NPE when resume bootstrap fails (CASSANDRA-13272)
|
* Fix potential NPE when resume bootstrap fails (CASSANDRA-13272)
|
||||||
|
|
|
||||||
|
|
@ -546,10 +546,14 @@ public abstract class Message
|
||||||
flusher.queued.add(item);
|
flusher.queued.add(item);
|
||||||
flusher.start();
|
flusher.start();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ChannelHandler.Sharable
|
||||||
|
public static final class ExceptionHandler extends ChannelInboundHandlerAdapter
|
||||||
|
{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void exceptionCaught(final ChannelHandlerContext ctx, Throwable cause)
|
public void exceptionCaught(final ChannelHandlerContext ctx, Throwable cause)
|
||||||
throws Exception
|
|
||||||
{
|
{
|
||||||
// Provide error message to client in case channel is still open
|
// Provide error message to client in case channel is still open
|
||||||
UnexpectedChannelExceptionHandler handler = new UnexpectedChannelExceptionHandler(ctx.channel(), false);
|
UnexpectedChannelExceptionHandler handler = new UnexpectedChannelExceptionHandler(ctx.channel(), false);
|
||||||
|
|
|
||||||
|
|
@ -294,6 +294,7 @@ public class Server implements CassandraDaemon.Server
|
||||||
private static final Frame.Decompressor frameDecompressor = new Frame.Decompressor();
|
private static final Frame.Decompressor frameDecompressor = new Frame.Decompressor();
|
||||||
private static final Frame.Compressor frameCompressor = new Frame.Compressor();
|
private static final Frame.Compressor frameCompressor = new Frame.Compressor();
|
||||||
private static final Frame.Encoder frameEncoder = new Frame.Encoder();
|
private static final Frame.Encoder frameEncoder = new Frame.Encoder();
|
||||||
|
private static final Message.ExceptionHandler exceptionHandler = new Message.ExceptionHandler();
|
||||||
private static final Message.Dispatcher dispatcher = new Message.Dispatcher();
|
private static final Message.Dispatcher dispatcher = new Message.Dispatcher();
|
||||||
private static final ConnectionLimitHandler connectionLimitHandler = new ConnectionLimitHandler();
|
private static final ConnectionLimitHandler connectionLimitHandler = new ConnectionLimitHandler();
|
||||||
|
|
||||||
|
|
@ -327,6 +328,14 @@ public class Server implements CassandraDaemon.Server
|
||||||
pipeline.addLast("messageDecoder", messageDecoder);
|
pipeline.addLast("messageDecoder", messageDecoder);
|
||||||
pipeline.addLast("messageEncoder", messageEncoder);
|
pipeline.addLast("messageEncoder", messageEncoder);
|
||||||
|
|
||||||
|
// The exceptionHandler will take care of handling exceptionCaught(...) events while still running
|
||||||
|
// on the same EventLoop as all previous added handlers in the pipeline. This is important as the used
|
||||||
|
// eventExecutorGroup may not enforce strict ordering for channel events.
|
||||||
|
// As the exceptionHandler runs in the EventLoop as the previous handlers we are sure all exceptions are
|
||||||
|
// correctly handled before the handler itself is removed.
|
||||||
|
// See https://issues.apache.org/jira/browse/CASSANDRA-13649
|
||||||
|
pipeline.addLast("exceptionHandler", exceptionHandler);
|
||||||
|
|
||||||
if (server.eventExecutorGroup != null)
|
if (server.eventExecutorGroup != null)
|
||||||
pipeline.addLast(server.eventExecutorGroup, "executor", dispatcher);
|
pipeline.addLast(server.eventExecutorGroup, "executor", dispatcher);
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue