[jira] [Commented] (CASSANDRA-12620) Resurrected empty rows on update to 3.x

2016-12-05 Thread Benjamin Lerer (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-12620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15724737#comment-15724737
 ] 

Benjamin Lerer commented on CASSANDRA-12620:


Thanks for all the information. I will focus on this problem this week.

> Resurrected empty rows on update to 3.x
> ---
>
> Key: CASSANDRA-12620
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12620
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Collin Sauve
>Assignee: Benjamin Lerer
>
> We had the below table on C* 2.x (dse 4.8.4, we assume was 2.1.15.1423 
> according to documentation), and were entering TTLs at write-time using the 
> DataStax C# Driver (using the POCO mapper).
> Upon upgrade to 3.0.8.1293 (DSE 5.0.2), we are seeing a lot of rows that:
> * should have been TTL'd
> * have no non-primary-key column data
> {code}
> CREATE TABLE applicationservices.aggregate_bucket_event_v3 (
> bucket_type int,
> bucket_id text,
> date timestamp,
> aggregate_id text,
> event_type int,
> event_id text,
> entities list>>,
> identity_sid text,
> PRIMARY KEY ((bucket_type, bucket_id), date, aggregate_id, event_type, 
> event_id)
> ) WITH CLUSTERING ORDER BY (date DESC, aggregate_id ASC, event_type ASC, 
> event_id ASC)
> AND bloom_filter_fp_chance = 0.1
> AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
> AND comment = ''
> AND compaction = {'class': 
> 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'}
> AND compression = {'chunk_length_in_kb': '64', 'class': 
> 'org.apache.cassandra.io.compress.LZ4Compressor'}
> AND crc_check_chance = 1.0
> AND dclocal_read_repair_chance = 0.1
> AND default_time_to_live = 0
> AND gc_grace_seconds = 864000
> AND max_index_interval = 2048
> AND memtable_flush_period_in_ms = 0
> AND min_index_interval = 128
> AND read_repair_chance = 0.0
> AND speculative_retry = '99PERCENTILE';
> {code}
> {code}
> {
> "partition" : {
>   "key" : [ "0", "26492" ],
>   "position" : 54397932
> },
> "rows" : [
>   {
> "type" : "row",
> "position" : 54397961,
> "clustering" : [ "2016-09-07 23:33Z", "3651664", "0", 
> "773665449947099136" ],
> "liveness_info" : { "tstamp" : "2016-09-07T23:34:09.758Z", "ttl" : 
> 172741, "expires_at" : "2016-09-09T23:33:10Z", "expired" : false },
> "cells" : [
>   { "name" : "identity_sid", "value" : "p_tw_zahidana" },
>   { "name" : "entities", "deletion_info" : { "marked_deleted" : 
> "2016-09-07T23:34:09.757999Z", "local_delete_time" : "2016-09-07T23:34:09Z" } 
> },
>   { "name" : "entities", "path" : [ 
> "936e17e1-7553-11e6-9b92-29a33b5827c3" ], "value" : 
> "0:https\\://www.youtube.com/watch?v=pwAJAssv6As" },
>   { "name" : "entities", "path" : [ 
> "936e17e2-7553-11e6-9b92-29a33b5827c3" ], "value" : "2:youtube" }
> ]
>   },
>   {
> "type" : "row",
>},
>   {
> "type" : "row",
> "position" : 54397177,
> "clustering" : [ "2016-08-17 10:00Z", "6387376", "0", 
> "765850666296225792" ],
> "liveness_info" : { "tstamp" : "2016-08-17T11:26:15.917001Z" },
> "cells" : [ ]
>   },
>   {
> "type" : "row",
> "position" : 54397227,
> "clustering" : [ "2016-08-17 07:00Z", "6387376", "0", 
> "765805367347601409" ],
> "liveness_info" : { "tstamp" : "2016-08-17T08:11:17.587Z" },
> "cells" : [ ]
>   },
>   {
> "type" : "row",
> "position" : 54397276,
> "clustering" : [ "2016-08-17 04:00Z", "6387376", "0", 
> "765760069858365441" ],
> "liveness_info" : { "tstamp" : "2016-08-17T05:58:11.228Z" },
> "cells" : [ ]
>   },
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (CASSANDRA-8398) Expose time spent waiting in thread pool queue

2016-12-05 Thread Dikang Gu (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15724629#comment-15724629
 ] 

Dikang Gu edited comment on CASSANDRA-8398 at 12/6/16 6:59 AM:
---

[~tjake] this is the patch including the {{tpstats}} changes, I also attach the 
screen shot here, can you please take a look? thanks!

|[patch | 
https://github.com/DikangGu/cassandra/commit/c9f66fa213c0538e83e92591f7836deba4a24047]|


was (Author: dikanggu):
[~tjake] this is the patch including the {{tpstats}} changes, I also attach the 
screen shot here, please take a look, thanks!

|[patch | 
https://github.com/DikangGu/cassandra/commit/c9f66fa213c0538e83e92591f7836deba4a24047]|

> Expose time spent waiting in thread pool queue 
> ---
>
> Key: CASSANDRA-8398
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8398
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: T Jake Luciani
>Assignee: Dikang Gu
>Priority: Minor
>  Labels: lhf
> Fix For: 3.12
>
> Attachments: tpstats.png
>
>
> We are missing an important source of latency in our system, the time waiting 
> to be processed by thread pools.  We should add a metric for this so someone 
> can easily see how much time is spent just waiting to be processed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-8398) Expose time spent waiting in thread pool queue

2016-12-05 Thread Dikang Gu (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-8398?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dikang Gu updated CASSANDRA-8398:
-
Attachment: tpstats.png

> Expose time spent waiting in thread pool queue 
> ---
>
> Key: CASSANDRA-8398
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8398
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: T Jake Luciani
>Assignee: Dikang Gu
>Priority: Minor
>  Labels: lhf
> Fix For: 3.12
>
> Attachments: tpstats.png
>
>
> We are missing an important source of latency in our system, the time waiting 
> to be processed by thread pools.  We should add a metric for this so someone 
> can easily see how much time is spent just waiting to be processed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8398) Expose time spent waiting in thread pool queue

2016-12-05 Thread Dikang Gu (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15724629#comment-15724629
 ] 

Dikang Gu commented on CASSANDRA-8398:
--

[~tjake] this is the patch including the {{tpstats}} changes, I also attach the 
screen shot here, please take a look, thanks!

|[patch | 
https://github.com/DikangGu/cassandra/commit/c9f66fa213c0538e83e92591f7836deba4a24047]|

> Expose time spent waiting in thread pool queue 
> ---
>
> Key: CASSANDRA-8398
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8398
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: T Jake Luciani
>Assignee: Dikang Gu
>Priority: Minor
>  Labels: lhf
> Fix For: 3.12
>
>
> We are missing an important source of latency in our system, the time waiting 
> to be processed by thread pools.  We should add a metric for this so someone 
> can easily see how much time is spent just waiting to be processed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8398) Expose time spent waiting in thread pool queue

2016-12-05 Thread Dikang Gu (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15724279#comment-15724279
 ] 

Dikang Gu commented on CASSANDRA-8398:
--

Yes, I also realize it's not per table metrics. :)

> Expose time spent waiting in thread pool queue 
> ---
>
> Key: CASSANDRA-8398
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8398
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: T Jake Luciani
>Assignee: Dikang Gu
>Priority: Minor
>  Labels: lhf
> Fix For: 3.12
>
>
> We are missing an important source of latency in our system, the time waiting 
> to be processed by thread pools.  We should add a metric for this so someone 
> can easily see how much time is spent just waiting to be processed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8398) Expose time spent waiting in thread pool queue

2016-12-05 Thread T Jake Luciani (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15724177#comment-15724177
 ] 

T Jake Luciani commented on CASSANDRA-8398:
---

Sorry I meant tpstats

> Expose time spent waiting in thread pool queue 
> ---
>
> Key: CASSANDRA-8398
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8398
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: T Jake Luciani
>Assignee: Dikang Gu
>Priority: Minor
>  Labels: lhf
> Fix For: 3.12
>
>
> We are missing an important source of latency in our system, the time waiting 
> to be processed by thread pools.  We should add a metric for this so someone 
> can easily see how much time is spent just waiting to be processed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (CASSANDRA-13004) Corruption while adding a column to a table

2016-12-05 Thread Stanislav Vishnevskiy (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-13004?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15724156#comment-15724156
 ] 

Stanislav Vishnevskiy edited comment on CASSANDRA-13004 at 12/6/16 3:01 AM:


We found this in the logs at the exact time this happened.

{code}
ERROR [SharedPool-Worker-11] 2016-12-06 01:44:16,971 Message.java:617 - 
Unexpected exception during request; channel = [id: 0xbd9a77e9, 
/10.10.0.48:38317 => /10.10.0.129:9042]
java.io.IOError: java.io.IOException: Corrupt value length 1485619006 
encountered, as it exceeds the maximum of 268435456, which is set via 
max_value_size_in_mb in cassandra.yaml
at 
org.apache.cassandra.db.rows.UnfilteredRowIteratorSerializer$1.computeNext(UnfilteredRowIteratorSerializer.java:222)
 ~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.db.rows.UnfilteredRowIteratorSerializer$1.computeNext(UnfilteredRowIteratorSerializer.java:210)
 ~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.utils.AbstractIterator.hasNext(AbstractIterator.java:47) 
~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.db.transform.BaseRows.hasNext(BaseRows.java:129) 
~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.utils.MergeIterator$Candidate.advance(MergeIterator.java:369)
 ~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.utils.MergeIterator$ManyToOne.advance(MergeIterator.java:189)
 ~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.utils.MergeIterator$ManyToOne.computeNext(MergeIterator.java:158)
 ~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.utils.AbstractIterator.hasNext(AbstractIterator.java:47) 
~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.db.rows.UnfilteredRowIterators$UnfilteredRowMergeIterator.computeNext(UnfilteredRowIterators.java:509)
 ~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.db.rows.UnfilteredRowIterators$UnfilteredRowMergeIterator.computeNext(UnfilteredRowIterators.java:369)
 ~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.utils.AbstractIterator.hasNext(AbstractIterator.java:47) 
~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.db.transform.BaseRows.hasNext(BaseRows.java:129) 
~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.db.transform.FilteredRows.isEmpty(FilteredRows.java:50) 
~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.db.transform.Filter.closeIfEmpty(Filter.java:73) 
~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.db.transform.Filter.applyToPartition(Filter.java:43) 
~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.db.transform.Filter.applyToPartition(Filter.java:26) 
~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.db.transform.BasePartitions.hasNext(BasePartitions.java:96)
 ~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:707)
 ~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:400)
 ~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:353)
 ~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:227)
 ~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:76)
 ~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:206)
 ~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.cql3.QueryProcessor.processPrepared(QueryProcessor.java:487)
 ~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.cql3.QueryProcessor.processPrepared(QueryProcessor.java:464)
 ~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.transport.messages.ExecuteMessage.execute(ExecuteMessage.java:130)
 ~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:513)
 [apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:407)
 [apache-cassandra-3.0.9.jar:3.0.9]
at 
io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
 [netty-all-4.0.23.Final.jar:4.0.23.Final]
at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
 [netty-all-4.0.23.Final.jar:4.0.23.Final]
at 
io.netty.channel.AbstractChannelHandlerContext.access$700(AbstractChannelHandlerContext.java:32)
 [netty-all-4.0.23.Final.ja

[jira] [Commented] (CASSANDRA-13004) Corruption while adding a column to a table

2016-12-05 Thread Stanislav Vishnevskiy (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-13004?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15724156#comment-15724156
 ] 

Stanislav Vishnevskiy commented on CASSANDRA-13004:
---

We found this in the logs at the exact time this happened.

{code}
ERROR [SharedPool-Worker-11] 2016-12-06 01:44:16,971 Message.java:617 - 
Unexpected exception during request; channel = [id: 0xbd9a77e9, 
/10.10.0.48:38317 => /10.10.0.129:9042]
java.io.IOError: java.io.IOException: Corrupt value length 1485619006 
encountered, as it exceeds the maximum of 268435456, which is set via 
max_value_size_in_mb in cassandra.yaml
at 
org.apache.cassandra.db.rows.UnfilteredRowIteratorSerializer$1.computeNext(UnfilteredRowIteratorSerializer.java:222)
 ~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.db.rows.UnfilteredRowIteratorSerializer$1.computeNext(UnfilteredRowIteratorSerializer.java:210)
 ~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.utils.AbstractIterator.hasNext(AbstractIterator.java:47) 
~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.db.transform.BaseRows.hasNext(BaseRows.java:129) 
~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.utils.MergeIterator$Candidate.advance(MergeIterator.java:369)
 ~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.utils.MergeIterator$ManyToOne.advance(MergeIterator.java:189)
 ~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.utils.MergeIterator$ManyToOne.computeNext(MergeIterator.java:158)
 ~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.utils.AbstractIterator.hasNext(AbstractIterator.java:47) 
~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.db.rows.UnfilteredRowIterators$UnfilteredRowMergeIterator.computeNext(UnfilteredRowIterators.java:509)
 ~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.db.rows.UnfilteredRowIterators$UnfilteredRowMergeIterator.computeNext(UnfilteredRowIterators.java:369)
 ~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.utils.AbstractIterator.hasNext(AbstractIterator.java:47) 
~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.db.transform.BaseRows.hasNext(BaseRows.java:129) 
~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.db.transform.FilteredRows.isEmpty(FilteredRows.java:50) 
~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.db.transform.Filter.closeIfEmpty(Filter.java:73) 
~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.db.transform.Filter.applyToPartition(Filter.java:43) 
~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.db.transform.Filter.applyToPartition(Filter.java:26) 
~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.db.transform.BasePartitions.hasNext(BasePartitions.java:96)
 ~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:707)
 ~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:400)
 ~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:353)
 ~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:227)
 ~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:76)
 ~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:206)
 ~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.cql3.QueryProcessor.processPrepared(QueryProcessor.java:487)
 ~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.cql3.QueryProcessor.processPrepared(QueryProcessor.java:464)
 ~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.transport.messages.ExecuteMessage.execute(ExecuteMessage.java:130)
 ~[apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:513)
 [apache-cassandra-3.0.9.jar:3.0.9]
at 
org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:407)
 [apache-cassandra-3.0.9.jar:3.0.9]
at 
io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
 [netty-all-4.0.23.Final.jar:4.0.23.Final]
at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
 [netty-all-4.0.23.Final.jar:4.0.23.Final]
at 
io.netty.channel.AbstractChannelHandlerContext.access$700(AbstractChannelHandlerContext.java:32)
 [netty-all-4.0.23.Final.jar:4.0.23.Final]
at 
io.netty.channel.Abst

[jira] [Updated] (CASSANDRA-13004) Corruption while adding a column to a table

2016-12-05 Thread Stanislav Vishnevskiy (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-13004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stanislav Vishnevskiy updated CASSANDRA-13004:
--
Summary: Corruption while adding a column to a table  (was: Corruption 
while adding a column to a table in production)

> Corruption while adding a column to a table
> ---
>
> Key: CASSANDRA-13004
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13004
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Stanislav Vishnevskiy
>
> We had the following schema in production. 
> {code:text}
> 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:text}
> 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 no 
> longer be read from the Python driver. 
> {code:text}
> [E 161206 01:56:58 geventreactor:141] Error decoding response from Cassandra. 
> ver(4); flags(); 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\x00\x0f\x00\x10discord_channels\x00\x08channels\x00\x02id\x00\x02\x00\x0eapplication_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\x10discord_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\x00\x08\x03\x8a\x19\x8e\xf8\x82\x00\x01\xff\xff\xff\xff\x00\x00\x00\x04\x00\x00\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\xb4(\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\x03\x81L\xea\xfc\x82\x00\n\x00\x00\x00\x04\x00\x00\x00\x01\x00\x00\x00\x04\x00\x00\x08\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x08\x03\x8a\x1e\xe6\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$\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\x00\x00\x00\x00\x08\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\x00\x00\x04\x10\x02\x00\x00\x00\x00\x00\x08\x03\x8a+=\xca\xc0\x00\n\x00\x00\x00$\x00\x00\x00\x08\x03\x8a+=\xca\xc0\x00\n\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x08\x00\x00\x00\x00\x04\x00\x00\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\xb4(\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'
> {code}
> And then in cqlsh when trying to read the row we got this. 
> {code:text}
> /usr/bin/cqlsh.py:632: DateOverFlowWarning: Some timestamps are larger than 
> 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 = future.result()
>   File 
> "/usr/share/cassandra/lib/cassandra-driver-internal-only-3.5.0.post0-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 by

[jira] [Updated] (CASSANDRA-13004) Corruption while add a column to a table in production

2016-12-05 Thread Stanislav Vishnevskiy (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-13004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stanislav Vishnevskiy updated CASSANDRA-13004:
--
Description: 
We had the following schema in production. 

{code:text}
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:text}
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 no 
longer be read from the Python driver. 

{code:text}
[E 161206 01:56:58 geventreactor:141] Error decoding response from Cassandra. 
ver(4); flags(); 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\x00\x0f\x00\x10discord_channels\x00\x08channels\x00\x02id\x00\x02\x00\x0eapplication_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\x10discord_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\x00\x08\x03\x8a\x19\x8e\xf8\x82\x00\x01\xff\xff\xff\xff\x00\x00\x00\x04\x00\x00\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\xb4(\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\x03\x81L\xea\xfc\x82\x00\n\x00\x00\x00\x04\x00\x00\x00\x01\x00\x00\x00\x04\x00\x00\x08\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x08\x03\x8a\x1e\xe6\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$\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\x00\x00\x00\x00\x08\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\x00\x00\x04\x10\x02\x00\x00\x00\x00\x00\x08\x03\x8a+=\xca\xc0\x00\n\x00\x00\x00$\x00\x00\x00\x08\x03\x8a+=\xca\xc0\x00\n\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x08\x00\x00\x00\x00\x04\x00\x00\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\xb4(\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'
{code}

And then in cqlsh when trying to read the row we got this. 

{code:text}
/usr/bin/cqlsh.py:632: DateOverFlowWarning: Some timestamps are larger than 
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 = future.result()
  File 
"/usr/share/cassandra/lib/cassandra-driver-internal-only-3.5.0.post0-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: invalid 
start byte
{code}

We tried to read the data and it would refuse to read the name column (the 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 and it 
fixed the problem. However there is clearly a race condition in the schema 
change sub-system.

Any ideas?

  was:
We had the following schema in production. 

{code:cql}
CREATE TYPE IF NOT EXISTS discord_channels.channel_recipient (
nick

[jira] [Updated] (CASSANDRA-13004) Corruption while adding a column to a table

2016-12-05 Thread Stanislav Vishnevskiy (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-13004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stanislav Vishnevskiy updated CASSANDRA-13004:
--
Description: 
We had the following schema in production. 

{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 no 
longer be read from the Python driver. 

{code:none}
[E 161206 01:56:58 geventreactor:141] Error decoding response from Cassandra. 
ver(4); flags(); 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\x00\x0f\x00\x10discord_channels\x00\x08channels\x00\x02id\x00\x02\x00\x0eapplication_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\x10discord_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\x00\x08\x03\x8a\x19\x8e\xf8\x82\x00\x01\xff\xff\xff\xff\x00\x00\x00\x04\x00\x00\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\xb4(\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\x03\x81L\xea\xfc\x82\x00\n\x00\x00\x00\x04\x00\x00\x00\x01\x00\x00\x00\x04\x00\x00\x08\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x08\x03\x8a\x1e\xe6\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$\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\x00\x00\x00\x00\x08\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\x00\x00\x04\x10\x02\x00\x00\x00\x00\x00\x08\x03\x8a+=\xca\xc0\x00\n\x00\x00\x00$\x00\x00\x00\x08\x03\x8a+=\xca\xc0\x00\n\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x08\x00\x00\x00\x00\x04\x00\x00\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\xb4(\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'
{code}

And then in cqlsh when trying to read the row we got this. 

{code:none}
/usr/bin/cqlsh.py:632: DateOverFlowWarning: Some timestamps are larger than 
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 = future.result()
  File 
"/usr/share/cassandra/lib/cassandra-driver-internal-only-3.5.0.post0-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: invalid 
start byte
{code}

We tried to read the data and it would refuse to read the name column (the 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 and it 
fixed the problem. However there is clearly a race condition in the schema 
change sub-system.

Any ideas?

  was:
We had the following schema in production. 

{code:text}
CREATE TYPE IF NOT EXISTS discord_channels.channel_recipient (
nick 

[jira] [Updated] (CASSANDRA-13004) Corruption while adding a column to a table in production

2016-12-05 Thread Stanislav Vishnevskiy (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-13004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stanislav Vishnevskiy updated CASSANDRA-13004:
--
Summary: Corruption while adding a column to a table in production  (was: 
Corruption while add a column to a table in production)

> Corruption while adding a column to a table in production
> -
>
> Key: CASSANDRA-13004
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13004
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Stanislav Vishnevskiy
>
> We had the following schema in production. 
> {code:text}
> 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:text}
> 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 no 
> longer be read from the Python driver. 
> {code:text}
> [E 161206 01:56:58 geventreactor:141] Error decoding response from Cassandra. 
> ver(4); flags(); 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\x00\x0f\x00\x10discord_channels\x00\x08channels\x00\x02id\x00\x02\x00\x0eapplication_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\x10discord_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\x00\x08\x03\x8a\x19\x8e\xf8\x82\x00\x01\xff\xff\xff\xff\x00\x00\x00\x04\x00\x00\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\xb4(\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\x03\x81L\xea\xfc\x82\x00\n\x00\x00\x00\x04\x00\x00\x00\x01\x00\x00\x00\x04\x00\x00\x08\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x08\x03\x8a\x1e\xe6\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$\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\x00\x00\x00\x00\x08\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\x00\x00\x04\x10\x02\x00\x00\x00\x00\x00\x08\x03\x8a+=\xca\xc0\x00\n\x00\x00\x00$\x00\x00\x00\x08\x03\x8a+=\xca\xc0\x00\n\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x08\x00\x00\x00\x00\x04\x00\x00\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\xb4(\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'
> {code}
> And then in cqlsh when trying to read the row we got this. 
> {code:text}
> /usr/bin/cqlsh.py:632: DateOverFlowWarning: Some timestamps are larger than 
> 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 = future.result()
>   File 
> "/usr/share/cassandra/lib/cassandra-driver-internal-only-3.5.0.post0-d8d0456.zip/cassandra-driver-3.5.0.post0-d8d0456/cassandra/cluster.py",
>  line 3650, in result
> raise self._final_exception
> UnicodeDe

[jira] [Updated] (CASSANDRA-13004) Corruption while add a column to a table in production

2016-12-05 Thread Stanislav Vishnevskiy (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-13004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stanislav Vishnevskiy updated CASSANDRA-13004:
--
Description: 
We had the following schema in production. 

{code:cql}
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:cql}
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 no 
longer be read from the Python driver. 

{code:text}
[E 161206 01:56:58 geventreactor:141] Error decoding response from Cassandra. 
ver(4); flags(); 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\x00\x0f\x00\x10discord_channels\x00\x08channels\x00\x02id\x00\x02\x00\x0eapplication_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\x10discord_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\x00\x08\x03\x8a\x19\x8e\xf8\x82\x00\x01\xff\xff\xff\xff\x00\x00\x00\x04\x00\x00\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\xb4(\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\x03\x81L\xea\xfc\x82\x00\n\x00\x00\x00\x04\x00\x00\x00\x01\x00\x00\x00\x04\x00\x00\x08\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x08\x03\x8a\x1e\xe6\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$\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\x00\x00\x00\x00\x08\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\x00\x00\x04\x10\x02\x00\x00\x00\x00\x00\x08\x03\x8a+=\xca\xc0\x00\n\x00\x00\x00$\x00\x00\x00\x08\x03\x8a+=\xca\xc0\x00\n\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x08\x00\x00\x00\x00\x04\x00\x00\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\xb4(\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'
{code}

And then in cqlsh when trying to read the row we got this. 

{code:text}
/usr/bin/cqlsh.py:632: DateOverFlowWarning: Some timestamps are larger than 
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 = future.result()
  File 
"/usr/share/cassandra/lib/cassandra-driver-internal-only-3.5.0.post0-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: invalid 
start byte
{/code}

We tried to read the data and it would refuse to read the name column (the 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 and it 
fixed the problem. However there is clearly a race condition in the schema 
change sub-system.

Any ideas?

  was:
We had the following schema in production. 

{code:cql}
CREATE TYPE IF NOT EXISTS discord_channels.channel_recipient (
nick 

[jira] [Updated] (CASSANDRA-13004) Corruption while add a column to a table in production

2016-12-05 Thread Stanislav Vishnevskiy (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-13004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stanislav Vishnevskiy updated CASSANDRA-13004:
--
Description: 
We had the following schema in production. 

{code:cql}
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:cql}
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 no 
longer be read from the Python driver. 

{code:text}
[E 161206 01:56:58 geventreactor:141] Error decoding response from Cassandra. 
ver(4); flags(); 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\x00\x0f\x00\x10discord_channels\x00\x08channels\x00\x02id\x00\x02\x00\x0eapplication_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\x10discord_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\x00\x08\x03\x8a\x19\x8e\xf8\x82\x00\x01\xff\xff\xff\xff\x00\x00\x00\x04\x00\x00\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\xb4(\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\x03\x81L\xea\xfc\x82\x00\n\x00\x00\x00\x04\x00\x00\x00\x01\x00\x00\x00\x04\x00\x00\x08\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x08\x03\x8a\x1e\xe6\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$\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\x00\x00\x00\x00\x08\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\x00\x00\x04\x10\x02\x00\x00\x00\x00\x00\x08\x03\x8a+=\xca\xc0\x00\n\x00\x00\x00$\x00\x00\x00\x08\x03\x8a+=\xca\xc0\x00\n\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x08\x00\x00\x00\x00\x04\x00\x00\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\xb4(\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'
{code}

And then in cqlsh when trying to read the row we got this. 

{code:text}
/usr/bin/cqlsh.py:632: DateOverFlowWarning: Some timestamps are larger than 
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 = future.result()
  File 
"/usr/share/cassandra/lib/cassandra-driver-internal-only-3.5.0.post0-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: invalid 
start byte
{code}

We tried to read the data and it would refuse to read the name column (the 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 and it 
fixed the problem. However there is clearly a race condition in the schema 
change sub-system.

Any ideas?

  was:
We had the following schema in production. 

{code:cql}
CREATE TYPE IF NOT EXISTS discord_channels.channel_recipient (
nick t

[jira] [Created] (CASSANDRA-13004) Corruption while add a column to a table in production

2016-12-05 Thread Stanislav Vishnevskiy (JIRA)
Stanislav Vishnevskiy created CASSANDRA-13004:
-

 Summary: Corruption while add a column to a table in production
 Key: CASSANDRA-13004
 URL: https://issues.apache.org/jira/browse/CASSANDRA-13004
 Project: Cassandra
  Issue Type: Bug
Reporter: Stanislav Vishnevskiy


We had the following schema in production. 

{code:cql}
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:cql}
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 no 
longer be read from the Python driver. 

{code}
[E 161206 01:56:58 geventreactor:141] Error decoding response from Cassandra. 
ver(4); flags(); 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\x00\x0f\x00\x10discord_channels\x00\x08channels\x00\x02id\x00\x02\x00\x0eapplication_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\x10discord_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\x00\x08\x03\x8a\x19\x8e\xf8\x82\x00\x01\xff\xff\xff\xff\x00\x00\x00\x04\x00\x00\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\xb4(\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\x03\x81L\xea\xfc\x82\x00\n\x00\x00\x00\x04\x00\x00\x00\x01\x00\x00\x00\x04\x00\x00\x08\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x08\x03\x8a\x1e\xe6\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$\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\x00\x00\x00\x00\x08\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\x00\x00\x04\x10\x02\x00\x00\x00\x00\x00\x08\x03\x8a+=\xca\xc0\x00\n\x00\x00\x00$\x00\x00\x00\x08\x03\x8a+=\xca\xc0\x00\n\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x08\x00\x00\x00\x00\x04\x00\x00\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\xb4(\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'
{code}

And then in cqlsh when trying to read the row we got this. 

{code}
/usr/bin/cqlsh.py:632: DateOverFlowWarning: Some timestamps are larger than 
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 = future.result()
  File 
"/usr/share/cassandra/lib/cassandra-driver-internal-only-3.5.0.post0-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: invalid 
start byte
{/code}

We tried to read the data and it would refuse to read the name column (the 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 and it 
fixed the problem. However there is clearly a race condition in the schema 
change sub-system.

Any ideas

[jira] [Commented] (CASSANDRA-8398) Expose time spent waiting in thread pool queue

2016-12-05 Thread Dikang Gu (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15724079#comment-15724079
 ] 

Dikang Gu commented on CASSANDRA-8398:
--

[~tjake], thanks for the review, sure, I will add it to the {{nodetool 
tablehistograms}}, this is what you refer to, right?

> Expose time spent waiting in thread pool queue 
> ---
>
> Key: CASSANDRA-8398
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8398
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: T Jake Luciani
>Assignee: Dikang Gu
>Priority: Minor
>  Labels: lhf
> Fix For: 3.12
>
>
> We are missing an important source of latency in our system, the time waiting 
> to be processed by thread pools.  We should add a metric for this so someone 
> can easily see how much time is spent just waiting to be processed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-13003) Support a map of counters

2016-12-05 Thread Aleksey Yeschenko (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-13003?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15723792#comment-15723792
 ] 

Aleksey Yeschenko commented on CASSANDRA-13003:
---

It would, kind of, but ideally needs support for several things first.

One would be CASSANDRA-6506, another would be CASSANDRA-7826, both not on the 
immediate radar.

> Support a map of counters
> -
>
> Key: CASSANDRA-13003
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13003
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Andrew Voumard
>Priority: Minor
>
> Would it be possible to support the dynamic addition of counters, by 
> supporting a map of counters ? This would make it easier to support 
> situations where counters could be added more dynamically (where their names 
> are not known at design time).
> If it makes it any easier, I would expect it to be ok if the current 
> restriction of not being able to delete a counter remains, meaning requests 
> to remove an item from the map would be ignored or return an error.
> I expect it would be possible to synthesize this feature without impacting 
> the core code, by dynamically adding counter columns via dynamic schema ALTER 
> statements, creating something like - columns on 
> demand, effectively wrapping the dynamic column addition, but native cql 
> support would make this task simpler.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (CASSANDRA-13003) Support a map of counters

2016-12-05 Thread Andrew Voumard (JIRA)
Andrew Voumard created CASSANDRA-13003:
--

 Summary: Support a map of counters
 Key: CASSANDRA-13003
 URL: https://issues.apache.org/jira/browse/CASSANDRA-13003
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Andrew Voumard
Priority: Minor


Would it be possible to support the dynamic addition of counters, by supporting 
a map of counters ? This would make it easier to support situations where 
counters could be added more dynamically (where their names are not known at 
design time).

If it makes it any easier, I would expect it to be ok if the current 
restriction of not being able to delete a counter remains, meaning requests to 
remove an item from the map would be ignored or return an error.

I expect it would be possible to synthesize this feature without impacting the 
core code, by dynamically adding counter columns via dynamic schema ALTER 
statements, creating something like - columns on 
demand, effectively wrapping the dynamic column addition, but native cql 
support would make this task simpler.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-10446) Run repair with down replicas

2016-12-05 Thread Paulo Motta (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-10446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15723734#comment-15723734
 ] 

Paulo Motta commented on CASSANDRA-10446:
-

Sounds good!

> Run repair with down replicas
> -
>
> Key: CASSANDRA-10446
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10446
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: sankalp kohli
>Assignee: Blake Eggleston
>Priority: Minor
> Fix For: 4.0
>
>
> We should have an option of running repair when replicas are down. We can 
> call it -force.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-13000) slow query log analysis tool

2016-12-05 Thread Jeff Jirsa (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-13000?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jeff Jirsa updated CASSANDRA-13000:
---
Component/s: Observability

> slow query log analysis tool
> 
>
> Key: CASSANDRA-13000
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13000
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Observability
>Reporter: Jon Haddad
>
> As a follow up to CASSANDRA-12403, it would be very helpful to have a tool to 
> process the slow queries that are logged.  In the MySQL world, there's a tool 
> called mysqldumpslow, which processes a slow query log, abstracts the 
> parameters to prepared statements, and shows the queries which are causing 
> problems based on frequency.  The {{mysqldumpslow}} utillity shows an 
> aggregated count & time statistics spent on slow queries.  For instance:
> {code}shell> mysqldumpslow
> Reading mysql slow query log from 
> /usr/local/mysql/data/mysqld51-apple-slow.log
> Count: 1  Time=4.32s (4s)  Lock=0.00s (0s)  Rows=0.0 (0), root[root]@localhost
>  insert into t2 select * from t1
> Count: 3  Time=2.53s (7s)  Lock=0.00s (0s)  Rows=0.0 (0), root[root]@localhost
>  insert into t2 select * from t1 limit N
> Count: 3  Time=2.13s (6s)  Lock=0.00s (0s)  Rows=0.0 (0), root[root]@localhost
>  insert into t1 select * from t1{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (CASSANDRA-13002) per table slow query times

2016-12-05 Thread Jon Haddad (JIRA)
Jon Haddad created CASSANDRA-13002:
--

 Summary: per table slow query times
 Key: CASSANDRA-13002
 URL: https://issues.apache.org/jira/browse/CASSANDRA-13002
 Project: Cassandra
  Issue Type: New Feature
Reporter: Jon Haddad


CASSANDRA-12403 made it possible to log slow queries, but the time specified is 
a global one.  This isn't useful if we know different tables have different 
access patterns, as we'll end up with a lot of noise.  We should be able to 
override the slow query time at a per table level.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-13001) pluggable slow query logging / handling

2016-12-05 Thread Jon Haddad (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-13001?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jon Haddad updated CASSANDRA-13001:
---
Description: Currently CASSANDRA-12403 logs slow queries as DEBUG to a 
file.  It would be better to have this as an interface which we can log to 
alternative locations, such as to a table on the cluster or to a remote 
location (statsd, graphite, etc).(was: Currently CASSANDRA-12403 logs as 
DEBUG to a file.  It would be better to have this as an interface which we can 
log to alternative locations, such as to a table on the cluster or to a remote 
location (statsd, graphite, etc).  )

> pluggable slow query logging / handling
> ---
>
> Key: CASSANDRA-13001
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13001
> Project: Cassandra
>  Issue Type: New Feature
>Reporter: Jon Haddad
>
> Currently CASSANDRA-12403 logs slow queries as DEBUG to a file.  It would be 
> better to have this as an interface which we can log to alternative 
> locations, such as to a table on the cluster or to a remote location (statsd, 
> graphite, etc).  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (CASSANDRA-13001) pluggable slow query logging / handling

2016-12-05 Thread Jon Haddad (JIRA)
Jon Haddad created CASSANDRA-13001:
--

 Summary: pluggable slow query logging / handling
 Key: CASSANDRA-13001
 URL: https://issues.apache.org/jira/browse/CASSANDRA-13001
 Project: Cassandra
  Issue Type: New Feature
Reporter: Jon Haddad


Currently CASSANDRA-12403 logs as DEBUG to a file.  It would be better to have 
this as an interface which we can log to alternative locations, such as to a 
table on the cluster or to a remote location (statsd, graphite, etc).  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-12984) MVs are built unnecessarily again after bootstrap

2016-12-05 Thread Joshua McKenzie (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-12984?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Joshua McKenzie updated CASSANDRA-12984:

Reviewer: Carl Yeksigian

> MVs are built unnecessarily again after bootstrap
> -
>
> Key: CASSANDRA-12984
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12984
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Benjamin Roth
>Assignee: Benjamin Roth
> Fix For: 3.0.x, 3.x
>
>
> After bootstrap MVs are enqueued to be built but they have been already 
> created by the bootstrap.
> Simply adding them to system.built_views after a successful bootstrap should 
> fix that issue.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-12997) dtest failure in org.apache.cassandra.cql3.validation.operations.AlterTest.testDropListAndAddListWithSameName

2016-12-05 Thread Joshua McKenzie (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-12997?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Joshua McKenzie updated CASSANDRA-12997:

Assignee: Sylvain Lebresne

> dtest failure in 
> org.apache.cassandra.cql3.validation.operations.AlterTest.testDropListAndAddListWithSameName
> -
>
> Key: CASSANDRA-12997
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12997
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Sean McCarthy
>Assignee: Sylvain Lebresne
>  Labels: test-failure, testall
>
> example failure:
> http://cassci.datastax.com/job/trunk_testall/1298/testReport/org.apache.cassandra.cql3.validation.operations/AlterTest/testDropListAndAddListWithSameName
> {code}
> Error Message
> Invalid value for row 0 column 2 (mycollection of type list), expected 
>  but got <[first element]>
> {code}{code}Stacktrace
> junit.framework.AssertionFailedError: Invalid value for row 0 column 2 
> (mycollection of type list), expected  but got <[first element]>
>   at org.apache.cassandra.cql3.CQLTester.assertRows(CQLTester.java:908)
>   at 
> org.apache.cassandra.cql3.validation.operations.AlterTest.testDropListAndAddListWithSameName(AlterTest.java:87)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (CASSANDRA-13000) slow query log analysis tool

2016-12-05 Thread Jon Haddad (JIRA)
Jon Haddad created CASSANDRA-13000:
--

 Summary: slow query log analysis tool
 Key: CASSANDRA-13000
 URL: https://issues.apache.org/jira/browse/CASSANDRA-13000
 Project: Cassandra
  Issue Type: New Feature
Reporter: Jon Haddad


As a follow up to CASSANDRA-12403, it would be very helpful to have a tool to 
process the slow queries that are logged.  In the MySQL world, there's a tool 
called mysqldumpslow, which processes a slow query log, abstracts the 
parameters to prepared statements, and shows the queries which are causing 
problems based on frequency.  The {{mysqldumpslow}} utillity shows an 
aggregated count & time statistics spent on slow queries.  For instance:

{code}shell> mysqldumpslow

Reading mysql slow query log from /usr/local/mysql/data/mysqld51-apple-slow.log
Count: 1  Time=4.32s (4s)  Lock=0.00s (0s)  Rows=0.0 (0), root[root]@localhost
 insert into t2 select * from t1

Count: 3  Time=2.53s (7s)  Lock=0.00s (0s)  Rows=0.0 (0), root[root]@localhost
 insert into t2 select * from t1 limit N

Count: 3  Time=2.13s (6s)  Lock=0.00s (0s)  Rows=0.0 (0), root[root]@localhost
 insert into t1 select * from t1{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-10446) Run repair with down replicas

2016-12-05 Thread Blake Eggleston (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-10446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15723526#comment-15723526
 ] 

Blake Eggleston commented on CASSANDRA-10446:
-

bq. skipping anti-compaction on the coordinator is not sufficient, since 
anti-compaction is what cleans repair state on the replicas

Good catch. Post CASSANDRA-9143, this will most likely no longer be the case. 
Why don't we wait until that gets committed before continuing with this one.

> Run repair with down replicas
> -
>
> Key: CASSANDRA-10446
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10446
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: sankalp kohli
>Assignee: Blake Eggleston
>Priority: Minor
> Fix For: 4.0
>
>
> We should have an option of running repair when replicas are down. We can 
> call it -force.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-12987) dtest failure in paxos_tests.TestPaxos.contention_test_many_threads

2016-12-05 Thread Joshua McKenzie (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-12987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Joshua McKenzie updated CASSANDRA-12987:

Assignee: Joel Knighton

> dtest failure in paxos_tests.TestPaxos.contention_test_many_threads
> ---
>
> Key: CASSANDRA-12987
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12987
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Sean McCarthy
>Assignee: Joel Knighton
>  Labels: dtest, test-failure
> Attachments: node1.log, node1_debug.log, node1_gc.log, node2.log, 
> node2_debug.log, node2_gc.log, node3.log, node3_debug.log, node3_gc.log
>
>
> example failure:
> http://cassci.datastax.com/job/trunk_dtest/1437/testReport/paxos_tests/TestPaxos/contention_test_many_threads
> {code}
> Error Message
> value=299, errors=0, retries=25559
> {code}{code}
> Stacktrace
>   File "/usr/lib/python2.7/unittest/case.py", line 329, in run
> testMethod()
>   File "/home/automaton/cassandra-dtest/paxos_tests.py", line 88, in 
> contention_test_many_threads
> self._contention_test(300, 1)
>   File "/home/automaton/cassandra-dtest/paxos_tests.py", line 192, in 
> _contention_test
> self.assertTrue((value == threads * iterations) and (errors == 0), 
> "value={}, errors={}, retries={}".format(value, errors, retries))
>   File "/usr/lib/python2.7/unittest/case.py", line 422, in assertTrue
> raise self.failureException(msg)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-12932) dtest failure in cql_tests.StorageProxyCQLTester.type_test

2016-12-05 Thread Joshua McKenzie (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-12932?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Joshua McKenzie updated CASSANDRA-12932:

Assignee: Alex Petrov

> dtest failure in cql_tests.StorageProxyCQLTester.type_test
> --
>
> Key: CASSANDRA-12932
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12932
> Project: Cassandra
>  Issue Type: Test
>Reporter: Michael Shuler
>Assignee: Alex Petrov
>  Labels: dtest, test-failure
>
> example failure:
> http://cassci.datastax.com/job/cassandra-3.X_novnode_dtest/10/testReport/cql_tests/StorageProxyCQLTester/type_test
> {noformat}
> Error Message
> ('Unable to connect to any servers', {'127.0.0.1': error(111, "Tried 
> connecting to [('127.0.0.1', 9042)]. Last error: Connection refused")})
>  >> begin captured logging << 
> dtest: DEBUG: cluster ccm directory: /tmp/dtest-7XmxR8
> dtest: DEBUG: Done setting configuration options:
> {   'num_tokens': None,
> 'phi_convict_threshold': 5,
> 'range_request_timeout_in_ms': 1,
> 'read_request_timeout_in_ms': 1,
> 'request_timeout_in_ms': 1,
> 'truncate_request_timeout_in_ms': 1,
> 'write_request_timeout_in_ms': 1}
> - >> end captured logging << -
> Stacktrace
>   File "/usr/lib/python2.7/unittest/case.py", line 329, in run
> testMethod()
>   File "/home/automaton/cassandra-dtest/cql_tests.py", line 195, in type_test
> session = self.prepare()
>   File "/home/automaton/cassandra-dtest/cql_tests.py", line 54, in prepare
> session = self.patient_cql_connection(node1, 
> protocol_version=protocol_version, user=user, password=password)
>   File "/home/automaton/cassandra-dtest/dtest.py", line 507, in 
> patient_cql_connection
> bypassed_exception=NoHostAvailable
>   File "/home/automaton/cassandra-dtest/dtest.py", line 200, in 
> retry_till_success
> return fun(*args, **kwargs)
>   File "/home/automaton/cassandra-dtest/dtest.py", line 440, in cql_connection
> protocol_version, port=port, ssl_opts=ssl_opts)
>   File "/home/automaton/cassandra-dtest/dtest.py", line 468, in 
> _create_session
> session = cluster.connect(wait_for_all_pools=True)
>   File "/home/automaton/src/cassandra-driver/cassandra/cluster.py", line 
> 1180, in connect
> self.control_connection.connect()
>   File "/home/automaton/src/cassandra-driver/cassandra/cluster.py", line 
> 2597, in connect
> self._set_new_connection(self._reconnect_internal())
>   File "/home/automaton/src/cassandra-driver/cassandra/cluster.py", line 
> 2634, in _reconnect_internal
> raise NoHostAvailable("Unable to connect to any servers", errors)
> '(\'Unable to connect to any servers\', {\'127.0.0.1\': error(111, "Tried 
> connecting to [(\'127.0.0.1\', 9042)]. Last error: Connection 
> refused")})\n >> begin captured logging << 
> \ndtest: DEBUG: cluster ccm directory: 
> /tmp/dtest-7XmxR8\ndtest: DEBUG: Done setting configuration options:\n{   
> \'num_tokens\': None,\n\'phi_convict_threshold\': 5,\n
> \'range_request_timeout_in_ms\': 1,\n\'read_request_timeout_in_ms\': 
> 1,\n\'request_timeout_in_ms\': 1,\n
> \'truncate_request_timeout_in_ms\': 1,\n
> \'write_request_timeout_in_ms\': 1}\n- >> end 
> captured logging << -'
> {noformat}
> (generated no ccm node log at all)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-12986) dtest failure in upgrade_internal_auth_test.TestAuthUpgrade.test_upgrade_legacy_table

2016-12-05 Thread Joshua McKenzie (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-12986?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Joshua McKenzie updated CASSANDRA-12986:

Assignee: Alex Petrov

> dtest failure in 
> upgrade_internal_auth_test.TestAuthUpgrade.test_upgrade_legacy_table
> -
>
> Key: CASSANDRA-12986
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12986
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Sean McCarthy
>Assignee: Alex Petrov
>  Labels: dtest, test-failure
> Attachments: node1.log, node1_debug.log, node1_gc.log, node2.log, 
> node2_debug.log, node2_gc.log, node3.log, node3_debug.log, node3_gc.log
>
>
> example failure:
> http://cassci.datastax.com/job/trunk_dtest/1437/testReport/upgrade_internal_auth_test/TestAuthUpgrade/test_upgrade_legacy_table
> {code}
> Standard Output
> Unexpected error in node1 log, error: 
> ERROR [main] 2016-12-01 03:08:30,985 CassandraDaemon.java:724 - Detected 
> unreadable sstables 
> /tmp/dtest-wwgdhU/test/node1/data0/system/schema_columns-296e9c049bec3085827dc17d3df2122a/system-schema_columns-ka-10-Data.db,/tmp/dtest-wwgdhU/test/node1/data1/system/schema_columnfamilies-45f5b36024bc3f83a3631034ea4fa697/system-schema_columnfamilies-ka-9-Filter.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_usertypes-3aa752254f82350b8d5c430fa221fa0a/system-schema_usertypes-ka-1-Filter.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_columnfamilies-45f5b36024bc3f83a3631034ea4fa697/system-schema_columnfamilies-ka-10-Data.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_triggers-0359bc7171233ee19a4ab9dfb11fc125/system-schema_triggers-ka-1-Filter.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_usertypes-3aa752254f82350b8d5c430fa221fa0a/system-schema_usertypes-ka-1-Summary.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_columns-296e9c049bec3085827dc17d3df2122a/system-schema_columns-ka-9-CompressionInfo.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_columnfamilies-45f5b36024bc3f83a3631034ea4fa697/system-schema_columnfamilies-ka-11-Index.db,/tmp/dtest-wwgdhU/test/node1/data1/system/local-7ad54392bcdd35a684174e047860b377/system-local-ka-6-Statistics.db,/tmp/dtest-wwgdhU/test/node1/data1/system/peers-37f71aca7dc2383ba70672528af04d4f/system-peers-ka-1-Filter.db,/tmp/dtest-wwgdhU/test/node1/data1/system/peers-37f71aca7dc2383ba70672528af04d4f/system-peers-ka-1-Statistics.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_columnfamilies-45f5b36024bc3f83a3631034ea4fa697/system-schema_columnfamilies-ka-10-Filter.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_columns-296e9c049bec3085827dc17d3df2122a/system-schema_columns-ka-10-Statistics.db,/tmp/dtest-wwgdhU/test/node1/data2/system/schema_keyspaces-b0f2235744583cdb9631c43e59ce3676/system-schema_keyspaces-ka-13-Statistics.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_columnfamilies-45f5b36024bc3f83a3631034ea4fa697/system-schema_columnfamilies-ka-10-CompressionInfo.db,/tmp/dtest-wwgdhU/test/node1/data2/system/local-7ad54392bcdd35a684174e047860b377/system-local-ka-5-Index.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_columns-296e9c049bec3085827dc17d3df2122a/system-schema_columns-ka-10-Filter.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_columns-296e9c049bec3085827dc17d3df2122a/system-schema_columns-ka-9-Index.db,/tmp/dtest-wwgdhU/test/node1/data1/system/local-7ad54392bcdd35a684174e047860b377/system-local-ka-6-CompressionInfo.db,/tmp/dtest-wwgdhU/test/node1/data2/system/sstable_activity-5a1ff267ace03f128563cfae6103c65e/system-sstable_activity-ka-1-Index.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_columns-296e9c049bec3085827dc17d3df2122a/system-schema_columns-ka-9-Statistics.db,/tmp/dtest-wwgdhU/test/node1/data1/system/local-7ad54392bcdd35a684174e047860b377/system-local-ka-6-Summary.db,/tmp/dtest-wwgdhU/test/node1/data2/system/sstable_activity-5a1ff267ace03f128563cfae6103c65e/system-sstable_activity-ka-1-CompressionInfo.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_columnfamilies-45f5b36024bc3f83a3631034ea4fa697/system-schema_columnfamilies-ka-10-Statistics.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_usertypes-3aa752254f82350b8d5c430fa221fa0a/system-schema_usertypes-ka-1-Data.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_columns-296e9c049bec3085827dc17d3df2122a/system-schema_columns-ka-9-Data.db,/tmp/dtest-wwgdhU/test/node1/data2/system/schema_keyspaces-b0f2235744583cdb9631c43e59ce3676/system-schema_keyspaces-ka-13-Index.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_triggers-0359bc7171233ee19a4ab9dfb11fc125/system-schema_triggers-ka-1-CompressionInfo.db,/tmp/dtest-wwgdhU/test/node1/data2/system/sstable_activity-5a1ff267ace03f128563cfae6103c65e/system-sstable_activity-ka-1-Filter.db,/tmp/dtest-wwgdhU/test/node1/data2/system/schema_

[jira] [Updated] (CASSANDRA-12929) dtest failure in bootstrap_test.TestBootstrap.simple_bootstrap_test_small_keepalive_period

2016-12-05 Thread Joshua McKenzie (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-12929?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Joshua McKenzie updated CASSANDRA-12929:

Assignee: Paulo Motta

> dtest failure in 
> bootstrap_test.TestBootstrap.simple_bootstrap_test_small_keepalive_period
> --
>
> Key: CASSANDRA-12929
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12929
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Michael Shuler
>Assignee: Paulo Motta
>  Labels: dtest, test-failure
>
> example failure:
> http://cassci.datastax.com/job/trunk_novnode_dtest/494/testReport/bootstrap_test/TestBootstrap/simple_bootstrap_test_small_keepalive_period
> {noformat}
> Error Message
> Expected [['COMPLETED']] from SELECT bootstrapped FROM system.local WHERE 
> key='local', but got [[u'IN_PROGRESS']]
>  >> begin captured logging << 
> dtest: DEBUG: cluster ccm directory: /tmp/dtest-YmnyEI
> dtest: DEBUG: Done setting configuration options:
> {   'num_tokens': None, 'phi_convict_threshold': 5, 'start_rpc': 'true'}
> cassandra.cluster: INFO: New Cassandra host  
> discovered
> - >> end captured logging << -
> Stacktrace
>   File "/usr/lib/python2.7/unittest/case.py", line 329, in run
> testMethod()
>   File "/home/automaton/cassandra-dtest/tools/decorators.py", line 46, in 
> wrapped
> f(obj)
>   File "/home/automaton/cassandra-dtest/bootstrap_test.py", line 163, in 
> simple_bootstrap_test_small_keepalive_period
> assert_bootstrap_state(self, node2, 'COMPLETED')
>   File "/home/automaton/cassandra-dtest/tools/assertions.py", line 297, in 
> assert_bootstrap_state
> assert_one(session, "SELECT bootstrapped FROM system.local WHERE 
> key='local'", [expected_bootstrap_state])
>   File "/home/automaton/cassandra-dtest/tools/assertions.py", line 130, in 
> assert_one
> assert list_res == [expected], "Expected {} from {}, but got 
> {}".format([expected], query, list_res)
> "Expected [['COMPLETED']] from SELECT bootstrapped FROM system.local WHERE 
> key='local', but got [[u'IN_PROGRESS']]\n >> begin 
> captured logging << \ndtest: DEBUG: cluster ccm 
> directory: /tmp/dtest-YmnyEI\ndtest: DEBUG: Done setting configuration 
> options:\n{   'num_tokens': None, 'phi_convict_threshold': 5, 'start_rpc': 
> 'true'}\ncassandra.cluster: INFO: New Cassandra host  datacenter1> discovered\n- >> end captured logging << 
> -"
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-12904) dtest failure in repair_tests.repair_test.TestRepair.simple_sequential_repair_test

2016-12-05 Thread Joshua McKenzie (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-12904?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Joshua McKenzie updated CASSANDRA-12904:

Assignee: Yuki Morishita

> dtest failure in 
> repair_tests.repair_test.TestRepair.simple_sequential_repair_test
> --
>
> Key: CASSANDRA-12904
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12904
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Michael Shuler
>Assignee: Yuki Morishita
>  Labels: dtest, test-failure
> Attachments: node1.log, node1_debug.log, node1_gc.log, node2.log, 
> node2_debug.log, node2_gc.log, node3.log, node3_debug.log, node3_gc.log
>
>
> example failure:
> http://cassci.datastax.com/job/cassandra-2.2_dtest/710/testReport/repair_tests.repair_test/TestRepair/simple_sequential_repair_test/
> {noformat}
> Error Message
> 2001 != 2000
>  >> begin captured logging << 
> dtest: DEBUG: cluster ccm directory: /tmp/dtest-gzVU4X
> dtest: DEBUG: Done setting configuration options:
> {   'initial_token': None,
> 'num_tokens': '32',
> 'phi_convict_threshold': 5,
> 'range_request_timeout_in_ms': 1,
> 'read_request_timeout_in_ms': 1,
> 'request_timeout_in_ms': 1,
> 'truncate_request_timeout_in_ms': 1,
> 'write_request_timeout_in_ms': 1}
> dtest: DEBUG: Starting cluster..
> cassandra.policies: INFO: Using datacenter 'datacenter1' for 
> DCAwareRoundRobinPolicy (via host '127.0.0.1'); if incorrect, please specify 
> a local_dc to the constructor, or limit contact points to local cluster nodes
> cassandra.cluster: INFO: New Cassandra host  
> discovered
> cassandra.cluster: INFO: New Cassandra host  
> discovered
> dtest: DEBUG: Inserting data...
> cassandra.cluster: WARNING: Host 127.0.0.3 has been marked down
> cassandra.pool: WARNING: Error attempting to reconnect to 127.0.0.3, 
> scheduling retry in 2.0 seconds: [Errno 111] Tried connecting to 
> [('127.0.0.3', 9042)]. Last error: Connection refused
> cassandra.pool: WARNING: Error attempting to reconnect to 127.0.0.3, 
> scheduling retry in 4.0 seconds: [Errno 111] Tried connecting to 
> [('127.0.0.3', 9042)]. Last error: Connection refused
> cassandra.pool: WARNING: Error attempting to reconnect to 127.0.0.3, 
> scheduling retry in 8.0 seconds: [Errno 111] Tried connecting to 
> [('127.0.0.3', 9042)]. Last error: Connection refused
> cassandra.pool: INFO: Successful reconnection to 127.0.0.3, marking node up 
> if it isn't already
> cassandra.cluster: INFO: Host 127.0.0.3 may be up; will prepare queries and 
> open connection pool
> cassandra.cluster: INFO: Connection pools established for node 127.0.0.3
> dtest: DEBUG: Checking data on node3...
> cassandra.cluster: INFO: New Cassandra host  
> discovered
> cassandra.cluster: INFO: New Cassandra host  
> discovered
> - >> end captured logging << -
> Stacktrace
>   File "/usr/lib/python2.7/unittest/case.py", line 329, in run
> testMethod()
>   File "/home/automaton/cassandra-dtest/repair_tests/repair_test.py", line 
> 291, in simple_sequential_repair_test
> self._simple_repair(sequential=True)
>   File "/home/automaton/cassandra-dtest/repair_tests/repair_test.py", line 
> 386, in _simple_repair
> self._repair_and_verify(sequential)
>   File "/home/automaton/cassandra-dtest/repair_tests/repair_test.py", line 
> 118, in _repair_and_verify
> self.check_rows_on_node(node3, 2000, missings=[1000])
>   File "/home/automaton/cassandra-dtest/repair_tests/repair_test.py", line 
> 71, in check_rows_on_node
> self.assertEqual(len(result), rows)
>   File "/usr/lib/python2.7/unittest/case.py", line 513, in assertEqual
> assertion_func(first, second, msg=msg)
>   File "/usr/lib/python2.7/unittest/case.py", line 506, in _baseAssertEqual
> raise self.failureException(msg)
> "2001 != 2000\n >> begin captured logging << 
> \ndtest: DEBUG: cluster ccm directory: 
> /tmp/dtest-gzVU4X\ndtest: DEBUG: Done setting configuration options:\n{   
> 'initial_token': None,\n'num_tokens': '32',\n'phi_convict_threshold': 
> 5,\n'range_request_timeout_in_ms': 1,\n
> 'read_request_timeout_in_ms': 1,\n'request_timeout_in_ms': 1,\n   
>  'truncate_request_timeout_in_ms': 1,\n'write_request_timeout_in_ms': 
> 1}\ndtest: DEBUG: Starting cluster..\ncassandra.policies: INFO: Using 
> datacenter 'datacenter1' for DCAwareRoundRobinPolicy (via host '127.0.0.1'); 
> if incorrect, please specify a local_dc to the constructor, or limit contact 
> points to local cluster nodes\ncassandra.cluster: INFO: New Cassandra host 
>  discovered\ncassandra.cluster: INFO: New 
> Cassandra host  discovered\ndtest: DEBUG:

[jira] [Updated] (CASSANDRA-12354) dtest failure in upgrade_tests.cql_tests.TestCQLNodes2RF1_Upgrade_current_2_2_x_To_indev_2_2_x.bug_5732_test

2016-12-05 Thread Joshua McKenzie (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-12354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Joshua McKenzie updated CASSANDRA-12354:

Assignee: Tyler Hobbs

> dtest failure in 
> upgrade_tests.cql_tests.TestCQLNodes2RF1_Upgrade_current_2_2_x_To_indev_2_2_x.bug_5732_test
> 
>
> Key: CASSANDRA-12354
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12354
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Craig Kodman
>Assignee: Tyler Hobbs
>  Labels: dtest
>
> example failure:
> http://cassci.datastax.com/job/cassandra-2.2_dtest_upgrade/7/testReport/upgrade_tests.cql_tests/TestCQLNodes2RF1_Upgrade_current_2_2_x_To_indev_2_2_x/bug_5732_test



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-11115) Thrift removal

2016-12-05 Thread Aleksey Yeschenko (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15723487#comment-15723487
 ] 

Aleksey Yeschenko commented on CASSANDRA-5:
---

Will wrap up soon, minor nits so far:

1. lib/licenses still has licenses for the removed jars
2. {{AlterKeyspaceStatement}}: disregard the TODO comment there, it's no longer 
valid. Feel free to remove or just don't bother, it'll go away soon
3. {{CompactTables.DefaultNames.defaultPartitionKeyName()}} is no longer needed 
(plus the related constant plus the field)
4. {{LegacyLayout}} has tons of unused imports
5. {{CollectionType}} ‘custome type’ typo
6. a lot of unused methods in {{CompositeType.Builder}} and some in 
{{CompositeType}}, some only used by tests. Assuming from this patch, but could 
be pre-existing.

My oversights from CASSANDRA-12716 review (I think):

7. Unused {{RowIndexEntry.IndexedEntry}} constructor and some minor unused 
things in the class
8. {{ReadResponse}} unused {{command}} field

> Thrift removal
> --
>
> Key: CASSANDRA-5
> URL: https://issues.apache.org/jira/browse/CASSANDRA-5
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Sylvain Lebresne
>Assignee: Sylvain Lebresne
> Fix For: 4.0
>
>
> Thrift removal [has been announced for 
> 4.0|http://mail-archives.apache.org/mod_mbox/cassandra-user/201601.mbox/%3ccaldd-zgagnldu3pqbd6wp0jb0x73qjdr9phpxmmo+gq+2e5...@mail.gmail.com%3E].
>  This ticket is meant to serve as a general task for that removal, but also 
> to track issue related to that, either things that we should do in 3.x to 
> make that removal as smooth as possible, or sub-tasks that it makes sense to 
> separate.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-12888) Incremental repairs broken for MVs and CDC

2016-12-05 Thread Benjamin Roth (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-12888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15723449#comment-15723449
 ] 

Benjamin Roth commented on CASSANDRA-12888:
---

Another example:

A repair of a KS with approx 1.7TB total on 8 nodes with 7 base tables and 4 
MVs increased from roughly 18:30h to 23:30h. I would explain it like that:
This patch causes more validation work as it also validates MVs now, not only 
base tables. Depending of the ratio of base tables to MVs and the extent of 
detected inconsistencies and repair streams, it is possible that this patch 
performs worse than before.
>From my point of view it is still ok because it will never perform worse than 
>if all the MVs were normal tables. But if there are a lot of streams e.g. due 
>to a node failure recovery, this patch will perform much, much better than 
>before.

> Incremental repairs broken for MVs and CDC
> --
>
> Key: CASSANDRA-12888
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12888
> Project: Cassandra
>  Issue Type: Bug
>  Components: Streaming and Messaging
>Reporter: Stefan Podkowinski
>Assignee: Benjamin Roth
>Priority: Critical
> Fix For: 3.0.x, 3.x
>
>
> SSTables streamed during the repair process will first be written locally and 
> afterwards either simply added to the pool of existing sstables or, in case 
> of existing MVs or active CDC, replayed on mutation basis:
> As described in {{StreamReceiveTask.OnCompletionRunnable}}:
> {quote}
> We have a special path for views and for CDC.
> For views, since the view requires cleaning up any pre-existing state, we 
> must put all partitions through the same write path as normal mutations. This 
> also ensures any 2is are also updated.
> For CDC-enabled tables, we want to ensure that the mutations are run through 
> the CommitLog so they can be archived by the CDC process on discard.
> {quote}
> Using the regular write path turns out to be an issue for incremental 
> repairs, as we loose the {{repaired_at}} state in the process. Eventually the 
> streamed rows will end up in the unrepaired set, in contrast to the rows on 
> the sender site moved to the repaired set. The next repair run will stream 
> the same data back again, causing rows to bounce on and on between nodes on 
> each repair.
> See linked dtest on steps to reproduce. An example for reproducing this 
> manually using ccm can be found 
> [here|https://gist.github.com/spodkowinski/2d8e0408516609c7ae701f2bf1e515e8]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-12991) Inter-node race condition in validation compaction

2016-12-05 Thread Benjamin Roth (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-12991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15723428#comment-15723428
 ] 

Benjamin Roth commented on CASSANDRA-12991:
---

Absolutely right!

This is why I wrote:
bq. m1.timestamp could even be < tv and still be in s1 but not in s2 because it 
could have been blocked on node 2 due to a full mutation stage queue, network 
delays or whatever. So it would be more safe to filter mutations out if 
m1.timestamp > (tv - write_timeout)

Maybe this was confusing, so a bit more elaborate:
To avoid also such kind of race condition where a mutation didn't arrive at a 
node that has a timestamp that is older than the timestamp of the validation 
request, there has to be a reasonable grace period. I personally would consider 
for example write_request_timeout_in_ms as a reasonable base, maybe also a fix 
period of some seconds. If a mutation doesn't make it to a remote node during 
that period is absolutely ok to count this one as a mismatch.
So we have a timestamp when the validation was requested by the repair 
coordinator (tr) and a timestamp for the validation compaction (tc) that 
filters out all mutations after that timestamp and a grace period (gp), where 
roughly tc = tr - gp

One could argue that the grace period means that the most recent mutations are 
not included in the repair but I'd say this is totally ok because we talk about 
a few seconds and no repair is executed within a few seconds after some outage. 
Normally a repair is a scheduled task or a manual task after recovery of a 
failure situation that definitively takes more than a few seconds to recover.

> Inter-node race condition in validation compaction
> --
>
> Key: CASSANDRA-12991
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12991
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Benjamin Roth
>Priority: Minor
>
> Problem:
> When a validation compaction is triggered by a repair it may happen that due 
> to flying in mutations the merkle trees differ but the data is consistent 
> however.
> Example:
> t = 1: 
> Repair starts, triggers validations
> Node A starts validation
> t = 10001:
> Mutation arrives at Node A
> t = 10002:
> Mutation arrives at Node B
> t = 10003:
> Node B starts validation
> Hashes of node A+B will differ but data is consistent from a view (think of 
> it like a snapshot) t = 1.
> Impact:
> Unnecessary streaming happens. This may not a big impact on low traffic CFs, 
> partitions but on high traffic CFs and maybe very big partitions, this may 
> have a bigger impact and is a waste of resources.
> Possible solution:
> Build hashes based upon a snapshot timestamp.
> This requires SSTables created after that timestamp to be filtered when doing 
> a validation compaction:
> - Cells with timestamp > snapshot time have to be removed
> - Tombstone range markers have to be handled
>  - Bounds have to be removed if delete timestamp > snapshot time
>  - Boundary markers have to be either changed to a bound or completely 
> removed, depending if start and/or end are both affected or not
> Probably this is a known behaviour. Have there been any discussions about 
> this in the past? Did not find an matching issue, so I created this one.
> I am happy about any feedback, whatsoever.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-12999) add method to get size of endpoints to TokenMetadata

2016-12-05 Thread Dikang Gu (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-12999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15723386#comment-15723386
 ] 

Dikang Gu commented on CASSANDRA-12999:
---

Sure, thanks for letting me know.

> add method to get size of endpoints to TokenMetadata
> 
>
> Key: CASSANDRA-12999
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12999
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Jason Brown
>Assignee: Jason Brown
>Priority: Minor
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-12999) add method to get size of endpoints to TokenMetadata

2016-12-05 Thread Aleksey Yeschenko (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-12999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15723338#comment-15723338
 ] 

Aleksey Yeschenko commented on CASSANDRA-12999:
---

Jason has a patch cooking that we discussed offline, pending legal review. 
There is no rush for CASSANDRA-12671 - I don't know what you have in mind, but 
it'll likely require some iteration. Plus 3.11 is at least another month away.

> add method to get size of endpoints to TokenMetadata
> 
>
> Key: CASSANDRA-12999
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12999
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Jason Brown
>Assignee: Jason Brown
>Priority: Minor
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-12999) add method to get size of endpoints to TokenMetadata

2016-12-05 Thread Dikang Gu (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-12999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15723277#comment-15723277
 ] 

Dikang Gu commented on CASSANDRA-12999:
---

The patch based on trunk.

|[patch | 
https://github.com/DikangGu/cassandra/commit/001d58c7b02b4cc56af5462db380ff99ef677b8f]|[unit
 test | 
https://cassci.datastax.com/view/Dev/view/DikangGu/job/DikangGu-CASSANDRA-12999-trunk-testall/]|[dtest
 | 
https://cassci.datastax.com/view/Dev/view/DikangGu/job/DikangGu-CASSANDRA-12999-trunk-dtest/]|

> add method to get size of endpoints to TokenMetadata
> 
>
> Key: CASSANDRA-12999
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12999
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Jason Brown
>Assignee: Jason Brown
>Priority: Minor
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (CASSANDRA-12999) add method to get size of endpoints to TokenMetadata

2016-12-05 Thread Dikang Gu (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-12999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15723226#comment-15723226
 ] 

Dikang Gu edited comment on CASSANDRA-12999 at 12/5/16 8:05 PM:


[~jasobrown], thanks for creating the jira! Do you mind I create a patch 
quickly today, so that I will unblock CASSANDRA-12671? Thanks!


was (Author: dikanggu):
[~jasobrown], thanks for creating the jira? Do you mind I create a patch 
quickly today, so that I will unblock CASSANDRA-12671? Thanks!

> add method to get size of endpoints to TokenMetadata
> 
>
> Key: CASSANDRA-12999
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12999
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Jason Brown
>Assignee: Jason Brown
>Priority: Minor
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-12999) add method to get size of endpoints to TokenMetadata

2016-12-05 Thread Dikang Gu (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-12999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15723226#comment-15723226
 ] 

Dikang Gu commented on CASSANDRA-12999:
---

[~jasobrown], thanks for creating the jira? Do you mind I create a patch 
quickly today, so that I will unblock CASSANDRA-12671? Thanks!

> add method to get size of endpoints to TokenMetadata
> 
>
> Key: CASSANDRA-12999
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12999
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Jason Brown
>Assignee: Jason Brown
>Priority: Minor
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-12671) Support changing hinted handoff throttle in real time

2016-12-05 Thread Dikang Gu (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-12671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15723207#comment-15723207
 ] 

Dikang Gu commented on CASSANDRA-12671:
---

[~iamaleksey], thanks for the review! The motivation for this ticket is that, 
we have some write heavy cluster, and we are taking down nodes or even 
datacenter regularly for maintenance. So the nodes could be down for hours, and 
there are lots of hints to replay. So it would be great to have a command to 
adjust the replay speed in real time, to find a balance between the replay 
speed and system load.

1. Sure, I will find a better place for the 
{{getHintedHandoffThrottleBytesPerNode}}
2. Yeah, it is definitely more expensive then I thought, I should be more 
careful about the underlying code impl.
3. there is already a command {{setHintedHandoffThrottleInKB}} which will set 
the value of {{conf.hinted_handoff_throttle_in_kb}}
4. we do not need to run the command very frequent, but probably still need to 
run it, like monthly.


> Support changing hinted handoff throttle in real time 
> --
>
> Key: CASSANDRA-12671
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12671
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Dikang Gu
>Assignee: Dikang Gu
>Priority: Minor
> Fix For: 3.x
>
>
> Problem: currently the sethintedhandoffthrottlekb takes effect when current 
> hints handoff tasks finish, and then applies to next task, which could take 
> hours for big node. 
> I think it would be great to change the hinted handoff throttle in real time, 
> which means it takes effect immediately. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-12998) Remove a silly hint.isLive() check in HintsService.write()

2016-12-05 Thread Jason Brown (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-12998?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Brown updated CASSANDRA-12998:

Reviewer: Jason Brown

> Remove a silly hint.isLive() check in HintsService.write()
> --
>
> Key: CASSANDRA-12998
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12998
> Project: Cassandra
>  Issue Type: Bug
>  Components: Local Write-Read Paths
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Trivial
> Fix For: 3.0.x, 3.x
>
>
> Somehow made it to the final version of the codebase, this can practically 
> never return false. The {{bufferPool.write()}} call should be unconditional.
> {code}
> public void write(Iterable hostIds, Hint hint)
> {
> if (isShutDown)
> throw new IllegalStateException("HintsService is shut down and 
> can't accept new hints");
> // we have to make sure that the HintsStore instances get properly 
> initialized - otherwise dispatch will not trigger
> catalog.maybeLoadStores(hostIds);
> if (hint.isLive())
> bufferPool.write(hostIds, hint);
> StorageMetrics.totalHints.inc(size(hostIds));
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-12998) Remove a silly hint.isLive() check in HintsService.write()

2016-12-05 Thread Jason Brown (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-12998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15723180#comment-15723180
 ] 

Jason Brown commented on CASSANDRA-12998:
-

+1

> Remove a silly hint.isLive() check in HintsService.write()
> --
>
> Key: CASSANDRA-12998
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12998
> Project: Cassandra
>  Issue Type: Bug
>  Components: Local Write-Read Paths
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Trivial
> Fix For: 3.0.x, 3.x
>
>
> Somehow made it to the final version of the codebase, this can practically 
> never return false. The {{bufferPool.write()}} call should be unconditional.
> {code}
> public void write(Iterable hostIds, Hint hint)
> {
> if (isShutDown)
> throw new IllegalStateException("HintsService is shut down and 
> can't accept new hints");
> // we have to make sure that the HintsStore instances get properly 
> initialized - otherwise dispatch will not trigger
> catalog.maybeLoadStores(hostIds);
> if (hint.isLive())
> bufferPool.write(hostIds, hint);
> StorageMetrics.totalHints.inc(size(hostIds));
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-12905) Retry acquire MV lock on failure instead of throwing WTE on streaming

2016-12-05 Thread Paulo Motta (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-12905?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paulo Motta updated CASSANDRA-12905:

 Reviewer: Paulo Motta
Fix Version/s: (was: 3.0.x)
   (was: 3.x)
   3.10

> Retry acquire MV lock on failure instead of throwing WTE on streaming
> -
>
> Key: CASSANDRA-12905
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12905
> Project: Cassandra
>  Issue Type: Bug
>  Components: Streaming and Messaging
> Environment: centos 6.7 x86_64
>Reporter: Nir Zilka
>Assignee: Benjamin Roth
>Priority: Critical
> Fix For: 3.10
>
>
> Hello,
> I performed two upgrades to the current cluster (currently 15 nodes, 1 DC, 
> private VLAN),
> first it was 2.2.5.1 and repair worked flawlessly,
> second upgrade was to 3.0.9 (with upgradesstables) and also repair worked 
> well,
> then i upgraded 2 weeks ago to 3.9 - and the repair problems started.
> there are several errors types from the system.log (different nodes) :
> - Sync failed between /xxx.xxx.xxx.xxx and /xxx.xxx.xxx.xxx
> - Streaming error occurred on session with peer xxx.xxx.xxx.xxx Operation 
> timed out - received only 0 responses
> - Remote peer xxx.xxx.xxx.xxx failed stream session
> - Session completed with the following error
> org.apache.cassandra.streaming.StreamException: Stream failed
> 
> i use 3.9 default configuration with the cluster settings adjustments (3 
> seeds, GossipingPropertyFileSnitch).
> streaming_socket_timeout_in_ms is the default (8640).
> i'm afraid from consistency problems while i'm not performing repair.
> Any ideas?
> Thanks,
> Nir.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-10540) RangeAwareCompaction

2016-12-05 Thread Joshua McKenzie (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-10540?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Joshua McKenzie updated CASSANDRA-10540:

Tester:   (was: Philip Thompson)

> RangeAwareCompaction
> 
>
> Key: CASSANDRA-10540
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10540
> Project: Cassandra
>  Issue Type: New Feature
>Reporter: Marcus Eriksson
>Assignee: Marcus Eriksson
>  Labels: compaction, lcs, vnodes
> Fix For: 3.x
>
>
> Broken out from CASSANDRA-6696, we should split sstables based on ranges 
> during compaction.
> Requirements;
> * dont create tiny sstables - keep them bunched together until a single vnode 
> is big enough (configurable how big that is)
> * make it possible to run existing compaction strategies on the per-range 
> sstables
> We should probably add a global compaction strategy parameter that states 
> whether this should be enabled or not.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-12868) Reject default_time_to_live option when creating or altering MVs

2016-12-05 Thread Michael Shuler (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-12868?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Shuler updated CASSANDRA-12868:
---
Fix Version/s: (was: 3.11)
   3.10

> Reject default_time_to_live option when creating or altering MVs
> 
>
> Key: CASSANDRA-12868
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12868
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Srinivasarao Daruna
>Assignee: Sundar Srinivasan
>Priority: Minor
>  Labels: lhf
> Fix For: 3.0.11, 3.10
>
> Attachments: 12868-trunk.txt
>
>
> Hi,
> By default, materialized views are using the TTL of primary table, 
> irrespective of the configured value provided in materialized view creation.
> For eg:
> table:
> CREATE TABLE test2(id text, date text, col1 text,col2 text, PRIMARY 
> KEY(id,date)) WITH default_time_to_live = 60 AND CLUSTERING ORDER BY (date 
> DESC);
> CREATE MATERIALIZED VIEW test3_view AS
> SELECT id, date, col1
> FROM test3 
> WHERE id IS NOT NULL AND date IS NOT NULL
> PRIMARY KEY(id,date) WITH default_time_to_live = 30;
> The queries are accepted in CQL. As per the detail, it should use 30 seconds 
> for Materialized view and 60 seconds for parent table.
> But, it is always 60 seconds (as the parent table)
> case 1: 
> parent table and materialized view with different TTL
> MV will always have the TTL of parent.
> case 2:
> Parent table without TTL but materialized view with TTL
> MV does not have the TTL even though the configuration has been accepted in 
> the table creation.
> Expected:
> Either the TTL configuration should not be accepted in the materialized view 
> creation, if it is of no value.
> Or
> TTL has to be applied differently for both Materialized View and Table if the 
> configuration is added.
> If no configuration, TTL has to be taken from the parent table. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[7/9] cassandra git commit: Merge branch 'cassandra-3.11' into cassandra-3.X

2016-12-05 Thread mshuler
Merge branch 'cassandra-3.11' into cassandra-3.X


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/838a21d4
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/838a21d4
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/838a21d4

Branch: refs/heads/cassandra-3.X
Commit: 838a21d408d16f40be58e91aeef3c166d07b933f
Parents: 61368ae b207f2e
Author: Michael Shuler 
Authored: Mon Dec 5 13:18:37 2016 -0600
Committer: Michael Shuler 
Committed: Mon Dec 5 13:18:37 2016 -0600

--

--




[9/9] cassandra git commit: Merge branch 'cassandra-3.X' into trunk

2016-12-05 Thread mshuler
Merge branch 'cassandra-3.X' into trunk


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/8ddbb749
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8ddbb749
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8ddbb749

Branch: refs/heads/trunk
Commit: 8ddbb74935d21d2f3bc124d3bb89c53342e52c87
Parents: 5984255 838a21d
Author: Michael Shuler 
Authored: Mon Dec 5 13:19:29 2016 -0600
Committer: Michael Shuler 
Committed: Mon Dec 5 13:19:29 2016 -0600

--

--




[2/9] cassandra git commit: Fix CHANGES entry for CASSANDRA-12868

2016-12-05 Thread mshuler
Fix CHANGES entry for CASSANDRA-12868


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b207f2e3
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b207f2e3
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b207f2e3

Branch: refs/heads/cassandra-3.X
Commit: b207f2e3bf66bd3eeda87d42bb85e78c70604189
Parents: a85b007
Author: Michael Shuler 
Authored: Mon Dec 5 13:17:10 2016 -0600
Committer: Michael Shuler 
Committed: Mon Dec 5 13:17:10 2016 -0600

--
 CHANGES.txt | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b207f2e3/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index c04c2fa..c5d2da2 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,7 +1,3 @@
-3.11
-Merged from 3.0:
- * Reject default_time_to_live option when creating or altering MVs 
(CASSANDRA-12868)
-
 3.10
  * Use correct bounds for all-data range when filtering (CASSANDRA-12666)
  * Remove timing window in test case (CASSANDRA-12875)
@@ -112,6 +108,7 @@ Merged from 3.0:
  * Restore resumable hints delivery (CASSANDRA-11960)
  * Properly report LWT contention (CASSANDRA-12626)
 Merged from 3.0:
+ * Reject default_time_to_live option when creating or altering MVs 
(CASSANDRA-12868)
  * Nodetool should use a more sane max heap size (CASSANDRA-12739)
  * LocalToken ensures token values are cloned on heap (CASSANDRA-12651)
  * AnticompactionRequestSerializer serializedSize is incorrect 
(CASSANDRA-12934)



[jira] [Updated] (CASSANDRA-12935) Use saved tokens when setting local tokens on StorageService.joinRing()

2016-12-05 Thread Michael Shuler (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-12935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Shuler updated CASSANDRA-12935:
---
Fix Version/s: (was: 3.11)
   3.10

> Use saved tokens when setting local tokens on StorageService.joinRing()
> ---
>
> Key: CASSANDRA-12935
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12935
> Project: Cassandra
>  Issue Type: Bug
>  Components: Coordination
>Reporter: Paulo Motta
>Assignee: Paulo Motta
>Priority: Minor
> Fix For: 2.2.9, 3.0.11, 3.10, 4.0
>
>
> The introduction of {{StorageService.finishJoiningRing()}} on CASSANDRA-8523:
> {code:java}
> @@ -885,17 +896,14 @@ public class StorageService extends 
> NotificationBroadcasterSupport implements IE
>  {
>  if (dataAvailable)
>  {
> -// start participating in the ring.
> -
> SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.COMPLETED);
> -setTokens(bootstrapTokens);
> +finishJoiningRing();
> +
>  // remove the existing info about the replaced node.
>  if (!current.isEmpty())
>  {
>  for (InetAddress existing : current)
>  Gossiper.instance.replacedEndpoint(existing);
>  }
> -assert tokenMetadata.sortedTokens().size() > 0;
> -doAuthSetup();
>  }
>  else
>  {
> @@ -908,6 +916,11 @@ public class StorageService extends 
> NotificationBroadcasterSupport implements IE
>  else if (isSurveyMode)
>  {
> -setTokens(SystemKeyspace.getSavedTokens());
> -
> SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.COMPLETED);
>  isSurveyMode = false;
>  logger.info("Leaving write survey mode and joining ring at 
> operator request");
> -assert tokenMetadata.sortedTokens().size() > 0;
> -
> -doAuthSetup();
> +finishJoiningRing();
>  }
>  }
>  
> +private void finishJoiningRing()
> +{
> +// start participating in the ring.
> +
> SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.COMPLETED);
> +setTokens(bootstrapTokens);
> +
> +assert tokenMetadata.sortedTokens().size() > 0;
> +doAuthSetup();
> +}
> +
> {code}
> slightly changed the way tokens are set on {{StorageService.joinRing()}} when 
> {{cassandra.write_survey=true}} from 
> {{setTokens(SystemKeyspace.getSavedTokens())}}
> to {{setTokens(bootstrapTokens)}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[6/9] cassandra git commit: Merge branch 'cassandra-3.11' into cassandra-3.X

2016-12-05 Thread mshuler
Merge branch 'cassandra-3.11' into cassandra-3.X


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/838a21d4
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/838a21d4
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/838a21d4

Branch: refs/heads/trunk
Commit: 838a21d408d16f40be58e91aeef3c166d07b933f
Parents: 61368ae b207f2e
Author: Michael Shuler 
Authored: Mon Dec 5 13:18:37 2016 -0600
Committer: Michael Shuler 
Committed: Mon Dec 5 13:18:37 2016 -0600

--

--




[5/9] cassandra git commit: Fix CHANGES entry for CASSANDRA-12868

2016-12-05 Thread mshuler
Fix CHANGES entry for CASSANDRA-12868


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/61368aee
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/61368aee
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/61368aee

Branch: refs/heads/trunk
Commit: 61368aee729cf39057561e5b3fea10c64c6448a8
Parents: 09da51e
Author: Michael Shuler 
Authored: Mon Dec 5 13:18:25 2016 -0600
Committer: Michael Shuler 
Committed: Mon Dec 5 13:18:25 2016 -0600

--
 CHANGES.txt | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/61368aee/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 3918cfd..47b5e42 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -5,10 +5,6 @@
  * Add support for arithmetic operators (CASSANDRA-11935)
  * Tables in system_distributed should not use gcgs of 0 (CASSANDRA-12954)
 
-3.11
-Merged from 3.0:
- * Reject default_time_to_live option when creating or altering MVs 
(CASSANDRA-12868)
-
 3.10
  * Use correct bounds for all-data range when filtering (CASSANDRA-12666)
  * Remove timing window in test case (CASSANDRA-12875)
@@ -119,6 +115,7 @@ Merged from 3.0:
  * Restore resumable hints delivery (CASSANDRA-11960)
  * Properly report LWT contention (CASSANDRA-12626)
 Merged from 3.0:
+ * Reject default_time_to_live option when creating or altering MVs 
(CASSANDRA-12868)
  * Nodetool should use a more sane max heap size (CASSANDRA-12739)
  * LocalToken ensures token values are cloned on heap (CASSANDRA-12651)
  * AnticompactionRequestSerializer serializedSize is incorrect 
(CASSANDRA-12934)



[8/9] cassandra git commit: Fix CHANGES entry for CASSANDRA-12868

2016-12-05 Thread mshuler
Fix CHANGES entry for CASSANDRA-12868


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/59842553
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/59842553
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/59842553

Branch: refs/heads/trunk
Commit: 59842553e0cab6678605a2d9ba539532d6e0a8e2
Parents: 8d97e3d
Author: Michael Shuler 
Authored: Mon Dec 5 13:19:21 2016 -0600
Committer: Michael Shuler 
Committed: Mon Dec 5 13:19:21 2016 -0600

--
 CHANGES.txt | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/59842553/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 4952864..90003ec 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -14,10 +14,6 @@
  * Add support for arithmetic operators (CASSANDRA-11935)
  * Tables in system_distributed should not use gcgs of 0 (CASSANDRA-12954)
 
-3.11
-Merged from 3.0:
- * Reject default_time_to_live option when creating or altering MVs 
(CASSANDRA-12868)
-
 3.10
  * Use correct bounds for all-data range when filtering (CASSANDRA-12666)
  * Remove timing window in test case (CASSANDRA-12875)
@@ -128,6 +124,7 @@ Merged from 3.0:
  * Restore resumable hints delivery (CASSANDRA-11960)
  * Properly record CAS contention (CASSANDRA-12626)
 Merged from 3.0:
+ * Reject default_time_to_live option when creating or altering MVs 
(CASSANDRA-12868)
  * Nodetool should use a more sane max heap size (CASSANDRA-12739)
  * LocalToken ensures token values are cloned on heap (CASSANDRA-12651)
  * AnticompactionRequestSerializer serializedSize is incorrect 
(CASSANDRA-12934)



[3/9] cassandra git commit: Fix CHANGES entry for CASSANDRA-12868

2016-12-05 Thread mshuler
Fix CHANGES entry for CASSANDRA-12868


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b207f2e3
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b207f2e3
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b207f2e3

Branch: refs/heads/trunk
Commit: b207f2e3bf66bd3eeda87d42bb85e78c70604189
Parents: a85b007
Author: Michael Shuler 
Authored: Mon Dec 5 13:17:10 2016 -0600
Committer: Michael Shuler 
Committed: Mon Dec 5 13:17:10 2016 -0600

--
 CHANGES.txt | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b207f2e3/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index c04c2fa..c5d2da2 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,7 +1,3 @@
-3.11
-Merged from 3.0:
- * Reject default_time_to_live option when creating or altering MVs 
(CASSANDRA-12868)
-
 3.10
  * Use correct bounds for all-data range when filtering (CASSANDRA-12666)
  * Remove timing window in test case (CASSANDRA-12875)
@@ -112,6 +108,7 @@ Merged from 3.0:
  * Restore resumable hints delivery (CASSANDRA-11960)
  * Properly report LWT contention (CASSANDRA-12626)
 Merged from 3.0:
+ * Reject default_time_to_live option when creating or altering MVs 
(CASSANDRA-12868)
  * Nodetool should use a more sane max heap size (CASSANDRA-12739)
  * LocalToken ensures token values are cloned on heap (CASSANDRA-12651)
  * AnticompactionRequestSerializer serializedSize is incorrect 
(CASSANDRA-12934)



[4/9] cassandra git commit: Fix CHANGES entry for CASSANDRA-12868

2016-12-05 Thread mshuler
Fix CHANGES entry for CASSANDRA-12868


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/61368aee
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/61368aee
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/61368aee

Branch: refs/heads/cassandra-3.X
Commit: 61368aee729cf39057561e5b3fea10c64c6448a8
Parents: 09da51e
Author: Michael Shuler 
Authored: Mon Dec 5 13:18:25 2016 -0600
Committer: Michael Shuler 
Committed: Mon Dec 5 13:18:25 2016 -0600

--
 CHANGES.txt | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/61368aee/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 3918cfd..47b5e42 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -5,10 +5,6 @@
  * Add support for arithmetic operators (CASSANDRA-11935)
  * Tables in system_distributed should not use gcgs of 0 (CASSANDRA-12954)
 
-3.11
-Merged from 3.0:
- * Reject default_time_to_live option when creating or altering MVs 
(CASSANDRA-12868)
-
 3.10
  * Use correct bounds for all-data range when filtering (CASSANDRA-12666)
  * Remove timing window in test case (CASSANDRA-12875)
@@ -119,6 +115,7 @@ Merged from 3.0:
  * Restore resumable hints delivery (CASSANDRA-11960)
  * Properly report LWT contention (CASSANDRA-12626)
 Merged from 3.0:
+ * Reject default_time_to_live option when creating or altering MVs 
(CASSANDRA-12868)
  * Nodetool should use a more sane max heap size (CASSANDRA-12739)
  * LocalToken ensures token values are cloned on heap (CASSANDRA-12651)
  * AnticompactionRequestSerializer serializedSize is incorrect 
(CASSANDRA-12934)



[1/9] cassandra git commit: Fix CHANGES entry for CASSANDRA-12868

2016-12-05 Thread mshuler
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.11 a85b00710 -> b207f2e3b
  refs/heads/cassandra-3.X 09da51e66 -> 838a21d40
  refs/heads/trunk 8d97e3d9b -> 8ddbb7493


Fix CHANGES entry for CASSANDRA-12868


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b207f2e3
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b207f2e3
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b207f2e3

Branch: refs/heads/cassandra-3.11
Commit: b207f2e3bf66bd3eeda87d42bb85e78c70604189
Parents: a85b007
Author: Michael Shuler 
Authored: Mon Dec 5 13:17:10 2016 -0600
Committer: Michael Shuler 
Committed: Mon Dec 5 13:17:10 2016 -0600

--
 CHANGES.txt | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b207f2e3/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index c04c2fa..c5d2da2 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,7 +1,3 @@
-3.11
-Merged from 3.0:
- * Reject default_time_to_live option when creating or altering MVs 
(CASSANDRA-12868)
-
 3.10
  * Use correct bounds for all-data range when filtering (CASSANDRA-12666)
  * Remove timing window in test case (CASSANDRA-12875)
@@ -112,6 +108,7 @@ Merged from 3.0:
  * Restore resumable hints delivery (CASSANDRA-11960)
  * Properly report LWT contention (CASSANDRA-12626)
 Merged from 3.0:
+ * Reject default_time_to_live option when creating or altering MVs 
(CASSANDRA-12868)
  * Nodetool should use a more sane max heap size (CASSANDRA-12739)
  * LocalToken ensures token values are cloned on heap (CASSANDRA-12651)
  * AnticompactionRequestSerializer serializedSize is incorrect 
(CASSANDRA-12934)



[jira] [Updated] (CASSANDRA-12666) dtest failure in paging_test.TestPagingData.test_paging_with_filtering_on_partition_key

2016-12-05 Thread Michael Shuler (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-12666?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Shuler updated CASSANDRA-12666:
---
Fix Version/s: (was: 3.11)
   (was: 3.x)
   3.10

> dtest failure in 
> paging_test.TestPagingData.test_paging_with_filtering_on_partition_key
> ---
>
> Key: CASSANDRA-12666
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12666
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Sean McCarthy
>Assignee: Alex Petrov
>Priority: Critical
>  Labels: dtest
> Fix For: 3.10
>
> Attachments: node1.log, node1_debug.log, node1_gc.log, node2.log, 
> node2_debug.log, node2_gc.log, node3.log, node3_debug.log, node3_gc.log
>
>
> example failure:
> http://cassci.datastax.com/job/trunk_novnode_dtest/480/testReport/paging_test/TestPagingData/test_paging_with_filtering_on_partition_key
> {code}
> Standard Output
> Unexpected error in node3 log, error: 
> ERROR [Native-Transport-Requests-3] 2016-09-17 00:50:11,543 Message.java:622 
> - Unexpected exception during request; channel = [id: 0x467a4afe, 
> L:/127.0.0.3:9042 - R:/127.0.0.1:59115]
> java.lang.AssertionError: null
>   at 
> org.apache.cassandra.dht.IncludingExcludingBounds.split(IncludingExcludingBounds.java:45)
>  ~[main/:na]
>   at 
> org.apache.cassandra.service.StorageProxy.getRestrictedRanges(StorageProxy.java:2368)
>  ~[main/:na]
>   at 
> org.apache.cassandra.service.StorageProxy$RangeIterator.(StorageProxy.java:1951)
>  ~[main/:na]
>   at 
> org.apache.cassandra.service.StorageProxy.getRangeSlice(StorageProxy.java:2235)
>  ~[main/:na]
>   at 
> org.apache.cassandra.db.PartitionRangeReadCommand.execute(PartitionRangeReadCommand.java:184)
>  ~[main/:na]
>   at 
> org.apache.cassandra.service.pager.AbstractQueryPager.fetchPage(AbstractQueryPager.java:66)
>  ~[main/:na]
>   at 
> org.apache.cassandra.service.pager.PartitionRangeQueryPager.fetchPage(PartitionRangeQueryPager.java:36)
>  ~[main/:na]
>   at 
> org.apache.cassandra.cql3.statements.SelectStatement$Pager$NormalPager.fetchPage(SelectStatement.java:328)
>  ~[main/:na]
>   at 
> org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:375)
>  ~[main/:na]
>   at 
> org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:250)
>  ~[main/:na]
>   at 
> org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:78)
>  ~[main/:na]
>   at 
> org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:216)
>  ~[main/:na]
>   at 
> org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:247) 
> ~[main/:na]
>   at 
> org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:232) 
> ~[main/:na]
>   at 
> org.apache.cassandra.transport.messages.QueryMessage.execute(QueryMessage.java:115)
>  ~[main/:na]
>   at 
> org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:516)
>  [main/:na]
>   at 
> org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:409)
>  [main/:na]
>   at 
> io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
>  [netty-all-4.0.39.Final.jar:4.0.39.Final]
>   at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
>  [netty-all-4.0.39.Final.jar:4.0.39.Final]
>   at 
> io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:35)
>  [netty-all-4.0.39.Final.jar:4.0.39.Final]
>   at 
> io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:357)
>  [netty-all-4.0.39.Final.jar:4.0.39.Final]
>   at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
> [na:1.8.0_45]
>   at 
> org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:162)
>  [main/:na]
>   at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:109) 
> [main/:na]
>   at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
> {code}
> Related failures:
> http://cassci.datastax.com/job/trunk_novnode_dtest/480/testReport/paging_test/TestPagingData/test_paging_with_filtering_on_partition_key_on_clustering_columns/
> http://cassci.datastax.com/job/trunk_novnode_dtest/480/testReport/paging_test/TestPagingData/test_paging_with_filtering_on_partition_key_on_clustering_columns_with_contains/
> http://cassci.datastax.com/job/trunk_novnode_dtest/480/testReport/paging_test/TestPagingData/test_paging_with_filtering_on_partition_key_on_counter_columns/



--
This message was sent by Atlassia

[jira] [Updated] (CASSANDRA-12894) testall failure in org.apache.cassandra.hints.HintsBufferPoolTest.testBackpressure-compression

2016-12-05 Thread Ariel Weisberg (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-12894?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ariel Weisberg updated CASSANDRA-12894:
---
Fix Version/s: (was: 3.10)
   3.x

> testall failure in 
> org.apache.cassandra.hints.HintsBufferPoolTest.testBackpressure-compression
> --
>
> Key: CASSANDRA-12894
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12894
> Project: Cassandra
>  Issue Type: Test
>Reporter: Michael Shuler
>Assignee: Ariel Weisberg
>  Labels: test-failure
> Fix For: 4.0, 3.0.x, 3.x
>
>
> example failure:
> http://cassci.datastax.com/job/cassandra-3.0_testall/720/testReport/org.apache.cassandra.hints/HintsBufferPoolTest/testBackpressure_compression
> {noformat}
> Error Message
> null
> Stacktrace
> junit.framework.AssertionFailedError: null
>   at 
> org.apache.cassandra.hints.HintsBufferPoolTest.testBackpressure(HintsBufferPoolTest.java:73)
>   at 
> org.jboss.byteman.contrib.bmunit.BMUnitRunner$10.evaluate(BMUnitRunner.java:371)
>   at 
> org.jboss.byteman.contrib.bmunit.BMUnitRunner$6.evaluate(BMUnitRunner.java:241)
>   at 
> org.jboss.byteman.contrib.bmunit.BMUnitRunner$1.evaluate(BMUnitRunner.java:75)
> Standard Output
> ERROR 16:26:27 SLF4J: stderr
> INFO  16:26:27 Configuration location: 
> file:/home/automaton/cassandra/test/conf/cassandra.yaml
> INFO  16:26:27 Node configuration:[allocate_tokens_for_keyspace=null; 
> authenticator=null; authorizer=null; auto_bootstrap=true; auto_snapshot=true; 
> batch_size_fail_threshold_in_kb=50; batch_size_warn_threshold_in_kb=5; 
> batchlog_replay_throttle_in_kb=1024; broadcast_address=null; 
> broadcast_rpc_address=null; buffer_pool_use_heap_if_exhausted=true; 
> cas_contention_timeout_in_ms
> ...[truncated 8324 chars]...
> NA OS native malloc/free
> INFO  16:26:30 Initializing counter cache with capacity of 6 MBs
> INFO  16:26:30 Scheduling counter cache save to every 7200 seconds (going to 
> save all keys).
> INFO  16:26:31 Global buffer pool is enabled, when pool is exahusted (max is 
> 512 mb) it will allocate on heap
> INFO  16:26:31 Initializing hints_buffer_test.table
> INFO  16:26:31 byteman jar is 
> /home/automaton/cassandra/build/lib/jars/byteman-3.0.3.jar
> INFO  16:26:31 Setting org.jboss.byteman.allow.config.update=true
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-12671) Support changing hinted handoff throttle in real time

2016-12-05 Thread Jason Brown (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-12671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15722985#comment-15722985
 ] 

Jason Brown commented on CASSANDRA-12671:
-

created CASSANDRA-12999

> Support changing hinted handoff throttle in real time 
> --
>
> Key: CASSANDRA-12671
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12671
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Dikang Gu
>Assignee: Dikang Gu
>Priority: Minor
> Fix For: 3.x
>
>
> Problem: currently the sethintedhandoffthrottlekb takes effect when current 
> hints handoff tasks finish, and then applies to next task, which could take 
> hours for big node. 
> I think it would be great to change the hinted handoff throttle in real time, 
> which means it takes effect immediately. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (CASSANDRA-12999) add method to get size of endpoints to TokenMetadata

2016-12-05 Thread Jason Brown (JIRA)
Jason Brown created CASSANDRA-12999:
---

 Summary: add method to get size of endpoints to TokenMetadata
 Key: CASSANDRA-12999
 URL: https://issues.apache.org/jira/browse/CASSANDRA-12999
 Project: Cassandra
  Issue Type: Improvement
Reporter: Jason Brown
Assignee: Jason Brown
Priority: Minor






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-12671) Support changing hinted handoff throttle in real time

2016-12-05 Thread Aleksey Yeschenko (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-12671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15722943#comment-15722943
 ] 

Aleksey Yeschenko commented on CASSANDRA-12671:
---

Speaking of {{TokenMetadata.getAllEndpoints()}}. There are a few cases where we 
only use it for size. They should all be replaced with a new method in 
{{TokenMetadata}} that would just get the counts (think {{return 
enpointToHostIdMap.size()}}).

Can you open a new JIRA to add the new method, and replace all 
{{getAllEndpoints().size()}} calls with it? I'll review. Thanks.

> Support changing hinted handoff throttle in real time 
> --
>
> Key: CASSANDRA-12671
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12671
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Dikang Gu
>Assignee: Dikang Gu
>Priority: Minor
> Fix For: 3.x
>
>
> Problem: currently the sethintedhandoffthrottlekb takes effect when current 
> hints handoff tasks finish, and then applies to next task, which could take 
> hours for big node. 
> I think it would be great to change the hinted handoff throttle in real time, 
> which means it takes effect immediately. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-12982) Customizable hint ttl has been removed

2016-12-05 Thread Aleksey Yeschenko (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-12982?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15722911#comment-15722911
 ] 

Aleksey Yeschenko commented on CASSANDRA-12982:
---

Also, would be nice to have an entry in conf/jvm.options, as is tradition 
(under STARTUP PARAMETERS section).

> Customizable hint ttl has been removed
> --
>
> Key: CASSANDRA-12982
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12982
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Blake Eggleston
>Assignee: Blake Eggleston
>Priority: Minor
> Fix For: 3.x
>
>
> The cassandra.maxHintTTL property added in CASSANDRA-5988 was removed in the 
> hint system rewrite for 3.0.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-12982) Customizable hint ttl has been removed

2016-12-05 Thread Aleksey Yeschenko (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-12982?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-12982:
--
Status: Open  (was: Patch Available)

> Customizable hint ttl has been removed
> --
>
> Key: CASSANDRA-12982
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12982
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Blake Eggleston
>Assignee: Blake Eggleston
>Priority: Minor
> Fix For: 3.x
>
>
> The cassandra.maxHintTTL property added in CASSANDRA-5988 was removed in the 
> hint system rewrite for 3.0.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-12982) Customizable hint ttl has been removed

2016-12-05 Thread Aleksey Yeschenko (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-12982?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15722822#comment-15722822
 ] 

Aleksey Yeschenko commented on CASSANDRA-12982:
---

I think the thought process back then was "we don't use cells with TTL to store 
hints anymore, so this makes no sense to re-add".

Except we kind of do have, in the form of gcgs vint. So I don't mind re-adding 
it.

The patch is no bad, but I feel like we can do better:

1. You've added code poking into the buffer containing the hint to 
{{HintsReader}}. Arguably, this code doesn't belong to {{HIntsReader}} - it's 
not supposed to be aware of the underlying {{Hint}} representation, only binary 
encoding of the log itself. That code should live in {{Hint.Serializer}}. 
Besides breaking separation of concerns this duplication adds risk of 
forgetting to update deser code in both classes when we change it.

2. It should be versioned.

3. If we properly move it to {{Hint.Serializer}}, we can take this further, and 
besides cutting some network I/O, also short-circuit hint/buffer reading after 
getting the first two fields. For verbatim buffer iterators it means we can 
skip allocating a {{ByteBuffer}} with the containing mutation. For {{Hint}} 
iterator this means we can avoid deserialising the whole mutation entirely if 
we can deduct from creation time, gcgs, and max ttl that the hint is no longer 
alive.

4. There really is no need to call {{System.currentTimeMillis()}} for every 
hint deserialisation (via {{isLive}} check). This can be pretty expensive in 
certain virtualised environments depending on the configured time source. We 
can calculate it once on each iterator init (once per page), and still never 
overstream (if this is a normal dispatch, the hints are all still young; if 
it's a late dispatch - after a node being down for a while - the hints will 
likely be either all alive or all dead).

Pushed a branch with suggestions 
[here|https://github.com/iamaleksey/cassandra/commits/12982-sketch]. Note: it 
has some unrelated code changes (which ended up as CASSANDRA-12998), also 
doesn't necessarily work, or pass tests. Coded up while bored on Sunday at 
night, so there might be some room for improvement, too.

Please let me know what you think.

> Customizable hint ttl has been removed
> --
>
> Key: CASSANDRA-12982
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12982
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Blake Eggleston
>Assignee: Blake Eggleston
>Priority: Minor
> Fix For: 3.x
>
>
> The cassandra.maxHintTTL property added in CASSANDRA-5988 was removed in the 
> hint system rewrite for 3.0.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-12982) Customizable hint ttl has been removed

2016-12-05 Thread Aleksey Yeschenko (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-12982?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-12982:
--
Fix Version/s: (was: 4.0)
   (was: 3.0.x)
   3.x

> Customizable hint ttl has been removed
> --
>
> Key: CASSANDRA-12982
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12982
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Blake Eggleston
>Assignee: Blake Eggleston
>Priority: Minor
> Fix For: 3.x
>
>
> The cassandra.maxHintTTL property added in CASSANDRA-5988 was removed in the 
> hint system rewrite for 3.0.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-12935) Use saved tokens when setting local tokens on StorageService.joinRing()

2016-12-05 Thread Carl Yeksigian (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-12935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Carl Yeksigian updated CASSANDRA-12935:
---
   Resolution: Fixed
Fix Version/s: 3.11
   4.0
   3.0.11
   2.2.9
   Status: Resolved  (was: Patch Available)

+1

Committed as 
[a449e8f|https://git-wip-us.apache.org/repos/asf?p=cassandra.git;a=commit;h=a449e8f70f047081b2fd5892219ad2659d0027bd]
 and merged forward.

> Use saved tokens when setting local tokens on StorageService.joinRing()
> ---
>
> Key: CASSANDRA-12935
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12935
> Project: Cassandra
>  Issue Type: Bug
>  Components: Coordination
>Reporter: Paulo Motta
>Assignee: Paulo Motta
>Priority: Minor
> Fix For: 2.2.9, 3.0.11, 4.0, 3.11
>
>
> The introduction of {{StorageService.finishJoiningRing()}} on CASSANDRA-8523:
> {code:java}
> @@ -885,17 +896,14 @@ public class StorageService extends 
> NotificationBroadcasterSupport implements IE
>  {
>  if (dataAvailable)
>  {
> -// start participating in the ring.
> -
> SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.COMPLETED);
> -setTokens(bootstrapTokens);
> +finishJoiningRing();
> +
>  // remove the existing info about the replaced node.
>  if (!current.isEmpty())
>  {
>  for (InetAddress existing : current)
>  Gossiper.instance.replacedEndpoint(existing);
>  }
> -assert tokenMetadata.sortedTokens().size() > 0;
> -doAuthSetup();
>  }
>  else
>  {
> @@ -908,6 +916,11 @@ public class StorageService extends 
> NotificationBroadcasterSupport implements IE
>  else if (isSurveyMode)
>  {
> -setTokens(SystemKeyspace.getSavedTokens());
> -
> SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.COMPLETED);
>  isSurveyMode = false;
>  logger.info("Leaving write survey mode and joining ring at 
> operator request");
> -assert tokenMetadata.sortedTokens().size() > 0;
> -
> -doAuthSetup();
> +finishJoiningRing();
>  }
>  }
>  
> +private void finishJoiningRing()
> +{
> +// start participating in the ring.
> +
> SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.COMPLETED);
> +setTokens(bootstrapTokens);
> +
> +assert tokenMetadata.sortedTokens().size() > 0;
> +doAuthSetup();
> +}
> +
> {code}
> slightly changed the way tokens are set on {{StorageService.joinRing()}} when 
> {{cassandra.write_survey=true}} from 
> {{setTokens(SystemKeyspace.getSavedTokens())}}
> to {{setTokens(bootstrapTokens)}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[09/10] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.X

2016-12-05 Thread carl
Merge branch 'cassandra-3.0' into cassandra-3.X


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/caa26e4f
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/caa26e4f
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/caa26e4f

Branch: refs/heads/trunk
Commit: caa26e4fb9ba7b905d2806da6c1eff222d429b8c
Parents: afbc2e8 5f64ed7
Author: Carl Yeksigian 
Authored: Mon Dec 5 11:46:37 2016 -0500
Committer: Carl Yeksigian 
Committed: Mon Dec 5 11:46:37 2016 -0500

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/service/StorageService.java | 9 +
 2 files changed, 6 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/caa26e4f/CHANGES.txt
--
diff --cc CHANGES.txt
index 3d27690,5cacdd0..3918cfd
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -170,9 -48,6 +170,10 @@@ Merged from 3.0
   * Correct log message for statistics of offheap memtable flush 
(CASSANDRA-12776)
   * Explicitly set locale for string validation 
(CASSANDRA-12541,CASSANDRA-12542,CASSANDRA-12543,CASSANDRA-12545)
  Merged from 2.2:
++ * Use saved tokens when setting local tokens on StorageService.joinRing 
(CASSANDRA-12935)
 + * cqlsh: fix DESC TYPES errors (CASSANDRA-12914)
 + * Fix leak on skipped SSTables in sstableupgrade (CASSANDRA-12899)
 + * Avoid blocking gossip during pending range calculation (CASSANDRA-12281)
   * Fix purgeability of tombstones with max timestamp (CASSANDRA-12792)
   * Fail repair if participant dies during sync or anticompaction 
(CASSANDRA-12901)
   * cqlsh COPY: unprotected pk values before converting them if not using 
prepared statements (CASSANDRA-12863)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/caa26e4f/src/java/org/apache/cassandra/service/StorageService.java
--
diff --cc src/java/org/apache/cassandra/service/StorageService.java
index 07eb1d8,9bf8c54..a53187f
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@@ -986,7 -917,8 +987,7 @@@ public class StorageService extends Not
  {
  if (dataAvailable)
  {
- finishJoiningRing(bootstrap);
 -finishJoiningRing(bootstrapTokens);
 -
++finishJoiningRing(bootstrap, bootstrapTokens);
  // remove the existing info about the replaced node.
  if (!current.isEmpty())
  {
@@@ -1041,26 -967,17 +1042,26 @@@
  }
  else if (isSurveyMode)
  {
 -isSurveyMode = false;
  logger.info("Leaving write survey mode and joining ring at 
operator request");
- finishJoiningRing(resumedBootstrap);
 -finishJoiningRing(SystemKeyspace.getSavedTokens());
++finishJoiningRing(resumedBootstrap, 
SystemKeyspace.getSavedTokens());
 +isSurveyMode = false;
  }
  }
  
 -private void finishJoiningRing(Collection tokens)
 +private void executePreJoinTasks(boolean bootstrap)
 +{
 +StreamSupport.stream(ColumnFamilyStore.all().spliterator(), false)
 +.filter(cfs -> 
Schema.instance.getUserKeyspaces().contains(cfs.keyspace.getName()))
 +.forEach(cfs -> 
cfs.indexManager.executePreJoinTasksBlocking(bootstrap));
 +}
 +
- private void finishJoiningRing(boolean didBootstrap)
++private void finishJoiningRing(boolean didBootstrap, Collection 
tokens)
  {
  // start participating in the ring.
 +setMode(Mode.JOINING, "Finish joining ring", true);
  
SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.COMPLETED);
 +executePreJoinTasks(didBootstrap);
- setTokens(bootstrapTokens);
+ setTokens(tokens);
  
  assert tokenMetadata.sortedTokens().size() > 0;
  doAuthSetup();



[07/10] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0

2016-12-05 Thread carl
Merge branch 'cassandra-2.2' into cassandra-3.0


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/5f64ed7c
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5f64ed7c
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5f64ed7c

Branch: refs/heads/trunk
Commit: 5f64ed7cc2d62543f0be7b5eb09bd2495a0e4f3a
Parents: 4d5a53e a449e8f
Author: Carl Yeksigian 
Authored: Mon Dec 5 11:41:52 2016 -0500
Committer: Carl Yeksigian 
Committed: Mon Dec 5 11:41:52 2016 -0500

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/service/StorageService.java | 9 +
 2 files changed, 6 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5f64ed7c/CHANGES.txt
--
diff --cc CHANGES.txt
index 8cdca57,302becf..5cacdd0
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,11 -1,5 +1,12 @@@
 -2.2.9
 +3.0.11
 + * Reject default_time_to_live option when creating or altering MVs 
(CASSANDRA-12868)
 + * Nodetool should use a more sane max heap size (CASSANDRA-12739)
 + * LocalToken ensures token values are cloned on heap (CASSANDRA-12651)
 + * AnticompactionRequestSerializer serializedSize is incorrect 
(CASSANDRA-12934)
 + * Prevent reloading of logback.xml from UDF sandbox (CASSANDRA-12535)
 + * Reenable HeapPool (CASSANDRA-12900)
 +Merged from 2.2:
+  * Use saved tokens when setting local tokens on StorageService.joinRing 
(CASSANDRA-12935)
   * cqlsh: fix DESC TYPES errors (CASSANDRA-12914)
   * Fix leak on skipped SSTables in sstableupgrade (CASSANDRA-12899)
   * Avoid blocking gossip during pending range calculation (CASSANDRA-12281)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5f64ed7c/src/java/org/apache/cassandra/service/StorageService.java
--



[08/10] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.X

2016-12-05 Thread carl
Merge branch 'cassandra-3.0' into cassandra-3.X


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/caa26e4f
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/caa26e4f
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/caa26e4f

Branch: refs/heads/cassandra-3.X
Commit: caa26e4fb9ba7b905d2806da6c1eff222d429b8c
Parents: afbc2e8 5f64ed7
Author: Carl Yeksigian 
Authored: Mon Dec 5 11:46:37 2016 -0500
Committer: Carl Yeksigian 
Committed: Mon Dec 5 11:46:37 2016 -0500

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/service/StorageService.java | 9 +
 2 files changed, 6 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/caa26e4f/CHANGES.txt
--
diff --cc CHANGES.txt
index 3d27690,5cacdd0..3918cfd
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -170,9 -48,6 +170,10 @@@ Merged from 3.0
   * Correct log message for statistics of offheap memtable flush 
(CASSANDRA-12776)
   * Explicitly set locale for string validation 
(CASSANDRA-12541,CASSANDRA-12542,CASSANDRA-12543,CASSANDRA-12545)
  Merged from 2.2:
++ * Use saved tokens when setting local tokens on StorageService.joinRing 
(CASSANDRA-12935)
 + * cqlsh: fix DESC TYPES errors (CASSANDRA-12914)
 + * Fix leak on skipped SSTables in sstableupgrade (CASSANDRA-12899)
 + * Avoid blocking gossip during pending range calculation (CASSANDRA-12281)
   * Fix purgeability of tombstones with max timestamp (CASSANDRA-12792)
   * Fail repair if participant dies during sync or anticompaction 
(CASSANDRA-12901)
   * cqlsh COPY: unprotected pk values before converting them if not using 
prepared statements (CASSANDRA-12863)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/caa26e4f/src/java/org/apache/cassandra/service/StorageService.java
--
diff --cc src/java/org/apache/cassandra/service/StorageService.java
index 07eb1d8,9bf8c54..a53187f
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@@ -986,7 -917,8 +987,7 @@@ public class StorageService extends Not
  {
  if (dataAvailable)
  {
- finishJoiningRing(bootstrap);
 -finishJoiningRing(bootstrapTokens);
 -
++finishJoiningRing(bootstrap, bootstrapTokens);
  // remove the existing info about the replaced node.
  if (!current.isEmpty())
  {
@@@ -1041,26 -967,17 +1042,26 @@@
  }
  else if (isSurveyMode)
  {
 -isSurveyMode = false;
  logger.info("Leaving write survey mode and joining ring at 
operator request");
- finishJoiningRing(resumedBootstrap);
 -finishJoiningRing(SystemKeyspace.getSavedTokens());
++finishJoiningRing(resumedBootstrap, 
SystemKeyspace.getSavedTokens());
 +isSurveyMode = false;
  }
  }
  
 -private void finishJoiningRing(Collection tokens)
 +private void executePreJoinTasks(boolean bootstrap)
 +{
 +StreamSupport.stream(ColumnFamilyStore.all().spliterator(), false)
 +.filter(cfs -> 
Schema.instance.getUserKeyspaces().contains(cfs.keyspace.getName()))
 +.forEach(cfs -> 
cfs.indexManager.executePreJoinTasksBlocking(bootstrap));
 +}
 +
- private void finishJoiningRing(boolean didBootstrap)
++private void finishJoiningRing(boolean didBootstrap, Collection 
tokens)
  {
  // start participating in the ring.
 +setMode(Mode.JOINING, "Finish joining ring", true);
  
SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.COMPLETED);
 +executePreJoinTasks(didBootstrap);
- setTokens(bootstrapTokens);
+ setTokens(tokens);
  
  assert tokenMetadata.sortedTokens().size() > 0;
  doAuthSetup();



[01/10] cassandra git commit: Use saved tokens when setting local tokens on StorageService.joinRing()

2016-12-05 Thread carl
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 d38bf9faa -> a449e8f70
  refs/heads/cassandra-3.0 4d5a53e9b -> 5f64ed7cc
  refs/heads/cassandra-3.X afbc2e850 -> caa26e4fb
  refs/heads/trunk bc70e4903 -> d31ce663f


Use saved tokens when setting local tokens on StorageService.joinRing()

Patch by Paulo Motta; reviewed by Carl Yeksigian for CASSANDRA-12935


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a449e8f7
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a449e8f7
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a449e8f7

Branch: refs/heads/cassandra-2.2
Commit: a449e8f70f047081b2fd5892219ad2659d0027bd
Parents: d38bf9f
Author: Paulo Motta 
Authored: Sun Nov 20 18:47:54 2016 -0200
Committer: Carl Yeksigian 
Committed: Mon Dec 5 11:40:37 2016 -0500

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/service/StorageService.java | 9 +
 2 files changed, 6 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a449e8f7/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index d951b07..302becf 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.9
+ * Use saved tokens when setting local tokens on StorageService.joinRing 
(CASSANDRA-12935)
  * cqlsh: fix DESC TYPES errors (CASSANDRA-12914)
  * Fix leak on skipped SSTables in sstableupgrade (CASSANDRA-12899)
  * Avoid blocking gossip during pending range calculation (CASSANDRA-12281)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a449e8f7/src/java/org/apache/cassandra/service/StorageService.java
--
diff --git a/src/java/org/apache/cassandra/service/StorageService.java 
b/src/java/org/apache/cassandra/service/StorageService.java
index 58c2bac..c2996d7 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -194,6 +194,7 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 /** This method updates the local token on disk  */
 public void setTokens(Collection tokens)
 {
+assert tokens != null && !tokens.isEmpty() : "Node needs at least one 
token.";
 if (logger.isDebugEnabled())
 logger.debug("Setting tokens to {}", tokens);
 SystemKeyspace.updateTokens(tokens);
@@ -907,7 +908,7 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 {
 if (dataAvailable)
 {
-finishJoiningRing();
+finishJoiningRing(bootstrapTokens);
 
 // remove the existing info about the replaced node.
 if (!current.isEmpty())
@@ -959,15 +960,15 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 {
 isSurveyMode = false;
 logger.info("Leaving write survey mode and joining ring at 
operator request");
-finishJoiningRing();
+finishJoiningRing(SystemKeyspace.getSavedTokens());
 }
 }
 
-private void finishJoiningRing()
+private void finishJoiningRing(Collection tokens)
 {
 // start participating in the ring.
 
SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.COMPLETED);
-setTokens(bootstrapTokens);
+setTokens(tokens);
 
 assert tokenMetadata.sortedTokens().size() > 0;
 doAuthSetup();



[04/10] cassandra git commit: Use saved tokens when setting local tokens on StorageService.joinRing()

2016-12-05 Thread carl
Use saved tokens when setting local tokens on StorageService.joinRing()

Patch by Paulo Motta; reviewed by Carl Yeksigian for CASSANDRA-12935


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a449e8f7
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a449e8f7
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a449e8f7

Branch: refs/heads/trunk
Commit: a449e8f70f047081b2fd5892219ad2659d0027bd
Parents: d38bf9f
Author: Paulo Motta 
Authored: Sun Nov 20 18:47:54 2016 -0200
Committer: Carl Yeksigian 
Committed: Mon Dec 5 11:40:37 2016 -0500

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/service/StorageService.java | 9 +
 2 files changed, 6 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a449e8f7/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index d951b07..302becf 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.9
+ * Use saved tokens when setting local tokens on StorageService.joinRing 
(CASSANDRA-12935)
  * cqlsh: fix DESC TYPES errors (CASSANDRA-12914)
  * Fix leak on skipped SSTables in sstableupgrade (CASSANDRA-12899)
  * Avoid blocking gossip during pending range calculation (CASSANDRA-12281)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a449e8f7/src/java/org/apache/cassandra/service/StorageService.java
--
diff --git a/src/java/org/apache/cassandra/service/StorageService.java 
b/src/java/org/apache/cassandra/service/StorageService.java
index 58c2bac..c2996d7 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -194,6 +194,7 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 /** This method updates the local token on disk  */
 public void setTokens(Collection tokens)
 {
+assert tokens != null && !tokens.isEmpty() : "Node needs at least one 
token.";
 if (logger.isDebugEnabled())
 logger.debug("Setting tokens to {}", tokens);
 SystemKeyspace.updateTokens(tokens);
@@ -907,7 +908,7 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 {
 if (dataAvailable)
 {
-finishJoiningRing();
+finishJoiningRing(bootstrapTokens);
 
 // remove the existing info about the replaced node.
 if (!current.isEmpty())
@@ -959,15 +960,15 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 {
 isSurveyMode = false;
 logger.info("Leaving write survey mode and joining ring at 
operator request");
-finishJoiningRing();
+finishJoiningRing(SystemKeyspace.getSavedTokens());
 }
 }
 
-private void finishJoiningRing()
+private void finishJoiningRing(Collection tokens)
 {
 // start participating in the ring.
 
SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.COMPLETED);
-setTokens(bootstrapTokens);
+setTokens(tokens);
 
 assert tokenMetadata.sortedTokens().size() > 0;
 doAuthSetup();



[8/8] cassandra git commit: Merge branch 'cassandra-3.X' into trunk

2016-12-05 Thread carl
Merge branch 'cassandra-3.X' into trunk


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/8d97e3d9
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8d97e3d9
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8d97e3d9

Branch: refs/heads/trunk
Commit: 8d97e3d9b615e3ebf006156d93e03448b84247cd
Parents: d31ce66 09da51e
Author: Carl Yeksigian 
Authored: Mon Dec 5 12:28:25 2016 -0500
Committer: Carl Yeksigian 
Committed: Mon Dec 5 12:28:25 2016 -0500

--

--




[3/8] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11

2016-12-05 Thread carl
Merge branch 'cassandra-3.0' into cassandra-3.11


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a85b0071
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a85b0071
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a85b0071

Branch: refs/heads/cassandra-3.11
Commit: a85b007103ec2ffcfac2ce9e591bc26657089549
Parents: a06b469 5f64ed7
Author: Carl Yeksigian 
Authored: Mon Dec 5 12:27:57 2016 -0500
Committer: Carl Yeksigian 
Committed: Mon Dec 5 12:27:57 2016 -0500

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/service/StorageService.java | 9 +
 2 files changed, 6 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a85b0071/CHANGES.txt
--
diff --cc CHANGES.txt
index e69a67a,5cacdd0..c04c2fa
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -163,9 -48,6 +163,10 @@@ Merged from 3.0
   * Correct log message for statistics of offheap memtable flush 
(CASSANDRA-12776)
   * Explicitly set locale for string validation 
(CASSANDRA-12541,CASSANDRA-12542,CASSANDRA-12543,CASSANDRA-12545)
  Merged from 2.2:
++ * Use saved tokens when setting local tokens on StorageService.joinRing 
(CASSANDRA-12935)
 + * cqlsh: fix DESC TYPES errors (CASSANDRA-12914)
 + * Fix leak on skipped SSTables in sstableupgrade (CASSANDRA-12899)
 + * Avoid blocking gossip during pending range calculation (CASSANDRA-12281)
   * Fix purgeability of tombstones with max timestamp (CASSANDRA-12792)
   * Fail repair if participant dies during sync or anticompaction 
(CASSANDRA-12901)
   * cqlsh COPY: unprotected pk values before converting them if not using 
prepared statements (CASSANDRA-12863)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a85b0071/src/java/org/apache/cassandra/service/StorageService.java
--
diff --cc src/java/org/apache/cassandra/service/StorageService.java
index 07eb1d8,9bf8c54..a53187f
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@@ -986,7 -917,8 +987,7 @@@ public class StorageService extends Not
  {
  if (dataAvailable)
  {
- finishJoiningRing(bootstrap);
 -finishJoiningRing(bootstrapTokens);
 -
++finishJoiningRing(bootstrap, bootstrapTokens);
  // remove the existing info about the replaced node.
  if (!current.isEmpty())
  {
@@@ -1041,26 -967,17 +1042,26 @@@
  }
  else if (isSurveyMode)
  {
 -isSurveyMode = false;
  logger.info("Leaving write survey mode and joining ring at 
operator request");
- finishJoiningRing(resumedBootstrap);
 -finishJoiningRing(SystemKeyspace.getSavedTokens());
++finishJoiningRing(resumedBootstrap, 
SystemKeyspace.getSavedTokens());
 +isSurveyMode = false;
  }
  }
  
 -private void finishJoiningRing(Collection tokens)
 +private void executePreJoinTasks(boolean bootstrap)
 +{
 +StreamSupport.stream(ColumnFamilyStore.all().spliterator(), false)
 +.filter(cfs -> 
Schema.instance.getUserKeyspaces().contains(cfs.keyspace.getName()))
 +.forEach(cfs -> 
cfs.indexManager.executePreJoinTasksBlocking(bootstrap));
 +}
 +
- private void finishJoiningRing(boolean didBootstrap)
++private void finishJoiningRing(boolean didBootstrap, Collection 
tokens)
  {
  // start participating in the ring.
 +setMode(Mode.JOINING, "Finish joining ring", true);
  
SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.COMPLETED);
 +executePreJoinTasks(didBootstrap);
- setTokens(bootstrapTokens);
+ setTokens(tokens);
  
  assert tokenMetadata.sortedTokens().size() > 0;
  doAuthSetup();



[1/8] cassandra git commit: Use saved tokens when setting local tokens on StorageService.joinRing()

2016-12-05 Thread carl
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.11 a06b469c6 -> a85b00710
  refs/heads/cassandra-3.X caa26e4fb -> 09da51e66
  refs/heads/trunk d31ce663f -> 8d97e3d9b


Use saved tokens when setting local tokens on StorageService.joinRing()

Patch by Paulo Motta; reviewed by Carl Yeksigian for CASSANDRA-12935


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a449e8f7
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a449e8f7
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a449e8f7

Branch: refs/heads/cassandra-3.11
Commit: a449e8f70f047081b2fd5892219ad2659d0027bd
Parents: d38bf9f
Author: Paulo Motta 
Authored: Sun Nov 20 18:47:54 2016 -0200
Committer: Carl Yeksigian 
Committed: Mon Dec 5 11:40:37 2016 -0500

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/service/StorageService.java | 9 +
 2 files changed, 6 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a449e8f7/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index d951b07..302becf 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.9
+ * Use saved tokens when setting local tokens on StorageService.joinRing 
(CASSANDRA-12935)
  * cqlsh: fix DESC TYPES errors (CASSANDRA-12914)
  * Fix leak on skipped SSTables in sstableupgrade (CASSANDRA-12899)
  * Avoid blocking gossip during pending range calculation (CASSANDRA-12281)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a449e8f7/src/java/org/apache/cassandra/service/StorageService.java
--
diff --git a/src/java/org/apache/cassandra/service/StorageService.java 
b/src/java/org/apache/cassandra/service/StorageService.java
index 58c2bac..c2996d7 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -194,6 +194,7 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 /** This method updates the local token on disk  */
 public void setTokens(Collection tokens)
 {
+assert tokens != null && !tokens.isEmpty() : "Node needs at least one 
token.";
 if (logger.isDebugEnabled())
 logger.debug("Setting tokens to {}", tokens);
 SystemKeyspace.updateTokens(tokens);
@@ -907,7 +908,7 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 {
 if (dataAvailable)
 {
-finishJoiningRing();
+finishJoiningRing(bootstrapTokens);
 
 // remove the existing info about the replaced node.
 if (!current.isEmpty())
@@ -959,15 +960,15 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 {
 isSurveyMode = false;
 logger.info("Leaving write survey mode and joining ring at 
operator request");
-finishJoiningRing();
+finishJoiningRing(SystemKeyspace.getSavedTokens());
 }
 }
 
-private void finishJoiningRing()
+private void finishJoiningRing(Collection tokens)
 {
 // start participating in the ring.
 
SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.COMPLETED);
-setTokens(bootstrapTokens);
+setTokens(tokens);
 
 assert tokenMetadata.sortedTokens().size() > 0;
 doAuthSetup();



[5/8] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11

2016-12-05 Thread carl
Merge branch 'cassandra-3.0' into cassandra-3.11


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a85b0071
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a85b0071
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a85b0071

Branch: refs/heads/trunk
Commit: a85b007103ec2ffcfac2ce9e591bc26657089549
Parents: a06b469 5f64ed7
Author: Carl Yeksigian 
Authored: Mon Dec 5 12:27:57 2016 -0500
Committer: Carl Yeksigian 
Committed: Mon Dec 5 12:27:57 2016 -0500

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/service/StorageService.java | 9 +
 2 files changed, 6 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a85b0071/CHANGES.txt
--
diff --cc CHANGES.txt
index e69a67a,5cacdd0..c04c2fa
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -163,9 -48,6 +163,10 @@@ Merged from 3.0
   * Correct log message for statistics of offheap memtable flush 
(CASSANDRA-12776)
   * Explicitly set locale for string validation 
(CASSANDRA-12541,CASSANDRA-12542,CASSANDRA-12543,CASSANDRA-12545)
  Merged from 2.2:
++ * Use saved tokens when setting local tokens on StorageService.joinRing 
(CASSANDRA-12935)
 + * cqlsh: fix DESC TYPES errors (CASSANDRA-12914)
 + * Fix leak on skipped SSTables in sstableupgrade (CASSANDRA-12899)
 + * Avoid blocking gossip during pending range calculation (CASSANDRA-12281)
   * Fix purgeability of tombstones with max timestamp (CASSANDRA-12792)
   * Fail repair if participant dies during sync or anticompaction 
(CASSANDRA-12901)
   * cqlsh COPY: unprotected pk values before converting them if not using 
prepared statements (CASSANDRA-12863)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a85b0071/src/java/org/apache/cassandra/service/StorageService.java
--
diff --cc src/java/org/apache/cassandra/service/StorageService.java
index 07eb1d8,9bf8c54..a53187f
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@@ -986,7 -917,8 +987,7 @@@ public class StorageService extends Not
  {
  if (dataAvailable)
  {
- finishJoiningRing(bootstrap);
 -finishJoiningRing(bootstrapTokens);
 -
++finishJoiningRing(bootstrap, bootstrapTokens);
  // remove the existing info about the replaced node.
  if (!current.isEmpty())
  {
@@@ -1041,26 -967,17 +1042,26 @@@
  }
  else if (isSurveyMode)
  {
 -isSurveyMode = false;
  logger.info("Leaving write survey mode and joining ring at 
operator request");
- finishJoiningRing(resumedBootstrap);
 -finishJoiningRing(SystemKeyspace.getSavedTokens());
++finishJoiningRing(resumedBootstrap, 
SystemKeyspace.getSavedTokens());
 +isSurveyMode = false;
  }
  }
  
 -private void finishJoiningRing(Collection tokens)
 +private void executePreJoinTasks(boolean bootstrap)
 +{
 +StreamSupport.stream(ColumnFamilyStore.all().spliterator(), false)
 +.filter(cfs -> 
Schema.instance.getUserKeyspaces().contains(cfs.keyspace.getName()))
 +.forEach(cfs -> 
cfs.indexManager.executePreJoinTasksBlocking(bootstrap));
 +}
 +
- private void finishJoiningRing(boolean didBootstrap)
++private void finishJoiningRing(boolean didBootstrap, Collection 
tokens)
  {
  // start participating in the ring.
 +setMode(Mode.JOINING, "Finish joining ring", true);
  
SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.COMPLETED);
 +executePreJoinTasks(didBootstrap);
- setTokens(bootstrapTokens);
+ setTokens(tokens);
  
  assert tokenMetadata.sortedTokens().size() > 0;
  doAuthSetup();



[4/8] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11

2016-12-05 Thread carl
Merge branch 'cassandra-3.0' into cassandra-3.11


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a85b0071
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a85b0071
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a85b0071

Branch: refs/heads/cassandra-3.X
Commit: a85b007103ec2ffcfac2ce9e591bc26657089549
Parents: a06b469 5f64ed7
Author: Carl Yeksigian 
Authored: Mon Dec 5 12:27:57 2016 -0500
Committer: Carl Yeksigian 
Committed: Mon Dec 5 12:27:57 2016 -0500

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/service/StorageService.java | 9 +
 2 files changed, 6 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a85b0071/CHANGES.txt
--
diff --cc CHANGES.txt
index e69a67a,5cacdd0..c04c2fa
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -163,9 -48,6 +163,10 @@@ Merged from 3.0
   * Correct log message for statistics of offheap memtable flush 
(CASSANDRA-12776)
   * Explicitly set locale for string validation 
(CASSANDRA-12541,CASSANDRA-12542,CASSANDRA-12543,CASSANDRA-12545)
  Merged from 2.2:
++ * Use saved tokens when setting local tokens on StorageService.joinRing 
(CASSANDRA-12935)
 + * cqlsh: fix DESC TYPES errors (CASSANDRA-12914)
 + * Fix leak on skipped SSTables in sstableupgrade (CASSANDRA-12899)
 + * Avoid blocking gossip during pending range calculation (CASSANDRA-12281)
   * Fix purgeability of tombstones with max timestamp (CASSANDRA-12792)
   * Fail repair if participant dies during sync or anticompaction 
(CASSANDRA-12901)
   * cqlsh COPY: unprotected pk values before converting them if not using 
prepared statements (CASSANDRA-12863)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a85b0071/src/java/org/apache/cassandra/service/StorageService.java
--
diff --cc src/java/org/apache/cassandra/service/StorageService.java
index 07eb1d8,9bf8c54..a53187f
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@@ -986,7 -917,8 +987,7 @@@ public class StorageService extends Not
  {
  if (dataAvailable)
  {
- finishJoiningRing(bootstrap);
 -finishJoiningRing(bootstrapTokens);
 -
++finishJoiningRing(bootstrap, bootstrapTokens);
  // remove the existing info about the replaced node.
  if (!current.isEmpty())
  {
@@@ -1041,26 -967,17 +1042,26 @@@
  }
  else if (isSurveyMode)
  {
 -isSurveyMode = false;
  logger.info("Leaving write survey mode and joining ring at 
operator request");
- finishJoiningRing(resumedBootstrap);
 -finishJoiningRing(SystemKeyspace.getSavedTokens());
++finishJoiningRing(resumedBootstrap, 
SystemKeyspace.getSavedTokens());
 +isSurveyMode = false;
  }
  }
  
 -private void finishJoiningRing(Collection tokens)
 +private void executePreJoinTasks(boolean bootstrap)
 +{
 +StreamSupport.stream(ColumnFamilyStore.all().spliterator(), false)
 +.filter(cfs -> 
Schema.instance.getUserKeyspaces().contains(cfs.keyspace.getName()))
 +.forEach(cfs -> 
cfs.indexManager.executePreJoinTasksBlocking(bootstrap));
 +}
 +
- private void finishJoiningRing(boolean didBootstrap)
++private void finishJoiningRing(boolean didBootstrap, Collection 
tokens)
  {
  // start participating in the ring.
 +setMode(Mode.JOINING, "Finish joining ring", true);
  
SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.COMPLETED);
 +executePreJoinTasks(didBootstrap);
- setTokens(bootstrapTokens);
+ setTokens(tokens);
  
  assert tokenMetadata.sortedTokens().size() > 0;
  doAuthSetup();



[6/8] cassandra git commit: Merge branch 'cassandra-3.11' into cassandra-3.X

2016-12-05 Thread carl
Merge branch 'cassandra-3.11' into cassandra-3.X


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/09da51e6
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/09da51e6
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/09da51e6

Branch: refs/heads/trunk
Commit: 09da51e66bd30a8696c39cd21c1261e35c531059
Parents: caa26e4 a85b007
Author: Carl Yeksigian 
Authored: Mon Dec 5 12:28:09 2016 -0500
Committer: Carl Yeksigian 
Committed: Mon Dec 5 12:28:09 2016 -0500

--

--




[7/8] cassandra git commit: Merge branch 'cassandra-3.11' into cassandra-3.X

2016-12-05 Thread carl
Merge branch 'cassandra-3.11' into cassandra-3.X


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/09da51e6
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/09da51e6
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/09da51e6

Branch: refs/heads/cassandra-3.X
Commit: 09da51e66bd30a8696c39cd21c1261e35c531059
Parents: caa26e4 a85b007
Author: Carl Yeksigian 
Authored: Mon Dec 5 12:28:09 2016 -0500
Committer: Carl Yeksigian 
Committed: Mon Dec 5 12:28:09 2016 -0500

--

--




[2/8] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0

2016-12-05 Thread carl
Merge branch 'cassandra-2.2' into cassandra-3.0


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/5f64ed7c
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5f64ed7c
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5f64ed7c

Branch: refs/heads/cassandra-3.11
Commit: 5f64ed7cc2d62543f0be7b5eb09bd2495a0e4f3a
Parents: 4d5a53e a449e8f
Author: Carl Yeksigian 
Authored: Mon Dec 5 11:41:52 2016 -0500
Committer: Carl Yeksigian 
Committed: Mon Dec 5 11:41:52 2016 -0500

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/service/StorageService.java | 9 +
 2 files changed, 6 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5f64ed7c/CHANGES.txt
--
diff --cc CHANGES.txt
index 8cdca57,302becf..5cacdd0
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,11 -1,5 +1,12 @@@
 -2.2.9
 +3.0.11
 + * Reject default_time_to_live option when creating or altering MVs 
(CASSANDRA-12868)
 + * Nodetool should use a more sane max heap size (CASSANDRA-12739)
 + * LocalToken ensures token values are cloned on heap (CASSANDRA-12651)
 + * AnticompactionRequestSerializer serializedSize is incorrect 
(CASSANDRA-12934)
 + * Prevent reloading of logback.xml from UDF sandbox (CASSANDRA-12535)
 + * Reenable HeapPool (CASSANDRA-12900)
 +Merged from 2.2:
+  * Use saved tokens when setting local tokens on StorageService.joinRing 
(CASSANDRA-12935)
   * cqlsh: fix DESC TYPES errors (CASSANDRA-12914)
   * Fix leak on skipped SSTables in sstableupgrade (CASSANDRA-12899)
   * Avoid blocking gossip during pending range calculation (CASSANDRA-12281)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5f64ed7c/src/java/org/apache/cassandra/service/StorageService.java
--



[05/10] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0

2016-12-05 Thread carl
Merge branch 'cassandra-2.2' into cassandra-3.0


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/5f64ed7c
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5f64ed7c
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5f64ed7c

Branch: refs/heads/cassandra-3.X
Commit: 5f64ed7cc2d62543f0be7b5eb09bd2495a0e4f3a
Parents: 4d5a53e a449e8f
Author: Carl Yeksigian 
Authored: Mon Dec 5 11:41:52 2016 -0500
Committer: Carl Yeksigian 
Committed: Mon Dec 5 11:41:52 2016 -0500

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/service/StorageService.java | 9 +
 2 files changed, 6 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5f64ed7c/CHANGES.txt
--
diff --cc CHANGES.txt
index 8cdca57,302becf..5cacdd0
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,11 -1,5 +1,12 @@@
 -2.2.9
 +3.0.11
 + * Reject default_time_to_live option when creating or altering MVs 
(CASSANDRA-12868)
 + * Nodetool should use a more sane max heap size (CASSANDRA-12739)
 + * LocalToken ensures token values are cloned on heap (CASSANDRA-12651)
 + * AnticompactionRequestSerializer serializedSize is incorrect 
(CASSANDRA-12934)
 + * Prevent reloading of logback.xml from UDF sandbox (CASSANDRA-12535)
 + * Reenable HeapPool (CASSANDRA-12900)
 +Merged from 2.2:
+  * Use saved tokens when setting local tokens on StorageService.joinRing 
(CASSANDRA-12935)
   * cqlsh: fix DESC TYPES errors (CASSANDRA-12914)
   * Fix leak on skipped SSTables in sstableupgrade (CASSANDRA-12899)
   * Avoid blocking gossip during pending range calculation (CASSANDRA-12281)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5f64ed7c/src/java/org/apache/cassandra/service/StorageService.java
--



[03/10] cassandra git commit: Use saved tokens when setting local tokens on StorageService.joinRing()

2016-12-05 Thread carl
Use saved tokens when setting local tokens on StorageService.joinRing()

Patch by Paulo Motta; reviewed by Carl Yeksigian for CASSANDRA-12935


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a449e8f7
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a449e8f7
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a449e8f7

Branch: refs/heads/cassandra-3.X
Commit: a449e8f70f047081b2fd5892219ad2659d0027bd
Parents: d38bf9f
Author: Paulo Motta 
Authored: Sun Nov 20 18:47:54 2016 -0200
Committer: Carl Yeksigian 
Committed: Mon Dec 5 11:40:37 2016 -0500

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/service/StorageService.java | 9 +
 2 files changed, 6 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a449e8f7/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index d951b07..302becf 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.9
+ * Use saved tokens when setting local tokens on StorageService.joinRing 
(CASSANDRA-12935)
  * cqlsh: fix DESC TYPES errors (CASSANDRA-12914)
  * Fix leak on skipped SSTables in sstableupgrade (CASSANDRA-12899)
  * Avoid blocking gossip during pending range calculation (CASSANDRA-12281)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a449e8f7/src/java/org/apache/cassandra/service/StorageService.java
--
diff --git a/src/java/org/apache/cassandra/service/StorageService.java 
b/src/java/org/apache/cassandra/service/StorageService.java
index 58c2bac..c2996d7 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -194,6 +194,7 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 /** This method updates the local token on disk  */
 public void setTokens(Collection tokens)
 {
+assert tokens != null && !tokens.isEmpty() : "Node needs at least one 
token.";
 if (logger.isDebugEnabled())
 logger.debug("Setting tokens to {}", tokens);
 SystemKeyspace.updateTokens(tokens);
@@ -907,7 +908,7 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 {
 if (dataAvailable)
 {
-finishJoiningRing();
+finishJoiningRing(bootstrapTokens);
 
 // remove the existing info about the replaced node.
 if (!current.isEmpty())
@@ -959,15 +960,15 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 {
 isSurveyMode = false;
 logger.info("Leaving write survey mode and joining ring at 
operator request");
-finishJoiningRing();
+finishJoiningRing(SystemKeyspace.getSavedTokens());
 }
 }
 
-private void finishJoiningRing()
+private void finishJoiningRing(Collection tokens)
 {
 // start participating in the ring.
 
SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.COMPLETED);
-setTokens(bootstrapTokens);
+setTokens(tokens);
 
 assert tokenMetadata.sortedTokens().size() > 0;
 doAuthSetup();



[06/10] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0

2016-12-05 Thread carl
Merge branch 'cassandra-2.2' into cassandra-3.0


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/5f64ed7c
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5f64ed7c
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5f64ed7c

Branch: refs/heads/cassandra-3.0
Commit: 5f64ed7cc2d62543f0be7b5eb09bd2495a0e4f3a
Parents: 4d5a53e a449e8f
Author: Carl Yeksigian 
Authored: Mon Dec 5 11:41:52 2016 -0500
Committer: Carl Yeksigian 
Committed: Mon Dec 5 11:41:52 2016 -0500

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/service/StorageService.java | 9 +
 2 files changed, 6 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5f64ed7c/CHANGES.txt
--
diff --cc CHANGES.txt
index 8cdca57,302becf..5cacdd0
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,11 -1,5 +1,12 @@@
 -2.2.9
 +3.0.11
 + * Reject default_time_to_live option when creating or altering MVs 
(CASSANDRA-12868)
 + * Nodetool should use a more sane max heap size (CASSANDRA-12739)
 + * LocalToken ensures token values are cloned on heap (CASSANDRA-12651)
 + * AnticompactionRequestSerializer serializedSize is incorrect 
(CASSANDRA-12934)
 + * Prevent reloading of logback.xml from UDF sandbox (CASSANDRA-12535)
 + * Reenable HeapPool (CASSANDRA-12900)
 +Merged from 2.2:
+  * Use saved tokens when setting local tokens on StorageService.joinRing 
(CASSANDRA-12935)
   * cqlsh: fix DESC TYPES errors (CASSANDRA-12914)
   * Fix leak on skipped SSTables in sstableupgrade (CASSANDRA-12899)
   * Avoid blocking gossip during pending range calculation (CASSANDRA-12281)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5f64ed7c/src/java/org/apache/cassandra/service/StorageService.java
--



[02/10] cassandra git commit: Use saved tokens when setting local tokens on StorageService.joinRing()

2016-12-05 Thread carl
Use saved tokens when setting local tokens on StorageService.joinRing()

Patch by Paulo Motta; reviewed by Carl Yeksigian for CASSANDRA-12935


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a449e8f7
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a449e8f7
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a449e8f7

Branch: refs/heads/cassandra-3.0
Commit: a449e8f70f047081b2fd5892219ad2659d0027bd
Parents: d38bf9f
Author: Paulo Motta 
Authored: Sun Nov 20 18:47:54 2016 -0200
Committer: Carl Yeksigian 
Committed: Mon Dec 5 11:40:37 2016 -0500

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/service/StorageService.java | 9 +
 2 files changed, 6 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a449e8f7/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index d951b07..302becf 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.9
+ * Use saved tokens when setting local tokens on StorageService.joinRing 
(CASSANDRA-12935)
  * cqlsh: fix DESC TYPES errors (CASSANDRA-12914)
  * Fix leak on skipped SSTables in sstableupgrade (CASSANDRA-12899)
  * Avoid blocking gossip during pending range calculation (CASSANDRA-12281)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a449e8f7/src/java/org/apache/cassandra/service/StorageService.java
--
diff --git a/src/java/org/apache/cassandra/service/StorageService.java 
b/src/java/org/apache/cassandra/service/StorageService.java
index 58c2bac..c2996d7 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -194,6 +194,7 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 /** This method updates the local token on disk  */
 public void setTokens(Collection tokens)
 {
+assert tokens != null && !tokens.isEmpty() : "Node needs at least one 
token.";
 if (logger.isDebugEnabled())
 logger.debug("Setting tokens to {}", tokens);
 SystemKeyspace.updateTokens(tokens);
@@ -907,7 +908,7 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 {
 if (dataAvailable)
 {
-finishJoiningRing();
+finishJoiningRing(bootstrapTokens);
 
 // remove the existing info about the replaced node.
 if (!current.isEmpty())
@@ -959,15 +960,15 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 {
 isSurveyMode = false;
 logger.info("Leaving write survey mode and joining ring at 
operator request");
-finishJoiningRing();
+finishJoiningRing(SystemKeyspace.getSavedTokens());
 }
 }
 
-private void finishJoiningRing()
+private void finishJoiningRing(Collection tokens)
 {
 // start participating in the ring.
 
SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.COMPLETED);
-setTokens(bootstrapTokens);
+setTokens(tokens);
 
 assert tokenMetadata.sortedTokens().size() > 0;
 doAuthSetup();



[10/10] cassandra git commit: Merge branch 'cassandra-3.X' into trunk

2016-12-05 Thread carl
Merge branch 'cassandra-3.X' into trunk


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d31ce663
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d31ce663
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d31ce663

Branch: refs/heads/trunk
Commit: d31ce663f61de4e246ac95492d6846f6ace6a4ff
Parents: bc70e49 caa26e4
Author: Carl Yeksigian 
Authored: Mon Dec 5 11:47:03 2016 -0500
Committer: Carl Yeksigian 
Committed: Mon Dec 5 11:47:03 2016 -0500

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/service/StorageService.java | 9 +
 2 files changed, 6 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d31ce663/CHANGES.txt
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d31ce663/src/java/org/apache/cassandra/service/StorageService.java
--



[jira] [Updated] (CASSANDRA-12986) dtest failure in upgrade_internal_auth_test.TestAuthUpgrade.test_upgrade_legacy_table

2016-12-05 Thread Philip Thompson (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-12986?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Philip Thompson updated CASSANDRA-12986:

Issue Type: Bug  (was: Test)

> dtest failure in 
> upgrade_internal_auth_test.TestAuthUpgrade.test_upgrade_legacy_table
> -
>
> Key: CASSANDRA-12986
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12986
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Sean McCarthy
>Assignee: DS Test Eng
>  Labels: dtest, test-failure
> Attachments: node1.log, node1_debug.log, node1_gc.log, node2.log, 
> node2_debug.log, node2_gc.log, node3.log, node3_debug.log, node3_gc.log
>
>
> example failure:
> http://cassci.datastax.com/job/trunk_dtest/1437/testReport/upgrade_internal_auth_test/TestAuthUpgrade/test_upgrade_legacy_table
> {code}
> Standard Output
> Unexpected error in node1 log, error: 
> ERROR [main] 2016-12-01 03:08:30,985 CassandraDaemon.java:724 - Detected 
> unreadable sstables 
> /tmp/dtest-wwgdhU/test/node1/data0/system/schema_columns-296e9c049bec3085827dc17d3df2122a/system-schema_columns-ka-10-Data.db,/tmp/dtest-wwgdhU/test/node1/data1/system/schema_columnfamilies-45f5b36024bc3f83a3631034ea4fa697/system-schema_columnfamilies-ka-9-Filter.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_usertypes-3aa752254f82350b8d5c430fa221fa0a/system-schema_usertypes-ka-1-Filter.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_columnfamilies-45f5b36024bc3f83a3631034ea4fa697/system-schema_columnfamilies-ka-10-Data.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_triggers-0359bc7171233ee19a4ab9dfb11fc125/system-schema_triggers-ka-1-Filter.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_usertypes-3aa752254f82350b8d5c430fa221fa0a/system-schema_usertypes-ka-1-Summary.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_columns-296e9c049bec3085827dc17d3df2122a/system-schema_columns-ka-9-CompressionInfo.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_columnfamilies-45f5b36024bc3f83a3631034ea4fa697/system-schema_columnfamilies-ka-11-Index.db,/tmp/dtest-wwgdhU/test/node1/data1/system/local-7ad54392bcdd35a684174e047860b377/system-local-ka-6-Statistics.db,/tmp/dtest-wwgdhU/test/node1/data1/system/peers-37f71aca7dc2383ba70672528af04d4f/system-peers-ka-1-Filter.db,/tmp/dtest-wwgdhU/test/node1/data1/system/peers-37f71aca7dc2383ba70672528af04d4f/system-peers-ka-1-Statistics.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_columnfamilies-45f5b36024bc3f83a3631034ea4fa697/system-schema_columnfamilies-ka-10-Filter.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_columns-296e9c049bec3085827dc17d3df2122a/system-schema_columns-ka-10-Statistics.db,/tmp/dtest-wwgdhU/test/node1/data2/system/schema_keyspaces-b0f2235744583cdb9631c43e59ce3676/system-schema_keyspaces-ka-13-Statistics.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_columnfamilies-45f5b36024bc3f83a3631034ea4fa697/system-schema_columnfamilies-ka-10-CompressionInfo.db,/tmp/dtest-wwgdhU/test/node1/data2/system/local-7ad54392bcdd35a684174e047860b377/system-local-ka-5-Index.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_columns-296e9c049bec3085827dc17d3df2122a/system-schema_columns-ka-10-Filter.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_columns-296e9c049bec3085827dc17d3df2122a/system-schema_columns-ka-9-Index.db,/tmp/dtest-wwgdhU/test/node1/data1/system/local-7ad54392bcdd35a684174e047860b377/system-local-ka-6-CompressionInfo.db,/tmp/dtest-wwgdhU/test/node1/data2/system/sstable_activity-5a1ff267ace03f128563cfae6103c65e/system-sstable_activity-ka-1-Index.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_columns-296e9c049bec3085827dc17d3df2122a/system-schema_columns-ka-9-Statistics.db,/tmp/dtest-wwgdhU/test/node1/data1/system/local-7ad54392bcdd35a684174e047860b377/system-local-ka-6-Summary.db,/tmp/dtest-wwgdhU/test/node1/data2/system/sstable_activity-5a1ff267ace03f128563cfae6103c65e/system-sstable_activity-ka-1-CompressionInfo.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_columnfamilies-45f5b36024bc3f83a3631034ea4fa697/system-schema_columnfamilies-ka-10-Statistics.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_usertypes-3aa752254f82350b8d5c430fa221fa0a/system-schema_usertypes-ka-1-Data.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_columns-296e9c049bec3085827dc17d3df2122a/system-schema_columns-ka-9-Data.db,/tmp/dtest-wwgdhU/test/node1/data2/system/schema_keyspaces-b0f2235744583cdb9631c43e59ce3676/system-schema_keyspaces-ka-13-Index.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_triggers-0359bc7171233ee19a4ab9dfb11fc125/system-schema_triggers-ka-1-CompressionInfo.db,/tmp/dtest-wwgdhU/test/node1/data2/system/sstable_activity-5a1ff267ace03f128563cfae6103c65e/system-sstable_activity-ka-1-Filter.db,/tmp/dtest-wwgdhU/test/node1/data2/system/

[jira] [Updated] (CASSANDRA-12987) dtest failure in paxos_tests.TestPaxos.contention_test_many_threads

2016-12-05 Thread Philip Thompson (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-12987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Philip Thompson updated CASSANDRA-12987:

Assignee: (was: DS Test Eng)

> dtest failure in paxos_tests.TestPaxos.contention_test_many_threads
> ---
>
> Key: CASSANDRA-12987
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12987
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Sean McCarthy
>  Labels: dtest, test-failure
> Attachments: node1.log, node1_debug.log, node1_gc.log, node2.log, 
> node2_debug.log, node2_gc.log, node3.log, node3_debug.log, node3_gc.log
>
>
> example failure:
> http://cassci.datastax.com/job/trunk_dtest/1437/testReport/paxos_tests/TestPaxos/contention_test_many_threads
> {code}
> Error Message
> value=299, errors=0, retries=25559
> {code}{code}
> Stacktrace
>   File "/usr/lib/python2.7/unittest/case.py", line 329, in run
> testMethod()
>   File "/home/automaton/cassandra-dtest/paxos_tests.py", line 88, in 
> contention_test_many_threads
> self._contention_test(300, 1)
>   File "/home/automaton/cassandra-dtest/paxos_tests.py", line 192, in 
> _contention_test
> self.assertTrue((value == threads * iterations) and (errors == 0), 
> "value={}, errors={}, retries={}".format(value, errors, retries))
>   File "/usr/lib/python2.7/unittest/case.py", line 422, in assertTrue
> raise self.failureException(msg)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-12987) dtest failure in paxos_tests.TestPaxos.contention_test_many_threads

2016-12-05 Thread Philip Thompson (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-12987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Philip Thompson updated CASSANDRA-12987:

Issue Type: Bug  (was: Test)

> dtest failure in paxos_tests.TestPaxos.contention_test_many_threads
> ---
>
> Key: CASSANDRA-12987
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12987
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Sean McCarthy
>Assignee: DS Test Eng
>  Labels: dtest, test-failure
> Attachments: node1.log, node1_debug.log, node1_gc.log, node2.log, 
> node2_debug.log, node2_gc.log, node3.log, node3_debug.log, node3_gc.log
>
>
> example failure:
> http://cassci.datastax.com/job/trunk_dtest/1437/testReport/paxos_tests/TestPaxos/contention_test_many_threads
> {code}
> Error Message
> value=299, errors=0, retries=25559
> {code}{code}
> Stacktrace
>   File "/usr/lib/python2.7/unittest/case.py", line 329, in run
> testMethod()
>   File "/home/automaton/cassandra-dtest/paxos_tests.py", line 88, in 
> contention_test_many_threads
> self._contention_test(300, 1)
>   File "/home/automaton/cassandra-dtest/paxos_tests.py", line 192, in 
> _contention_test
> self.assertTrue((value == threads * iterations) and (errors == 0), 
> "value={}, errors={}, retries={}".format(value, errors, retries))
>   File "/usr/lib/python2.7/unittest/case.py", line 422, in assertTrue
> raise self.failureException(msg)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-12986) dtest failure in upgrade_internal_auth_test.TestAuthUpgrade.test_upgrade_legacy_table

2016-12-05 Thread Philip Thompson (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-12986?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Philip Thompson updated CASSANDRA-12986:

Assignee: (was: DS Test Eng)

> dtest failure in 
> upgrade_internal_auth_test.TestAuthUpgrade.test_upgrade_legacy_table
> -
>
> Key: CASSANDRA-12986
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12986
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Sean McCarthy
>  Labels: dtest, test-failure
> Attachments: node1.log, node1_debug.log, node1_gc.log, node2.log, 
> node2_debug.log, node2_gc.log, node3.log, node3_debug.log, node3_gc.log
>
>
> example failure:
> http://cassci.datastax.com/job/trunk_dtest/1437/testReport/upgrade_internal_auth_test/TestAuthUpgrade/test_upgrade_legacy_table
> {code}
> Standard Output
> Unexpected error in node1 log, error: 
> ERROR [main] 2016-12-01 03:08:30,985 CassandraDaemon.java:724 - Detected 
> unreadable sstables 
> /tmp/dtest-wwgdhU/test/node1/data0/system/schema_columns-296e9c049bec3085827dc17d3df2122a/system-schema_columns-ka-10-Data.db,/tmp/dtest-wwgdhU/test/node1/data1/system/schema_columnfamilies-45f5b36024bc3f83a3631034ea4fa697/system-schema_columnfamilies-ka-9-Filter.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_usertypes-3aa752254f82350b8d5c430fa221fa0a/system-schema_usertypes-ka-1-Filter.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_columnfamilies-45f5b36024bc3f83a3631034ea4fa697/system-schema_columnfamilies-ka-10-Data.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_triggers-0359bc7171233ee19a4ab9dfb11fc125/system-schema_triggers-ka-1-Filter.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_usertypes-3aa752254f82350b8d5c430fa221fa0a/system-schema_usertypes-ka-1-Summary.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_columns-296e9c049bec3085827dc17d3df2122a/system-schema_columns-ka-9-CompressionInfo.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_columnfamilies-45f5b36024bc3f83a3631034ea4fa697/system-schema_columnfamilies-ka-11-Index.db,/tmp/dtest-wwgdhU/test/node1/data1/system/local-7ad54392bcdd35a684174e047860b377/system-local-ka-6-Statistics.db,/tmp/dtest-wwgdhU/test/node1/data1/system/peers-37f71aca7dc2383ba70672528af04d4f/system-peers-ka-1-Filter.db,/tmp/dtest-wwgdhU/test/node1/data1/system/peers-37f71aca7dc2383ba70672528af04d4f/system-peers-ka-1-Statistics.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_columnfamilies-45f5b36024bc3f83a3631034ea4fa697/system-schema_columnfamilies-ka-10-Filter.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_columns-296e9c049bec3085827dc17d3df2122a/system-schema_columns-ka-10-Statistics.db,/tmp/dtest-wwgdhU/test/node1/data2/system/schema_keyspaces-b0f2235744583cdb9631c43e59ce3676/system-schema_keyspaces-ka-13-Statistics.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_columnfamilies-45f5b36024bc3f83a3631034ea4fa697/system-schema_columnfamilies-ka-10-CompressionInfo.db,/tmp/dtest-wwgdhU/test/node1/data2/system/local-7ad54392bcdd35a684174e047860b377/system-local-ka-5-Index.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_columns-296e9c049bec3085827dc17d3df2122a/system-schema_columns-ka-10-Filter.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_columns-296e9c049bec3085827dc17d3df2122a/system-schema_columns-ka-9-Index.db,/tmp/dtest-wwgdhU/test/node1/data1/system/local-7ad54392bcdd35a684174e047860b377/system-local-ka-6-CompressionInfo.db,/tmp/dtest-wwgdhU/test/node1/data2/system/sstable_activity-5a1ff267ace03f128563cfae6103c65e/system-sstable_activity-ka-1-Index.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_columns-296e9c049bec3085827dc17d3df2122a/system-schema_columns-ka-9-Statistics.db,/tmp/dtest-wwgdhU/test/node1/data1/system/local-7ad54392bcdd35a684174e047860b377/system-local-ka-6-Summary.db,/tmp/dtest-wwgdhU/test/node1/data2/system/sstable_activity-5a1ff267ace03f128563cfae6103c65e/system-sstable_activity-ka-1-CompressionInfo.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_columnfamilies-45f5b36024bc3f83a3631034ea4fa697/system-schema_columnfamilies-ka-10-Statistics.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_usertypes-3aa752254f82350b8d5c430fa221fa0a/system-schema_usertypes-ka-1-Data.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_columns-296e9c049bec3085827dc17d3df2122a/system-schema_columns-ka-9-Data.db,/tmp/dtest-wwgdhU/test/node1/data2/system/schema_keyspaces-b0f2235744583cdb9631c43e59ce3676/system-schema_keyspaces-ka-13-Index.db,/tmp/dtest-wwgdhU/test/node1/data0/system/schema_triggers-0359bc7171233ee19a4ab9dfb11fc125/system-schema_triggers-ka-1-CompressionInfo.db,/tmp/dtest-wwgdhU/test/node1/data2/system/sstable_activity-5a1ff267ace03f128563cfae6103c65e/system-sstable_activity-ka-1-Filter.db,/tmp/dtest-wwgdhU/test/node1/data2/system/schema_columns-296e9c049bec3085

[jira] [Commented] (CASSANDRA-12998) Remove a silly hint.isLive() check in HintsService.write()

2016-12-05 Thread Aleksey Yeschenko (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-12998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15722745#comment-15722745
 ] 

Aleksey Yeschenko commented on CASSANDRA-12998:
---

I think it was a misguided attempt at optimisation. Anyways,

||branch||testall||dtest||
|[12998-3.0|https://github.com/iamaleksey/cassandra/tree/12998-3.0]|[testall|http://cassci.datastax.com/view/Dev/view/iamaleksey/job/iamaleksey-12998-3.0-testall]|[dtest|http://cassci.datastax.com/view/Dev/view/iamaleksey/job/iamaleksey-12998-3.0-dtest]|

> Remove a silly hint.isLive() check in HintsService.write()
> --
>
> Key: CASSANDRA-12998
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12998
> Project: Cassandra
>  Issue Type: Bug
>  Components: Local Write-Read Paths
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Trivial
> Fix For: 3.0.x, 3.x
>
>
> Somehow made it to the final version of the codebase, this can practically 
> never return false. The {{bufferPool.write()}} call should be unconditional.
> {code}
> public void write(Iterable hostIds, Hint hint)
> {
> if (isShutDown)
> throw new IllegalStateException("HintsService is shut down and 
> can't accept new hints");
> // we have to make sure that the HintsStore instances get properly 
> initialized - otherwise dispatch will not trigger
> catalog.maybeLoadStores(hostIds);
> if (hint.isLive())
> bufferPool.write(hostIds, hint);
> StorageMetrics.totalHints.inc(size(hostIds));
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (CASSANDRA-12998) Remove a silly hint.isLive() check in HintsService.write()

2016-12-05 Thread Aleksey Yeschenko (JIRA)
Aleksey Yeschenko created CASSANDRA-12998:
-

 Summary: Remove a silly hint.isLive() check in HintsService.write()
 Key: CASSANDRA-12998
 URL: https://issues.apache.org/jira/browse/CASSANDRA-12998
 Project: Cassandra
  Issue Type: Bug
  Components: Local Write-Read Paths
Reporter: Aleksey Yeschenko
Assignee: Aleksey Yeschenko
Priority: Trivial
 Fix For: 3.0.x, 3.x


Somehow made it to the final version of the codebase, this can practically 
never return false. The {{bufferPool.write()}} call should be unconditional.

{code}
public void write(Iterable hostIds, Hint hint)
{
if (isShutDown)
throw new IllegalStateException("HintsService is shut down and 
can't accept new hints");

// we have to make sure that the HintsStore instances get properly 
initialized - otherwise dispatch will not trigger
catalog.maybeLoadStores(hostIds);

if (hint.isLive())
bufferPool.write(hostIds, hint);

StorageMetrics.totalHints.inc(size(hostIds));
}
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (CASSANDRA-12620) Resurrected empty rows on update to 3.x

2016-12-05 Thread Brice Dutheil (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-12620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15722709#comment-15722709
 ] 

Brice Dutheil edited comment on CASSANDRA-12620 at 12/5/16 4:46 PM:


Not sure but the liveness info looks wrong, it seems the conversion for the the 
_ka_ format to the new _mc_ format _forgot_ to report the expired / delete row.

If I read it correctly {{"cells": \[\["",1479813209,147981320982,"d"],}} is 
the row marker, and it shows the row has the status deleted. However the 
upgraded entry don't show this deleted status ({{"liveness_info" : \{ "tstamp" 
: "2016-11-22T11:13:29.820Z" \},}}).




was (Author: bric3):
Not sure but the liveness info looks wrong, it seems the conversion for the the 
_ka_ format to the new _mc_ format _forgot_ to report the expired / delete row.

If I read it correctly {{"cells": [["",1479813209,147981320982,"d"],}} is 
the row marker, and it shows the row has the status deleted. However the 
upgraded entry don't show this deleted status ({{"liveness_info" : { "tstamp" : 
"2016-11-22T11:13:29.820Z" },}}).



> Resurrected empty rows on update to 3.x
> ---
>
> Key: CASSANDRA-12620
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12620
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Collin Sauve
>Assignee: Benjamin Lerer
>
> We had the below table on C* 2.x (dse 4.8.4, we assume was 2.1.15.1423 
> according to documentation), and were entering TTLs at write-time using the 
> DataStax C# Driver (using the POCO mapper).
> Upon upgrade to 3.0.8.1293 (DSE 5.0.2), we are seeing a lot of rows that:
> * should have been TTL'd
> * have no non-primary-key column data
> {code}
> CREATE TABLE applicationservices.aggregate_bucket_event_v3 (
> bucket_type int,
> bucket_id text,
> date timestamp,
> aggregate_id text,
> event_type int,
> event_id text,
> entities list>>,
> identity_sid text,
> PRIMARY KEY ((bucket_type, bucket_id), date, aggregate_id, event_type, 
> event_id)
> ) WITH CLUSTERING ORDER BY (date DESC, aggregate_id ASC, event_type ASC, 
> event_id ASC)
> AND bloom_filter_fp_chance = 0.1
> AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
> AND comment = ''
> AND compaction = {'class': 
> 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'}
> AND compression = {'chunk_length_in_kb': '64', 'class': 
> 'org.apache.cassandra.io.compress.LZ4Compressor'}
> AND crc_check_chance = 1.0
> AND dclocal_read_repair_chance = 0.1
> AND default_time_to_live = 0
> AND gc_grace_seconds = 864000
> AND max_index_interval = 2048
> AND memtable_flush_period_in_ms = 0
> AND min_index_interval = 128
> AND read_repair_chance = 0.0
> AND speculative_retry = '99PERCENTILE';
> {code}
> {code}
> {
> "partition" : {
>   "key" : [ "0", "26492" ],
>   "position" : 54397932
> },
> "rows" : [
>   {
> "type" : "row",
> "position" : 54397961,
> "clustering" : [ "2016-09-07 23:33Z", "3651664", "0", 
> "773665449947099136" ],
> "liveness_info" : { "tstamp" : "2016-09-07T23:34:09.758Z", "ttl" : 
> 172741, "expires_at" : "2016-09-09T23:33:10Z", "expired" : false },
> "cells" : [
>   { "name" : "identity_sid", "value" : "p_tw_zahidana" },
>   { "name" : "entities", "deletion_info" : { "marked_deleted" : 
> "2016-09-07T23:34:09.757999Z", "local_delete_time" : "2016-09-07T23:34:09Z" } 
> },
>   { "name" : "entities", "path" : [ 
> "936e17e1-7553-11e6-9b92-29a33b5827c3" ], "value" : 
> "0:https\\://www.youtube.com/watch?v=pwAJAssv6As" },
>   { "name" : "entities", "path" : [ 
> "936e17e2-7553-11e6-9b92-29a33b5827c3" ], "value" : "2:youtube" }
> ]
>   },
>   {
> "type" : "row",
>},
>   {
> "type" : "row",
> "position" : 54397177,
> "clustering" : [ "2016-08-17 10:00Z", "6387376", "0", 
> "765850666296225792" ],
> "liveness_info" : { "tstamp" : "2016-08-17T11:26:15.917001Z" },
> "cells" : [ ]
>   },
>   {
> "type" : "row",
> "position" : 54397227,
> "clustering" : [ "2016-08-17 07:00Z", "6387376", "0", 
> "765805367347601409" ],
> "liveness_info" : { "tstamp" : "2016-08-17T08:11:17.587Z" },
> "cells" : [ ]
>   },
>   {
> "type" : "row",
> "position" : 54397276,
> "clustering" : [ "2016-08-17 04:00Z", "6387376", "0", 
> "765760069858365441" ],
> "liveness_info" : { "tstamp" : "2016-08-17T05:58:11.228Z" },
> "cells" : [ ]
>   },
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-12620) Resurrected empty rows on update to 3.x

2016-12-05 Thread Brice Dutheil (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-12620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15722709#comment-15722709
 ] 

Brice Dutheil commented on CASSANDRA-12620:
---

Not sure but the liveness info looks wrong, it seems the conversion for the the 
_ka_ format to the new _mc_ format _forgot_ to report the expired / delete row.

If I read it correctly {{"cells": [["",1479813209,147981320982,"d"],}} is 
the row marker, and it shows the row has the status deleted. However the 
upgraded entry don't show this deleted status ({{"liveness_info" : { "tstamp" : 
"2016-11-22T11:13:29.820Z" },}}).



> Resurrected empty rows on update to 3.x
> ---
>
> Key: CASSANDRA-12620
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12620
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Collin Sauve
>Assignee: Benjamin Lerer
>
> We had the below table on C* 2.x (dse 4.8.4, we assume was 2.1.15.1423 
> according to documentation), and were entering TTLs at write-time using the 
> DataStax C# Driver (using the POCO mapper).
> Upon upgrade to 3.0.8.1293 (DSE 5.0.2), we are seeing a lot of rows that:
> * should have been TTL'd
> * have no non-primary-key column data
> {code}
> CREATE TABLE applicationservices.aggregate_bucket_event_v3 (
> bucket_type int,
> bucket_id text,
> date timestamp,
> aggregate_id text,
> event_type int,
> event_id text,
> entities list>>,
> identity_sid text,
> PRIMARY KEY ((bucket_type, bucket_id), date, aggregate_id, event_type, 
> event_id)
> ) WITH CLUSTERING ORDER BY (date DESC, aggregate_id ASC, event_type ASC, 
> event_id ASC)
> AND bloom_filter_fp_chance = 0.1
> AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
> AND comment = ''
> AND compaction = {'class': 
> 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'}
> AND compression = {'chunk_length_in_kb': '64', 'class': 
> 'org.apache.cassandra.io.compress.LZ4Compressor'}
> AND crc_check_chance = 1.0
> AND dclocal_read_repair_chance = 0.1
> AND default_time_to_live = 0
> AND gc_grace_seconds = 864000
> AND max_index_interval = 2048
> AND memtable_flush_period_in_ms = 0
> AND min_index_interval = 128
> AND read_repair_chance = 0.0
> AND speculative_retry = '99PERCENTILE';
> {code}
> {code}
> {
> "partition" : {
>   "key" : [ "0", "26492" ],
>   "position" : 54397932
> },
> "rows" : [
>   {
> "type" : "row",
> "position" : 54397961,
> "clustering" : [ "2016-09-07 23:33Z", "3651664", "0", 
> "773665449947099136" ],
> "liveness_info" : { "tstamp" : "2016-09-07T23:34:09.758Z", "ttl" : 
> 172741, "expires_at" : "2016-09-09T23:33:10Z", "expired" : false },
> "cells" : [
>   { "name" : "identity_sid", "value" : "p_tw_zahidana" },
>   { "name" : "entities", "deletion_info" : { "marked_deleted" : 
> "2016-09-07T23:34:09.757999Z", "local_delete_time" : "2016-09-07T23:34:09Z" } 
> },
>   { "name" : "entities", "path" : [ 
> "936e17e1-7553-11e6-9b92-29a33b5827c3" ], "value" : 
> "0:https\\://www.youtube.com/watch?v=pwAJAssv6As" },
>   { "name" : "entities", "path" : [ 
> "936e17e2-7553-11e6-9b92-29a33b5827c3" ], "value" : "2:youtube" }
> ]
>   },
>   {
> "type" : "row",
>},
>   {
> "type" : "row",
> "position" : 54397177,
> "clustering" : [ "2016-08-17 10:00Z", "6387376", "0", 
> "765850666296225792" ],
> "liveness_info" : { "tstamp" : "2016-08-17T11:26:15.917001Z" },
> "cells" : [ ]
>   },
>   {
> "type" : "row",
> "position" : 54397227,
> "clustering" : [ "2016-08-17 07:00Z", "6387376", "0", 
> "765805367347601409" ],
> "liveness_info" : { "tstamp" : "2016-08-17T08:11:17.587Z" },
> "cells" : [ ]
>   },
>   {
> "type" : "row",
> "position" : 54397276,
> "clustering" : [ "2016-08-17 04:00Z", "6387376", "0", 
> "765760069858365441" ],
> "liveness_info" : { "tstamp" : "2016-08-17T05:58:11.228Z" },
> "cells" : [ ]
>   },
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (CASSANDRA-12620) Resurrected empty rows on update to 3.x

2016-12-05 Thread Brice Dutheil (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-12620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15722612#comment-15722612
 ] 

Brice Dutheil edited comment on CASSANDRA-12620 at 12/5/16 4:11 PM:


[~blerer] We have rollbacked an environment. I'm not sure I can upload the dump 
(maybe in private). But here's another primary key that is *expired* before and 
after the upgrade :

For information 1479813209 : Tue, 22 Nov 2016 11:13:29 GMT

{code:title=sstable2json / DSE 4.8.6 / Cassandra 2.1.13}
{"key": "1c5598b3-70de-4ba5-a9ec-a57a61d3f494",
 "cells": [["",1479813209,147981320982,"d"],
   ["field1",1479813209,147981320982,"d"],
   ["field2",1479813209,147981320982,"d"],
   ["field3",1479813209,147981320982,"d"],
   ["field4",1479813209,147981320982,"d"],
   ["field5",1479813209,147981320982,"d"],
   ["field7:_","scopes:!",147981320981,"t",1479813209],
   
["field7:41444d494e5f4150504c49434154494f4e",1479813209,147981320982,"d"],
   
["field7:41444d494e5f434154414c4f475f52454144",1479813209,147981320982,"d"],
   
["field7:41444d494e5f434154414c4f475f5752495445",1479813209,147981320982,"d"],
   
["field7:41444d494e5f435245444954535f52454144",1479813209,147981320982,"d"],
   
["field7:41444d494e5f435245444954535f5452414e53414354494f4e535f52454144",1479813209,147981320982,"d"],
   
["field7:41444d494e5f435245444954535f5752495445",1479813209,147981320982,"d"],
   
["field7:41444d494e5f454e41424c494e475f5041434b",1479813209,147981320982,"d"],
   
["field7:41444d494e5f464f524249445f4d534953444e5f52454144",1479813209,147981320982,"d"],
   
["field7:41444d494e5f464f524249445f4d534953444e5f5752495445",1479813209,147981320982,"d"],
   
["field7:41444d494e5f484f54425f434845434b",1479813209,147981320982,"d"],
   
["field7:41444d494e5f484f54425f52454144",1479813209,147981320982,"d"],
   
["field7:41444d494e5f484f54425f5752495445",1479813209,147981320982,"d"],
   
["field7:41444d494e5f4f464645525f52454144",1479813209,147981320982,"d"],
   
["field7:41444d494e5f4f464645525f5752495445",1479813209,147981320982,"d"],
   
["field7:41444d494e5f5041434b5f50524943494e475f52454144",1479813209,147981320982,"d"],
   
["field7:41444d494e5f5041434b5f50524943494e475f5752495445",1479813209,147981320982,"d"],
   
["field7:41444d494e5f504152544e45525f50524f564953494f4e494e475f52454144",1479813209,147981320982,"d"],
   
["field7:41444d494e5f504152544e45525f50524f564953494f4e494e475f5752495445",1479813209,147981320982,"d"],
   
["field7:41444d494e5f50524f4d4f54494f4e5f52454144",1479813209,147981320982,"d"],
   
["field7:41444d494e5f50524f4d4f54494f4e5f5752495445",1479813209,147981320982,"d"],
   
["field7:41444d494e5f5245504f52545f52454144",1479813209,147981320982,"d"],
   
["field7:41444d494e5f53434f5045535f52454144",1479813209,147981320982,"d"],
   
["field7:41444d494e5f534d535f53454e44",1479813209,147981320982,"d"],
   
["field7:41444d494e5f555345525f52454144",1479813209,147981320982,"d"],
   
["field7:41444d494e5f555345525f5752495445",1479813209,147981320982,"d"],
   
["field7:41444d494e5f56414c49444154494f4e5f53454e44",1479813209,147981320982,"d"],
   
["field7:41444d494e5f564f4943455f44455354494e4154494f4e5f42554e444c45535f52454144",1479813209,147981320982,"d"],
   
["field7:415554485f41444d494e5f434c49454e545f52454144",1479813209,147981320982,"d"],
   
["field7:415554485f41444d494e5f434c49454e545f5752495445",1479813209,147981320982,"d"],
   
["field7:415554485f41444d494e5f47524f55505f52454144",1479813209,147981320982,"d"],
   
["field7:415554485f41444d494e5f47524f55505f5752495445",1479813209,147981320982,"d"],
   
["field7:415554485f41444d494e5f555345525f52454144",1479813209,147981320982,"d"],
   
["field7:415554485f41444d494e5f555345525f5752495445",1479813209,147981320982,"d"],
   ["field6",1479813209,147981320982,"d"],
   ["field8",1479813209,147981320982,"d"]]},
{code}

{code:title=sstabledump / DSE 5.0.4 / Cassandra 3.0.10}
{
  "partition" : {
"key" : [ "1c5598b3-70de-4ba5-a9ec-a57a61d3f494" ],
"position" : 0
  },
  "rows" : [
{
  "type" : "row",
  "position" : 50,
  "liveness_info" : { "tstamp" : "2016-11-22T11:13:29.820Z" },
  "cells" : [
{ "name" : "field1", "deletion_info" : { "local_delete_time" : 
"2016-11-22T11:13:29Z" } },
{ "name" : "field2", "deletion_info" : { "local_delete_time" : 
"2016-11-22T11:13:29Z" } },
{ "name" : "field3", "deletion_info" : { "local_delete_

[jira] [Comment Edited] (CASSANDRA-12620) Resurrected empty rows on update to 3.x

2016-12-05 Thread Brice Dutheil (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-12620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15722517#comment-15722517
 ] 

Brice Dutheil edited comment on CASSANDRA-12620 at 12/5/16 4:01 PM:


Hi,

We just had the same problem, upgrading from Cassandra 2.1.13 / DSE 4.8.6 to 
Cassandra 3.0.10 / DSE 5.0.4. The problem has been identified on 3 different 
environments.

Dead / tombstoned rows with an expired TTL show up after the upgrade. The thing 
is only the primary key is non null, all other fields are null. We only insert 
non null values using TTL that have various TTL from 60s to 1day.

{code}
select * from ttl_entries where key='d7c10084-724c-4117-9927-b927a972203b';

key | field1 | field2 | field3 | field4 | field5 | field6 | field7 | field8
--+--+---+---+--+--+--++---
d7c10084-724c-4117-9927-b927a972203b | null | null | null | null | null | null 
| null | null
{code}


Here's an {{sstabledump}} of one of the impacted row. Note that the 
{{liveness_info}} is missing TTL informations:

{code:title=sstabledump row d7c10084-724c-4117-9927-b927a972203b}
{
  "partition" : { 
"key" : [ "d7c10084-724c-4117-9927-b927a972203b" ], 
"position" : 6557684 
  }, 
  "rows" : [ 
{ 
  "type" : "row", 
  "position" : 6557734, 
  "liveness_info" : { "tstamp" : "2016-11-25T02:24:06.237Z" }, 
  "cells" : [ 
  { "name" : "field1", "deletion_info" : { "local_delete_time" : 
"2016-11-25T02:24:06Z" } }, 
  { "name" : "field2", "deletion_info" : { "local_delete_time" : 
"2016-11-25T02:24:06Z" } }, 
  { "name" : "field3", "deletion_info" : { "local_delete_time" : 
"2016-11-25T02:24:06Z" } }, 
  { "name" : "field4", "deletion_info" : { "local_delete_time" : 
"2016-11-25T02:24:06Z" } }, 
  { "name" : "field5", "deletion_info" : { "local_delete_time" : 
"2016-11-25T02:24:06Z" } }, 
  { "name" : "field6", "deletion_info" : { "local_delete_time" : 
"2016-11-25T02:24:06Z" } }, 
  { "name" : "field8", "deletion_info" : { "local_delete_time" : 
"2016-11-25T02:24:06Z" } }, 
  { "name" : "field7", "deletion_info" : { "marked_deleted" : 
"2016-11-25T02:24:06.236999Z", "local_delete_time" : "2016-11-25T02:24:06Z" } 
}, 
  { "name" : "field7", "path" : [ "VALUE_01" ], "deletion_info" : { 
"local_delete_time" : "2016-11-25T02:24:06Z" } }, 
  { "name" : "field7", "path" : [ "VALUE_02" ], "deletion_info" : { 
"local_delete_time" : "2016-11-25T02:24:06Z" } }, 
  { "name" : "field7", "path" : [ "VALUE_03" ], "deletion_info" : { 
"local_delete_time" : "2016-11-25T02:24:06Z" } }, 
  { "name" : "field7", "path" : [ "VALUE_04" ], "deletion_info" : { 
"local_delete_time" : "2016-11-25T02:24:06Z" } }, 
  { "name" : "field7", "path" : [ "VALUE_05" ], "deletion_info" : { 
"local_delete_time" : "2016-11-25T02:24:06Z" } }, 
  { "name" : "field7", "path" : [ "VALUE_06" ], "deletion_info" : { 
"local_delete_time" : "2016-11-25T02:24:06Z" } }, 
  { "name" : "field7", "path" : [ "VALUE_07" ], "deletion_info" : { 
"local_delete_time" : "2016-11-25T02:24:06Z" } }, 
  { "name" : "field7", "path" : [ "VALUE_08" ], "deletion_info" : { 
"local_delete_time" : "2016-11-25T02:24:06Z" } }, 
  { "name" : "field7", "path" : [ "VALUE_09" ], "deletion_info" : { 
"local_delete_time" : "2016-11-25T02:24:06Z" } }, 
  { "name" : "field7", "path" : [ "VALUE_10" ], "deletion_info" : { 
"local_delete_time" : "2016-11-25T02:24:06Z" } }, 
  { "name" : "field7", "path" : [ "VALUE_11" ], "deletion_info" : { 
"local_delete_time" : "2016-11-25T02:24:06Z" } }, 
  { "name" : "field7", "path" : [ "VALUE_12" ], "deletion_info" : { 
"local_delete_time" : "2016-11-25T02:24:06Z" } }, 
  { "name" : "field7", "path" : [ "VALUE_13" ], "deletion_info" : { 
"local_delete_time" : "2016-11-25T02:24:06Z" } }, 
  { "name" : "field7", "path" : [ "VALUE_14" ], "deletion_info" : { 
"local_delete_time" : "2016-11-25T02:24:06Z" } }, 
  { "name" : "field7", "path" : [ "VALUE_15" ], "deletion_info" : { 
"local_delete_time" : "2016-11-25T02:24:06Z" } }, 
  { "name" : "field7", "path" : [ "VALUE_16" ], "deletion_info" : { 
"local_delete_time" : "2016-11-25T02:24:06Z" } }, 
  { "name" : "field7", "path" : [ "VALUE_17" ], "deletion_info" : { 
"local_delete_time" : "2016-11-25T02:24:06Z" } }, 
  { "name" : "field7", "path" : [ "VALUE_18" ], "deletion_info" : { 
"local_delete_time" : "2016-11-25T02:24:06Z" } }, 
  { "name" : "field7", "path" : [ "VALUE_19" ], "deletion_info" : { 
"local_delete_time" : "2016-11-25T02:24:06Z" } }, 
  { "name" : "field7", "path" : [ "VALUE_20" ], "deletion_info" : { 
"local_delete_time" : "2016-11-25T02:24:06Z" 

[jira] [Comment Edited] (CASSANDRA-12620) Resurrected empty rows on update to 3.x

2016-12-05 Thread Brice Dutheil (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-12620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15722612#comment-15722612
 ] 

Brice Dutheil edited comment on CASSANDRA-12620 at 12/5/16 4:00 PM:


[~blerer] We have rollbacked an environment. I'm not sure I can upload the dump 
(maybe in private). But here's another primary key that is *expired* before and 
after the upgrade :

For information 1479813209 : Tue, 22 Nov 2016 11:13:29 GMT

{code:title=sstable2json / DSE 4.8.6 / Cassandra 2.1.13}
{"key": "1c5598b3-70de-4ba5-a9ec-a57a61d3f494",
 "cells": [["",1479813209,147981320982,"d"],
   ["field1",1479813209,147981320982,"d"],
   ["field2",1479813209,147981320982,"d"],
   ["field3",1479813209,147981320982,"d"],
   ["field4",1479813209,147981320982,"d"],
   ["field5",1479813209,147981320982,"d"],
   ["field7:_","scopes:!",147981320981,"t",1479813209],
   
["field7:41444d494e5f4150504c49434154494f4e",1479813209,147981320982,"d"],
   
["field7:41444d494e5f434154414c4f475f52454144",1479813209,147981320982,"d"],
   
["field7:41444d494e5f434154414c4f475f5752495445",1479813209,147981320982,"d"],
   
["field7:41444d494e5f435245444954535f52454144",1479813209,147981320982,"d"],
   
["field7:41444d494e5f435245444954535f5452414e53414354494f4e535f52454144",1479813209,147981320982,"d"],
   
["field7:41444d494e5f435245444954535f5752495445",1479813209,147981320982,"d"],
   
["field7:41444d494e5f454e41424c494e475f5041434b",1479813209,147981320982,"d"],
   
["field7:41444d494e5f464f524249445f4d534953444e5f52454144",1479813209,147981320982,"d"],
   
["field7:41444d494e5f464f524249445f4d534953444e5f5752495445",1479813209,147981320982,"d"],
   
["field7:41444d494e5f484f54425f434845434b",1479813209,147981320982,"d"],
   
["field7:41444d494e5f484f54425f52454144",1479813209,147981320982,"d"],
   
["field7:41444d494e5f484f54425f5752495445",1479813209,147981320982,"d"],
   
["field7:41444d494e5f4f464645525f52454144",1479813209,147981320982,"d"],
   
["field7:41444d494e5f4f464645525f5752495445",1479813209,147981320982,"d"],
   
["field7:41444d494e5f5041434b5f50524943494e475f52454144",1479813209,147981320982,"d"],
   
["field7:41444d494e5f5041434b5f50524943494e475f5752495445",1479813209,147981320982,"d"],
   
["field7:41444d494e5f504152544e45525f50524f564953494f4e494e475f52454144",1479813209,147981320982,"d"],
   
["field7:41444d494e5f504152544e45525f50524f564953494f4e494e475f5752495445",1479813209,147981320982,"d"],
   
["field7:41444d494e5f50524f4d4f54494f4e5f52454144",1479813209,147981320982,"d"],
   
["field7:41444d494e5f50524f4d4f54494f4e5f5752495445",1479813209,147981320982,"d"],
   
["field7:41444d494e5f5245504f52545f52454144",1479813209,147981320982,"d"],
   
["field7:41444d494e5f53434f5045535f52454144",1479813209,147981320982,"d"],
   
["field7:41444d494e5f534d535f53454e44",1479813209,147981320982,"d"],
   
["field7:41444d494e5f555345525f52454144",1479813209,147981320982,"d"],
   
["field7:41444d494e5f555345525f5752495445",1479813209,147981320982,"d"],
   
["field7:41444d494e5f56414c49444154494f4e5f53454e44",1479813209,147981320982,"d"],
   
["field7:41444d494e5f564f4943455f44455354494e4154494f4e5f42554e444c45535f52454144",1479813209,147981320982,"d"],
   
["field7:415554485f41444d494e5f434c49454e545f52454144",1479813209,147981320982,"d"],
   
["field7:415554485f41444d494e5f434c49454e545f5752495445",1479813209,147981320982,"d"],
   
["field7:415554485f41444d494e5f47524f55505f52454144",1479813209,147981320982,"d"],
   
["field7:415554485f41444d494e5f47524f55505f5752495445",1479813209,147981320982,"d"],
   
["field7:415554485f41444d494e5f555345525f52454144",1479813209,147981320982,"d"],
   
["field7:415554485f41444d494e5f555345525f5752495445",1479813209,147981320982,"d"],
   ["field6",1479813209,147981320982,"d"],
   ["field8",1479813209,147981320982,"d"]]},
{code}

{code:title=sstabledump / DSE 5.0.4 / Cassandra 3.0.10}
{
  "partition" : {
"key" : [ "1c5598b3-70de-4ba5-a9ec-a57a61d3f494" ],
"position" : 0
  },
  "rows" : [
{
  "type" : "row",
  "position" : 50,
  "liveness_info" : { "tstamp" : "2016-11-22T11:13:29.820Z" },
  "cells" : [
{ "name" : "field1", "deletion_info" : { "local_delete_time" : 
"2016-11-22T11:13:29Z" } },
{ "name" : "field2", "deletion_info" : { "local_delete_time" : 
"2016-11-22T11:13:29Z" } },
{ "name" : "field3", "deletion_info" : { "local_delete_

[jira] [Commented] (CASSANDRA-12620) Resurrected empty rows on update to 3.x

2016-12-05 Thread Brice Dutheil (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-12620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15722612#comment-15722612
 ] 

Brice Dutheil commented on CASSANDRA-12620:
---

[~blerer] We have rollbacked an environment. I'm not sure I can upload the dump 
(maybe in private). But here's another primary key that is *expired* before and 
after the upgrade :

For information 1479813209 : Tue, 22 Nov 2016 11:13:29 GMT

{code:title=sstable2json / DSE 4.8.6}
{"key": "1c5598b3-70de-4ba5-a9ec-a57a61d3f494",
 "cells": [["",1479813209,147981320982,"d"],
   ["field1",1479813209,147981320982,"d"],
   ["field2",1479813209,147981320982,"d"],
   ["field3",1479813209,147981320982,"d"],
   ["field4",1479813209,147981320982,"d"],
   ["field5",1479813209,147981320982,"d"],
   ["field7:_","scopes:!",147981320981,"t",1479813209],
   
["field7:41444d494e5f4150504c49434154494f4e",1479813209,147981320982,"d"],
   
["field7:41444d494e5f434154414c4f475f52454144",1479813209,147981320982,"d"],
   
["field7:41444d494e5f434154414c4f475f5752495445",1479813209,147981320982,"d"],
   
["field7:41444d494e5f435245444954535f52454144",1479813209,147981320982,"d"],
   
["field7:41444d494e5f435245444954535f5452414e53414354494f4e535f52454144",1479813209,147981320982,"d"],
   
["field7:41444d494e5f435245444954535f5752495445",1479813209,147981320982,"d"],
   
["field7:41444d494e5f454e41424c494e475f5041434b",1479813209,147981320982,"d"],
   
["field7:41444d494e5f464f524249445f4d534953444e5f52454144",1479813209,147981320982,"d"],
   
["field7:41444d494e5f464f524249445f4d534953444e5f5752495445",1479813209,147981320982,"d"],
   
["field7:41444d494e5f484f54425f434845434b",1479813209,147981320982,"d"],
   
["field7:41444d494e5f484f54425f52454144",1479813209,147981320982,"d"],
   
["field7:41444d494e5f484f54425f5752495445",1479813209,147981320982,"d"],
   
["field7:41444d494e5f4f464645525f52454144",1479813209,147981320982,"d"],
   
["field7:41444d494e5f4f464645525f5752495445",1479813209,147981320982,"d"],
   
["field7:41444d494e5f5041434b5f50524943494e475f52454144",1479813209,147981320982,"d"],
   
["field7:41444d494e5f5041434b5f50524943494e475f5752495445",1479813209,147981320982,"d"],
   
["field7:41444d494e5f504152544e45525f50524f564953494f4e494e475f52454144",1479813209,147981320982,"d"],
   
["field7:41444d494e5f504152544e45525f50524f564953494f4e494e475f5752495445",1479813209,147981320982,"d"],
   
["field7:41444d494e5f50524f4d4f54494f4e5f52454144",1479813209,147981320982,"d"],
   
["field7:41444d494e5f50524f4d4f54494f4e5f5752495445",1479813209,147981320982,"d"],
   
["field7:41444d494e5f5245504f52545f52454144",1479813209,147981320982,"d"],
   
["field7:41444d494e5f53434f5045535f52454144",1479813209,147981320982,"d"],
   
["field7:41444d494e5f534d535f53454e44",1479813209,147981320982,"d"],
   
["field7:41444d494e5f555345525f52454144",1479813209,147981320982,"d"],
   
["field7:41444d494e5f555345525f5752495445",1479813209,147981320982,"d"],
   
["field7:41444d494e5f56414c49444154494f4e5f53454e44",1479813209,147981320982,"d"],
   
["field7:41444d494e5f564f4943455f44455354494e4154494f4e5f42554e444c45535f52454144",1479813209,147981320982,"d"],
   
["field7:415554485f41444d494e5f434c49454e545f52454144",1479813209,147981320982,"d"],
   
["field7:415554485f41444d494e5f434c49454e545f5752495445",1479813209,147981320982,"d"],
   
["field7:415554485f41444d494e5f47524f55505f52454144",1479813209,147981320982,"d"],
   
["field7:415554485f41444d494e5f47524f55505f5752495445",1479813209,147981320982,"d"],
   
["field7:415554485f41444d494e5f555345525f52454144",1479813209,147981320982,"d"],
   
["field7:415554485f41444d494e5f555345525f5752495445",1479813209,147981320982,"d"],
   ["field6",1479813209,147981320982,"d"],
   ["field8",1479813209,147981320982,"d"]]},
{code}

{code:title=sstabledump / DSE 5.0.4}
{
  "partition" : {
"key" : [ "1c5598b3-70de-4ba5-a9ec-a57a61d3f494" ],
"position" : 0
  },
  "rows" : [
{
  "type" : "row",
  "position" : 50,
  "liveness_info" : { "tstamp" : "2016-11-22T11:13:29.820Z" },
  "cells" : [
{ "name" : "field1", "deletion_info" : { "local_delete_time" : 
"2016-11-22T11:13:29Z" } },
{ "name" : "field2", "deletion_info" : { "local_delete_time" : 
"2016-11-22T11:13:29Z" } },
{ "name" : "field3", "deletion_info" : { "local_delete_time" : 
"2016-11-22T11:13:29Z" } },
{ "name" : "field4", "deletion_info" : { "

[jira] [Commented] (CASSANDRA-12956) CL is not replayed on custom 2i exception

2016-12-05 Thread Alex Petrov (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-12956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15722609#comment-15722609
 ] 

Alex Petrov commented on CASSANDRA-12956:
-

Great, thank you.
I've removed the duplicate {{await}}, thanks for catching that. {{truncate}} 
check for {{false}} is done in [flush 
memtable|https://github.com/apache/cassandra/compare/trunk...ifesdjeen:12956-3.X#diff-98f5acb96aa6d684781936c141132e2aR1097].

I've applied the change to all branches and did CI.

> CL is not replayed on custom 2i exception
> -
>
> Key: CASSANDRA-12956
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12956
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Alex Petrov
>Assignee: Alex Petrov
>Priority: Critical
>
> If during the node shutdown / drain the custom (non-cf) 2i throws an 
> exception, CommitLog will get correctly preserved (segments won't get 
> discarded because segment tracking is correct). 
> However, when it gets replayed on node startup,  we're making a decision 
> whether or not to replay the commit log. CL segment starts getting replayed, 
> since there are non-discarded segments and during this process we're checking 
> whether there every [individual 
> mutation|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogReplayer.java#L215]
>  in commit log is already committed or no. Information about the sstables is 
> taken from [live sstables on 
> disk|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogReplayer.java#L250-L256].



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-12829) DELETE query with an empty IN clause can delete more than expected

2016-12-05 Thread Alex Petrov (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-12829?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alex Petrov updated CASSANDRA-12829:

Status: Patch Available  (was: Open)

> DELETE query with an empty IN clause can delete more than expected
> --
>
> Key: CASSANDRA-12829
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12829
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
> Environment: Arch Linux x64, kernel 4.7.6, Cassandra 3.9 downloaded 
> from the website
>Reporter: Jason T. Bradshaw
>Assignee: Alex Petrov
>
> When deleting from a table with a certain structure and using an *in* clause 
> with an empty list, the *in* clause with an empty list can be ignored, 
> resulting in deleting more than is expected.
> *Setup:*
> {code}
> cqlsh> create table test (a text, b text, id uuid, primary key ((a, b), id));
> cqlsh> insert into test (a, b, id) values ('a', 'b', 
> ----);
> cqlsh> insert into test (a, b, id) values ('b', 'c', 
> ----);
> cqlsh> insert into test (a, b, id) values ('a', 'c', 
> ----);
> cqlsh> select * from test;
>  a | b | id
> ---+---+--
>  a | c | ----
>  b | c | ----
>  a | b | ----
> (3 rows)
> {code}
> *Expected:*
> {code}
> cqlsh> delete from test where a = 'a' and b in ('a', 'b', 'c') and id in ();
> cqlsh> select * from test;
>  a | b | id
> ---+---+--
>  a | c | ----
>  b | c | ----
>  a | b | ----
> (3 rows)
> {code}
> *Actual:*
> {code}
> cqlsh> delete from test where a = 'a' and b in ('a', 'b', 'c') and id in ();
> cqlsh> select * from test;
>  a | b | id
> ---+---+--
>  b | c | ----
> (1 rows)
> {code}
> Instead of deleting nothing, as the final empty *in* clause would imply, it 
> instead deletes everything that matches the first two clauses, acting as if 
> the following query had been issued instead:
> {code}
> cqlsh> delete from test where a = 'a' and b in ('a', 'b', 'c');
> {code}
> This seems to be related to the presence of a tuple clustering key, as I 
> could not reproduce it without one.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8398) Expose time spent waiting in thread pool queue

2016-12-05 Thread T Jake Luciani (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15722595#comment-15722595
 ] 

T Jake Luciani commented on CASSANDRA-8398:
---

Looks good thanks.  I think we should include the reporting of this (p50 p99) 
in nodetool tablestats 

> Expose time spent waiting in thread pool queue 
> ---
>
> Key: CASSANDRA-8398
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8398
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: T Jake Luciani
>Assignee: Dikang Gu
>Priority: Minor
>  Labels: lhf
> Fix For: 3.12
>
>
> We are missing an important source of latency in our system, the time waiting 
> to be processed by thread pools.  We should add a metric for this so someone 
> can easily see how much time is spent just waiting to be processed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


  1   2   >