[jira] [Updated] (CASSANDRA-12988) make the consistency level for user-level auth reads and writes configurable

2017-12-07 Thread Jeff Jirsa (JIRA)

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

Jeff Jirsa updated CASSANDRA-12988:
---
Status: Patch Available  (was: Open)

Looks patch-available to me (came up in an IRC question, just marking 
patch-available) 

> make the consistency level for user-level auth reads and writes configurable
> 
>
> Key: CASSANDRA-12988
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12988
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Jason Brown
>Assignee: Sam Tunnicliffe
>Priority: Minor
> Fix For: 4.x
>
>
> Most reads for the auth-related tables execute at {{LOCAL_ONE}}. We'd like to 
> make it configurable, with the default still being {{LOCAL_ONE}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-13848) Allow sstabledump to do a json object per partition to better handle large sstables

2017-12-07 Thread Jeff Jirsa (JIRA)

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

Jeff Jirsa updated CASSANDRA-13848:
---
   Resolution: Fixed
Fix Version/s: 4.0
   Status: Resolved  (was: Ready to Commit)

Thanks so much for the patch and your patience [~kwern]. Code looks well done, 
and I expect this will make people very happy. I took the liberty of adding a 
new entry to {{NEWS.txt}} as well, so people discover the new feature.

Committed as 
[9110c08f47782ff8ed05067c0931af1bc020608b|https://github.com/apache/cassandra/commit/9110c08f47782ff8ed05067c0931af1bc020608b]
 


> Allow sstabledump to do a json object per partition to better handle large 
> sstables
> ---
>
> Key: CASSANDRA-13848
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13848
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Tools
>Reporter: Jeff Jirsa
>Assignee: Kevin Wern
>Priority: Trivial
>  Labels: lhf
> Fix For: 4.0
>
> Attachments: 0001-sstabledump-add-l-option-for-jsonl.patch
>
>
> sstable2json / sstabledump make a huge json document of the whole file. For 
> very large sstables this makes it impossible to load in memory to do anything 
> with it. Allowing users to Break it into small json objects per partition 
> would be useful.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-13848) Allow sstabledump to do a json object per partition to better handle large sstables

2017-12-07 Thread Jeff Jirsa (JIRA)

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

Jeff Jirsa updated CASSANDRA-13848:
---
Status: Ready to Commit  (was: Patch Available)

> Allow sstabledump to do a json object per partition to better handle large 
> sstables
> ---
>
> Key: CASSANDRA-13848
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13848
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Tools
>Reporter: Jeff Jirsa
>Assignee: Kevin Wern
>Priority: Trivial
>  Labels: lhf
> Attachments: 0001-sstabledump-add-l-option-for-jsonl.patch
>
>
> sstable2json / sstabledump make a huge json document of the whole file. For 
> very large sstables this makes it impossible to load in memory to do anything 
> with it. Allowing users to Break it into small json objects per partition 
> would be useful.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



cassandra git commit: Allow sstabledump to do a json object per partition

2017-12-07 Thread jjirsa
Repository: cassandra
Updated Branches:
  refs/heads/trunk 23691f5f8 -> 9110c08f4


Allow sstabledump to do a json object per partition

Patch by Kevin Wern; Reviewed by Jeff Jirsa for CASSANDRA-13848


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

Branch: refs/heads/trunk
Commit: 9110c08f47782ff8ed05067c0931af1bc020608b
Parents: 23691f5
Author: Kevin Wern 
Authored: Mon Oct 9 04:26:25 2017 -0400
Committer: Jeff Jirsa 
Committed: Thu Dec 7 16:18:53 2017 -0800

--
 CHANGES.txt |  1 +
 NEWS.txt|  2 ++
 .../apache/cassandra/tools/JsonTransformer.java | 35 
 .../apache/cassandra/tools/SSTableExport.java   |  8 +
 4 files changed, 39 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9110c08f/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 8a1f0f8..cd8c678 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 4.0
+ * Allow sstabledump to do a json object per partition (CASSANDRA-13848)
  * Add option to optimise merkle tree comparison across replicas 
(CASSANDRA-3200)
  * Remove unused and deprecated methods from AbstractCompactionStrategy 
(CASSANDRA-14081)
  * Fix Distribution.average in cassandra-stress (CASSANDRA-14090)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9110c08f/NEWS.txt
--
diff --git a/NEWS.txt b/NEWS.txt
index 43f57f2..7bb9152 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -46,6 +46,8 @@ New features
  to use in production and limits utilization of heap memory and disk space 
with limits
  you can specify when enabling the log.
  See nodetool and fqltool help text for more information.
+   - SSTableDump now supports the -l option to output each partition as it's 
own json object
+ See CASSANDRA-13848 for more detail
 
 Upgrading
 -

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9110c08f/src/java/org/apache/cassandra/tools/JsonTransformer.java
--
diff --git a/src/java/org/apache/cassandra/tools/JsonTransformer.java 
b/src/java/org/apache/cassandra/tools/JsonTransformer.java
index e33a32c..502cb3b 100644
--- a/src/java/org/apache/cassandra/tools/JsonTransformer.java
+++ b/src/java/org/apache/cassandra/tools/JsonTransformer.java
@@ -56,6 +56,7 @@ import org.codehaus.jackson.JsonGenerator;
 import org.codehaus.jackson.impl.Indenter;
 import org.codehaus.jackson.util.DefaultPrettyPrinter.NopIndenter;
 import org.codehaus.jackson.util.DefaultPrettyPrinter;
+import org.codehaus.jackson.util.MinimalPrettyPrinter;
 
 public final class JsonTransformer
 {
@@ -78,17 +79,26 @@ public final class JsonTransformer
 
 private long currentPosition = 0;
 
-private JsonTransformer(JsonGenerator json, ISSTableScanner 
currentScanner, boolean rawTime, TableMetadata metadata)
+private JsonTransformer(JsonGenerator json, ISSTableScanner 
currentScanner, boolean rawTime, TableMetadata metadata, boolean isJsonLines)
 {
 this.json = json;
 this.metadata = metadata;
 this.currentScanner = currentScanner;
 this.rawTime = rawTime;
 
-DefaultPrettyPrinter prettyPrinter = new DefaultPrettyPrinter();
-prettyPrinter.indentObjectsWith(objectIndenter);
-prettyPrinter.indentArraysWith(arrayIndenter);
-json.setPrettyPrinter(prettyPrinter);
+if (isJsonLines)
+{
+MinimalPrettyPrinter minimalPrettyPrinter = new 
MinimalPrettyPrinter();
+minimalPrettyPrinter.setRootValueSeparator("\n");
+json.setPrettyPrinter(minimalPrettyPrinter);
+}
+else
+{
+DefaultPrettyPrinter prettyPrinter = new DefaultPrettyPrinter();
+prettyPrinter.indentObjectsWith(objectIndenter);
+prettyPrinter.indentArraysWith(arrayIndenter);
+json.setPrettyPrinter(prettyPrinter);
+}
 }
 
 public static void toJson(ISSTableScanner currentScanner, 
Stream partitions, boolean rawTime, TableMetadata 
metadata, OutputStream out)
@@ -96,18 +106,28 @@ public final class JsonTransformer
 {
 try (JsonGenerator json = jsonFactory.createJsonGenerator(new 
OutputStreamWriter(out, StandardCharsets.UTF_8)))
 {
-JsonTransformer transformer = new JsonTransformer(json, 
currentScanner, rawTime, metadata);
+JsonTransformer transformer = new 

[jira] [Commented] (CASSANDRA-14088) Forward slash in role name breaks CassandraAuthorizer

2017-12-07 Thread Kurt Greaves (JIRA)

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

Kurt Greaves commented on CASSANDRA-14088:
--

For the record, unit tests passed for me (I just didn't bother checking because 
I'd recently been flooded by build failures from CircleCI). 
[unit|https://circleci.com/gh/kgreav/cassandra/45]

Seems that it failed on [3.11|https://circleci.com/gh/kgreav/cassandra/44] but 
on an unrelated error.

> Forward slash in role name breaks CassandraAuthorizer
> -
>
> Key: CASSANDRA-14088
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14088
> Project: Cassandra
>  Issue Type: Bug
>  Components: Auth
> Environment: Git commit: 4c80eeece37d79f434078224a0504400ae10a20d 
> ({{HEAD}} of {{trunk}}).
>Reporter: Jesse Haber-Kucharsky
>Assignee: Kurt Greaves
>Priority: Minor
> Fix For: 3.0.16, 3.11.2, 4.0
>
>
> The standard system authorizer 
> ({{org.apache.cassandra.auth.CassandraAuthorizer}}) stores the permissions 
> granted to each user for a given resource in {{system_auth.role_permissions}}.
> A resource like the {{my_keyspace.items}} table is stored as 
> {{"data/my_keyspace/items"}} (note the {{/}} delimiter).
> Similarly, role resources (like the {{joe}} role) are stored as 
> {{"roles/joe"}}.
> The problem is that roles can be created with {{/}} in their names, which 
> confuses the authorizer when the table is queried.
> For example,
> {code}
> $ bin/cqlsh -u cassandra -p cassandra
> Connected to Test Cluster at 127.0.0.1:9042.
> [cqlsh 5.0.1 | Cassandra 4.0-SNAPSHOT | CQL spec 3.4.5 | Native protocol v4]
> Use HELP for help.
> cassandra@cqlsh> CREATE ROLE emperor;
> cassandra@cqlsh> CREATE ROLE "ki/ng";
> cassandra@cqlsh> GRANT ALTER ON ROLE "ki/ng" TO emperor;
> cassandra@cqlsh> LIST ROLES;
>  role  | super | login | options
> ---+---+---+-
>  cassandra |  True |  True |{}
>emperor | False | False |{}
>  ki/ng | False | False |{}
> (3 rows)
> cassandra@cqlsh> SELECT * FROM system_auth.role_permissions;
>  role  | resource  | permissions
> ---+---+
>emperor |   roles/ki/ng |  {'ALTER'}
>  cassandra | roles/emperor | {'ALTER', 'AUTHORIZE', 'DROP'}
>  cassandra |   roles/ki/ng | {'ALTER', 'AUTHORIZE', 'DROP'}
> (3 rows)
> cassandra@cqlsh> LIST ALL PERMISSIONS OF emperor;
> ServerError: java.lang.IllegalArgumentException: roles/ki/ng is not a valid 
> role resource name
> {code}
> Here's the backtrace from the server process:
> {code}
> ERROR [Native-Transport-Requests-1] 2017-12-01 11:07:52,811 
> QueryMessage.java:129 - Unexpected error during query
> java.lang.IllegalArgumentException: roles/ki/ng is not a valid role resource 
> name
> at 
> org.apache.cassandra.auth.RoleResource.fromName(RoleResource.java:101) 
> ~[main/:na]
> at org.apache.cassandra.auth.Resources.fromName(Resources.java:56) 
> ~[main/:na]
> at 
> org.apache.cassandra.auth.CassandraAuthorizer.listPermissionsForRole(CassandraAuthorizer.java:283)
>  ~[main/:na]
> at 
> org.apache.cassandra.auth.CassandraAuthorizer.list(CassandraAuthorizer.java:263)
>  ~[main/:na]
> at 
> org.apache.cassandra.cql3.statements.ListPermissionsStatement.list(ListPermissionsStatement.java:108)
>  ~[main/:na]
> at 
> org.apache.cassandra.cql3.statements.ListPermissionsStatement.execute(ListPermissionsStatement.java:96)
>  ~[main/:na]
> at 
> org.apache.cassandra.cql3.statements.AuthorizationStatement.execute(AuthorizationStatement.java:48)
>  ~[main/:na]
> at 
> org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:207)
>  ~[main/:na]
> at 
> org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:238) 
> ~[main/:na]
> at 
> org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:223) 
> ~[main/:na]
> at 
> org.apache.cassandra.transport.messages.QueryMessage.execute(QueryMessage.java:116)
>  ~[main/:na]
> at 
> org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:517)
>  [main/:na]
> at 
> org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:410)
>  [main/:na]
> at 
> io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
>  [netty-all-4.1.14.Final.jar:4.1.14.Final]
> at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
>  [netty-all-4.1.14.Final.jar:4.1.14.Final]
> at 
> io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:38)
>  

[jira] [Commented] (CASSANDRA-13992) Don't send new_metadata_id for conditional updates

2017-12-07 Thread Kurt Greaves (JIRA)

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

Kurt Greaves commented on CASSANDRA-13992:
--

Should we have updated the spec to indicate that those flags will not work with 
LWT? Seems like it could be quite surprising for new driver developers.

> Don't send new_metadata_id for conditional updates
> --
>
> Key: CASSANDRA-13992
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13992
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Olivier Michallat
>Assignee: Alex Petrov
>Priority: Minor
> Fix For: 4.0
>
>
> This is a follow-up to CASSANDRA-10786.
> Given the table
> {code}
> CREATE TABLE foo (k int PRIMARY KEY)
> {code}
> And the prepared statement
> {code}
> INSERT INTO foo (k) VALUES (?) IF NOT EXISTS
> {code}
> The result set metadata changes depending on the outcome of the update:
> * if the row didn't exist, there is only a single column \[applied] = true
> * if it did, the result contains \[applied] = false, plus the current value 
> of column k.
> The way this was handled so far is that the PREPARED response contains no 
> result set metadata, and therefore all EXECUTE messages have SKIP_METADATA = 
> false, and the responses always include the full (and correct) metadata.
> CASSANDRA-10786 still sends the PREPARED response with no metadata, *but the 
> response to EXECUTE now contains a {{new_metadata_id}}*. The driver thinks it 
> is because of a schema change, and updates its local copy of the prepared 
> statement's result metadata.
> The next EXECUTE is sent with SKIP_METADATA = true, but the server appears to 
> ignore that, and still sends the metadata in the response. So each response 
> includes the correct metadata, the driver uses it, and there is no visible 
> issue for client code.
> The only drawback is that the driver updates its local copy of the metadata 
> unnecessarily, every time. We can work around that by only updating if we had 
> metadata before, at the cost of an extra volatile read. But I think the best 
> thing to do would be to never send a {{new_metadata_id}} in for a conditional 
> update.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-14010) Fix SStable ordering by max timestamp in SinglePartitionReadCommand

2017-12-07 Thread Paulo Motta (JIRA)

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

Paulo Motta updated CASSANDRA-14010:

   Resolution: Fixed
Fix Version/s: (was: 3.11.x)
   (was: 4.x)
   (was: 3.0.x)
   4.0
   3.11.2
   3.0.16
   Status: Resolved  (was: Ready to Commit)

Committed as {{a9225f90e205a7c2b24a4ad4a32d0961067005b0}} to cassandra-3.0 and 
merged up to cassandra-3.11 and trunk. Thanks!

> Fix SStable ordering by max timestamp in SinglePartitionReadCommand
> ---
>
> Key: CASSANDRA-14010
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14010
> Project: Cassandra
>  Issue Type: Bug
>  Components: Local Write-Read Paths
>Reporter: Jonathan Pellby
>Assignee: ZhaoYang
>  Labels: correctness
> Fix For: 3.0.16, 3.11.2, 4.0
>
>
> We have a test environment were we drop and create keyspaces and tables 
> several times within a short time frame. Since upgrading from 3.11.0 to 
> 3.11.1, we are seeing a lot of create statements failing. See the logs below:
> {code:java}
> 2017-11-13T14:29:20.037986449Z WARN Directory /tmp/ramdisk/commitlog doesn't 
> exist
> 2017-11-13T14:29:20.038009590Z WARN Directory /tmp/ramdisk/saved_caches 
> doesn't exist
> 2017-11-13T14:29:20.094337265Z INFO Initialized prepared statement caches 
> with 10 MB (native) and 10 MB (Thrift)
> 2017-11-13T14:29:20.805946340Z INFO Initializing system.IndexInfo
> 2017-11-13T14:29:21.934686905Z INFO Initializing system.batches
> 2017-11-13T14:29:21.973914733Z INFO Initializing system.paxos
> 2017-11-13T14:29:21.994550268Z INFO Initializing system.local
> 2017-11-13T14:29:22.014097194Z INFO Initializing system.peers
> 2017-11-13T14:29:22.124211254Z INFO Initializing system.peer_events
> 2017-11-13T14:29:22.153966833Z INFO Initializing system.range_xfers
> 2017-11-13T14:29:22.174097334Z INFO Initializing system.compaction_history
> 2017-11-13T14:29:22.194259920Z INFO Initializing system.sstable_activity
> 2017-11-13T14:29:22.210178271Z INFO Initializing system.size_estimates
> 2017-11-13T14:29:22.223836992Z INFO Initializing system.available_ranges
> 2017-11-13T14:29:22.237854207Z INFO Initializing system.transferred_ranges
> 2017-11-13T14:29:22.253995621Z INFO Initializing 
> system.views_builds_in_progress
> 2017-11-13T14:29:22.264052481Z INFO Initializing system.built_views
> 2017-11-13T14:29:22.283334779Z INFO Initializing system.hints
> 2017-11-13T14:29:22.304110311Z INFO Initializing system.batchlog
> 2017-11-13T14:29:22.318031950Z INFO Initializing system.prepared_statements
> 2017-11-13T14:29:22.326547917Z INFO Initializing system.schema_keyspaces
> 2017-11-13T14:29:22.337097407Z INFO Initializing system.schema_columnfamilies
> 2017-11-13T14:29:22.354082675Z INFO Initializing system.schema_columns
> 2017-11-13T14:29:22.384179063Z INFO Initializing system.schema_triggers
> 2017-11-13T14:29:22.394222027Z INFO Initializing system.schema_usertypes
> 2017-11-13T14:29:22.414199833Z INFO Initializing system.schema_functions
> 2017-11-13T14:29:22.427205182Z INFO Initializing system.schema_aggregates
> 2017-11-13T14:29:22.427228345Z INFO Not submitting build tasks for views in 
> keyspace system as storage service is not initialized
> 2017-11-13T14:29:22.652838866Z INFO Scheduling approximate time-check task 
> with a precision of 10 milliseconds
> 2017-11-13T14:29:22.732862906Z INFO Initializing system_schema.keyspaces
> 2017-11-13T14:29:22.746598744Z INFO Initializing system_schema.tables
> 2017-11-13T14:29:22.759649011Z INFO Initializing system_schema.columns
> 2017-11-13T14:29:22.766245435Z INFO Initializing system_schema.triggers
> 2017-11-13T14:29:22.778716809Z INFO Initializing system_schema.dropped_columns
> 2017-11-13T14:29:22.791369819Z INFO Initializing system_schema.views
> 2017-11-13T14:29:22.839141724Z INFO Initializing system_schema.types
> 2017-11-13T14:29:22.852911976Z INFO Initializing system_schema.functions
> 2017-11-13T14:29:22.852938112Z INFO Initializing system_schema.aggregates
> 2017-11-13T14:29:22.869348526Z INFO Initializing system_schema.indexes
> 2017-11-13T14:29:22.874178682Z INFO Not submitting build tasks for views in 
> keyspace system_schema as storage service is not initialized
> 2017-11-13T14:29:23.700250435Z INFO Initializing key cache with capacity of 
> 25 MBs.
> 2017-11-13T14:29:23.724357053Z INFO Initializing row cache with capacity of 0 
> MBs
> 2017-11-13T14:29:23.724383599Z INFO Initializing counter cache with capacity 
> of 12 MBs
> 2017-11-13T14:29:23.724386906Z INFO Scheduling counter cache save to every 
> 7200 seconds (going to save all keys).
> 2017-11-13T14:29:23.984408710Z INFO Populating token metadata from system 
> tables
> 

[6/6] cassandra git commit: Merge branch 'cassandra-3.11' into trunk

2017-12-07 Thread paulo
Merge branch 'cassandra-3.11' into trunk


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

Branch: refs/heads/trunk
Commit: 23691f5f8ae541a91f0a2379693d59f7120c12cd
Parents: a61764d b637eb1
Author: Paulo Motta 
Authored: Fri Dec 8 09:05:20 2017 +1100
Committer: Paulo Motta 
Committed: Fri Dec 8 09:06:05 2017 +1100

--
 CHANGES.txt |  1 +
 .../io/sstable/format/SSTableReader.java|  3 ++-
 .../apache/cassandra/cql3/SimpleQueryTest.java  | 20 
 3 files changed, 23 insertions(+), 1 deletion(-)
--


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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/23691f5f/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/23691f5f/test/unit/org/apache/cassandra/cql3/SimpleQueryTest.java
--


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



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

2017-12-07 Thread paulo
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/b637eb11
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b637eb11
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b637eb11

Branch: refs/heads/trunk
Commit: b637eb11c956698dc2ffb936eb85224e22dc7d94
Parents: cdcd652 a9225f9
Author: Paulo Motta 
Authored: Fri Dec 8 09:03:53 2017 +1100
Committer: Paulo Motta 
Committed: Fri Dec 8 09:04:56 2017 +1100

--
 CHANGES.txt |  1 +
 .../io/sstable/format/SSTableReader.java|  3 ++-
 .../apache/cassandra/cql3/SimpleQueryTest.java  | 20 
 3 files changed, 23 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b637eb11/CHANGES.txt
--
diff --cc CHANGES.txt
index 691b285,a5a97db..18a22bd
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,13 -1,5 +1,14 @@@
 +3.11.2
 + * Remove OpenJDK log warning (CASSANDRA-13916)
 + * Prevent compaction strategies from looping indefinitely (CASSANDRA-14079)
 + * Cache disk boundaries (CASSANDRA-13215)
 + * Add asm jar to build.xml for maven builds (CASSANDRA-11193)
 + * Round buffer size to powers of 2 for the chunk cache (CASSANDRA-13897)
 + * Update jackson JSON jars (CASSANDRA-13949)
 + * Avoid locks when checking LCS fanout and if we should defrag 
(CASSANDRA-13930)
 +Merged from 3.0:
  3.0.16
+  * Fix SStable ordering by max timestamp in SinglePartitionReadCommand 
(CASSANDRA-14010)
   * Accept role names containing forward-slash (CASSANDRA-14088)
   * Optimize CRC check chance probability calculations (CASSANDRA-14094)
   * Fix cleanup on keyspace with no replicas (CASSANDRA-13526)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b637eb11/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b637eb11/test/unit/org/apache/cassandra/cql3/SimpleQueryTest.java
--
diff --cc test/unit/org/apache/cassandra/cql3/SimpleQueryTest.java
index c2de52a,f32bcc6..62fe5a1
--- a/test/unit/org/apache/cassandra/cql3/SimpleQueryTest.java
+++ b/test/unit/org/apache/cassandra/cql3/SimpleQueryTest.java
@@@ -547,42 -527,23 +547,62 @@@ public class SimpleQueryTest extends CQ
  );
  }
  
 +/** Test for Cassandra issue 10958 **/
 +@Test
 +public void restrictionOnRegularColumnWithStaticColumnPresentTest() 
throws Throwable
 +{
 +createTable("CREATE TABLE %s (id int, id2 int, age int static, extra 
int, PRIMARY KEY(id, id2))");
 +
 +execute("INSERT INTO %s (id, id2, age, extra) VALUES (?, ?, ?, ?)", 
1, 1, 1, 1);
 +execute("INSERT INTO %s (id, id2, age, extra) VALUES (?, ?, ?, ?)", 
2, 2, 2, 2);
 +execute("UPDATE %s SET age=? WHERE id=?", 3, 3);
 +
 +assertRows(execute("SELECT * FROM %s"),
 +row(1, 1, 1, 1),
 +row(2, 2, 2, 2),
 +row(3, null, 3, null)
 +);
 +
 +assertRows(execute("SELECT * FROM %s WHERE extra > 1 ALLOW 
FILTERING"),
 +row(2, 2, 2, 2)
 +);
 +}
 +
 +@Test
 +public void testRowFilteringOnStaticColumn() throws Throwable
 +{
 +createTable("CREATE TABLE %s (id int, name text, age int static, 
PRIMARY KEY (id, name))");
 +for (int i = 0; i < 5; i++)
 +{
 +execute("INSERT INTO %s (id, name, age) VALUES (?, ?, ?)", i, 
"NameDoesNotMatter", i);
 +}
 +
 +assertInvalid("SELECT id, age FROM %s WHERE age < 1");
 +assertRows(execute("SELECT id, age FROM %s WHERE age < 1 ALLOW 
FILTERING"),
 +   row(0, 0));
 +assertRows(execute("SELECT id, age FROM %s WHERE age > 0 AND age < 3 
ALLOW FILTERING"),
 +   row(1, 1), row(2, 2));
 +assertRows(execute("SELECT id, age FROM %s WHERE age > 3 ALLOW 
FILTERING"),
 +   row(4, 4));
 +}
++
+ @Test
+ public void testSStableTimestampOrdering() throws Throwable
+ {
+ createTable("CREATE TABLE %s (k1 int, v1 int, v2 int, PRIMARY KEY 
(k1))");
+ disableCompaction();
+ 
+ // sstable1
+ execute("INSERT INTO %s(k1,v1,v2) VALUES(1,1,1)  USING TIMESTAMP 5");
+ flush();
+ 
+ // sstable2
+ execute("INSERT INTO %s(k1,v1,v2) VALUES(1,1,2)  USING TIMESTAMP 8");
+ flush();
+ 
+ execute("INSERT INTO %s(k1) VALUES(1)  USING TIMESTAMP 7");
+ execute("DELETE FROM %s USING TIMESTAMP 6 WHERE k1 = 1");
+ 
+ assertRows(execute("SELECT * FROM 

[3/6] cassandra git commit: Fix SStable ordering by max timestamp in SinglePartitionReadCommand

2017-12-07 Thread paulo
Fix SStable ordering by max timestamp in SinglePartitionReadCommand

Patch by Zhao Yang; Reviewed by Benjamin Lerer for CASSANDRA-14010


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

Branch: refs/heads/trunk
Commit: a9225f90e205a7c2b24a4ad4a32d0961067005b0
Parents: f9de26a
Author: Zhao Yang 
Authored: Wed Dec 6 16:17:26 2017 +0800
Committer: Paulo Motta 
Committed: Fri Dec 8 09:01:56 2017 +1100

--
 CHANGES.txt |  1 +
 .../io/sstable/format/SSTableReader.java|  3 ++-
 .../apache/cassandra/cql3/SimpleQueryTest.java  | 23 +---
 3 files changed, 23 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a9225f90/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 4a415eb..a5a97db 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.16
+ * Fix SStable ordering by max timestamp in SinglePartitionReadCommand 
(CASSANDRA-14010)
  * Accept role names containing forward-slash (CASSANDRA-14088)
  * Optimize CRC check chance probability calculations (CASSANDRA-14094)
  * Fix cleanup on keyspace with no replicas (CASSANDRA-13526)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a9225f90/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
--
diff --git a/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java 
b/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
index fb9343f..7e1bc1a 100644
--- a/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
+++ b/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
@@ -140,7 +140,8 @@ public abstract class SSTableReader extends SSTable 
implements SelfRefCounted maxTimestampComparator = 
(o1, o2) -> Long.compare(o1.getMaxTimestamp(), o2.getMaxTimestamp());
+// Descending order
+public static final Comparator maxTimestampComparator = 
(o1, o2) -> Long.compare(o2.getMaxTimestamp(), o1.getMaxTimestamp());
 
 // it's just an object, which we use regular Object equality on; we 
introduce a special class just for easy recognition
 public static final class UniqueIdentifier {}

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a9225f90/test/unit/org/apache/cassandra/cql3/SimpleQueryTest.java
--
diff --git a/test/unit/org/apache/cassandra/cql3/SimpleQueryTest.java 
b/test/unit/org/apache/cassandra/cql3/SimpleQueryTest.java
index 052b53d..f32bcc6 100644
--- a/test/unit/org/apache/cassandra/cql3/SimpleQueryTest.java
+++ b/test/unit/org/apache/cassandra/cql3/SimpleQueryTest.java
@@ -17,11 +17,8 @@
  */
 package org.apache.cassandra.cql3;
 
-import java.util.*;
 import org.junit.Test;
 
-import static junit.framework.Assert.*;
-
 public class SimpleQueryTest extends CQLTester
 {
 @Test
@@ -529,4 +526,24 @@ public class SimpleQueryTest extends CQLTester
 row(0, 0, 0, 0)
 );
 }
+
+@Test
+public void testSStableTimestampOrdering() throws Throwable
+{
+createTable("CREATE TABLE %s (k1 int, v1 int, v2 int, PRIMARY KEY 
(k1))");
+disableCompaction();
+
+// sstable1
+execute("INSERT INTO %s(k1,v1,v2) VALUES(1,1,1)  USING TIMESTAMP 5");
+flush();
+
+// sstable2
+execute("INSERT INTO %s(k1,v1,v2) VALUES(1,1,2)  USING TIMESTAMP 8");
+flush();
+
+execute("INSERT INTO %s(k1) VALUES(1)  USING TIMESTAMP 7");
+execute("DELETE FROM %s USING TIMESTAMP 6 WHERE k1 = 1");
+
+assertRows(execute("SELECT * FROM %s WHERE k1=1"), row(1, 1, 2));
+} 
 }


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[1/6] cassandra git commit: Fix SStable ordering by max timestamp in SinglePartitionReadCommand

2017-12-07 Thread paulo
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.0 f9de26a79 -> a9225f90e
  refs/heads/cassandra-3.11 cdcd6529d -> b637eb11c
  refs/heads/trunk a61764d6c -> 23691f5f8


Fix SStable ordering by max timestamp in SinglePartitionReadCommand

Patch by Zhao Yang; Reviewed by Benjamin Lerer for CASSANDRA-14010


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

Branch: refs/heads/cassandra-3.0
Commit: a9225f90e205a7c2b24a4ad4a32d0961067005b0
Parents: f9de26a
Author: Zhao Yang 
Authored: Wed Dec 6 16:17:26 2017 +0800
Committer: Paulo Motta 
Committed: Fri Dec 8 09:01:56 2017 +1100

--
 CHANGES.txt |  1 +
 .../io/sstable/format/SSTableReader.java|  3 ++-
 .../apache/cassandra/cql3/SimpleQueryTest.java  | 23 +---
 3 files changed, 23 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a9225f90/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 4a415eb..a5a97db 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.16
+ * Fix SStable ordering by max timestamp in SinglePartitionReadCommand 
(CASSANDRA-14010)
  * Accept role names containing forward-slash (CASSANDRA-14088)
  * Optimize CRC check chance probability calculations (CASSANDRA-14094)
  * Fix cleanup on keyspace with no replicas (CASSANDRA-13526)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a9225f90/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
--
diff --git a/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java 
b/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
index fb9343f..7e1bc1a 100644
--- a/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
+++ b/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
@@ -140,7 +140,8 @@ public abstract class SSTableReader extends SSTable 
implements SelfRefCounted maxTimestampComparator = 
(o1, o2) -> Long.compare(o1.getMaxTimestamp(), o2.getMaxTimestamp());
+// Descending order
+public static final Comparator maxTimestampComparator = 
(o1, o2) -> Long.compare(o2.getMaxTimestamp(), o1.getMaxTimestamp());
 
 // it's just an object, which we use regular Object equality on; we 
introduce a special class just for easy recognition
 public static final class UniqueIdentifier {}

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a9225f90/test/unit/org/apache/cassandra/cql3/SimpleQueryTest.java
--
diff --git a/test/unit/org/apache/cassandra/cql3/SimpleQueryTest.java 
b/test/unit/org/apache/cassandra/cql3/SimpleQueryTest.java
index 052b53d..f32bcc6 100644
--- a/test/unit/org/apache/cassandra/cql3/SimpleQueryTest.java
+++ b/test/unit/org/apache/cassandra/cql3/SimpleQueryTest.java
@@ -17,11 +17,8 @@
  */
 package org.apache.cassandra.cql3;
 
-import java.util.*;
 import org.junit.Test;
 
-import static junit.framework.Assert.*;
-
 public class SimpleQueryTest extends CQLTester
 {
 @Test
@@ -529,4 +526,24 @@ public class SimpleQueryTest extends CQLTester
 row(0, 0, 0, 0)
 );
 }
+
+@Test
+public void testSStableTimestampOrdering() throws Throwable
+{
+createTable("CREATE TABLE %s (k1 int, v1 int, v2 int, PRIMARY KEY 
(k1))");
+disableCompaction();
+
+// sstable1
+execute("INSERT INTO %s(k1,v1,v2) VALUES(1,1,1)  USING TIMESTAMP 5");
+flush();
+
+// sstable2
+execute("INSERT INTO %s(k1,v1,v2) VALUES(1,1,2)  USING TIMESTAMP 8");
+flush();
+
+execute("INSERT INTO %s(k1) VALUES(1)  USING TIMESTAMP 7");
+execute("DELETE FROM %s USING TIMESTAMP 6 WHERE k1 = 1");
+
+assertRows(execute("SELECT * FROM %s WHERE k1=1"), row(1, 1, 2));
+} 
 }


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[2/6] cassandra git commit: Fix SStable ordering by max timestamp in SinglePartitionReadCommand

2017-12-07 Thread paulo
Fix SStable ordering by max timestamp in SinglePartitionReadCommand

Patch by Zhao Yang; Reviewed by Benjamin Lerer for CASSANDRA-14010


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

Branch: refs/heads/cassandra-3.11
Commit: a9225f90e205a7c2b24a4ad4a32d0961067005b0
Parents: f9de26a
Author: Zhao Yang 
Authored: Wed Dec 6 16:17:26 2017 +0800
Committer: Paulo Motta 
Committed: Fri Dec 8 09:01:56 2017 +1100

--
 CHANGES.txt |  1 +
 .../io/sstable/format/SSTableReader.java|  3 ++-
 .../apache/cassandra/cql3/SimpleQueryTest.java  | 23 +---
 3 files changed, 23 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a9225f90/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 4a415eb..a5a97db 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.16
+ * Fix SStable ordering by max timestamp in SinglePartitionReadCommand 
(CASSANDRA-14010)
  * Accept role names containing forward-slash (CASSANDRA-14088)
  * Optimize CRC check chance probability calculations (CASSANDRA-14094)
  * Fix cleanup on keyspace with no replicas (CASSANDRA-13526)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a9225f90/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
--
diff --git a/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java 
b/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
index fb9343f..7e1bc1a 100644
--- a/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
+++ b/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
@@ -140,7 +140,8 @@ public abstract class SSTableReader extends SSTable 
implements SelfRefCounted maxTimestampComparator = 
(o1, o2) -> Long.compare(o1.getMaxTimestamp(), o2.getMaxTimestamp());
+// Descending order
+public static final Comparator maxTimestampComparator = 
(o1, o2) -> Long.compare(o2.getMaxTimestamp(), o1.getMaxTimestamp());
 
 // it's just an object, which we use regular Object equality on; we 
introduce a special class just for easy recognition
 public static final class UniqueIdentifier {}

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a9225f90/test/unit/org/apache/cassandra/cql3/SimpleQueryTest.java
--
diff --git a/test/unit/org/apache/cassandra/cql3/SimpleQueryTest.java 
b/test/unit/org/apache/cassandra/cql3/SimpleQueryTest.java
index 052b53d..f32bcc6 100644
--- a/test/unit/org/apache/cassandra/cql3/SimpleQueryTest.java
+++ b/test/unit/org/apache/cassandra/cql3/SimpleQueryTest.java
@@ -17,11 +17,8 @@
  */
 package org.apache.cassandra.cql3;
 
-import java.util.*;
 import org.junit.Test;
 
-import static junit.framework.Assert.*;
-
 public class SimpleQueryTest extends CQLTester
 {
 @Test
@@ -529,4 +526,24 @@ public class SimpleQueryTest extends CQLTester
 row(0, 0, 0, 0)
 );
 }
+
+@Test
+public void testSStableTimestampOrdering() throws Throwable
+{
+createTable("CREATE TABLE %s (k1 int, v1 int, v2 int, PRIMARY KEY 
(k1))");
+disableCompaction();
+
+// sstable1
+execute("INSERT INTO %s(k1,v1,v2) VALUES(1,1,1)  USING TIMESTAMP 5");
+flush();
+
+// sstable2
+execute("INSERT INTO %s(k1,v1,v2) VALUES(1,1,2)  USING TIMESTAMP 8");
+flush();
+
+execute("INSERT INTO %s(k1) VALUES(1)  USING TIMESTAMP 7");
+execute("DELETE FROM %s USING TIMESTAMP 6 WHERE k1 = 1");
+
+assertRows(execute("SELECT * FROM %s WHERE k1=1"), row(1, 1, 2));
+} 
 }


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



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

2017-12-07 Thread paulo
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/b637eb11
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b637eb11
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b637eb11

Branch: refs/heads/cassandra-3.11
Commit: b637eb11c956698dc2ffb936eb85224e22dc7d94
Parents: cdcd652 a9225f9
Author: Paulo Motta 
Authored: Fri Dec 8 09:03:53 2017 +1100
Committer: Paulo Motta 
Committed: Fri Dec 8 09:04:56 2017 +1100

--
 CHANGES.txt |  1 +
 .../io/sstable/format/SSTableReader.java|  3 ++-
 .../apache/cassandra/cql3/SimpleQueryTest.java  | 20 
 3 files changed, 23 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b637eb11/CHANGES.txt
--
diff --cc CHANGES.txt
index 691b285,a5a97db..18a22bd
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,13 -1,5 +1,14 @@@
 +3.11.2
 + * Remove OpenJDK log warning (CASSANDRA-13916)
 + * Prevent compaction strategies from looping indefinitely (CASSANDRA-14079)
 + * Cache disk boundaries (CASSANDRA-13215)
 + * Add asm jar to build.xml for maven builds (CASSANDRA-11193)
 + * Round buffer size to powers of 2 for the chunk cache (CASSANDRA-13897)
 + * Update jackson JSON jars (CASSANDRA-13949)
 + * Avoid locks when checking LCS fanout and if we should defrag 
(CASSANDRA-13930)
 +Merged from 3.0:
  3.0.16
+  * Fix SStable ordering by max timestamp in SinglePartitionReadCommand 
(CASSANDRA-14010)
   * Accept role names containing forward-slash (CASSANDRA-14088)
   * Optimize CRC check chance probability calculations (CASSANDRA-14094)
   * Fix cleanup on keyspace with no replicas (CASSANDRA-13526)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b637eb11/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b637eb11/test/unit/org/apache/cassandra/cql3/SimpleQueryTest.java
--
diff --cc test/unit/org/apache/cassandra/cql3/SimpleQueryTest.java
index c2de52a,f32bcc6..62fe5a1
--- a/test/unit/org/apache/cassandra/cql3/SimpleQueryTest.java
+++ b/test/unit/org/apache/cassandra/cql3/SimpleQueryTest.java
@@@ -547,42 -527,23 +547,62 @@@ public class SimpleQueryTest extends CQ
  );
  }
  
 +/** Test for Cassandra issue 10958 **/
 +@Test
 +public void restrictionOnRegularColumnWithStaticColumnPresentTest() 
throws Throwable
 +{
 +createTable("CREATE TABLE %s (id int, id2 int, age int static, extra 
int, PRIMARY KEY(id, id2))");
 +
 +execute("INSERT INTO %s (id, id2, age, extra) VALUES (?, ?, ?, ?)", 
1, 1, 1, 1);
 +execute("INSERT INTO %s (id, id2, age, extra) VALUES (?, ?, ?, ?)", 
2, 2, 2, 2);
 +execute("UPDATE %s SET age=? WHERE id=?", 3, 3);
 +
 +assertRows(execute("SELECT * FROM %s"),
 +row(1, 1, 1, 1),
 +row(2, 2, 2, 2),
 +row(3, null, 3, null)
 +);
 +
 +assertRows(execute("SELECT * FROM %s WHERE extra > 1 ALLOW 
FILTERING"),
 +row(2, 2, 2, 2)
 +);
 +}
 +
 +@Test
 +public void testRowFilteringOnStaticColumn() throws Throwable
 +{
 +createTable("CREATE TABLE %s (id int, name text, age int static, 
PRIMARY KEY (id, name))");
 +for (int i = 0; i < 5; i++)
 +{
 +execute("INSERT INTO %s (id, name, age) VALUES (?, ?, ?)", i, 
"NameDoesNotMatter", i);
 +}
 +
 +assertInvalid("SELECT id, age FROM %s WHERE age < 1");
 +assertRows(execute("SELECT id, age FROM %s WHERE age < 1 ALLOW 
FILTERING"),
 +   row(0, 0));
 +assertRows(execute("SELECT id, age FROM %s WHERE age > 0 AND age < 3 
ALLOW FILTERING"),
 +   row(1, 1), row(2, 2));
 +assertRows(execute("SELECT id, age FROM %s WHERE age > 3 ALLOW 
FILTERING"),
 +   row(4, 4));
 +}
++
+ @Test
+ public void testSStableTimestampOrdering() throws Throwable
+ {
+ createTable("CREATE TABLE %s (k1 int, v1 int, v2 int, PRIMARY KEY 
(k1))");
+ disableCompaction();
+ 
+ // sstable1
+ execute("INSERT INTO %s(k1,v1,v2) VALUES(1,1,1)  USING TIMESTAMP 5");
+ flush();
+ 
+ // sstable2
+ execute("INSERT INTO %s(k1,v1,v2) VALUES(1,1,2)  USING TIMESTAMP 8");
+ flush();
+ 
+ execute("INSERT INTO %s(k1) VALUES(1)  USING TIMESTAMP 7");
+ execute("DELETE FROM %s USING TIMESTAMP 6 WHERE k1 = 1");
+ 
+ 

[jira] [Commented] (CASSANDRA-14088) Forward slash in role name breaks CassandraAuthorizer

2017-12-07 Thread Jeremiah Jordan (JIRA)

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

Jeremiah Jordan commented on CASSANDRA-14088:
-

I ran the unit test locally that extensively tests the change.  Feel free to 
remove the ready to commit if you want a full dtest run for it, but given we 
don't have any dtests which uses "/" in a name I did not feel it was needed.

> Forward slash in role name breaks CassandraAuthorizer
> -
>
> Key: CASSANDRA-14088
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14088
> Project: Cassandra
>  Issue Type: Bug
>  Components: Auth
> Environment: Git commit: 4c80eeece37d79f434078224a0504400ae10a20d 
> ({{HEAD}} of {{trunk}}).
>Reporter: Jesse Haber-Kucharsky
>Assignee: Kurt Greaves
>Priority: Minor
> Fix For: 3.0.16, 3.11.2, 4.0
>
>
> The standard system authorizer 
> ({{org.apache.cassandra.auth.CassandraAuthorizer}}) stores the permissions 
> granted to each user for a given resource in {{system_auth.role_permissions}}.
> A resource like the {{my_keyspace.items}} table is stored as 
> {{"data/my_keyspace/items"}} (note the {{/}} delimiter).
> Similarly, role resources (like the {{joe}} role) are stored as 
> {{"roles/joe"}}.
> The problem is that roles can be created with {{/}} in their names, which 
> confuses the authorizer when the table is queried.
> For example,
> {code}
> $ bin/cqlsh -u cassandra -p cassandra
> Connected to Test Cluster at 127.0.0.1:9042.
> [cqlsh 5.0.1 | Cassandra 4.0-SNAPSHOT | CQL spec 3.4.5 | Native protocol v4]
> Use HELP for help.
> cassandra@cqlsh> CREATE ROLE emperor;
> cassandra@cqlsh> CREATE ROLE "ki/ng";
> cassandra@cqlsh> GRANT ALTER ON ROLE "ki/ng" TO emperor;
> cassandra@cqlsh> LIST ROLES;
>  role  | super | login | options
> ---+---+---+-
>  cassandra |  True |  True |{}
>emperor | False | False |{}
>  ki/ng | False | False |{}
> (3 rows)
> cassandra@cqlsh> SELECT * FROM system_auth.role_permissions;
>  role  | resource  | permissions
> ---+---+
>emperor |   roles/ki/ng |  {'ALTER'}
>  cassandra | roles/emperor | {'ALTER', 'AUTHORIZE', 'DROP'}
>  cassandra |   roles/ki/ng | {'ALTER', 'AUTHORIZE', 'DROP'}
> (3 rows)
> cassandra@cqlsh> LIST ALL PERMISSIONS OF emperor;
> ServerError: java.lang.IllegalArgumentException: roles/ki/ng is not a valid 
> role resource name
> {code}
> Here's the backtrace from the server process:
> {code}
> ERROR [Native-Transport-Requests-1] 2017-12-01 11:07:52,811 
> QueryMessage.java:129 - Unexpected error during query
> java.lang.IllegalArgumentException: roles/ki/ng is not a valid role resource 
> name
> at 
> org.apache.cassandra.auth.RoleResource.fromName(RoleResource.java:101) 
> ~[main/:na]
> at org.apache.cassandra.auth.Resources.fromName(Resources.java:56) 
> ~[main/:na]
> at 
> org.apache.cassandra.auth.CassandraAuthorizer.listPermissionsForRole(CassandraAuthorizer.java:283)
>  ~[main/:na]
> at 
> org.apache.cassandra.auth.CassandraAuthorizer.list(CassandraAuthorizer.java:263)
>  ~[main/:na]
> at 
> org.apache.cassandra.cql3.statements.ListPermissionsStatement.list(ListPermissionsStatement.java:108)
>  ~[main/:na]
> at 
> org.apache.cassandra.cql3.statements.ListPermissionsStatement.execute(ListPermissionsStatement.java:96)
>  ~[main/:na]
> at 
> org.apache.cassandra.cql3.statements.AuthorizationStatement.execute(AuthorizationStatement.java:48)
>  ~[main/:na]
> at 
> org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:207)
>  ~[main/:na]
> at 
> org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:238) 
> ~[main/:na]
> at 
> org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:223) 
> ~[main/:na]
> at 
> org.apache.cassandra.transport.messages.QueryMessage.execute(QueryMessage.java:116)
>  ~[main/:na]
> at 
> org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:517)
>  [main/:na]
> at 
> org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:410)
>  [main/:na]
> at 
> io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
>  [netty-all-4.1.14.Final.jar:4.1.14.Final]
> at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
>  [netty-all-4.1.14.Final.jar:4.1.14.Final]
> at 
> io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:38)
>  [netty-all-4.1.14.Final.jar:4.1.14.Final]
> at 
> 

[jira] [Comment Edited] (CASSANDRA-14088) Forward slash in role name breaks CassandraAuthorizer

2017-12-07 Thread Jeff Jirsa (JIRA)

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

Jeff Jirsa edited comment on CASSANDRA-14088 at 12/7/17 9:24 PM:
-

Works for me. Committed as {{f9de26a79de02e61624994e67e64f2c93fb5a35b}} and 
merged up to 3.11/trunk. Thanks to all 3 of you [~KurtG], [~jjordan] , 
[~jhaberku]!



was (Author: jjirsa):
works for me. Committed as {{f9de26a79de02e61624994e67e64f2c93fb5a35b}} and 
merged up to 3.11/trunk.

> Forward slash in role name breaks CassandraAuthorizer
> -
>
> Key: CASSANDRA-14088
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14088
> Project: Cassandra
>  Issue Type: Bug
>  Components: Auth
> Environment: Git commit: 4c80eeece37d79f434078224a0504400ae10a20d 
> ({{HEAD}} of {{trunk}}).
>Reporter: Jesse Haber-Kucharsky
>Assignee: Kurt Greaves
>Priority: Minor
> Fix For: 3.0.16, 3.11.2, 4.0
>
>
> The standard system authorizer 
> ({{org.apache.cassandra.auth.CassandraAuthorizer}}) stores the permissions 
> granted to each user for a given resource in {{system_auth.role_permissions}}.
> A resource like the {{my_keyspace.items}} table is stored as 
> {{"data/my_keyspace/items"}} (note the {{/}} delimiter).
> Similarly, role resources (like the {{joe}} role) are stored as 
> {{"roles/joe"}}.
> The problem is that roles can be created with {{/}} in their names, which 
> confuses the authorizer when the table is queried.
> For example,
> {code}
> $ bin/cqlsh -u cassandra -p cassandra
> Connected to Test Cluster at 127.0.0.1:9042.
> [cqlsh 5.0.1 | Cassandra 4.0-SNAPSHOT | CQL spec 3.4.5 | Native protocol v4]
> Use HELP for help.
> cassandra@cqlsh> CREATE ROLE emperor;
> cassandra@cqlsh> CREATE ROLE "ki/ng";
> cassandra@cqlsh> GRANT ALTER ON ROLE "ki/ng" TO emperor;
> cassandra@cqlsh> LIST ROLES;
>  role  | super | login | options
> ---+---+---+-
>  cassandra |  True |  True |{}
>emperor | False | False |{}
>  ki/ng | False | False |{}
> (3 rows)
> cassandra@cqlsh> SELECT * FROM system_auth.role_permissions;
>  role  | resource  | permissions
> ---+---+
>emperor |   roles/ki/ng |  {'ALTER'}
>  cassandra | roles/emperor | {'ALTER', 'AUTHORIZE', 'DROP'}
>  cassandra |   roles/ki/ng | {'ALTER', 'AUTHORIZE', 'DROP'}
> (3 rows)
> cassandra@cqlsh> LIST ALL PERMISSIONS OF emperor;
> ServerError: java.lang.IllegalArgumentException: roles/ki/ng is not a valid 
> role resource name
> {code}
> Here's the backtrace from the server process:
> {code}
> ERROR [Native-Transport-Requests-1] 2017-12-01 11:07:52,811 
> QueryMessage.java:129 - Unexpected error during query
> java.lang.IllegalArgumentException: roles/ki/ng is not a valid role resource 
> name
> at 
> org.apache.cassandra.auth.RoleResource.fromName(RoleResource.java:101) 
> ~[main/:na]
> at org.apache.cassandra.auth.Resources.fromName(Resources.java:56) 
> ~[main/:na]
> at 
> org.apache.cassandra.auth.CassandraAuthorizer.listPermissionsForRole(CassandraAuthorizer.java:283)
>  ~[main/:na]
> at 
> org.apache.cassandra.auth.CassandraAuthorizer.list(CassandraAuthorizer.java:263)
>  ~[main/:na]
> at 
> org.apache.cassandra.cql3.statements.ListPermissionsStatement.list(ListPermissionsStatement.java:108)
>  ~[main/:na]
> at 
> org.apache.cassandra.cql3.statements.ListPermissionsStatement.execute(ListPermissionsStatement.java:96)
>  ~[main/:na]
> at 
> org.apache.cassandra.cql3.statements.AuthorizationStatement.execute(AuthorizationStatement.java:48)
>  ~[main/:na]
> at 
> org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:207)
>  ~[main/:na]
> at 
> org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:238) 
> ~[main/:na]
> at 
> org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:223) 
> ~[main/:na]
> at 
> org.apache.cassandra.transport.messages.QueryMessage.execute(QueryMessage.java:116)
>  ~[main/:na]
> at 
> org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:517)
>  [main/:na]
> at 
> org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:410)
>  [main/:na]
> at 
> io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
>  [netty-all-4.1.14.Final.jar:4.1.14.Final]
> at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
>  [netty-all-4.1.14.Final.jar:4.1.14.Final]
> at 
> 

[jira] [Updated] (CASSANDRA-14088) Forward slash in role name breaks CassandraAuthorizer

2017-12-07 Thread Jeff Jirsa (JIRA)

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

Jeff Jirsa updated CASSANDRA-14088:
---
Resolution: Fixed
Status: Resolved  (was: Ready to Commit)

works for me. Committed as {{f9de26a79de02e61624994e67e64f2c93fb5a35b}} and 
merged up to 3.11/trunk.

> Forward slash in role name breaks CassandraAuthorizer
> -
>
> Key: CASSANDRA-14088
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14088
> Project: Cassandra
>  Issue Type: Bug
>  Components: Auth
> Environment: Git commit: 4c80eeece37d79f434078224a0504400ae10a20d 
> ({{HEAD}} of {{trunk}}).
>Reporter: Jesse Haber-Kucharsky
>Assignee: Kurt Greaves
>Priority: Minor
> Fix For: 3.0.16, 3.11.2, 4.0
>
>
> The standard system authorizer 
> ({{org.apache.cassandra.auth.CassandraAuthorizer}}) stores the permissions 
> granted to each user for a given resource in {{system_auth.role_permissions}}.
> A resource like the {{my_keyspace.items}} table is stored as 
> {{"data/my_keyspace/items"}} (note the {{/}} delimiter).
> Similarly, role resources (like the {{joe}} role) are stored as 
> {{"roles/joe"}}.
> The problem is that roles can be created with {{/}} in their names, which 
> confuses the authorizer when the table is queried.
> For example,
> {code}
> $ bin/cqlsh -u cassandra -p cassandra
> Connected to Test Cluster at 127.0.0.1:9042.
> [cqlsh 5.0.1 | Cassandra 4.0-SNAPSHOT | CQL spec 3.4.5 | Native protocol v4]
> Use HELP for help.
> cassandra@cqlsh> CREATE ROLE emperor;
> cassandra@cqlsh> CREATE ROLE "ki/ng";
> cassandra@cqlsh> GRANT ALTER ON ROLE "ki/ng" TO emperor;
> cassandra@cqlsh> LIST ROLES;
>  role  | super | login | options
> ---+---+---+-
>  cassandra |  True |  True |{}
>emperor | False | False |{}
>  ki/ng | False | False |{}
> (3 rows)
> cassandra@cqlsh> SELECT * FROM system_auth.role_permissions;
>  role  | resource  | permissions
> ---+---+
>emperor |   roles/ki/ng |  {'ALTER'}
>  cassandra | roles/emperor | {'ALTER', 'AUTHORIZE', 'DROP'}
>  cassandra |   roles/ki/ng | {'ALTER', 'AUTHORIZE', 'DROP'}
> (3 rows)
> cassandra@cqlsh> LIST ALL PERMISSIONS OF emperor;
> ServerError: java.lang.IllegalArgumentException: roles/ki/ng is not a valid 
> role resource name
> {code}
> Here's the backtrace from the server process:
> {code}
> ERROR [Native-Transport-Requests-1] 2017-12-01 11:07:52,811 
> QueryMessage.java:129 - Unexpected error during query
> java.lang.IllegalArgumentException: roles/ki/ng is not a valid role resource 
> name
> at 
> org.apache.cassandra.auth.RoleResource.fromName(RoleResource.java:101) 
> ~[main/:na]
> at org.apache.cassandra.auth.Resources.fromName(Resources.java:56) 
> ~[main/:na]
> at 
> org.apache.cassandra.auth.CassandraAuthorizer.listPermissionsForRole(CassandraAuthorizer.java:283)
>  ~[main/:na]
> at 
> org.apache.cassandra.auth.CassandraAuthorizer.list(CassandraAuthorizer.java:263)
>  ~[main/:na]
> at 
> org.apache.cassandra.cql3.statements.ListPermissionsStatement.list(ListPermissionsStatement.java:108)
>  ~[main/:na]
> at 
> org.apache.cassandra.cql3.statements.ListPermissionsStatement.execute(ListPermissionsStatement.java:96)
>  ~[main/:na]
> at 
> org.apache.cassandra.cql3.statements.AuthorizationStatement.execute(AuthorizationStatement.java:48)
>  ~[main/:na]
> at 
> org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:207)
>  ~[main/:na]
> at 
> org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:238) 
> ~[main/:na]
> at 
> org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:223) 
> ~[main/:na]
> at 
> org.apache.cassandra.transport.messages.QueryMessage.execute(QueryMessage.java:116)
>  ~[main/:na]
> at 
> org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:517)
>  [main/:na]
> at 
> org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:410)
>  [main/:na]
> at 
> io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
>  [netty-all-4.1.14.Final.jar:4.1.14.Final]
> at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
>  [netty-all-4.1.14.Final.jar:4.1.14.Final]
> at 
> io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:38)
>  [netty-all-4.1.14.Final.jar:4.1.14.Final]
> at 
> io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:353)
>  

[3/6] cassandra git commit: Accept role names containing forward-slash

2017-12-07 Thread jjirsa
Accept role names containing forward-slash

Patch by Kurt Greaves; Reviewed by Jeremiah Jordan for CASSANDRA-14088


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

Branch: refs/heads/trunk
Commit: f9de26a79de02e61624994e67e64f2c93fb5a35b
Parents: b885e9c
Author: kurt 
Authored: Mon Dec 4 03:35:07 2017 +
Committer: Jeff Jirsa 
Committed: Thu Dec 7 13:19:58 2017 -0800

--
 CHANGES.txt |  1 +
 .../org/apache/cassandra/auth/RoleResource.java |  4 ++--
 .../miscellaneous/RoleSyntaxTest.java   | 23 
 3 files changed, 26 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f9de26a7/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index b275397..4a415eb 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.16
+ * Accept role names containing forward-slash (CASSANDRA-14088)
  * Optimize CRC check chance probability calculations (CASSANDRA-14094)
  * Fix cleanup on keyspace with no replicas (CASSANDRA-13526)
  * Fix updating base table rows with TTL not removing materialized view 
entries (CASSANDRA-14071)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f9de26a7/src/java/org/apache/cassandra/auth/RoleResource.java
--
diff --git a/src/java/org/apache/cassandra/auth/RoleResource.java 
b/src/java/org/apache/cassandra/auth/RoleResource.java
index e994233..89665f4 100644
--- a/src/java/org/apache/cassandra/auth/RoleResource.java
+++ b/src/java/org/apache/cassandra/auth/RoleResource.java
@@ -96,9 +96,9 @@ public class RoleResource implements IResource, 
Comparable
  */
 public static RoleResource fromName(String name)
 {
-String[] parts = StringUtils.split(name, '/');
+String[] parts = StringUtils.split(name, "/", 2);
 
-if (!parts[0].equals(ROOT_NAME) || parts.length > 2)
+if (!parts[0].equals(ROOT_NAME))
 throw new IllegalArgumentException(String.format("%s is not a 
valid role resource name", name));
 
 if (parts.length == 1)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f9de26a7/test/unit/org/apache/cassandra/cql3/validation/miscellaneous/RoleSyntaxTest.java
--
diff --git 
a/test/unit/org/apache/cassandra/cql3/validation/miscellaneous/RoleSyntaxTest.java
 
b/test/unit/org/apache/cassandra/cql3/validation/miscellaneous/RoleSyntaxTest.java
index 0cb1de2..f72e3dc 100644
--- 
a/test/unit/org/apache/cassandra/cql3/validation/miscellaneous/RoleSyntaxTest.java
+++ 
b/test/unit/org/apache/cassandra/cql3/validation/miscellaneous/RoleSyntaxTest.java
@@ -17,8 +17,10 @@
  */
 package org.apache.cassandra.cql3.validation.miscellaneous;
 
+import org.junit.Assert;
 import org.junit.Test;
 
+import org.apache.cassandra.auth.RoleResource;
 import org.apache.cassandra.cql3.CQLTester;
 
 public class RoleSyntaxTest extends CQLTester
@@ -158,4 +160,25 @@ public class RoleSyntaxTest extends CQLTester
 assertValidSyntax("LIST ROLES OF \"r1\"");
 assertValidSyntax("LIST ROLES OF $$ r '1' $$");
 }
+
+@Test
+public void roleNameTest()
+{
+// we used to split on all "/" which meant role names containing a / 
would trigger an exception in RoleResource.fromName()
+RoleResource t1 = RoleResource.role("ki/ng");
+RoleResource t2 = RoleResource.role("emperor");
+RoleResource t3 = RoleResource.role("aeou/!@*%");
+RoleResource t4 = RoleResource.role("do$\\$P#?:");
+RoleResource t5 = RoleResource.root();
+RoleResource r1 = RoleResource.fromName("roles/ki/ng");
+RoleResource r2 = RoleResource.fromName("roles/emperor");
+RoleResource r3 = RoleResource.fromName("roles/aeou/!@*%");
+RoleResource r4 = RoleResource.fromName("roles/do$\\$P#?:");
+RoleResource r5 = RoleResource.fromName("roles");
+Assert.assertEquals(t1, r1);
+Assert.assertEquals(t2, r2);
+Assert.assertEquals(t3, r3);
+Assert.assertEquals(t4, r4);
+Assert.assertEquals(t5, r5);
+}
 }


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



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

2017-12-07 Thread jjirsa
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/cdcd6529
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/cdcd6529
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/cdcd6529

Branch: refs/heads/trunk
Commit: cdcd6529d00c023eaaab4e075f56ffdaf7d774ad
Parents: 4e74f01 f9de26a
Author: Jeff Jirsa 
Authored: Thu Dec 7 13:20:37 2017 -0800
Committer: Jeff Jirsa 
Committed: Thu Dec 7 13:21:04 2017 -0800

--
 CHANGES.txt |  1 +
 .../org/apache/cassandra/auth/RoleResource.java |  4 ++--
 .../miscellaneous/RoleSyntaxTest.java   | 23 
 3 files changed, 26 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/cdcd6529/CHANGES.txt
--
diff --cc CHANGES.txt
index 1a1a2cf,4a415eb..691b285
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,16 -1,8 +1,17 @@@
 +3.11.2
 + * Remove OpenJDK log warning (CASSANDRA-13916)
 + * Prevent compaction strategies from looping indefinitely (CASSANDRA-14079)
 + * Cache disk boundaries (CASSANDRA-13215)
 + * Add asm jar to build.xml for maven builds (CASSANDRA-11193)
 + * Round buffer size to powers of 2 for the chunk cache (CASSANDRA-13897)
 + * Update jackson JSON jars (CASSANDRA-13949)
 + * Avoid locks when checking LCS fanout and if we should defrag 
(CASSANDRA-13930)
 +Merged from 3.0:
  3.0.16
+  * Accept role names containing forward-slash (CASSANDRA-14088)
   * Optimize CRC check chance probability calculations (CASSANDRA-14094)
   * Fix cleanup on keyspace with no replicas (CASSANDRA-13526)
 - * Fix updating base table rows with TTL not removing materialized view 
entries (CASSANDRA-14071)
 + * Fix updating base table rows with TTL not removing view entries 
(CASSANDRA-14071)
   * Reduce garbage created by DynamicSnitch (CASSANDRA-14091)
   * More frequent commitlog chained markers (CASSANDRA-13987)
   * Fix serialized size of DataLimits (CASSANDRA-14057)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/cdcd6529/src/java/org/apache/cassandra/auth/RoleResource.java
--


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[1/6] cassandra git commit: Accept role names containing forward-slash

2017-12-07 Thread jjirsa
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.0 b885e9c05 -> f9de26a79
  refs/heads/cassandra-3.11 4e74f0148 -> cdcd6529d
  refs/heads/trunk 32287169f -> a61764d6c


Accept role names containing forward-slash

Patch by Kurt Greaves; Reviewed by Jeremiah Jordan for CASSANDRA-14088


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

Branch: refs/heads/cassandra-3.0
Commit: f9de26a79de02e61624994e67e64f2c93fb5a35b
Parents: b885e9c
Author: kurt 
Authored: Mon Dec 4 03:35:07 2017 +
Committer: Jeff Jirsa 
Committed: Thu Dec 7 13:19:58 2017 -0800

--
 CHANGES.txt |  1 +
 .../org/apache/cassandra/auth/RoleResource.java |  4 ++--
 .../miscellaneous/RoleSyntaxTest.java   | 23 
 3 files changed, 26 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f9de26a7/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index b275397..4a415eb 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.16
+ * Accept role names containing forward-slash (CASSANDRA-14088)
  * Optimize CRC check chance probability calculations (CASSANDRA-14094)
  * Fix cleanup on keyspace with no replicas (CASSANDRA-13526)
  * Fix updating base table rows with TTL not removing materialized view 
entries (CASSANDRA-14071)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f9de26a7/src/java/org/apache/cassandra/auth/RoleResource.java
--
diff --git a/src/java/org/apache/cassandra/auth/RoleResource.java 
b/src/java/org/apache/cassandra/auth/RoleResource.java
index e994233..89665f4 100644
--- a/src/java/org/apache/cassandra/auth/RoleResource.java
+++ b/src/java/org/apache/cassandra/auth/RoleResource.java
@@ -96,9 +96,9 @@ public class RoleResource implements IResource, 
Comparable
  */
 public static RoleResource fromName(String name)
 {
-String[] parts = StringUtils.split(name, '/');
+String[] parts = StringUtils.split(name, "/", 2);
 
-if (!parts[0].equals(ROOT_NAME) || parts.length > 2)
+if (!parts[0].equals(ROOT_NAME))
 throw new IllegalArgumentException(String.format("%s is not a 
valid role resource name", name));
 
 if (parts.length == 1)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f9de26a7/test/unit/org/apache/cassandra/cql3/validation/miscellaneous/RoleSyntaxTest.java
--
diff --git 
a/test/unit/org/apache/cassandra/cql3/validation/miscellaneous/RoleSyntaxTest.java
 
b/test/unit/org/apache/cassandra/cql3/validation/miscellaneous/RoleSyntaxTest.java
index 0cb1de2..f72e3dc 100644
--- 
a/test/unit/org/apache/cassandra/cql3/validation/miscellaneous/RoleSyntaxTest.java
+++ 
b/test/unit/org/apache/cassandra/cql3/validation/miscellaneous/RoleSyntaxTest.java
@@ -17,8 +17,10 @@
  */
 package org.apache.cassandra.cql3.validation.miscellaneous;
 
+import org.junit.Assert;
 import org.junit.Test;
 
+import org.apache.cassandra.auth.RoleResource;
 import org.apache.cassandra.cql3.CQLTester;
 
 public class RoleSyntaxTest extends CQLTester
@@ -158,4 +160,25 @@ public class RoleSyntaxTest extends CQLTester
 assertValidSyntax("LIST ROLES OF \"r1\"");
 assertValidSyntax("LIST ROLES OF $$ r '1' $$");
 }
+
+@Test
+public void roleNameTest()
+{
+// we used to split on all "/" which meant role names containing a / 
would trigger an exception in RoleResource.fromName()
+RoleResource t1 = RoleResource.role("ki/ng");
+RoleResource t2 = RoleResource.role("emperor");
+RoleResource t3 = RoleResource.role("aeou/!@*%");
+RoleResource t4 = RoleResource.role("do$\\$P#?:");
+RoleResource t5 = RoleResource.root();
+RoleResource r1 = RoleResource.fromName("roles/ki/ng");
+RoleResource r2 = RoleResource.fromName("roles/emperor");
+RoleResource r3 = RoleResource.fromName("roles/aeou/!@*%");
+RoleResource r4 = RoleResource.fromName("roles/do$\\$P#?:");
+RoleResource r5 = RoleResource.fromName("roles");
+Assert.assertEquals(t1, r1);
+Assert.assertEquals(t2, r2);
+Assert.assertEquals(t3, r3);
+Assert.assertEquals(t4, r4);
+Assert.assertEquals(t5, r5);
+}
 }


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: 

[2/6] cassandra git commit: Accept role names containing forward-slash

2017-12-07 Thread jjirsa
Accept role names containing forward-slash

Patch by Kurt Greaves; Reviewed by Jeremiah Jordan for CASSANDRA-14088


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

Branch: refs/heads/cassandra-3.11
Commit: f9de26a79de02e61624994e67e64f2c93fb5a35b
Parents: b885e9c
Author: kurt 
Authored: Mon Dec 4 03:35:07 2017 +
Committer: Jeff Jirsa 
Committed: Thu Dec 7 13:19:58 2017 -0800

--
 CHANGES.txt |  1 +
 .../org/apache/cassandra/auth/RoleResource.java |  4 ++--
 .../miscellaneous/RoleSyntaxTest.java   | 23 
 3 files changed, 26 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f9de26a7/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index b275397..4a415eb 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.16
+ * Accept role names containing forward-slash (CASSANDRA-14088)
  * Optimize CRC check chance probability calculations (CASSANDRA-14094)
  * Fix cleanup on keyspace with no replicas (CASSANDRA-13526)
  * Fix updating base table rows with TTL not removing materialized view 
entries (CASSANDRA-14071)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f9de26a7/src/java/org/apache/cassandra/auth/RoleResource.java
--
diff --git a/src/java/org/apache/cassandra/auth/RoleResource.java 
b/src/java/org/apache/cassandra/auth/RoleResource.java
index e994233..89665f4 100644
--- a/src/java/org/apache/cassandra/auth/RoleResource.java
+++ b/src/java/org/apache/cassandra/auth/RoleResource.java
@@ -96,9 +96,9 @@ public class RoleResource implements IResource, 
Comparable
  */
 public static RoleResource fromName(String name)
 {
-String[] parts = StringUtils.split(name, '/');
+String[] parts = StringUtils.split(name, "/", 2);
 
-if (!parts[0].equals(ROOT_NAME) || parts.length > 2)
+if (!parts[0].equals(ROOT_NAME))
 throw new IllegalArgumentException(String.format("%s is not a 
valid role resource name", name));
 
 if (parts.length == 1)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f9de26a7/test/unit/org/apache/cassandra/cql3/validation/miscellaneous/RoleSyntaxTest.java
--
diff --git 
a/test/unit/org/apache/cassandra/cql3/validation/miscellaneous/RoleSyntaxTest.java
 
b/test/unit/org/apache/cassandra/cql3/validation/miscellaneous/RoleSyntaxTest.java
index 0cb1de2..f72e3dc 100644
--- 
a/test/unit/org/apache/cassandra/cql3/validation/miscellaneous/RoleSyntaxTest.java
+++ 
b/test/unit/org/apache/cassandra/cql3/validation/miscellaneous/RoleSyntaxTest.java
@@ -17,8 +17,10 @@
  */
 package org.apache.cassandra.cql3.validation.miscellaneous;
 
+import org.junit.Assert;
 import org.junit.Test;
 
+import org.apache.cassandra.auth.RoleResource;
 import org.apache.cassandra.cql3.CQLTester;
 
 public class RoleSyntaxTest extends CQLTester
@@ -158,4 +160,25 @@ public class RoleSyntaxTest extends CQLTester
 assertValidSyntax("LIST ROLES OF \"r1\"");
 assertValidSyntax("LIST ROLES OF $$ r '1' $$");
 }
+
+@Test
+public void roleNameTest()
+{
+// we used to split on all "/" which meant role names containing a / 
would trigger an exception in RoleResource.fromName()
+RoleResource t1 = RoleResource.role("ki/ng");
+RoleResource t2 = RoleResource.role("emperor");
+RoleResource t3 = RoleResource.role("aeou/!@*%");
+RoleResource t4 = RoleResource.role("do$\\$P#?:");
+RoleResource t5 = RoleResource.root();
+RoleResource r1 = RoleResource.fromName("roles/ki/ng");
+RoleResource r2 = RoleResource.fromName("roles/emperor");
+RoleResource r3 = RoleResource.fromName("roles/aeou/!@*%");
+RoleResource r4 = RoleResource.fromName("roles/do$\\$P#?:");
+RoleResource r5 = RoleResource.fromName("roles");
+Assert.assertEquals(t1, r1);
+Assert.assertEquals(t2, r2);
+Assert.assertEquals(t3, r3);
+Assert.assertEquals(t4, r4);
+Assert.assertEquals(t5, r5);
+}
 }


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[6/6] cassandra git commit: Merge branch 'cassandra-3.11' into trunk

2017-12-07 Thread jjirsa
Merge branch 'cassandra-3.11' into trunk


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

Branch: refs/heads/trunk
Commit: a61764d6cb4e877e1f0d383bc4cd49b2dd00b9d1
Parents: 3228716 cdcd652
Author: Jeff Jirsa 
Authored: Thu Dec 7 13:21:12 2017 -0800
Committer: Jeff Jirsa 
Committed: Thu Dec 7 13:21:38 2017 -0800

--
 CHANGES.txt |  1 +
 .../org/apache/cassandra/auth/RoleResource.java |  4 ++--
 .../miscellaneous/RoleSyntaxTest.java   | 23 
 3 files changed, 26 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a61764d6/CHANGES.txt
--
diff --cc CHANGES.txt
index ef414b9,691b285..6d3f398
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -179,9 -8,10 +179,10 @@@
   * Avoid locks when checking LCS fanout and if we should defrag 
(CASSANDRA-13930)
  Merged from 3.0:
  3.0.16
+  * Accept role names containing forward-slash (CASSANDRA-14088)
   * Optimize CRC check chance probability calculations (CASSANDRA-14094)
   * Fix cleanup on keyspace with no replicas (CASSANDRA-13526)
 - * Fix updating base table rows with TTL not removing view entries 
(CASSANDRA-14071)
 + * Fix updating base table rows with TTL not removing materialized view 
entries (CASSANDRA-14071)
   * Reduce garbage created by DynamicSnitch (CASSANDRA-14091)
   * More frequent commitlog chained markers (CASSANDRA-13987)
   * Fix serialized size of DataLimits (CASSANDRA-14057)


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



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

2017-12-07 Thread jjirsa
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/cdcd6529
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/cdcd6529
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/cdcd6529

Branch: refs/heads/cassandra-3.11
Commit: cdcd6529d00c023eaaab4e075f56ffdaf7d774ad
Parents: 4e74f01 f9de26a
Author: Jeff Jirsa 
Authored: Thu Dec 7 13:20:37 2017 -0800
Committer: Jeff Jirsa 
Committed: Thu Dec 7 13:21:04 2017 -0800

--
 CHANGES.txt |  1 +
 .../org/apache/cassandra/auth/RoleResource.java |  4 ++--
 .../miscellaneous/RoleSyntaxTest.java   | 23 
 3 files changed, 26 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/cdcd6529/CHANGES.txt
--
diff --cc CHANGES.txt
index 1a1a2cf,4a415eb..691b285
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,16 -1,8 +1,17 @@@
 +3.11.2
 + * Remove OpenJDK log warning (CASSANDRA-13916)
 + * Prevent compaction strategies from looping indefinitely (CASSANDRA-14079)
 + * Cache disk boundaries (CASSANDRA-13215)
 + * Add asm jar to build.xml for maven builds (CASSANDRA-11193)
 + * Round buffer size to powers of 2 for the chunk cache (CASSANDRA-13897)
 + * Update jackson JSON jars (CASSANDRA-13949)
 + * Avoid locks when checking LCS fanout and if we should defrag 
(CASSANDRA-13930)
 +Merged from 3.0:
  3.0.16
+  * Accept role names containing forward-slash (CASSANDRA-14088)
   * Optimize CRC check chance probability calculations (CASSANDRA-14094)
   * Fix cleanup on keyspace with no replicas (CASSANDRA-13526)
 - * Fix updating base table rows with TTL not removing materialized view 
entries (CASSANDRA-14071)
 + * Fix updating base table rows with TTL not removing view entries 
(CASSANDRA-14071)
   * Reduce garbage created by DynamicSnitch (CASSANDRA-14091)
   * More frequent commitlog chained markers (CASSANDRA-13987)
   * Fix serialized size of DataLimits (CASSANDRA-14057)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/cdcd6529/src/java/org/apache/cassandra/auth/RoleResource.java
--


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-14088) Forward slash in role name breaks CassandraAuthorizer

2017-12-07 Thread Jeff Jirsa (JIRA)

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

Jeff Jirsa commented on CASSANDRA-14088:


This is marked ready to commit, but there's no mention of utest/dtests at all - 
if they're clean I'll commit, but could someone confirm that they're clean?


> Forward slash in role name breaks CassandraAuthorizer
> -
>
> Key: CASSANDRA-14088
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14088
> Project: Cassandra
>  Issue Type: Bug
>  Components: Auth
> Environment: Git commit: 4c80eeece37d79f434078224a0504400ae10a20d 
> ({{HEAD}} of {{trunk}}).
>Reporter: Jesse Haber-Kucharsky
>Assignee: Kurt Greaves
>Priority: Minor
> Fix For: 3.0.16, 3.11.2, 4.0
>
>
> The standard system authorizer 
> ({{org.apache.cassandra.auth.CassandraAuthorizer}}) stores the permissions 
> granted to each user for a given resource in {{system_auth.role_permissions}}.
> A resource like the {{my_keyspace.items}} table is stored as 
> {{"data/my_keyspace/items"}} (note the {{/}} delimiter).
> Similarly, role resources (like the {{joe}} role) are stored as 
> {{"roles/joe"}}.
> The problem is that roles can be created with {{/}} in their names, which 
> confuses the authorizer when the table is queried.
> For example,
> {code}
> $ bin/cqlsh -u cassandra -p cassandra
> Connected to Test Cluster at 127.0.0.1:9042.
> [cqlsh 5.0.1 | Cassandra 4.0-SNAPSHOT | CQL spec 3.4.5 | Native protocol v4]
> Use HELP for help.
> cassandra@cqlsh> CREATE ROLE emperor;
> cassandra@cqlsh> CREATE ROLE "ki/ng";
> cassandra@cqlsh> GRANT ALTER ON ROLE "ki/ng" TO emperor;
> cassandra@cqlsh> LIST ROLES;
>  role  | super | login | options
> ---+---+---+-
>  cassandra |  True |  True |{}
>emperor | False | False |{}
>  ki/ng | False | False |{}
> (3 rows)
> cassandra@cqlsh> SELECT * FROM system_auth.role_permissions;
>  role  | resource  | permissions
> ---+---+
>emperor |   roles/ki/ng |  {'ALTER'}
>  cassandra | roles/emperor | {'ALTER', 'AUTHORIZE', 'DROP'}
>  cassandra |   roles/ki/ng | {'ALTER', 'AUTHORIZE', 'DROP'}
> (3 rows)
> cassandra@cqlsh> LIST ALL PERMISSIONS OF emperor;
> ServerError: java.lang.IllegalArgumentException: roles/ki/ng is not a valid 
> role resource name
> {code}
> Here's the backtrace from the server process:
> {code}
> ERROR [Native-Transport-Requests-1] 2017-12-01 11:07:52,811 
> QueryMessage.java:129 - Unexpected error during query
> java.lang.IllegalArgumentException: roles/ki/ng is not a valid role resource 
> name
> at 
> org.apache.cassandra.auth.RoleResource.fromName(RoleResource.java:101) 
> ~[main/:na]
> at org.apache.cassandra.auth.Resources.fromName(Resources.java:56) 
> ~[main/:na]
> at 
> org.apache.cassandra.auth.CassandraAuthorizer.listPermissionsForRole(CassandraAuthorizer.java:283)
>  ~[main/:na]
> at 
> org.apache.cassandra.auth.CassandraAuthorizer.list(CassandraAuthorizer.java:263)
>  ~[main/:na]
> at 
> org.apache.cassandra.cql3.statements.ListPermissionsStatement.list(ListPermissionsStatement.java:108)
>  ~[main/:na]
> at 
> org.apache.cassandra.cql3.statements.ListPermissionsStatement.execute(ListPermissionsStatement.java:96)
>  ~[main/:na]
> at 
> org.apache.cassandra.cql3.statements.AuthorizationStatement.execute(AuthorizationStatement.java:48)
>  ~[main/:na]
> at 
> org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:207)
>  ~[main/:na]
> at 
> org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:238) 
> ~[main/:na]
> at 
> org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:223) 
> ~[main/:na]
> at 
> org.apache.cassandra.transport.messages.QueryMessage.execute(QueryMessage.java:116)
>  ~[main/:na]
> at 
> org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:517)
>  [main/:na]
> at 
> org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:410)
>  [main/:na]
> at 
> io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
>  [netty-all-4.1.14.Final.jar:4.1.14.Final]
> at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
>  [netty-all-4.1.14.Final.jar:4.1.14.Final]
> at 
> io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:38)
>  [netty-all-4.1.14.Final.jar:4.1.14.Final]
> at 
> io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:353)
>  

[jira] [Commented] (CASSANDRA-14055) Index redistribution breaks SASI index

2017-12-07 Thread Alex Petrov (JIRA)

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

Alex Petrov commented on CASSANDRA-14055:
-

Sorry for not getting to it. I'm currently a bit overloaded with other things, 
I hope to get to it next week. If anyone has capacity for it - just assign 
yourself as a reviewer!

> Index redistribution breaks SASI index
> --
>
> Key: CASSANDRA-14055
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14055
> Project: Cassandra
>  Issue Type: Bug
>  Components: sasi
>Reporter: Ludovic Boutros
>Assignee: Ludovic Boutros
>  Labels: patch
> Fix For: 3.11.2
>
> Attachments: CASSANDRA-14055.patch, CASSANDRA-14055.patch, 
> CASSANDRA-14055.patch
>
>
> During index redistribution process, a new view is created.
> During this creation, old indexes should be released.
> But, new indexes are "attached" to the same SSTable as the old indexes.
> This leads to the deletion of the last SASI index file and breaks the index.
> The issue is in this function : 
> [https://github.com/apache/cassandra/blob/9ee44db49b13d4b4c91c9d6332ce06a6e2abf944/src/java/org/apache/cassandra/index/sasi/conf/view/View.java#L62]



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-14008) RTs at index boundaries in 2.x sstables can create unexpected CQL row in 3.x

2017-12-07 Thread Michael Shuler (JIRA)

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

Michael Shuler updated CASSANDRA-14008:
---
Fix Version/s: (was: 3.11.x)
   (was: 3.0.x)
   3.11.2
   3.0.16

> RTs at index boundaries in 2.x sstables can create unexpected CQL row in 3.x
> 
>
> Key: CASSANDRA-14008
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14008
> Project: Cassandra
>  Issue Type: Bug
>  Components: Local Write-Read Paths
>Reporter: Jeff Jirsa
>Assignee: Jeff Jirsa
>  Labels: correctness
> Fix For: 3.0.16, 3.11.2
>
>
> In 2.1/2.2, it is possible for a range tombstone that isn't a row deletion 
> and isn't a complex deletion to appear between two cells with the same 
> clustering. The 8099 legacy code incorrectly treats the two (non-RT) cells as 
> two distinct CQL rows, despite having the same clustering prefix.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-14055) Index redistribution breaks SASI index

2017-12-07 Thread Michael Shuler (JIRA)

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

Michael Shuler updated CASSANDRA-14055:
---
Fix Version/s: (was: 3.11.x)
   3.11.2

> Index redistribution breaks SASI index
> --
>
> Key: CASSANDRA-14055
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14055
> Project: Cassandra
>  Issue Type: Bug
>  Components: sasi
>Reporter: Ludovic Boutros
>Assignee: Ludovic Boutros
>  Labels: patch
> Fix For: 3.11.2
>
> Attachments: CASSANDRA-14055.patch, CASSANDRA-14055.patch, 
> CASSANDRA-14055.patch
>
>
> During index redistribution process, a new view is created.
> During this creation, old indexes should be released.
> But, new indexes are "attached" to the same SSTable as the old indexes.
> This leads to the deletion of the last SASI index file and breaks the index.
> The issue is in this function : 
> [https://github.com/apache/cassandra/blob/9ee44db49b13d4b4c91c9d6332ce06a6e2abf944/src/java/org/apache/cassandra/index/sasi/conf/view/View.java#L62]



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-14010) Fix SStable ordering by max timestamp in SinglePartitionReadCommand

2017-12-07 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer updated CASSANDRA-14010:
---
Status: Ready to Commit  (was: Patch Available)

> Fix SStable ordering by max timestamp in SinglePartitionReadCommand
> ---
>
> Key: CASSANDRA-14010
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14010
> Project: Cassandra
>  Issue Type: Bug
>  Components: Local Write-Read Paths
>Reporter: Jonathan Pellby
>Assignee: ZhaoYang
>  Labels: correctness
> Fix For: 3.0.x, 3.11.x, 4.x
>
>
> We have a test environment were we drop and create keyspaces and tables 
> several times within a short time frame. Since upgrading from 3.11.0 to 
> 3.11.1, we are seeing a lot of create statements failing. See the logs below:
> {code:java}
> 2017-11-13T14:29:20.037986449Z WARN Directory /tmp/ramdisk/commitlog doesn't 
> exist
> 2017-11-13T14:29:20.038009590Z WARN Directory /tmp/ramdisk/saved_caches 
> doesn't exist
> 2017-11-13T14:29:20.094337265Z INFO Initialized prepared statement caches 
> with 10 MB (native) and 10 MB (Thrift)
> 2017-11-13T14:29:20.805946340Z INFO Initializing system.IndexInfo
> 2017-11-13T14:29:21.934686905Z INFO Initializing system.batches
> 2017-11-13T14:29:21.973914733Z INFO Initializing system.paxos
> 2017-11-13T14:29:21.994550268Z INFO Initializing system.local
> 2017-11-13T14:29:22.014097194Z INFO Initializing system.peers
> 2017-11-13T14:29:22.124211254Z INFO Initializing system.peer_events
> 2017-11-13T14:29:22.153966833Z INFO Initializing system.range_xfers
> 2017-11-13T14:29:22.174097334Z INFO Initializing system.compaction_history
> 2017-11-13T14:29:22.194259920Z INFO Initializing system.sstable_activity
> 2017-11-13T14:29:22.210178271Z INFO Initializing system.size_estimates
> 2017-11-13T14:29:22.223836992Z INFO Initializing system.available_ranges
> 2017-11-13T14:29:22.237854207Z INFO Initializing system.transferred_ranges
> 2017-11-13T14:29:22.253995621Z INFO Initializing 
> system.views_builds_in_progress
> 2017-11-13T14:29:22.264052481Z INFO Initializing system.built_views
> 2017-11-13T14:29:22.283334779Z INFO Initializing system.hints
> 2017-11-13T14:29:22.304110311Z INFO Initializing system.batchlog
> 2017-11-13T14:29:22.318031950Z INFO Initializing system.prepared_statements
> 2017-11-13T14:29:22.326547917Z INFO Initializing system.schema_keyspaces
> 2017-11-13T14:29:22.337097407Z INFO Initializing system.schema_columnfamilies
> 2017-11-13T14:29:22.354082675Z INFO Initializing system.schema_columns
> 2017-11-13T14:29:22.384179063Z INFO Initializing system.schema_triggers
> 2017-11-13T14:29:22.394222027Z INFO Initializing system.schema_usertypes
> 2017-11-13T14:29:22.414199833Z INFO Initializing system.schema_functions
> 2017-11-13T14:29:22.427205182Z INFO Initializing system.schema_aggregates
> 2017-11-13T14:29:22.427228345Z INFO Not submitting build tasks for views in 
> keyspace system as storage service is not initialized
> 2017-11-13T14:29:22.652838866Z INFO Scheduling approximate time-check task 
> with a precision of 10 milliseconds
> 2017-11-13T14:29:22.732862906Z INFO Initializing system_schema.keyspaces
> 2017-11-13T14:29:22.746598744Z INFO Initializing system_schema.tables
> 2017-11-13T14:29:22.759649011Z INFO Initializing system_schema.columns
> 2017-11-13T14:29:22.766245435Z INFO Initializing system_schema.triggers
> 2017-11-13T14:29:22.778716809Z INFO Initializing system_schema.dropped_columns
> 2017-11-13T14:29:22.791369819Z INFO Initializing system_schema.views
> 2017-11-13T14:29:22.839141724Z INFO Initializing system_schema.types
> 2017-11-13T14:29:22.852911976Z INFO Initializing system_schema.functions
> 2017-11-13T14:29:22.852938112Z INFO Initializing system_schema.aggregates
> 2017-11-13T14:29:22.869348526Z INFO Initializing system_schema.indexes
> 2017-11-13T14:29:22.874178682Z INFO Not submitting build tasks for views in 
> keyspace system_schema as storage service is not initialized
> 2017-11-13T14:29:23.700250435Z INFO Initializing key cache with capacity of 
> 25 MBs.
> 2017-11-13T14:29:23.724357053Z INFO Initializing row cache with capacity of 0 
> MBs
> 2017-11-13T14:29:23.724383599Z INFO Initializing counter cache with capacity 
> of 12 MBs
> 2017-11-13T14:29:23.724386906Z INFO Scheduling counter cache save to every 
> 7200 seconds (going to save all keys).
> 2017-11-13T14:29:23.984408710Z INFO Populating token metadata from system 
> tables
> 2017-11-13T14:29:24.032687075Z INFO Global buffer pool is enabled, when pool 
> is exhausted (max is 125.000MiB) it will allocate on heap
> 2017-11-13T14:29:24.214123695Z INFO Token metadata:
> 2017-11-13T14:29:24.304218769Z INFO Completed loading (14 ms; 8 keys) 
> KeyCache cache
> 2017-11-13T14:29:24.363978406Z INFO No 

[jira] [Commented] (CASSANDRA-12814) Batch read requests to same physical host

2017-12-07 Thread Dikang Gu (JIRA)

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

Dikang Gu commented on CASSANDRA-12814:
---

FYI, I start to work on this and test in our internal env. In high level, my 
current approach is to introduce a MultiReadCommand, so that StorageProxy will 
group individual read commands belong to the same physical data node together, 
into one MultiReadCommand and send to the data node. 

> Batch read requests to same physical host
> -
>
> Key: CASSANDRA-12814
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12814
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Coordination
>Reporter: Dikang Gu
>Assignee: Dikang Gu
>  Labels: performance
>
> We have couple use cases that are doing fanout read for their data, means one 
> single read request from client contains multiple keys which live on 
> different physical hosts. (I know it's not recommended way to access C*).
> Right now, on the coordinator, it will issue separate read commands even 
> though they will go to the same physical host, which I think is causing a lot 
> of overheads.
> I think it's valuable to provide a new read command, that coordinator can 
> batch the reads to one datanode, and send to it in one message, and datanode 
> will return the results for all keys belong to it.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-9375) force minumum timeout value

2017-12-07 Thread Jeff Jirsa (JIRA)

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

Jeff Jirsa commented on CASSANDRA-9375:
---

Ninja fixed as 
[32287169fc483f2959259cacc4c5a72a85ea381c|https://github.com/apache/cassandra/commit/32287169fc483f2959259cacc4c5a72a85ea381c]

> force minumum timeout value 
> 
>
> Key: CASSANDRA-9375
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9375
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Brandon Williams
>Assignee: Varun Barala
>Priority: Trivial
>  Labels: patch
> Fix For: 4.0
>
> Attachments: CASSANDRA-9375.patch, CASSANDRA-9375_after_review, 
> CASSANDRA-9375_after_review_2.patch
>
>
> Granted, this is a nonsensical setting, but the error message makes it tough 
> to discern what's wrong:
> {noformat}
> ERROR 17:13:28,726 Exception encountered during startup
> java.lang.ExceptionInInitializerError
>  at 
> org.apache.cassandra.net.MessagingService.instance(MessagingService.java:310)
>  at 
> org.apache.cassandra.service.StorageService.(StorageService.java:233)
>  at 
> org.apache.cassandra.service.StorageService.(StorageService.java:141)
>  at 
> org.apache.cassandra.locator.DynamicEndpointSnitch.(DynamicEndpointSnitch.java:87)
>  at 
> org.apache.cassandra.locator.DynamicEndpointSnitch.(DynamicEndpointSnitch.java:63)
>  at 
> org.apache.cassandra.config.DatabaseDescriptor.createEndpointSnitch(DatabaseDescriptor.java:518)
>  at 
> org.apache.cassandra.config.DatabaseDescriptor.applyConfig(DatabaseDescriptor.java:350)
>  at 
> org.apache.cassandra.config.DatabaseDescriptor.(DatabaseDescriptor.java:112)
>  at 
> org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:213)
>  at 
> org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:567)
>  at 
> org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:656)
> Caused by: java.lang.IllegalArgumentException
>  at 
> java.util.concurrent.ScheduledThreadPoolExecutor.scheduleWithFixedDelay(ScheduledThreadPoolExecutor.java:586)
>  at 
> org.apache.cassandra.concurrent.DebuggableScheduledThreadPoolExecutor.scheduleWithFixedDelay(DebuggableScheduledThreadPoolExecutor.java:64)
>  at org.apache.cassandra.utils.ExpiringMap.(ExpiringMap.java:103)
>  at 
> org.apache.cassandra.net.MessagingService.(MessagingService.java:360)
>  at org.apache.cassandra.net.MessagingService.(MessagingService.java:68)
>  at 
> org.apache.cassandra.net.MessagingService$MSHandle.(MessagingService.java:306)
>  ... 11 more
> java.lang.ExceptionInInitializerError
>  at 
> org.apache.cassandra.net.MessagingService.instance(MessagingService.java:310)
>  at 
> org.apache.cassandra.service.StorageService.(StorageService.java:233)
>  at 
> org.apache.cassandra.service.StorageService.(StorageService.java:141)
>  at 
> org.apache.cassandra.locator.DynamicEndpointSnitch.(DynamicEndpointSnitch.java:87)
>  at 
> org.apache.cassandra.locator.DynamicEndpointSnitch.(DynamicEndpointSnitch.java:63)
>  at 
> org.apache.cassandra.config.DatabaseDescriptor.createEndpointSnitch(DatabaseDescriptor.java:518)
>  at 
> org.apache.cassandra.config.DatabaseDescriptor.applyConfig(DatabaseDescriptor.java:350)
>  at 
> org.apache.cassandra.config.DatabaseDescriptor.(DatabaseDescriptor.java:112)
>  at 
> org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:213)
>  at 
> org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:567)
>  at 
> org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:656)
> Caused by: java.lang.IllegalArgumentException
>  at 
> java.util.concurrent.ScheduledThreadPoolExecutor.scheduleWithFixedDelay(ScheduledThreadPoolExecutor.java:586)
>  at 
> org.apache.cassandra.concurrent.DebuggableScheduledThreadPoolExecutor.scheduleWithFixedDelay(DebuggableScheduledThreadPoolExecutor.java:64)
>  at org.apache.cassandra.utils.ExpiringMap.(ExpiringMap.java:103)
>  at 
> org.apache.cassandra.net.MessagingService.(MessagingService.java:360)
>  at org.apache.cassandra.net.MessagingService.(MessagingService.java:68)
>  at 
> org.apache.cassandra.net.MessagingService$MSHandle.(MessagingService.java:306)
>  ... 11 more
> Exception encountered during startup: null
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



cassandra git commit: Ninja: Fix incorrect value from CASSANDRA-9375

2017-12-07 Thread jjirsa
Repository: cassandra
Updated Branches:
  refs/heads/trunk cb56d9fc3 -> 32287169f


Ninja: Fix incorrect value from CASSANDRA-9375


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

Branch: refs/heads/trunk
Commit: 32287169fc483f2959259cacc4c5a72a85ea381c
Parents: cb56d9f
Author: Jeff Jirsa 
Authored: Thu Dec 7 10:55:03 2017 -0800
Committer: Jeff Jirsa 
Committed: Thu Dec 7 10:55:03 2017 -0800

--
 src/java/org/apache/cassandra/config/DatabaseDescriptor.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/32287169/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
--
diff --git a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java 
b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index acfd60f..807f082 100644
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@ -916,7 +916,7 @@ public class DatabaseDescriptor
 
 if(conf.counter_write_request_timeout_in_ms < LOWEST_ACCEPTED_TIMEOUT)
 {
-   logInfo("counter_write_request_timeout_in_ms", 
conf.counter_cache_keys_to_save, LOWEST_ACCEPTED_TIMEOUT);
+   logInfo("counter_write_request_timeout_in_ms", 
conf.counter_write_request_timeout_in_ms, LOWEST_ACCEPTED_TIMEOUT);
conf.counter_write_request_timeout_in_ms = LOWEST_ACCEPTED_TIMEOUT;
 }
 


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Created] (CASSANDRA-14101) By default, start native disable thrift.

2017-12-07 Thread Alain RODRIGUEZ (JIRA)
Alain RODRIGUEZ created CASSANDRA-14101:
---

 Summary: By default, start native disable thrift.
 Key: CASSANDRA-14101
 URL: https://issues.apache.org/jira/browse/CASSANDRA-14101
 Project: Cassandra
  Issue Type: Bug
  Components: Configuration
Reporter: Alain RODRIGUEZ
Priority: Minor


I noticed today that the default for {{start_native_transport}} is {{false}} 
and {{start_rpc}} is set to {{true}}.

I think it would be good to be coherent here, so someone commenting or dropping 
this option from the configuration file would not disable the native protocol.

For {{start_rpc}}:

https://github.com/apache/cassandra/blob/cassandra-3.11.1/src/java/org/apache/cassandra/config/Config.java#L136
 

https://github.com/apache/cassandra/blob/cassandra-3.11.1/conf/cassandra.yaml#L662

Should probably converge to {{false}}.

For {{start_native_transport}}:

https://github.com/apache/cassandra/blob/cassandra-3.11.1/src/java/org/apache/cassandra/config/Config.java#L152

https://github.com/apache/cassandra/blob/cassandra-3.11.1/conf/cassandra.yaml#L630

Should probably converge to {{true}}.

I think this is like this since C* 1.2.5 (default {{start_native_transport}} 
was changed in {{cassandra.yaml}}, but not in {{Config.java}}), and it is still 
'wrong' in the latest versions such as Cassandra 3.11.1.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Resolved] (CASSANDRA-14101) By default, start native disable thrift.

2017-12-07 Thread Alain RODRIGUEZ (JIRA)

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

Alain RODRIGUEZ resolved CASSANDRA-14101.
-
Resolution: Duplicate

> By default, start native disable thrift.
> 
>
> Key: CASSANDRA-14101
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14101
> Project: Cassandra
>  Issue Type: Bug
>  Components: Configuration
>Reporter: Alain RODRIGUEZ
>Priority: Minor
>
> I noticed today that the default for {{start_native_transport}} is {{false}} 
> and {{start_rpc}} is set to {{true}}.
> I think it would be good to be coherent here, so someone commenting or 
> dropping this option from the configuration file would not disable the native 
> protocol.
> For {{start_rpc}}:
> https://github.com/apache/cassandra/blob/cassandra-3.11.1/src/java/org/apache/cassandra/config/Config.java#L136
>  
> https://github.com/apache/cassandra/blob/cassandra-3.11.1/conf/cassandra.yaml#L662
> Should probably converge to {{false}}.
> For {{start_native_transport}}:
> https://github.com/apache/cassandra/blob/cassandra-3.11.1/src/java/org/apache/cassandra/config/Config.java#L152
> https://github.com/apache/cassandra/blob/cassandra-3.11.1/conf/cassandra.yaml#L630
> Should probably converge to {{true}}.
> I think this is like this since C* 1.2.5 (default {{start_native_transport}} 
> was changed in {{cassandra.yaml}}, but not in {{Config.java}}), and it is 
> still 'wrong' in the latest versions such as Cassandra 3.11.1.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-14101) By default, start native disable thrift.

2017-12-07 Thread Alain RODRIGUEZ (JIRA)

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

Alain RODRIGUEZ commented on CASSANDRA-14101:
-

Ah just noticed CASSANDRA-13656.

My bad, I checked up to 3.11.1 and it appears to be fixed in the trunk (4.0+).

> By default, start native disable thrift.
> 
>
> Key: CASSANDRA-14101
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14101
> Project: Cassandra
>  Issue Type: Bug
>  Components: Configuration
>Reporter: Alain RODRIGUEZ
>Priority: Minor
>
> I noticed today that the default for {{start_native_transport}} is {{false}} 
> and {{start_rpc}} is set to {{true}}.
> I think it would be good to be coherent here, so someone commenting or 
> dropping this option from the configuration file would not disable the native 
> protocol.
> For {{start_rpc}}:
> https://github.com/apache/cassandra/blob/cassandra-3.11.1/src/java/org/apache/cassandra/config/Config.java#L136
>  
> https://github.com/apache/cassandra/blob/cassandra-3.11.1/conf/cassandra.yaml#L662
> Should probably converge to {{false}}.
> For {{start_native_transport}}:
> https://github.com/apache/cassandra/blob/cassandra-3.11.1/src/java/org/apache/cassandra/config/Config.java#L152
> https://github.com/apache/cassandra/blob/cassandra-3.11.1/conf/cassandra.yaml#L630
> Should probably converge to {{true}}.
> I think this is like this since C* 1.2.5 (default {{start_native_transport}} 
> was changed in {{cassandra.yaml}}, but not in {{Config.java}}), and it is 
> still 'wrong' in the latest versions such as Cassandra 3.11.1.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-14055) Index redistribution breaks SASI index

2017-12-07 Thread Ludovic Boutros (JIRA)

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

Ludovic Boutros commented on CASSANDRA-14055:
-

Any news on this ? We are currently using the patch in production, but that 
would be better to use an official version of C* :). 

[~ifesdjeen], do you need some help ?


> Index redistribution breaks SASI index
> --
>
> Key: CASSANDRA-14055
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14055
> Project: Cassandra
>  Issue Type: Bug
>  Components: sasi
>Reporter: Ludovic Boutros
>Assignee: Ludovic Boutros
>  Labels: patch
> Fix For: 3.11.x
>
> Attachments: CASSANDRA-14055.patch, CASSANDRA-14055.patch, 
> CASSANDRA-14055.patch
>
>
> During index redistribution process, a new view is created.
> During this creation, old indexes should be released.
> But, new indexes are "attached" to the same SSTable as the old indexes.
> This leads to the deletion of the last SASI index file and breaks the index.
> The issue is in this function : 
> [https://github.com/apache/cassandra/blob/9ee44db49b13d4b4c91c9d6332ce06a6e2abf944/src/java/org/apache/cassandra/index/sasi/conf/view/View.java#L62]



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-13526) nodetool cleanup on KS with no replicas should remove old data, not silently complete

2017-12-07 Thread ZhaoYang (JIRA)

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

ZhaoYang commented on CASSANDRA-13526:
--

Thanks for reviewing

> nodetool cleanup on KS with no replicas should remove old data, not silently 
> complete
> -
>
> Key: CASSANDRA-13526
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13526
> Project: Cassandra
>  Issue Type: Bug
>  Components: Compaction
>Reporter: Jeff Jirsa
>Assignee: ZhaoYang
>  Labels: usability
> Fix For: 3.0.16, 3.11.2, 4.0
>
>
> From the user list:
> https://lists.apache.org/thread.html/5d49cc6bbc6fd2e5f8b12f2308a3e24212a55afbb441af5cb8cd4167@%3Cuser.cassandra.apache.org%3E
> If you have a multi-dc cluster, but some keyspaces not replicated to a given 
> DC, you'll be unable to run cleanup on those keyspaces in that DC, because 
> [the cleanup code will see no ranges and exit 
> early|https://github.com/apache/cassandra/blob/4cfaf85/src/java/org/apache/cassandra/db/compaction/CompactionManager.java#L427-L441]



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-3200) Repair: compare all trees together (for a given range/cf) instead of by pair in isolation

2017-12-07 Thread Marcus Eriksson (JIRA)

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

Marcus Eriksson updated CASSANDRA-3200:
---
   Resolution: Fixed
Fix Version/s: (was: 4.x)
   4.0
   Status: Resolved  (was: Ready to Commit)

and committed as {{cb56d9fc3c773abbefa2044ce41ddbfb7717e0cb}}

> Repair: compare all trees together (for a given range/cf) instead of by pair 
> in isolation
> -
>
> Key: CASSANDRA-3200
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3200
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Sylvain Lebresne
>Assignee: Marcus Eriksson
>Priority: Minor
>  Labels: repair
> Fix For: 4.0
>
>
> Currently, repair compare merkle trees by pair, in isolation of any other 
> tree. What that means concretely is that if I have three node A, B and C 
> (RF=3) with A and B in sync, but C having some range r inconsitent with both 
> A and B (since those are consistent), we will do the following transfer of r: 
> A -> C, C -> A, B -> C, C -> B.
> The fact that we do both A -> C and C -> A is fine, because we cannot know 
> which one is more to date from A or C. However, the transfer B -> C is 
> useless provided we do A -> C if A and B are in sync. Not doing that transfer 
> will be a 25% improvement in that case. With RF=5 and only one node 
> inconsistent with all the others, that almost a 40% improvement, etc...
> Given that this situation of one node not in sync while the others are is 
> probably fairly common (one node died so it is behind), this could be a fair 
> improvement over what is transferred. In the case where we use repair to 
> rebuild completely a node, this will be a dramatic improvement, because it 
> will avoid the rebuilded node to get RF times the data it should get.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[2/2] cassandra git commit: Add option to optimize Merkle tree comparison across replicas

2017-12-07 Thread marcuse
Add option to optimize Merkle tree comparison across replicas

Patch by marcuse; reviewed by Blake Eggleston for CASSANDRA-3200


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

Branch: refs/heads/trunk
Commit: cb56d9fc3c773abbefa2044ce41ddbfb7717e0cb
Parents: a6f3983
Author: Marcus Eriksson 
Authored: Thu Dec 7 13:55:44 2017 +0100
Committer: Marcus Eriksson 
Committed: Thu Dec 7 13:55:56 2017 +0100

--
 CHANGES.txt |   1 +
 NEWS.txt|   4 +
 .../repair/AsymmetricLocalSyncTask.java | 105 +
 .../repair/AsymmetricRemoteSyncTask.java|  60 +++
 .../cassandra/repair/AsymmetricSyncTask.java|  85 
 .../repair/CompletableRemoteSyncTask.java   |  28 ++
 .../apache/cassandra/repair/LocalSyncTask.java  |   1 -
 .../apache/cassandra/repair/RemoteSyncTask.java |   2 +-
 .../org/apache/cassandra/repair/RepairJob.java  | 137 --
 .../repair/RepairMessageVerbHandler.java|  24 +-
 .../apache/cassandra/repair/RepairRunnable.java |   1 +
 .../apache/cassandra/repair/RepairSession.java  |  12 +-
 .../cassandra/repair/StreamingRepairTask.java   |  36 +-
 .../repair/asymmetric/DifferenceHolder.java |  98 +
 .../repair/asymmetric/HostDifferences.java  |  83 
 .../asymmetric/IncomingRepairStreamTracker.java |  81 
 .../repair/asymmetric/PreferedNodeFilter.java   |  27 ++
 .../repair/asymmetric/RangeDenormalizer.java| 125 ++
 .../repair/asymmetric/ReduceHelper.java | 137 ++
 .../repair/asymmetric/StreamFromOptions.java| 109 +
 .../repair/messages/AsymmetricSyncRequest.java  | 132 ++
 .../repair/messages/RepairMessage.java  |   3 +-
 .../cassandra/repair/messages/RepairOption.java |  24 +-
 .../cassandra/service/ActiveRepairService.java  |   4 +-
 .../apache/cassandra/tools/nodetool/Repair.java |   6 +-
 .../cassandra/repair/LocalSyncTaskTest.java |   2 +-
 .../cassandra/repair/RepairSessionTest.java |   2 +-
 .../repair/StreamingRepairTaskTest.java |   5 +-
 .../repair/asymmetric/DifferenceHolderTest.java | 106 +
 .../asymmetric/RangeDenormalizerTest.java   |  86 
 .../repair/asymmetric/ReduceHelperTest.java | 425 +++
 .../asymmetric/StreamFromOptionsTest.java   | 124 ++
 .../apache/cassandra/utils/MerkleTreesTest.java |   2 +-
 33 files changed, 2013 insertions(+), 64 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/cb56d9fc/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 34af97d..ef414b9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 4.0
+ * Add option to optimise merkle tree comparison across replicas 
(CASSANDRA-3200)
  * Remove unused and deprecated methods from AbstractCompactionStrategy 
(CASSANDRA-14081)
  * Fix Distribution.average in cassandra-stress (CASSANDRA-14090)
  * Support a means of logging all queries as they were invoked 
(CASSANDRA-13983)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/cb56d9fc/NEWS.txt
--
diff --git a/NEWS.txt b/NEWS.txt
index a14f7ba..43f57f2 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -18,6 +18,10 @@ using the provided 'sstableupgrade' tool.
 
 New features
 
+   - An experimental option to compare all merkle trees together has been 
added - for example, in
+ a 3 node cluster with 2 replicas identical and 1 out-of-date, with this 
option enabled, the
+ out-of-date replica will only stream a single copy from up-to-date 
replica. Enable it by adding
+ "-os" to nodetool repair. See CASSANDRA-3200.
- The currentTimestamp, currentDate, currentTime and currentTimeUUID 
functions have been added.
  See CASSANDRA-13132
- Support for arithmetic operations between `timestamp`/`date` and 
`duration` has been added.

http://git-wip-us.apache.org/repos/asf/cassandra/blob/cb56d9fc/src/java/org/apache/cassandra/repair/AsymmetricLocalSyncTask.java
--
diff --git a/src/java/org/apache/cassandra/repair/AsymmetricLocalSyncTask.java 
b/src/java/org/apache/cassandra/repair/AsymmetricLocalSyncTask.java
new file mode 100644
index 000..5464520
--- /dev/null
+++ b/src/java/org/apache/cassandra/repair/AsymmetricLocalSyncTask.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this 

[1/2] cassandra git commit: Add option to optimize Merkle tree comparison across replicas

2017-12-07 Thread marcuse
Repository: cassandra
Updated Branches:
  refs/heads/trunk a6f39834b -> cb56d9fc3


http://git-wip-us.apache.org/repos/asf/cassandra/blob/cb56d9fc/test/unit/org/apache/cassandra/repair/RepairSessionTest.java
--
diff --git a/test/unit/org/apache/cassandra/repair/RepairSessionTest.java 
b/test/unit/org/apache/cassandra/repair/RepairSessionTest.java
index efae538..984218d 100644
--- a/test/unit/org/apache/cassandra/repair/RepairSessionTest.java
+++ b/test/unit/org/apache/cassandra/repair/RepairSessionTest.java
@@ -66,7 +66,7 @@ public class RepairSessionTest
 RepairSession session = new RepairSession(parentSessionId, sessionId, 
Arrays.asList(repairRange),
   "Keyspace1", 
RepairParallelism.SEQUENTIAL,
   endpoints, false, false, 
false,
-  PreviewKind.NONE, 
"Standard1");
+  PreviewKind.NONE, false, 
"Standard1");
 
 // perform convict
 session.convict(remote, Double.MAX_VALUE);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/cb56d9fc/test/unit/org/apache/cassandra/repair/StreamingRepairTaskTest.java
--
diff --git a/test/unit/org/apache/cassandra/repair/StreamingRepairTaskTest.java 
b/test/unit/org/apache/cassandra/repair/StreamingRepairTaskTest.java
index f433f2e..f0ff0e0 100644
--- a/test/unit/org/apache/cassandra/repair/StreamingRepairTaskTest.java
+++ b/test/unit/org/apache/cassandra/repair/StreamingRepairTaskTest.java
@@ -65,8 +65,9 @@ public class StreamingRepairTaskTest extends 
AbstractRepairTest
 UUID sessionID = registerSession(cfs, true, true);
 ActiveRepairService.ParentRepairSession prs = 
ActiveRepairService.instance.getParentRepairSession(sessionID);
 RepairJobDesc desc = new RepairJobDesc(sessionID, 
UUIDGen.getTimeUUID(), ks, tbl, prs.getRanges());
+
 SyncRequest request = new SyncRequest(desc, PARTICIPANT1, 
PARTICIPANT2, PARTICIPANT3, prs.getRanges(), PreviewKind.NONE);
-StreamingRepairTask task = new StreamingRepairTask(desc, request, 
desc.sessionId, PreviewKind.NONE);
+StreamingRepairTask task = new StreamingRepairTask(desc, 
request.initiator, request.src, request.dst, request.ranges, desc.sessionId, 
PreviewKind.NONE, false);
 
 StreamPlan plan = task.createStreamPlan(request.src, request.dst);
 Assert.assertFalse(plan.getFlushBeforeTransfer());
@@ -79,7 +80,7 @@ public class StreamingRepairTaskTest extends 
AbstractRepairTest
 ActiveRepairService.ParentRepairSession prs = 
ActiveRepairService.instance.getParentRepairSession(sessionID);
 RepairJobDesc desc = new RepairJobDesc(sessionID, 
UUIDGen.getTimeUUID(), ks, tbl, prs.getRanges());
 SyncRequest request = new SyncRequest(desc, PARTICIPANT1, 
PARTICIPANT2, PARTICIPANT3, prs.getRanges(), PreviewKind.NONE);
-StreamingRepairTask task = new StreamingRepairTask(desc, request, 
null, PreviewKind.NONE);
+StreamingRepairTask task = new StreamingRepairTask(desc, 
request.initiator, request.src, request.dst, request.ranges, null, 
PreviewKind.NONE, false);
 
 StreamPlan plan = task.createStreamPlan(request.src, request.dst);
 Assert.assertTrue(plan.getFlushBeforeTransfer());

http://git-wip-us.apache.org/repos/asf/cassandra/blob/cb56d9fc/test/unit/org/apache/cassandra/repair/asymmetric/DifferenceHolderTest.java
--
diff --git 
a/test/unit/org/apache/cassandra/repair/asymmetric/DifferenceHolderTest.java 
b/test/unit/org/apache/cassandra/repair/asymmetric/DifferenceHolderTest.java
new file mode 100644
index 000..52a43e6
--- /dev/null
+++ b/test/unit/org/apache/cassandra/repair/asymmetric/DifferenceHolderTest.java
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.cassandra.repair.asymmetric;
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.Iterator;
+
+import 

[jira] [Commented] (CASSANDRA-3200) Repair: compare all trees together (for a given range/cf) instead of by pair in isolation

2017-12-07 Thread Marcus Eriksson (JIRA)

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

Marcus Eriksson commented on CASSANDRA-3200:


the tests keep dying, but I've rerun the suspicious ones from the successful 
run above locally and they pass without problem, I'll get this committed

> Repair: compare all trees together (for a given range/cf) instead of by pair 
> in isolation
> -
>
> Key: CASSANDRA-3200
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3200
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Sylvain Lebresne
>Assignee: Marcus Eriksson
>Priority: Minor
>  Labels: repair
> Fix For: 4.x
>
>
> Currently, repair compare merkle trees by pair, in isolation of any other 
> tree. What that means concretely is that if I have three node A, B and C 
> (RF=3) with A and B in sync, but C having some range r inconsitent with both 
> A and B (since those are consistent), we will do the following transfer of r: 
> A -> C, C -> A, B -> C, C -> B.
> The fact that we do both A -> C and C -> A is fine, because we cannot know 
> which one is more to date from A or C. However, the transfer B -> C is 
> useless provided we do A -> C if A and B are in sync. Not doing that transfer 
> will be a 25% improvement in that case. With RF=5 and only one node 
> inconsistent with all the others, that almost a 40% improvement, etc...
> Given that this situation of one node not in sync while the others are is 
> probably fairly common (one node died so it is behind), this could be a fair 
> improvement over what is transferred. In the case where we use repair to 
> rebuild completely a node, this will be a dramatic improvement, because it 
> will avoid the rebuilded node to get RF times the data it should get.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Comment Edited] (CASSANDRA-14010) Fix SStable ordering by max timestamp in SinglePartitionReadCommand

2017-12-07 Thread ZhaoYang (JIRA)

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

ZhaoYang edited comment on CASSANDRA-14010 at 12/7/17 10:05 AM:


Thanks for the review.. fix nits and restarted CI.  CI looks good.


was (Author: jasonstack):
Thanks for the review.. fix nits and restarted CI.

> Fix SStable ordering by max timestamp in SinglePartitionReadCommand
> ---
>
> Key: CASSANDRA-14010
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14010
> Project: Cassandra
>  Issue Type: Bug
>  Components: Local Write-Read Paths
>Reporter: Jonathan Pellby
>Assignee: ZhaoYang
>  Labels: correctness
> Fix For: 3.0.x, 3.11.x, 4.x
>
>
> We have a test environment were we drop and create keyspaces and tables 
> several times within a short time frame. Since upgrading from 3.11.0 to 
> 3.11.1, we are seeing a lot of create statements failing. See the logs below:
> {code:java}
> 2017-11-13T14:29:20.037986449Z WARN Directory /tmp/ramdisk/commitlog doesn't 
> exist
> 2017-11-13T14:29:20.038009590Z WARN Directory /tmp/ramdisk/saved_caches 
> doesn't exist
> 2017-11-13T14:29:20.094337265Z INFO Initialized prepared statement caches 
> with 10 MB (native) and 10 MB (Thrift)
> 2017-11-13T14:29:20.805946340Z INFO Initializing system.IndexInfo
> 2017-11-13T14:29:21.934686905Z INFO Initializing system.batches
> 2017-11-13T14:29:21.973914733Z INFO Initializing system.paxos
> 2017-11-13T14:29:21.994550268Z INFO Initializing system.local
> 2017-11-13T14:29:22.014097194Z INFO Initializing system.peers
> 2017-11-13T14:29:22.124211254Z INFO Initializing system.peer_events
> 2017-11-13T14:29:22.153966833Z INFO Initializing system.range_xfers
> 2017-11-13T14:29:22.174097334Z INFO Initializing system.compaction_history
> 2017-11-13T14:29:22.194259920Z INFO Initializing system.sstable_activity
> 2017-11-13T14:29:22.210178271Z INFO Initializing system.size_estimates
> 2017-11-13T14:29:22.223836992Z INFO Initializing system.available_ranges
> 2017-11-13T14:29:22.237854207Z INFO Initializing system.transferred_ranges
> 2017-11-13T14:29:22.253995621Z INFO Initializing 
> system.views_builds_in_progress
> 2017-11-13T14:29:22.264052481Z INFO Initializing system.built_views
> 2017-11-13T14:29:22.283334779Z INFO Initializing system.hints
> 2017-11-13T14:29:22.304110311Z INFO Initializing system.batchlog
> 2017-11-13T14:29:22.318031950Z INFO Initializing system.prepared_statements
> 2017-11-13T14:29:22.326547917Z INFO Initializing system.schema_keyspaces
> 2017-11-13T14:29:22.337097407Z INFO Initializing system.schema_columnfamilies
> 2017-11-13T14:29:22.354082675Z INFO Initializing system.schema_columns
> 2017-11-13T14:29:22.384179063Z INFO Initializing system.schema_triggers
> 2017-11-13T14:29:22.394222027Z INFO Initializing system.schema_usertypes
> 2017-11-13T14:29:22.414199833Z INFO Initializing system.schema_functions
> 2017-11-13T14:29:22.427205182Z INFO Initializing system.schema_aggregates
> 2017-11-13T14:29:22.427228345Z INFO Not submitting build tasks for views in 
> keyspace system as storage service is not initialized
> 2017-11-13T14:29:22.652838866Z INFO Scheduling approximate time-check task 
> with a precision of 10 milliseconds
> 2017-11-13T14:29:22.732862906Z INFO Initializing system_schema.keyspaces
> 2017-11-13T14:29:22.746598744Z INFO Initializing system_schema.tables
> 2017-11-13T14:29:22.759649011Z INFO Initializing system_schema.columns
> 2017-11-13T14:29:22.766245435Z INFO Initializing system_schema.triggers
> 2017-11-13T14:29:22.778716809Z INFO Initializing system_schema.dropped_columns
> 2017-11-13T14:29:22.791369819Z INFO Initializing system_schema.views
> 2017-11-13T14:29:22.839141724Z INFO Initializing system_schema.types
> 2017-11-13T14:29:22.852911976Z INFO Initializing system_schema.functions
> 2017-11-13T14:29:22.852938112Z INFO Initializing system_schema.aggregates
> 2017-11-13T14:29:22.869348526Z INFO Initializing system_schema.indexes
> 2017-11-13T14:29:22.874178682Z INFO Not submitting build tasks for views in 
> keyspace system_schema as storage service is not initialized
> 2017-11-13T14:29:23.700250435Z INFO Initializing key cache with capacity of 
> 25 MBs.
> 2017-11-13T14:29:23.724357053Z INFO Initializing row cache with capacity of 0 
> MBs
> 2017-11-13T14:29:23.724383599Z INFO Initializing counter cache with capacity 
> of 12 MBs
> 2017-11-13T14:29:23.724386906Z INFO Scheduling counter cache save to every 
> 7200 seconds (going to save all keys).
> 2017-11-13T14:29:23.984408710Z INFO Populating token metadata from system 
> tables
> 2017-11-13T14:29:24.032687075Z INFO Global buffer pool is enabled, when pool 
> is exhausted (max is 125.000MiB) it will allocate on heap
> 

[jira] [Commented] (CASSANDRA-9375) force minumum timeout value

2017-12-07 Thread Varun Barala (JIRA)

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

Varun Barala commented on CASSANDRA-9375:
-

Ohh yes. Shall I open new ticket for this? I'll fix it. Thanks!!

> force minumum timeout value 
> 
>
> Key: CASSANDRA-9375
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9375
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Brandon Williams
>Assignee: Varun Barala
>Priority: Trivial
>  Labels: patch
> Fix For: 4.0
>
> Attachments: CASSANDRA-9375.patch, CASSANDRA-9375_after_review, 
> CASSANDRA-9375_after_review_2.patch
>
>
> Granted, this is a nonsensical setting, but the error message makes it tough 
> to discern what's wrong:
> {noformat}
> ERROR 17:13:28,726 Exception encountered during startup
> java.lang.ExceptionInInitializerError
>  at 
> org.apache.cassandra.net.MessagingService.instance(MessagingService.java:310)
>  at 
> org.apache.cassandra.service.StorageService.(StorageService.java:233)
>  at 
> org.apache.cassandra.service.StorageService.(StorageService.java:141)
>  at 
> org.apache.cassandra.locator.DynamicEndpointSnitch.(DynamicEndpointSnitch.java:87)
>  at 
> org.apache.cassandra.locator.DynamicEndpointSnitch.(DynamicEndpointSnitch.java:63)
>  at 
> org.apache.cassandra.config.DatabaseDescriptor.createEndpointSnitch(DatabaseDescriptor.java:518)
>  at 
> org.apache.cassandra.config.DatabaseDescriptor.applyConfig(DatabaseDescriptor.java:350)
>  at 
> org.apache.cassandra.config.DatabaseDescriptor.(DatabaseDescriptor.java:112)
>  at 
> org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:213)
>  at 
> org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:567)
>  at 
> org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:656)
> Caused by: java.lang.IllegalArgumentException
>  at 
> java.util.concurrent.ScheduledThreadPoolExecutor.scheduleWithFixedDelay(ScheduledThreadPoolExecutor.java:586)
>  at 
> org.apache.cassandra.concurrent.DebuggableScheduledThreadPoolExecutor.scheduleWithFixedDelay(DebuggableScheduledThreadPoolExecutor.java:64)
>  at org.apache.cassandra.utils.ExpiringMap.(ExpiringMap.java:103)
>  at 
> org.apache.cassandra.net.MessagingService.(MessagingService.java:360)
>  at org.apache.cassandra.net.MessagingService.(MessagingService.java:68)
>  at 
> org.apache.cassandra.net.MessagingService$MSHandle.(MessagingService.java:306)
>  ... 11 more
> java.lang.ExceptionInInitializerError
>  at 
> org.apache.cassandra.net.MessagingService.instance(MessagingService.java:310)
>  at 
> org.apache.cassandra.service.StorageService.(StorageService.java:233)
>  at 
> org.apache.cassandra.service.StorageService.(StorageService.java:141)
>  at 
> org.apache.cassandra.locator.DynamicEndpointSnitch.(DynamicEndpointSnitch.java:87)
>  at 
> org.apache.cassandra.locator.DynamicEndpointSnitch.(DynamicEndpointSnitch.java:63)
>  at 
> org.apache.cassandra.config.DatabaseDescriptor.createEndpointSnitch(DatabaseDescriptor.java:518)
>  at 
> org.apache.cassandra.config.DatabaseDescriptor.applyConfig(DatabaseDescriptor.java:350)
>  at 
> org.apache.cassandra.config.DatabaseDescriptor.(DatabaseDescriptor.java:112)
>  at 
> org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:213)
>  at 
> org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:567)
>  at 
> org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:656)
> Caused by: java.lang.IllegalArgumentException
>  at 
> java.util.concurrent.ScheduledThreadPoolExecutor.scheduleWithFixedDelay(ScheduledThreadPoolExecutor.java:586)
>  at 
> org.apache.cassandra.concurrent.DebuggableScheduledThreadPoolExecutor.scheduleWithFixedDelay(DebuggableScheduledThreadPoolExecutor.java:64)
>  at org.apache.cassandra.utils.ExpiringMap.(ExpiringMap.java:103)
>  at 
> org.apache.cassandra.net.MessagingService.(MessagingService.java:360)
>  at org.apache.cassandra.net.MessagingService.(MessagingService.java:68)
>  at 
> org.apache.cassandra.net.MessagingService$MSHandle.(MessagingService.java:306)
>  ... 11 more
> Exception encountered during startup: null
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-9375) force minumum timeout value

2017-12-07 Thread ZhaoYang (JIRA)

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

ZhaoYang commented on CASSANDRA-9375:
-

There seems to be a mismatch : {{counter_cache_keys_to_save}}

{code}
if(conf.counter_write_request_timeout_in_ms < LOWEST_ACCEPTED_TIMEOUT)
{
   logInfo("counter_write_request_timeout_in_ms", 
conf.counter_cache_keys_to_save, LOWEST_ACCEPTED_TIMEOUT);
   conf.counter_write_request_timeout_in_ms = LOWEST_ACCEPTED_TIMEOUT;
}
{code}

> force minumum timeout value 
> 
>
> Key: CASSANDRA-9375
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9375
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Brandon Williams
>Assignee: Varun Barala
>Priority: Trivial
>  Labels: patch
> Fix For: 4.0
>
> Attachments: CASSANDRA-9375.patch, CASSANDRA-9375_after_review, 
> CASSANDRA-9375_after_review_2.patch
>
>
> Granted, this is a nonsensical setting, but the error message makes it tough 
> to discern what's wrong:
> {noformat}
> ERROR 17:13:28,726 Exception encountered during startup
> java.lang.ExceptionInInitializerError
>  at 
> org.apache.cassandra.net.MessagingService.instance(MessagingService.java:310)
>  at 
> org.apache.cassandra.service.StorageService.(StorageService.java:233)
>  at 
> org.apache.cassandra.service.StorageService.(StorageService.java:141)
>  at 
> org.apache.cassandra.locator.DynamicEndpointSnitch.(DynamicEndpointSnitch.java:87)
>  at 
> org.apache.cassandra.locator.DynamicEndpointSnitch.(DynamicEndpointSnitch.java:63)
>  at 
> org.apache.cassandra.config.DatabaseDescriptor.createEndpointSnitch(DatabaseDescriptor.java:518)
>  at 
> org.apache.cassandra.config.DatabaseDescriptor.applyConfig(DatabaseDescriptor.java:350)
>  at 
> org.apache.cassandra.config.DatabaseDescriptor.(DatabaseDescriptor.java:112)
>  at 
> org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:213)
>  at 
> org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:567)
>  at 
> org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:656)
> Caused by: java.lang.IllegalArgumentException
>  at 
> java.util.concurrent.ScheduledThreadPoolExecutor.scheduleWithFixedDelay(ScheduledThreadPoolExecutor.java:586)
>  at 
> org.apache.cassandra.concurrent.DebuggableScheduledThreadPoolExecutor.scheduleWithFixedDelay(DebuggableScheduledThreadPoolExecutor.java:64)
>  at org.apache.cassandra.utils.ExpiringMap.(ExpiringMap.java:103)
>  at 
> org.apache.cassandra.net.MessagingService.(MessagingService.java:360)
>  at org.apache.cassandra.net.MessagingService.(MessagingService.java:68)
>  at 
> org.apache.cassandra.net.MessagingService$MSHandle.(MessagingService.java:306)
>  ... 11 more
> java.lang.ExceptionInInitializerError
>  at 
> org.apache.cassandra.net.MessagingService.instance(MessagingService.java:310)
>  at 
> org.apache.cassandra.service.StorageService.(StorageService.java:233)
>  at 
> org.apache.cassandra.service.StorageService.(StorageService.java:141)
>  at 
> org.apache.cassandra.locator.DynamicEndpointSnitch.(DynamicEndpointSnitch.java:87)
>  at 
> org.apache.cassandra.locator.DynamicEndpointSnitch.(DynamicEndpointSnitch.java:63)
>  at 
> org.apache.cassandra.config.DatabaseDescriptor.createEndpointSnitch(DatabaseDescriptor.java:518)
>  at 
> org.apache.cassandra.config.DatabaseDescriptor.applyConfig(DatabaseDescriptor.java:350)
>  at 
> org.apache.cassandra.config.DatabaseDescriptor.(DatabaseDescriptor.java:112)
>  at 
> org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:213)
>  at 
> org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:567)
>  at 
> org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:656)
> Caused by: java.lang.IllegalArgumentException
>  at 
> java.util.concurrent.ScheduledThreadPoolExecutor.scheduleWithFixedDelay(ScheduledThreadPoolExecutor.java:586)
>  at 
> org.apache.cassandra.concurrent.DebuggableScheduledThreadPoolExecutor.scheduleWithFixedDelay(DebuggableScheduledThreadPoolExecutor.java:64)
>  at org.apache.cassandra.utils.ExpiringMap.(ExpiringMap.java:103)
>  at 
> org.apache.cassandra.net.MessagingService.(MessagingService.java:360)
>  at org.apache.cassandra.net.MessagingService.(MessagingService.java:68)
>  at 
> org.apache.cassandra.net.MessagingService$MSHandle.(MessagingService.java:306)
>  ... 11 more
> Exception encountered during startup: null
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org