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 96CAB200BE8 for ; Thu, 8 Dec 2016 19:43:02 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 9567D160B1F; Thu, 8 Dec 2016 18:43:02 +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 90632160B0A for ; Thu, 8 Dec 2016 19:43:01 +0100 (CET) Received: (qmail 17916 invoked by uid 500); 8 Dec 2016 18:42:59 -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 17729 invoked by uid 99); 8 Dec 2016 18:42:59 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Dec 2016 18:42:59 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 6A41B2C03DF for ; Thu, 8 Dec 2016 18:42:59 +0000 (UTC) Date: Thu, 8 Dec 2016 18:42:59 +0000 (UTC) From: "Tyler Hobbs (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (CASSANDRA-13004) Corruption while adding a column to a table MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 08 Dec 2016 18:43:02 -0000 [ https://issues.apache.org/jira/browse/CASSANDRA-13004?page=3Dcom.atla= ssian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId= =3D15733022#comment-15733022 ]=20 Tyler Hobbs edited comment on CASSANDRA-13004 at 12/8/16 6:42 PM: ------------------------------------------------------------------ So far I've had no luck reproducing this locally. I dug into the response = that the driver got, and this is the breakdown of the message: {noformat} \x84\x00\x00\x1b\x08\x00\x00\x03w\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x= 00\x0f\x00\x10discord_channels\x00\x08channels # flags and metadata \x00\x02id\x00\x02 # col 0 \x00\x0eapplication_id\x00\x02 # col 1 \x00\x07bitrate\x00\t # col 2 \x00\x08guild_id\x00\x02 # col 3 \x00\ticon_hash\x00\r # col 4 \x00\x0flast_message_id\x00\x02 # col 5 \x00\x12last_pin_timestamp\x00\x0b # col 6 \x00\x04name\x00\r # col 7 \x00\x08owner_id\x00\x02 # col 8 \x00\x15permission_overwrites\x00! # col 9 \x00\x02\x000\x00\x10discord_channels\x00\x1c channel_permission_overwrite\x00\x04 \x00\x02id\x00\x02 \x00\x04type\x00\t \x00\x06allow_\x00\t \x00\x04deny\x00\t \x00\x08position\x00\t # col 10 \x00\nrecipients\x00! # col 11 \x00\x02\x000\x00\x10discord_channels\x00\x11channel_recipient\x00\x01 \x00\x04nick\x00\r \x00\x05topic\x00\r # col 12 \x00\x04type\x00\x14 # col 13 \x00\nuser_limit\x00\t # col 14 \x00\x00\x00\x01 # row count \x00\x00\x00\x08 \x03\x8a\x19\x8e\xf8\x82\x00\x01 # value 0, id (722015980= 85466627) \xff\xff\xff\xff # value 1, application_i= d (null) \x00\x00\x00\x04 \x00\x00\xfa\x00 # value 2, bitrate (1638= 4000) \x00\x00\x00\x08 \x00\x00\xfa\x00\x00\xf8G\xc5 # value 3, guild_id (142= 15603427718332416) \x00\x00\x00\x00 # value 4 icon_hash (emp= ty string) \x00\x00\x00\x08 \x03\x8b\xc0\xb5nB\x00\x02 # value 5 last_message_i= d (144188231338986243) \x00\x00\x00\x08 G\xc5\xffI\x98\xc4\xb4( # value 6 last_pin_times= tamp (2933185415680607559) \x00\x00\x00\x03 \x8b\xc0\xa8 # value 7 (non-UTF8 comp= liant string) \xff\xff\xff\xff # value 8, owner_id (nul= l) \x00\x00\x01< # absurdly large value s= ize (1006698496), rest of message unreliable \x00\x00\x00\x06\x00\x00\x00\x08\x03\x81L\xea\xfc\x82\x00\n\x00\x00\x00$\x0= 0\x00\x00\x08\x03\x81L\xea\xfc\x82\x00\n\x00\x00\x00\x04\x00\x00\x00\x01\x0= 0\x00\x00\x04\x00\x00\x08\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x= 08\x03\x8a\x1e\xe6\x8b\x80\x00\n\x00\x00\x00$\x00\x00\x00\x08\x03\x8a\x1e\x= e6\x8b\x80\x00\n\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x040\x07\xf8Q\= x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x08\x03\x8a\x1f\x1b{\x82\x00\x0= 0\x00\x00\x00$\x00\x00\x00\x08\x03\x8a\x1f\x1b{\x82\x00\x00\x00\x00\x00\x04= \x00\x00\x00\x00\x00\x00\x00\x04\x00\x07\xf8Q\x00\x00\x00\x04\x10\x00\x00\x= 00\x00\x00\x00\x08\x03\x8a\x1fH6\x82\x00\x01\x00\x00\x00$\x00\x00\x00\x08\x= 03\x8a\x1fH6\x82\x00\x01\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x04\x0= 0\x05\xe8A\x00\x00\x00\x04\x10\x02\x00\x00\x00\x00\x00\x08\x03\x8a+=3D\xca\= xc0\x00\n\x00\x00\x00$\x00\x00\x00\x08\x03\x8a+=3D\xca\xc0\x00\n\x00\x00\x0= 0\x04\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x08\x00\x00\x00\x00\x04\x00\x= 00\x00\x00\x00\x00\x00\x08\x03\x8a\x8f\x979\x80\x00\n\x00\x00\x00$\x00\x00\= x00\x08\x03\x8a\x8f\x979\x80\x00\n\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\= x00\x04\x00\x00\x00\x00\x00\x00\x00\x04\x00 \x08\x01\x00\x00\x00\x04\xc4\xb= 4(\x00\xff\xff\xff\xff\x00\x00\x00O[f\x80Q\x07general\x05\xf8G\xc5\xffI\x98= \xc4\xb4(\x00\xf8O[f\x80Q\x00\x00\x00\x02\x04\xf8O[f\x80Q\x00\xf8G\xc5\xffI= \x98\x01\x00\x00\xf8O[f\x80Q\x00\x00\x00\x00\xf8G\xc5\xffI\x97\xc4\xb4(\x06= \x00\xf8O\x7fe\x1fm\x08\x03\x00\x00\x00\x01\x00\x00\x00\x00\x04\x00\x00\x00= \x00 {noformat} Do any of those other column values look incorrect to you? was (Author: thobbs): So far I've had no luck reproducing this locally. I dug into the response = that the driver got, and this is the breakdown of the message: {noformat} \x84\x00\x00\x1b\x08\x00\x00\x03w\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x= 00\x0f\x00\x10discord_channels\x00\x08channels # flags and metadata \x00\x02id\x00\x02 # col 0 \x00\x0eapplication_id\x00\x02 # col 1 \x00\x07bitrate\x00\t # col 2 \x00\x08guild_id\x00\x02 # col 3 \x00\ticon_hash\x00\r # col 4 \x00\x0flast_message_id\x00\x02 # col 5 \x00\x12last_pin_timestamp\x00\x0b # col 6 \x00\x04name\x00\r # col 7 \x00\x08owner_id\x00\x02 # col 8 \x00\x15permission_overwrites\x00! # col 9 \x00\x02\x000\x00\x10discord_channels\x00\x1c channel_permission_overwrite\x00\x04 \x00\x02id\x00\x02 \x00\x04type\x00\t \x00\x06allow_\x00\t \x00\x04deny\x00\t \x00\x08position\x00\t # col 10 \x00\nrecipients\x00! # col 11 \x00\x02\x000\x00\x10discord_channels\x00\x11channel_recipient\x00\x01 \x00\x04nick\x00\r # col 12 \x00\x05topic\x00\r # col 13 \x00\x04type\x00\x14 # col 14 \x00\nuser_limit\x00\t # end type codes \x00\x00\x00\x01 # row count \x00\x00\x00\x08 \x03\x8a\x19\x8e\xf8\x82\x00\x01 # value 0, id (722015980= 85466627) \xff\xff\xff\xff # value 1, application_i= d (null) \x00\x00\x00\x04 \x00\x00\xfa\x00 # value 2, bitrate (1638= 4000) \x00\x00\x00\x08 \x00\x00\xfa\x00\x00\xf8G\xc5 # value 3, guild_id (142= 15603427718332416) \x00\x00\x00\x00 # value 4 icon_hash (emp= ty string) \x00\x00\x00\x08 \x03\x8b\xc0\xb5nB\x00\x02 # value 5 last_message_i= d (144188231338986243) \x00\x00\x00\x08 G\xc5\xffI\x98\xc4\xb4( # value 6 last_pin_times= tamp (2933185415680607559) \x00\x00\x00\x03 \x8b\xc0\xa8 # value 7 (non-UTF8 comp= liant string) \xff\xff\xff\xff # value 8, owner_id (nul= l) \x00\x00\x01< # absurdly large value s= ize (1006698496), rest of message unreliable \x00\x00\x00\x06\x00\x00\x00\x08\x03\x81L\xea\xfc\x82\x00\n\x00\x00\x00$\x0= 0\x00\x00\x08\x03\x81L\xea\xfc\x82\x00\n\x00\x00\x00\x04\x00\x00\x00\x01\x0= 0\x00\x00\x04\x00\x00\x08\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x= 08\x03\x8a\x1e\xe6\x8b\x80\x00\n\x00\x00\x00$\x00\x00\x00\x08\x03\x8a\x1e\x= e6\x8b\x80\x00\n\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x040\x07\xf8Q\= x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x08\x03\x8a\x1f\x1b{\x82\x00\x0= 0\x00\x00\x00$\x00\x00\x00\x08\x03\x8a\x1f\x1b{\x82\x00\x00\x00\x00\x00\x04= \x00\x00\x00\x00\x00\x00\x00\x04\x00\x07\xf8Q\x00\x00\x00\x04\x10\x00\x00\x= 00\x00\x00\x00\x08\x03\x8a\x1fH6\x82\x00\x01\x00\x00\x00$\x00\x00\x00\x08\x= 03\x8a\x1fH6\x82\x00\x01\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x04\x0= 0\x05\xe8A\x00\x00\x00\x04\x10\x02\x00\x00\x00\x00\x00\x08\x03\x8a+=3D\xca\= xc0\x00\n\x00\x00\x00$\x00\x00\x00\x08\x03\x8a+=3D\xca\xc0\x00\n\x00\x00\x0= 0\x04\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x08\x00\x00\x00\x00\x04\x00\x= 00\x00\x00\x00\x00\x00\x08\x03\x8a\x8f\x979\x80\x00\n\x00\x00\x00$\x00\x00\= x00\x08\x03\x8a\x8f\x979\x80\x00\n\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\= x00\x04\x00\x00\x00\x00\x00\x00\x00\x04\x00 \x08\x01\x00\x00\x00\x04\xc4\xb= 4(\x00\xff\xff\xff\xff\x00\x00\x00O[f\x80Q\x07general\x05\xf8G\xc5\xffI\x98= \xc4\xb4(\x00\xf8O[f\x80Q\x00\x00\x00\x02\x04\xf8O[f\x80Q\x00\xf8G\xc5\xffI= \x98\x01\x00\x00\xf8O[f\x80Q\x00\x00\x00\x00\xf8G\xc5\xffI\x97\xc4\xb4(\x06= \x00\xf8O\x7fe\x1fm\x08\x03\x00\x00\x00\x01\x00\x00\x00\x00\x04\x00\x00\x00= \x00 {noformat} Do any of those other column values look incorrect to you? > Corruption while adding a column to a table > ------------------------------------------- > > Key: CASSANDRA-13004 > URL: https://issues.apache.org/jira/browse/CASSANDRA-1300= 4 > Project: Cassandra > Issue Type: Bug > Reporter: Stanislav Vishnevskiy > > We had the following schema in production.=20 > {code:none} > CREATE TYPE IF NOT EXISTS discord_channels.channel_recipient ( > nick text > ); > CREATE TYPE IF NOT EXISTS discord_channels.channel_permission_overwrite ( > id bigint, > type int, > allow_ int, > deny int > ); > CREATE TABLE IF NOT EXISTS discord_channels.channels ( > id bigint, > guild_id bigint, > type tinyint, > name text, > topic text, > position int, > owner_id bigint, > icon_hash text, > recipients map>, > permission_overwrites map>, > bitrate int, > user_limit int, > last_pin_timestamp timestamp, > last_message_id bigint, > PRIMARY KEY (id) > ); > {code} > And then we executed the following alter. > {code:none} > ALTER TABLE discord_channels.channels ADD application_id bigint; > {code} > And one row (that we can tell) got corrupted at the same time and could n= o longer be read from the Python driver.=20 > {code:none} > [E 161206 01:56:58 geventreactor:141] Error decoding response from Cassan= dra. ver(4); flags(0000); stream(27); op(8); offset(9); len(887); buffer: '= \x84\x00\x00\x1b\x08\x00\x00\x03w\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x= 00\x0f\x00\x10discord_channels\x00\x08channels\x00\x02id\x00\x02\x00\x0eapp= lication_id\x00\x02\x00\x07bitrate\x00\t\x00\x08guild_id\x00\x02\x00\ticon_= hash\x00\r\x00\x0flast_message_id\x00\x02\x00\x12last_pin_timestamp\x00\x0b= \x00\x04name\x00\r\x00\x08owner_id\x00\x02\x00\x15permission_overwrites\x00= !\x00\x02\x000\x00\x10discord_channels\x00\x1cchannel_permission_overwrite\= x00\x04\x00\x02id\x00\x02\x00\x04type\x00\t\x00\x06allow_\x00\t\x00\x04deny= \x00\t\x00\x08position\x00\t\x00\nrecipients\x00!\x00\x02\x000\x00\x10disco= rd_channels\x00\x11channel_recipient\x00\x01\x00\x04nick\x00\r\x00\x05topic= \x00\r\x00\x04type\x00\x14\x00\nuser_limit\x00\t\x00\x00\x00\x01\x00\x00\x0= 0\x08\x03\x8a\x19\x8e\xf8\x82\x00\x01\xff\xff\xff\xff\x00\x00\x00\x04\x00\x= 00\xfa\x00\x00\x00\x00\x08\x00\x00\xfa\x00\x00\xf8G\xc5\x00\x00\x00\x00\x00= \x00\x00\x08\x03\x8b\xc0\xb5nB\x00\x02\x00\x00\x00\x08G\xc5\xffI\x98\xc4\xb= 4(\x00\x00\x00\x03\x8b\xc0\xa8\xff\xff\xff\xff\x00\x00\x01<\x00\x00\x00\x06= \x00\x00\x00\x08\x03\x81L\xea\xfc\x82\x00\n\x00\x00\x00$\x00\x00\x00\x08\x0= 3\x81L\xea\xfc\x82\x00\n\x00\x00\x00\x04\x00\x00\x00\x01\x00\x00\x00\x04\x0= 0\x00\x08\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x08\x03\x8a\x1e\x= e6\x8b\x80\x00\n\x00\x00\x00$\x00\x00\x00\x08\x03\x8a\x1e\xe6\x8b\x80\x00\n= \x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x040\x07\xf8Q\x00\x00\x00\x04\= x00\x00\x00\x00\x00\x00\x00\x08\x03\x8a\x1f\x1b{\x82\x00\x00\x00\x00\x00$\x= 00\x00\x00\x08\x03\x8a\x1f\x1b{\x82\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00= \x00\x00\x00\x04\x00\x07\xf8Q\x00\x00\x00\x04\x10\x00\x00\x00\x00\x00\x00\x= 08\x03\x8a\x1fH6\x82\x00\x01\x00\x00\x00$\x00\x00\x00\x08\x03\x8a\x1fH6\x82= \x00\x01\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x04\x00\x05\xe8A\x00\x= 00\x00\x04\x10\x02\x00\x00\x00\x00\x00\x08\x03\x8a+=3D\xca\xc0\x00\n\x00\x0= 0\x00$\x00\x00\x00\x08\x03\x8a+=3D\xca\xc0\x00\n\x00\x00\x00\x04\x00\x00\x0= 0\x00\x00\x00\x00\x04\x00\x00\x08\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x= 00\x00\x08\x03\x8a\x8f\x979\x80\x00\n\x00\x00\x00$\x00\x00\x00\x08\x03\x8a\= x8f\x979\x80\x00\n\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\= x00\x00\x00\x00\x00\x04\x00 \x08\x01\x00\x00\x00\x04\xc4\xb4(\x00\xff\xff\x= ff\xff\x00\x00\x00O[f\x80Q\x07general\x05\xf8G\xc5\xffI\x98\xc4\xb4(\x00\xf= 8O[f\x80Q\x00\x00\x00\x02\x04\xf8O[f\x80Q\x00\xf8G\xc5\xffI\x98\x01\x00\x00= \xf8O[f\x80Q\x00\x00\x00\x00\xf8G\xc5\xffI\x97\xc4\xb4(\x06\x00\xf8O\x7fe\x= 1fm\x08\x03\x00\x00\x00\x01\x00\x00\x00\x00\x04\x00\x00\x00\x00' > {code} > And then in cqlsh when trying to read the row we got this.=20 > {code:none} > /usr/bin/cqlsh.py:632: DateOverFlowWarning: Some timestamps are larger th= an Python datetime can represent. Timestamps are displayed in milliseconds = from epoch. > Traceback (most recent call last): > File "/usr/bin/cqlsh.py", line 1301, in perform_simple_statement > result =3D future.result() > File "/usr/share/cassandra/lib/cassandra-driver-internal-only-3.5.0.pos= t0-d8d0456.zip/cassandra-driver-3.5.0.post0-d8d0456/cassandra/cluster.py", = line 3650, in result > raise self._final_exception > UnicodeDecodeError: 'utf8' codec can't decode byte 0x80 in position 2: in= valid start byte > {code} > We tried to read the data and it would refuse to read the name column (th= e UTF8 error) and the last_pin_timestamp column had an absurdly large value= . > We ended up rewriting the whole row as we had the data in another place a= nd it fixed the problem. However there is clearly a race condition in the s= chema change sub-system. > Any ideas? -- This message was sent by Atlassian JIRA (v6.3.4#6332)