cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrey Ilinykh (JIRA)" <>
Subject [jira] [Created] (CASSANDRA-4743) Range slice query causes OOM
Date Mon, 01 Oct 2012 22:11:09 GMT
Andrey Ilinykh created CASSANDRA-4743:

             Summary: Range slice query causes OOM 
                 Key: CASSANDRA-4743
             Project: Cassandra
          Issue Type: Bug
          Components: Core
    Affects Versions: 1.1.5
            Reporter: Andrey Ilinykh

I got OOM error. The log is

ERROR [ReadStage:42] 2012-09-30 07:54:55,069 (line 135) Exception
in thread Thread[ReadStage:42,5,main]
java.lang.OutOfMemoryError: Java heap space
        at org.apache.cassandra.db.RangeSliceReply.getReply(
        at org.apache.cassandra.service.RangeSliceVerbHandler.doVerb(
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
        at java.util.concurrent.ThreadPoolExecutor$

The RangeSliceReply#getReply()

method gets all rows, calculates total size and then try to allocate output buffer. There
is no check done on total size, it could be very large.

public Message getReply(Message originalMessage) throws IOException
        int size = DBConstants.intSize;
        for (Row row : rows)
            size += Row.serializer().serializedSize(row, originalMessage.getVersion());

        DataOutputBuffer buffer = new DataOutputBuffer(size);
        for (Row row : rows)
            Row.serializer().serialize(row, buffer, originalMessage.getVersion());
        assert buffer.getLength() == buffer.getData().length;
        return originalMessage.getReply(FBUtilities.getBroadcastAddress(), buffer.getData(),

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message