Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 79C19200D09 for ; Tue, 12 Sep 2017 11:23:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 7265E1609C7; Tue, 12 Sep 2017 09:23:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B7F881609C6 for ; Tue, 12 Sep 2017 11:23:04 +0200 (CEST) Received: (qmail 87760 invoked by uid 500); 12 Sep 2017 09:23:02 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 87749 invoked by uid 99); 12 Sep 2017 09:23:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Sep 2017 09:23:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 62F7A18BB41 for ; Tue, 12 Sep 2017 09:23:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id zi8Da71CCfVw for ; Tue, 12 Sep 2017 09:23:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id F04E55FD48 for ; Tue, 12 Sep 2017 09:23:00 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 7755FE010F for ; Tue, 12 Sep 2017 09:23:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 3101F24147 for ; Tue, 12 Sep 2017 09:23:00 +0000 (UTC) Date: Tue, 12 Sep 2017 09:23:00 +0000 (UTC) From: "ZhaoYang (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-13595) Short read protection doesn't work at the end of a partition MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 12 Sep 2017 09:23:05 -0000 [ https://issues.apache.org/jira/browse/CASSANDRA-13595?page=3Dcom.atla= ssian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId= =3D16162720#comment-16162720 ]=20 ZhaoYang commented on CASSANDRA-13595: -------------------------------------- The cause is no short-read-protection generated for node2 with key=3D2, bec= ause no UnfilteredRowIterator with key=3D2 for node2... {code} For initial read: Node1 returns: =20 PartitionIterator { UnfilteredIterator( k=3D1@tombstone, back by short-read-pro= tection) =20 UnfilteredIterator( k=3D2, back by short-read-protection) = =20 } Node2 returns:=20 PartitionIterator { UnfilteredIterator( k=3D1, back by short-read-protection)= =20 } {code} I think in this case, we should expect paging to fetch next partition inste= ad of short-read-protection which seems work only within partition, not acr= oss partition. > Short read protection doesn't work at the end of a partition > ------------------------------------------------------------ > > Key: CASSANDRA-13595 > URL: https://issues.apache.org/jira/browse/CASSANDRA-1359= 5 > Project: Cassandra > Issue Type: Bug > Components: Coordination > Reporter: Andr=C3=A9s de la Pe=C3=B1a > Assignee: ZhaoYang > > It seems that short read protection doesn't work when the short read is d= one at the end of a partition in a range query. The final assertion of this= dtest fails: > {code} > def short_read_partitions_delete_test(self): > cluster =3D self.cluster > cluster.set_configuration_options(values=3D{'hinted_handoff_enabl= ed': False}) > cluster.set_batch_commitlog(enabled=3DTrue) > cluster.populate(2).start(wait_other_notice=3DTrue) > node1, node2 =3D self.cluster.nodelist() > session =3D self.patient_cql_connection(node1) > create_ks(session, 'ks', 2) > session.execute("CREATE TABLE t (k int, c int, PRIMARY KEY(k, c))= WITH read_repair_chance =3D 0.0") > # we write 1 and 2 in a partition: all nodes get it. > session.execute(SimpleStatement("INSERT INTO t (k, c) VALUES (1, = 1)", consistency_level=3DConsistencyLevel.ALL)) > session.execute(SimpleStatement("INSERT INTO t (k, c) VALUES (2, = 1)", consistency_level=3DConsistencyLevel.ALL)) > # we delete partition 1: only node 1 gets it. > node2.flush() > node2.stop(wait_other_notice=3DTrue) > session =3D self.patient_cql_connection(node1, 'ks', consistency_= level=3DConsistencyLevel.ONE) > session.execute(SimpleStatement("DELETE FROM t WHERE k =3D 1")) > node2.start(wait_other_notice=3DTrue) > # we delete partition 2: only node 2 gets it. > node1.flush() > node1.stop(wait_other_notice=3DTrue) > session =3D self.patient_cql_connection(node2, 'ks', consistency_= level=3DConsistencyLevel.ONE) > session.execute(SimpleStatement("DELETE FROM t WHERE k =3D 2")) > node1.start(wait_other_notice=3DTrue) > # read from both nodes > session =3D self.patient_cql_connection(node1, 'ks', consistency_= level=3DConsistencyLevel.ALL) > assert_none(session, "SELECT * FROM t LIMIT 1") > {code} > However, the dtest passes if we remove the {{LIMIT 1}}. > Short read protection [uses a {{SinglePartitionReadCommand}}|https://gith= ub.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/service/Da= taResolver.java#L484], maybe it should use a {{PartitionRangeReadCommand}} = instead? -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org For additional commands, e-mail: commits-help@cassandra.apache.org