cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Lerer (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-8276) Unusable prepared statement with 65k parameters
Date Wed, 01 Apr 2015 14:31:53 GMT


Benjamin Lerer commented on CASSANDRA-8276:

I tested the problem on the latest 2.0 and 2.1 and faced a different issue than what you described.
The test ran forever but I never received an {{UNPREPARED}} answer.

The first problem that I found was that the unit test seems to be wrong. Prior to 3.0 an {{IN}}
restriction containing multiple time the same value  will return the same number of time the
same result. In the case of your unit test you should receive 65535 times the row: ('0', 0).

If you replace the 65535 zero by 65535 different values the test will work fine. 

The problem comes from the fact that specifing the same value for the partition key in the
{{IN}} restriction a number of time greater than the page size breaks the paging. Cassandra
keeps on returning the same page of data forever.

The only way I have found to fix the problem will be to add some extra data in the {{ClientState}}
but this would be a breaking change.

As the use case is a really specific one and as the problem will be fixed in 3.0, I would
be in favor of marking this ticket as {{won't fix}}.
[~thobbs] what is your opinion?


> Unusable prepared statement with 65k parameters
> -----------------------------------------------
>                 Key: CASSANDRA-8276
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>         Environment: Cassandra 2.0.10
> Java driver 2.0.8-SNAPSHOT
>            Reporter: Pierre Laporte
>            Assignee: Benjamin Lerer
>             Fix For: 2.1.5
> We had an issue ([JAVA-515|]) in the
java-driver when the number of parameters in a statement is greater than the supported limit
> I added a limit-test to verify that prepared statements with 65535 parameters were accepted
by the driver, but ran into an issue on the Cassandra side.
> Basically, the test runs forever, because the driver receives an inconsistent answer
from Cassandra.  When we prepare the statement, C* answers that it is correctly prepared,
however when we try to execute it, we receive a {{UNPREPARED}} answer.
> [Here is the code|]
to reproduce the issue.

This message was sent by Atlassian JIRA

View raw message