Details
-
Bug
-
Status: Resolved
-
Low
-
Resolution: Duplicate
-
None
-
None
-
None
-
Low
Description
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.
Attachments
Issue Links
- duplicates
-
CASSANDRA-5428 CQL3 don't validate that collections haven't more than 64K elements
- Resolved