[
https://issues.apache.org/jira/browse/CASSANDRA-19270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17807121#comment-17807121
]
Stefan Miklosovic edited comment on CASSANDRA-19270 at 1/16/24 9:07 AM:
------------------------------------------------------------------------
Also, what Cassandra version you see this in? There is a test for composite PK
scenario here for trunk. I think this should be already included in 5.0-beta1.
https://github.com/apache/cassandra/blob/trunk/test/unit/org/apache/cassandra/cql3/validation/operations/InsertInvalidateSizedRecordsTest.java#L69
I think that exactly this test
https://github.com/apache/cassandra/blob/trunk/test/unit/org/apache/cassandra/cql3/validation/operations/InsertInvalidateSizedRecordsTest.java#L77-L80
Tests the scenario when one column from partition key is larger than allowed.
was (Author: smiklosovic):
Also, what Cassandra version you see this in? There is a test for composite PK
scenario here for trunk. I think this should be already included in 5.0-beta1.
https://github.com/apache/cassandra/blob/trunk/test/unit/org/apache/cassandra/cql3/validation/operations/InsertInvalidateSizedRecordsTest.java#L69
> Incorrect error type on oversized compound partition key
> --------------------------------------------------------
>
> Key: CASSANDRA-19270
> URL: https://issues.apache.org/jira/browse/CASSANDRA-19270
> Project: Cassandra
> Issue Type: Bug
> Reporter: Nadav Har'El
> Priority: Normal
>
> Cassandra limits key lengths (partition and clustering) to 64 KB. If a user
> attempts to INSERT data with a partition key or clustering key exceeding that
> size, the result is a clear InvalidRequest error with a message like "{{{}Key
> length of 66560 is longer than maximum of 65535{}}}".
> There is one exception: If you have a *compound* partition key (i.e., two or
> more partition key components) and attempt to write one of them larger than
> 64 KB, then instead of an orderly InvalidRequest like you got when there was
> just one component, now you get a NoHostAvailable with the message:
> "{{{}error("'H' format requires 0 <= number <= 65535")}){}}}". This is not
> only uglier, it can also confuse the Cassandra driver to retry this request -
> because it doesn't realize that the request itself is broken and there is no
> point to repeat it.
> Interestingly, if there are multiple clustering key columns, this problem
> doesn't happen: we still get a nice InvalidRequest if any one of these is
> more than 64 KB.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]