[ https://issues.apache.org/jira/browse/CASSANDRA-12420?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15427108#comment-15427108 ]
Tyler Hobbs commented on CASSANDRA-12420: ----------------------------------------- I've confirmed this is reproduceable in 2.1 with the following: {noformat} cqlsh> create keyspace ks1 WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1' }; cqlsh> use ks1; cqlsh:ks1> create table foo (a int, b int, c int, d int, PRIMARY KEY ((a, b), c)); cqlsh:ks1> insert into foo (a, b, c, d) VALUES (1, 1, 0, 0); cqlsh:ks1> insert into foo (a, b, c, d) VALUES (1, 1, 1, 1); cqlsh:ks1> insert into foo (a, b, c, d) VALUES (1, 1, 2, 2); cqlsh:ks1> insert into foo (a, b, c, d) VALUES (1, 1, 3, 3); cqlsh:ks1> insert into foo (a, b, c, d) VALUES (1, 1, 4, 4); cqlsh:ks1> insert into foo (a, b, c, d) VALUES (1, 1, 5, 5); cqlsh:ks1> insert into foo (a, b, c, d) VALUES (1, 1, 6, 6); cqlsh:ks1> insert into foo (a, b, c, d) VALUES (1, 1, 7, 7); cqlsh:ks1> insert into foo (a, b, c, d) VALUES (1, 1, 8, 8); cqlsh:ks1> insert into foo (a, b, c, d) VALUES (1, 1, 9, 9); cqlsh:ks1> PAGING 5; cqlsh:ks1> SELECT * FROM foo WHERE a = 1 AND b IN (1, 1, 1); a | b | c | d ---+---+---+--- 1 | 1 | 0 | 0 1 | 1 | 1 | 1 1 | 1 | 2 | 2 1 | 1 | 3 | 3 1 | 1 | 4 | 4 ---MORE---ยท a | b | c | d ---+---+---+--- 1 | 1 | 5 | 5 1 | 1 | 6 | 6 1 | 1 | 7 | 7 1 | 1 | 8 | 8 1 | 1 | 9 | 9 ---MORE--- a | b | c | d ---+---+---+--- 1 | 1 | 0 | 0 1 | 1 | 1 | 1 1 | 1 | 2 | 2 1 | 1 | 3 | 3 1 | 1 | 4 | 4 ---MORE--- a | b | c | d ---+---+---+--- 1 | 1 | 5 | 5 1 | 1 | 6 | 6 1 | 1 | 7 | 7 1 | 1 | 8 | 8 1 | 1 | 9 | 9 ... (repeats endlessly) {noformat} This does not reproduce in 2.2. This is somewhat different from CASSANDRA-8276, which was just complaining about duplicate result rows when duplicate {{IN}} values are used. The real problem here is that the paged results never end. > Duplicated Key in IN clause with a small fetch size will run forever > -------------------------------------------------------------------- > > Key: CASSANDRA-12420 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12420 > Project: Cassandra > Issue Type: Bug > Environment: cassandra 2.1.14, driver 2.1.7.1 > Reporter: ZhaoYang > Assignee: ZhaoYang > Attachments: CASSANDRA-12420.patch > > > This can be easily reproduced and fetch size is smaller than the correct > number of rows. > A table has 2 partition key, 1 clustering key, 1 column. > > Select select = QueryBuilder.select().from("ks", "cf"); > > select.where().and(QueryBuilder.eq("a", 1)); > > select.where().and(QueryBuilder.in("b", Arrays.asList(1, 1, 1))); > > select.setFetchSize(5); > Now we put a distinct method in client side to eliminate the duplicated key, > but it's better to fix inside Cassandra. -- This message was sent by Atlassian JIRA (v6.3.4#6332)