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 23455200D0F for ; Fri, 29 Sep 2017 19:35:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 21CF31609ED; Fri, 29 Sep 2017 17:35: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 67C0D1609D1 for ; Fri, 29 Sep 2017 19:35:04 +0200 (CEST) Received: (qmail 99674 invoked by uid 500); 29 Sep 2017 17:35:03 -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 99663 invoked by uid 99); 29 Sep 2017 17:35:03 -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; Fri, 29 Sep 2017 17:35:03 +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 D95B3180EF7 for ; Fri, 29 Sep 2017 17:35: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 uBnIleOW2ckM for ; Fri, 29 Sep 2017 17:35: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 872A25F3CE for ; Fri, 29 Sep 2017 17:35:01 +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 1F5D7E095A for ; Fri, 29 Sep 2017 17:35:01 +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 D2B60242B3 for ; Fri, 29 Sep 2017 17:35:00 +0000 (UTC) Date: Fri, 29 Sep 2017 17:35:00 +0000 (UTC) From: "Aleksey Yeschenko (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CASSANDRA-13595) Implement short read protection on partition boundaries MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 29 Sep 2017 17:35:05 -0000 [ https://issues.apache.org/jira/browse/CASSANDRA-13595?page=3Dcom.atl= assian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aleksey Yeschenko updated CASSANDRA-13595: ------------------------------------------ Status: Patch Available (was: In Progress) > Implement short read protection on partition boundaries > ------------------------------------------------------- > > 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: Aleksey Yeschenko > Labels: Correctness > Fix For: 3.0.15, 3.11.1 > > > 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