You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ja...@apache.org on 2014/08/15 23:16:31 UTC
[1/2] git commit: Avoid flushing on request threads. causes netty to
over cache buffers and OOM
Repository: cassandra
Updated Branches:
refs/heads/cassandra-2.1 f26e86c6c -> 96d0331ff
Avoid flushing on request threads. causes netty to over cache buffers and OOM
patch by benedict; reviewed by tjake for (CASSANDRA-7743)
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f2d60577
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f2d60577
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f2d60577
Branch: refs/heads/cassandra-2.1
Commit: f2d60577c3944affc8c3beefb07556c005cab185
Parents: 8137fce
Author: Benedict Elliott Smith <be...@apache.org>
Authored: Thu Aug 14 13:39:09 2014 +0700
Committer: Jake Luciani <ja...@apache.org>
Committed: Fri Aug 15 17:15:36 2014 -0400
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../org/apache/cassandra/transport/Message.java | 23 +++++++++++---------
2 files changed, 14 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f2d60577/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 8714265..eeb115f 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
2.1.0-rc6
+ * Fix OOM issue from netty caching over time (CASSANDRA-7743)
* json2sstable couldn't import JSON for CQL table (CASSANDRA-7477)
* Invalidate all caches on table drop (CASSANDRA-7561)
* Skip strict endpoint selection for ranges if RF == nodes (CASSANRA-7765)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f2d60577/src/java/org/apache/cassandra/transport/Message.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/transport/Message.java b/src/java/org/apache/cassandra/transport/Message.java
index 9a89454..163fffb 100644
--- a/src/java/org/apache/cassandra/transport/Message.java
+++ b/src/java/org/apache/cassandra/transport/Message.java
@@ -128,7 +128,7 @@ public abstract class Message
public final Type type;
protected Connection connection;
private int streamId;
- private Frame sourceFrame = null;
+ private Frame sourceFrame;
protected Message(Type type)
{
@@ -321,10 +321,12 @@ public abstract class Message
private static class FlushItem
{
final ChannelHandlerContext ctx;
- final Response response;
- private FlushItem(ChannelHandlerContext ctx, Response response)
+ final Object response;
+ final Frame sourceFrame;
+ private FlushItem(ChannelHandlerContext ctx, Object response, Frame sourceFrame)
{
this.ctx = ctx;
+ this.sourceFrame = sourceFrame;
this.response = response;
}
}
@@ -369,7 +371,7 @@ public abstract class Message
for (ChannelHandlerContext channel : channels)
channel.flush();
for (FlushItem item : flushed)
- item.response.getSourceFrame().release();
+ item.sourceFrame.release();
channels.clear();
flushed.clear();
@@ -420,20 +422,21 @@ public abstract class Message
response = request.execute(qstate);
response.setStreamId(request.getStreamId());
response.attach(connection);
- response.setSourceFrame(request.getSourceFrame());
connection.applyStateTransition(request.type, response.type);
}
catch (Throwable ex)
{
- request.getSourceFrame().release();
- // Don't let the exception propagate to exceptionCaught() if we can help it so that we can assign the right streamID.
- ctx.writeAndFlush(ErrorMessage.fromException(ex).setStreamId(request.getStreamId()), ctx.voidPromise());
+ flush(new FlushItem(ctx, ErrorMessage.fromException(ex).setStreamId(request.getStreamId()), request.getSourceFrame()));
return;
}
logger.debug("Responding: {}, v={}", response, connection.getVersion());
+ flush(new FlushItem(ctx, response, request.getSourceFrame()));
+ }
- EventLoop loop = ctx.channel().eventLoop();
+ private void flush(FlushItem item)
+ {
+ EventLoop loop = item.ctx.channel().eventLoop();
Flusher flusher = flusherLookup.get(loop);
if (flusher == null)
{
@@ -442,7 +445,7 @@ public abstract class Message
flusher = alt;
}
- flusher.queued.add(new FlushItem(ctx, response));
+ flusher.queued.add(item);
flusher.start();
}
[2/2] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1
Posted by ja...@apache.org.
Merge branch 'cassandra-2.1.0' into cassandra-2.1
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/96d0331f
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/96d0331f
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/96d0331f
Branch: refs/heads/cassandra-2.1
Commit: 96d0331ff63c905120c3ae564979c62954e71c78
Parents: f26e86c f2d6057
Author: Jake Luciani <ja...@apache.org>
Authored: Fri Aug 15 17:16:18 2014 -0400
Committer: Jake Luciani <ja...@apache.org>
Committed: Fri Aug 15 17:16:18 2014 -0400
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../org/apache/cassandra/transport/Message.java | 23 +++++++++++---------
2 files changed, 14 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/96d0331f/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index b68605e,eeb115f..113de3e
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,33 -1,5 +1,34 @@@
+2.1.1
+ * Add max live/tombstoned cells to nodetool cfstats output (CASSANDRA-7731)
+ * Validate IPv6 wildcard addresses properly (CASSANDRA-7680)
+ * (cqlsh) Error when tracing query (CASSANDRA-7613)
+ * Avoid IOOBE when building SyntaxError message snippet (CASSANDRA-7569)
+ * SSTableExport uses correct validator to create string representation of partition
+ keys (CASSANDRA-7498)
+ * Avoid NPEs when receiving type changes for an unknown keyspace (CASSANDRA-7689)
+ * Add support for custom 2i validation (CASSANDRA-7575)
+ * Pig support for hadoop CqlInputFormat (CASSANDRA-6454)
+ * Add listen_interface and rpc_interface options (CASSANDRA-7417)
+ * Improve schema merge performance (CASSANDRA-7444)
+ * Adjust MT depth based on # of partition validating (CASSANDRA-5263)
+ * Optimise NativeCell comparisons (CASSANDRA-6755)
+ * Configurable client timeout for cqlsh (CASSANDRA-7516)
+ * Include snippet of CQL query near syntax error in messages (CASSANDRA-7111)
+Merged from 2.0:
+ * (cqlsh) cqlsh should automatically disable tracing when selecting
+ from system_traces (CASSANDRA-7641)
+ * (Hadoop) Add CqlOutputFormat (CASSANDRA-6927)
+ * Don't depend on cassandra config for nodetool ring (CASSANDRA-7508)
+ * (cqlsh) Fix failing cqlsh formatting tests (CASSANDRA-7703)
+ * Fix IncompatibleClassChangeError from hadoop2 (CASSANDRA-7229)
+ * Add 'nodetool sethintedhandoffthrottlekb' (CASSANDRA-7635)
+ * (cqlsh) Add tab-completion for CREATE/DROP USER IF [NOT] EXISTS (CASSANDRA-7611)
+ * Catch errors when the JVM pulls the rug out from GCInspector (CASSANDRA-5345)
+ * cqlsh fails when version number parts are not int (CASSANDRA-7524)
+
+
2.1.0-rc6
+ * Fix OOM issue from netty caching over time (CASSANDRA-7743)
* json2sstable couldn't import JSON for CQL table (CASSANDRA-7477)
* Invalidate all caches on table drop (CASSANDRA-7561)
* Skip strict endpoint selection for ranges if RF == nodes (CASSANRA-7765)