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 13094200D0F for ; Fri, 29 Sep 2017 21:22:07 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 118031609D1; Fri, 29 Sep 2017 19:22:07 +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 56A111609BC for ; Fri, 29 Sep 2017 21:22:06 +0200 (CEST) Received: (qmail 99523 invoked by uid 500); 29 Sep 2017 19:22:05 -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 99512 invoked by uid 99); 29 Sep 2017 19:22:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Sep 2017 19:22:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 6FC5E1A42C2 for ; Fri, 29 Sep 2017 19:22:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-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-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id kZa81DpkStC9 for ; Fri, 29 Sep 2017 19:22:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 418DB60D08 for ; Fri, 29 Sep 2017 19:22:02 +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 3C406E0F1C for ; Fri, 29 Sep 2017 19:22: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 88E8D242C1 for ; Fri, 29 Sep 2017 19:22:00 +0000 (UTC) Date: Fri, 29 Sep 2017 19:22:00 +0000 (UTC) From: "Aleksey Yeschenko (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (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 19:22:07 -0000 [ https://issues.apache.org/jira/browse/CASSANDRA-13595?page=3Dcom.atla= ssian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId= =3D16186272#comment-16186272 ]=20 Aleksey Yeschenko commented on CASSANDRA-13595: ----------------------------------------------- Thanks. Squashed the last to commits together, will commit once CI is happy= . > 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