cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Theo Hultberg (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CASSANDRA-5559) Collection size overflow not handled in CQL3 binary protocol responses
Date Mon, 13 May 2013 07:39:17 GMT
Theo Hultberg created CASSANDRA-5559:
----------------------------------------

             Summary: Collection size overflow not handled in CQL3 binary protocol responses
                 Key: CASSANDRA-5559
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5559
             Project: Cassandra
          Issue Type: Bug
            Reporter: Theo Hultberg
            Priority: Minor


In the binary/native protocol collection sizes are specified with an unsigned int, but it's
still possible to create collections larger than 2^16 items. When the client asks for a row
with a collection that is bigger than this the collection size field overflows and the client
will see an inconsistent size. If the collection size is 2^16 + 1 the client will see a size
of 1.

All of the items in the collection are actually in the response, and the frame is still correct,
it's just that a client that interprets the protocol strictly will not see them (I don't know
how the Java CQL3 driver handles this, but my reading of the spec for the Ruby driver I'm
writing means that I can't read those values without going outside of the spec).

I don't know exactly what the correct thing to do is. The way it works now leads to weird
results (getting only one item when the collection is 2^16 + 1), and getting only the first
2^16 items may be less surprising.

--
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: http://www.atlassian.com/software/jira

Mime
View raw message