cassandra-builds git commit: Enable cqlsh jobs after venv/pip path fix verified

2017-03-07 Thread mshuler
Repository: cassandra-builds
Updated Branches:
  refs/heads/master d94b05fd9 -> 3c1a7fc89


Enable cqlsh jobs after venv/pip path fix verified


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

Branch: refs/heads/master
Commit: 3c1a7fc8981315bf982bcfce661fb16c42dc64e1
Parents: d94b05f
Author: Michael Shuler 
Authored: Tue Mar 7 21:27:16 2017 -0600
Committer: Michael Shuler 
Committed: Tue Mar 7 21:27:16 2017 -0600

--
 jenkins-dsl/cassandra_job_dsl_seed.groovy | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra-builds/blob/3c1a7fc8/jenkins-dsl/cassandra_job_dsl_seed.groovy
--
diff --git a/jenkins-dsl/cassandra_job_dsl_seed.groovy 
b/jenkins-dsl/cassandra_job_dsl_seed.groovy
index 9dcf7bb..062b4cb 100644
--- a/jenkins-dsl/cassandra_job_dsl_seed.groovy
+++ b/jenkins-dsl/cassandra_job_dsl_seed.groovy
@@ -311,7 +311,7 @@ cassandraBranches.each {
  * Main branch cqlsh jobs
  */
 matrixJob("${jobNamePrefix}-cqlsh-tests") {
-disabled(true)
+disabled(false)
 using('Cassandra-template-cqlsh-tests')
 configure { node ->
 node / scm / branches / 'hudson.plugins.git.BranchSpec' / 
name(branchName)
@@ -435,7 +435,6 @@ job('Cassandra-devbranch-dtest') {
  * Parameterized Dev Branch cqlsh-tests
  */
 matrixJob('Cassandra-devbranch-cqlsh-tests') {
-disabled(true)
 description(jobDescription)
 logRotator {
 numToKeep(10)



[jira] [Commented] (CASSANDRA-13010) nodetool compactionstats should say which disk a compaction is writing to

2017-03-07 Thread Jon Haddad (JIRA)

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

Jon Haddad commented on CASSANDRA-13010:


I don't believe this line does what it's supposed to:

{code}
ci.setTargetDirectory(cfs.getDirectories().getDirectoryForNewSSTables().getPath());
{code}

First off, getDirectoryForNewSSTables returns *any* directory that's available 
to be written to. The call {{getDirectoryForNewSSTables}} has this comment:

{code}
/**
 * Basically the same as calling {@link #getWriteableLocationAsFile(long)} 
with an unknown size ({@code -1L}),
 * which may return any non-blacklisted directory - even a data directory 
that has no usable space.
 * Do not use this method in production code.
 *
 * @throws FSWriteError if all directories are blacklisted.
 */
public File getDirectoryForNewSSTables()
{
return getWriteableLocationAsFile(-1L);
}
{code}

I believe a better way to approach this would be to use 
{{SSTableWriter.descriptor}} to pull out the target directory.

> nodetool compactionstats should say which disk a compaction is writing to
> -
>
> Key: CASSANDRA-13010
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13010
> Project: Cassandra
>  Issue Type: New Feature
>Reporter: Jon Haddad
>Assignee: Alex Lourie
>  Labels: lhf
>




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13010) nodetool compactionstats should say which disk a compaction is writing to

2017-03-07 Thread Alex Lourie (JIRA)

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

Alex Lourie commented on CASSANDRA-13010:
-

[~rustyrazorblade] totally fair. I'll ensure the conformity to the style guide.

Thanks.

> nodetool compactionstats should say which disk a compaction is writing to
> -
>
> Key: CASSANDRA-13010
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13010
> Project: Cassandra
>  Issue Type: New Feature
>Reporter: Jon Haddad
>Assignee: Alex Lourie
>  Labels: lhf
>




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13010) nodetool compactionstats should say which disk a compaction is writing to

2017-03-07 Thread Jon Haddad (JIRA)

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

Jon Haddad commented on CASSANDRA-13010:


On the nit side, I've already noticed a handful of cases that violate the style 
guide.  { and } should always be on their own lines, even for single line 
functions.  

http://cassandra.apache.org/doc/latest/development/code_style.html#general-code-conventions

For instance:
CompactionInfo.java: targetDirectory() 
CompactionIterator.java: setTargetDirectory

There may be others, but I won't bother listing them (for now).  If you can 
take a pass & ensure the patch conforms to the style guide, I'll focus on the 
content of the patch.

> nodetool compactionstats should say which disk a compaction is writing to
> -
>
> Key: CASSANDRA-13010
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13010
> Project: Cassandra
>  Issue Type: New Feature
>Reporter: Jon Haddad
>Assignee: Alex Lourie
>  Labels: lhf
>




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


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

2017-03-07 Thread Murukesh Mohanan (JIRA)

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

Murukesh Mohanan updated CASSANDRA-13001:
-
Attachment: 0001-Add-basic-pluggable-logging-to-debug.log-and-table.patch

Jon, can you go over the new patch and see if I'm headed in the right direction 
this time?

Essentially:

- a new interface {{o.a.c.db.monitoring.IQueryLogger}}, with one function 
{{void logQueries(MonitoringTask.AggregatedOperations operations, 
MonitoringTask.OperationType type, long elapsed)}}, accordingly, various 
elements in {{MonitoringTask}} have been made {{public}}
- Two classes implementing it, {{o.a.c.d.m.QueryDebugLogger}} and 
o.a.c.d.m.QueryTableLogger}}. The former implements the current 
{{debug.log}} behaviour and is default, and the latter saves stats and metadata 
to a table (hard-coded to {{perf.slow_log}}, looking for better ideas on this).
- New configuration setting {{slow_query_logger}}, works like {{authenticator}}.
- Rolled up both timed out and slow operation logging in {{MonitoringTask}} to 
use the interface.  Accordingly cleaned up {{MonitoringTask}}. Perhaps the 
configuration setting should be renamed, again looking for ideas.

The patch is far from ready, but ...

> pluggable slow query logging / handling
> ---
>
> Key: CASSANDRA-13001
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13001
> Project: Cassandra
>  Issue Type: New Feature
>Reporter: Jon Haddad
>Assignee: Murukesh Mohanan
> Fix For: 4.0
>
> Attachments: 
> 0001-Add-basic-pluggable-logging-to-debug.log-and-table.patch, 
> 0001-Add-multiple-logging-methods-for-slow-queries-CASSAN.patch
>
>
> Currently CASSANDRA-12403 logs slow queries as DEBUG to a file.  It would be 
> better to have this as an interface which we can log to alternative 
> locations, such as to a table on the cluster or to a remote location (statsd, 
> graphite, etc).  



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (CASSANDRA-12513) IOException (No such file or directory) closing MessagingService's server socket (locally)

2017-03-07 Thread Michael Kjellman (JIRA)

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

Michael Kjellman updated CASSANDRA-12513:
-
Status: Ready to Commit  (was: Patch Available)

> IOException (No such file or directory) closing MessagingService's server 
> socket (locally)
> --
>
> Key: CASSANDRA-12513
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12513
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Robert Stupp
>Assignee: Robert Stupp
>Priority: Minor
> Fix For: 3.0.x
>
>
> _Sometimes_ the {{RemoveTest}} fails with the following exception. It's not 
> related to the test itself.
> The exception is risen in 
> {{ServerSocketChannelImpl.implCloseSelectableChannel}} where it checks that a 
> thread ID is non-zero. The {{thread}} instance field is set inside its accept 
> and poll methods. It looks like this is caused by some race condition - i.e. 
> stopping in debugger at certain points prevents it from being triggered.
> I could not find any misuse in the code base - but want to document this 
> issue.
> No difference between 8u92 and 8u102
> {code}
> INFO  [ACCEPT-/127.0.0.1] 2016-08-22 08:35:16,606 ?:? - MessagingService has 
> terminated the accept() thread
> java.io.IOError: java.io.IOException: No such file or directory
>   at 
> org.apache.cassandra.net.MessagingService.shutdown(MessagingService.java:914)
>   at org.apache.cassandra.service.RemoveTest.tearDown(RemoveTest.java:103)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:498)
>   at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
>   at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>   at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
>   at 
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:37)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:44)
>   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
>   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
>   at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
>   at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
>   at 
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
>   at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
>   at org.junit.runner.JUnitCore.run(JUnitCore.java:159)
>   at 
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117)
>   at 
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
>   at 
> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:262)
>   at 
> com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:84)
> Caused by: java.io.IOException: No such file or directory
>   at sun.nio.ch.NativeThread.signal(Native Method)
>   at 
> sun.nio.ch.ServerSocketChannelImpl.implCloseSelectableChannel(ServerSocketChannelImpl.java:292)
>   at 
> java.nio.channels.spi.AbstractSelectableChannel.implCloseChannel(AbstractSelectableChannel.java:234)
>   at 
> java.nio.channels.spi.AbstractInterruptibleChannel.close(AbstractInterruptibleChannel.java:115)
>   at sun.nio.ch.ServerSocketAdaptor.close(ServerSocketAdaptor.java:137)
>   at 
> org.apache.cassandra.net.MessagingService$SocketThread.close(MessagingService.java:1249)
>   at 
> org.apache.cassandra.net.MessagingService.shutdown(MessagingService.java:904)
>   ... 22 more
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-12513) IOException (No such file or directory) closing MessagingService's server socket (locally)

2017-03-07 Thread Michael Kjellman (JIRA)

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

Michael Kjellman commented on CASSANDRA-12513:
--

[~snazy] I totally missed your comment! [~jjirsa] just pointed this out to me.

I just ran the unit tests on my mac a few times with your patch and I'm unable 
to get RemoveTest to fail anymore! :) (and I was very very reliably reproducing 
for a while now).

+1 on the fix.

> IOException (No such file or directory) closing MessagingService's server 
> socket (locally)
> --
>
> Key: CASSANDRA-12513
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12513
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Robert Stupp
>Assignee: Robert Stupp
>Priority: Minor
> Fix For: 3.0.x
>
>
> _Sometimes_ the {{RemoveTest}} fails with the following exception. It's not 
> related to the test itself.
> The exception is risen in 
> {{ServerSocketChannelImpl.implCloseSelectableChannel}} where it checks that a 
> thread ID is non-zero. The {{thread}} instance field is set inside its accept 
> and poll methods. It looks like this is caused by some race condition - i.e. 
> stopping in debugger at certain points prevents it from being triggered.
> I could not find any misuse in the code base - but want to document this 
> issue.
> No difference between 8u92 and 8u102
> {code}
> INFO  [ACCEPT-/127.0.0.1] 2016-08-22 08:35:16,606 ?:? - MessagingService has 
> terminated the accept() thread
> java.io.IOError: java.io.IOException: No such file or directory
>   at 
> org.apache.cassandra.net.MessagingService.shutdown(MessagingService.java:914)
>   at org.apache.cassandra.service.RemoveTest.tearDown(RemoveTest.java:103)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:498)
>   at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
>   at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>   at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
>   at 
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:37)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:44)
>   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
>   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
>   at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
>   at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
>   at 
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
>   at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
>   at org.junit.runner.JUnitCore.run(JUnitCore.java:159)
>   at 
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117)
>   at 
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
>   at 
> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:262)
>   at 
> com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:84)
> Caused by: java.io.IOException: No such file or directory
>   at sun.nio.ch.NativeThread.signal(Native Method)
>   at 
> sun.nio.ch.ServerSocketChannelImpl.implCloseSelectableChannel(ServerSocketChannelImpl.java:292)
>   at 
> java.nio.channels.spi.AbstractSelectableChannel.implCloseChannel(AbstractSelectableChannel.java:234)
>   at 
> java.nio.channels.spi.AbstractInterruptibleChannel.close(AbstractInterruptibleChannel.java:115)
>   at sun.nio.ch.ServerSocketAdaptor.close(ServerSocketAdaptor.java:137)
>   at 
> org.apache.cassandra.net.MessagingService$SocketThread.close(MessagingService.java:1249)
>   at 
> org.apache.cassandra.net.MessagingService.shutdown(MessagingService.java:904)
>   ... 22 more
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13306) Builds fetch source jars for build dependencies, not just source dependencies

2017-03-07 Thread Dave Brosius (JIRA)

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

Dave Brosius commented on CASSANDRA-13306:
--

agreed, that can be reverted.

> Builds fetch source jars for build dependencies, not just source dependencies
> -
>
> Key: CASSANDRA-13306
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13306
> Project: Cassandra
>  Issue Type: Bug
>  Components: Build
>Reporter: Joel Knighton
>
> A recent commit without a linked JIRA cleaned up dead imports and also added 
> a {{sourcesFilesetId}} to artifact fetching for the build-deps-pom. This 
> causes ant to fetch source jars for the build deps, but we have an explicit 
> separate build-deps-pom-sources that fetches sources.
> This happened in commit {{e96ce6d132129025ff6b923129cb67eed2f97931}}.
> Was this an intentional change, [~dbrosius]? It seems to conflate the 
> separate build-deps-pom and build-deps-pom-sources.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (CASSANDRA-13053) GRANT/REVOKE on table without keyspace performs permissions check incorrectly

2017-03-07 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-13053:
--
Fix Version/s: (was: 3.11.x)
   (was: 3.0.x)
   (was: 2.2.x)
   3.11.0
   3.0.13
   2.2.10

> GRANT/REVOKE on table without keyspace performs permissions check incorrectly
> -
>
> Key: CASSANDRA-13053
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13053
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
>Reporter: Sam Tunnicliffe
>Assignee: Aleksey Yeschenko
>Priority: Minor
> Fix For: 2.2.10, 3.0.13, 3.11.0
>
>
> When a {{GRANT}} or {{REVOKE}} statement is executed on a table without 
> specifying the keyspace, we attempt to use the client session's keyspace to 
> qualify the resource. 
> This is done when validating the statement, which occurs after checking that 
> the user executing the statement has sufficient permissions. This means that 
> the permissions checking uses an incorrect resource, namely a table with a 
> null keyspace. If that user is a superuser, then no error is encountered as 
> superuser privs implicitly grants *all* permissions. If the user is not a 
> superuser, then the {{GRANT}} or {{REVOKE}} fails with an ugly error, 
> regardless of which keyspace the client session is bound to:
> {code}
> Unauthorized: Error from server: code=2100 [Unauthorized] message="User admin 
> has no AUTHORIZE permission on  or any of its parents"
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13053) GRANT/REVOKE on table without keyspace performs permissions check incorrectly

2017-03-07 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-13053:
---

Thanks. Committed as 
[e4be2d06b756106d7ad31b36b3cc46bc97088064|https://github.com/apache/cassandra/commit/e4be2d06b756106d7ad31b36b3cc46bc97088064]
 to 2.2 and merged into 3.0, 3.11, and trunk.

> GRANT/REVOKE on table without keyspace performs permissions check incorrectly
> -
>
> Key: CASSANDRA-13053
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13053
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
>Reporter: Sam Tunnicliffe
>Assignee: Aleksey Yeschenko
>Priority: Minor
> Fix For: 2.2.10, 3.0.13, 3.11.0
>
>
> When a {{GRANT}} or {{REVOKE}} statement is executed on a table without 
> specifying the keyspace, we attempt to use the client session's keyspace to 
> qualify the resource. 
> This is done when validating the statement, which occurs after checking that 
> the user executing the statement has sufficient permissions. This means that 
> the permissions checking uses an incorrect resource, namely a table with a 
> null keyspace. If that user is a superuser, then no error is encountered as 
> superuser privs implicitly grants *all* permissions. If the user is not a 
> superuser, then the {{GRANT}} or {{REVOKE}} fails with an ugly error, 
> regardless of which keyspace the client session is bound to:
> {code}
> Unauthorized: Error from server: code=2100 [Unauthorized] message="User admin 
> has no AUTHORIZE permission on  or any of its parents"
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (CASSANDRA-13053) GRANT/REVOKE on table without keyspace performs permissions check incorrectly

2017-03-07 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-13053:
--
   Resolution: Fixed
Reproduced In: 3.10, 3.0.11, 2.2.9  (was: 2.2.9, 3.0.11, 3.10)
   Status: Resolved  (was: Ready to Commit)

> GRANT/REVOKE on table without keyspace performs permissions check incorrectly
> -
>
> Key: CASSANDRA-13053
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13053
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
>Reporter: Sam Tunnicliffe
>Assignee: Aleksey Yeschenko
>Priority: Minor
> Fix For: 2.2.x, 3.0.x, 3.11.x
>
>
> When a {{GRANT}} or {{REVOKE}} statement is executed on a table without 
> specifying the keyspace, we attempt to use the client session's keyspace to 
> qualify the resource. 
> This is done when validating the statement, which occurs after checking that 
> the user executing the statement has sufficient permissions. This means that 
> the permissions checking uses an incorrect resource, namely a table with a 
> null keyspace. If that user is a superuser, then no error is encountered as 
> superuser privs implicitly grants *all* permissions. If the user is not a 
> superuser, then the {{GRANT}} or {{REVOKE}} fails with an ugly error, 
> regardless of which keyspace the client session is bound to:
> {code}
> Unauthorized: Error from server: code=2100 [Unauthorized] message="User admin 
> has no AUTHORIZE permission on  or any of its parents"
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[09/10] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11

2017-03-07 Thread aleksey
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/2b62cb99
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/2b62cb99
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/2b62cb99

Branch: refs/heads/trunk
Commit: 2b62cb997ed163c85b0cb50e3198935b38aa2fb6
Parents: e995859 71c1f98
Author: Aleksey Yeschenko 
Authored: Wed Mar 8 00:22:35 2017 +
Committer: Aleksey Yeschenko 
Committed: Wed Mar 8 00:22:35 2017 +

--
 CHANGES.txt | 2 ++
 .../cql3/statements/PermissionsManagementStatement.java | 5 +
 2 files changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2b62cb99/CHANGES.txt
--
diff --cc CHANGES.txt
index 3852a64,7551a7f..88599b7
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -30,137 -39,6 +30,139 @@@ Merged from 3.0
 live rows in sstabledump (CASSANDRA-13177)
   * Provide user workaround when system_schema.columns does not contain entries
 for a table that's in system_schema.tables (CASSANDRA-13180)
 +Merged from 2.2:
++ * Fix GRANT/REVOKE when keyspace isn't specified (CASSANDRA-13053)
 + * Fix flaky LongLeveledCompactionStrategyTest (CASSANDRA-12202)
 + * Fix failing COPY TO STDOUT (CASSANDRA-12497)
 + * Fix ColumnCounter::countAll behaviour for reverse queries (CASSANDRA-13222)
 + * Exceptions encountered calling getSeeds() breaks OTC thread 
(CASSANDRA-13018)
 + * Fix negative mean latency metric (CASSANDRA-12876)
 + * Use only one file pointer when creating commitlog segments 
(CASSANDRA-12539)
 +Merged from 2.1:
 + * Remove unused repositories (CASSANDRA-13278)
 + * Log stacktrace of uncaught exceptions (CASSANDRA-13108)
 + * Use portable stderr for java error in startup (CASSANDRA-13211)
 + * Fix Thread Leak in OutboundTcpConnection (CASSANDRA-13204)
 + * Coalescing strategy can enter infinite loop (CASSANDRA-13159)
 +
++
 +3.10
 + * Fix secondary index queries regression (CASSANDRA-13013)
 + * Add duration type to the protocol V5 (CASSANDRA-12850)
 + * Fix duration type validation (CASSANDRA-13143)
 + * Fix flaky GcCompactionTest (CASSANDRA-12664)
 + * Fix TestHintedHandoff.hintedhandoff_decom_test (CASSANDRA-13058)
 + * Fixed query monitoring for range queries (CASSANDRA-13050)
 + * Remove outboundBindAny configuration property (CASSANDRA-12673)
 + * Use correct bounds for all-data range when filtering (CASSANDRA-12666)
 + * Remove timing window in test case (CASSANDRA-12875)
 + * Resolve unit testing without JCE security libraries installed 
(CASSANDRA-12945)
 + * Fix inconsistencies in cassandra-stress load balancing policy 
(CASSANDRA-12919)
 + * Fix validation of non-frozen UDT cells (CASSANDRA-12916)
 + * Don't shut down socket input/output on StreamSession (CASSANDRA-12903)
 + * Fix Murmur3PartitionerTest (CASSANDRA-12858)
 + * Move cqlsh syntax rules into separate module and allow easier 
customization (CASSANDRA-12897)
 + * Fix CommitLogSegmentManagerTest (CASSANDRA-12283)
 + * Fix cassandra-stress truncate option (CASSANDRA-12695)
 + * Fix crossNode value when receiving messages (CASSANDRA-12791)
 + * Don't load MX4J beans twice (CASSANDRA-12869)
 + * Extend native protocol request flags, add versions to SUPPORTED, and 
introduce ProtocolVersion enum (CASSANDRA-12838)
 + * Set JOINING mode when running pre-join tasks (CASSANDRA-12836)
 + * remove net.mintern.primitive library due to license issue (CASSANDRA-12845)
 + * Properly format IPv6 addresses when logging JMX service URL 
(CASSANDRA-12454)
 + * Optimize the vnode allocation for single replica per DC (CASSANDRA-12777)
 + * Use non-token restrictions for bounds when token restrictions are 
overridden (CASSANDRA-12419)
 + * Fix CQLSH auto completion for PER PARTITION LIMIT (CASSANDRA-12803)
 + * Use different build directories for Eclipse and Ant (CASSANDRA-12466)
 + * Avoid potential AttributeError in cqlsh due to no table metadata 
(CASSANDRA-12815)
 + * Fix RandomReplicationAwareTokenAllocatorTest.testExistingCluster 
(CASSANDRA-12812)
 + * Upgrade commons-codec to 1.9 (CASSANDRA-12790)
 + * Make the fanout size for LeveledCompactionStrategy to be configurable 
(CASSANDRA-11550)
 + * Add duration data type (CASSANDRA-11873)
 + * Fix timeout in ReplicationAwareTokenAllocatorTest (CASSANDRA-12784)
 + * Improve sum aggregate functions (CASSANDRA-12417)
 + * Make cassandra.yaml docs for batch_size_*_threshold_in_kb reflect changes 
in CASSANDRA-10876 (CASSANDRA-12761)
 + * cqlsh fails to format collections when using aliases (CASSANDRA-11534)
 + * Check for hash conflicts in prepared statements (CASSANDRA-12733)
 + * Exit query parsing upon first error 

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

2017-03-07 Thread aleksey
Merge branch 'cassandra-2.2' into cassandra-3.0


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

Branch: refs/heads/cassandra-3.11
Commit: 71c1f986656c83fa62b5ad464b8947efd89e207d
Parents: 50560aa e4be2d0
Author: Aleksey Yeschenko 
Authored: Wed Mar 8 00:19:54 2017 +
Committer: Aleksey Yeschenko 
Committed: Wed Mar 8 00:19:54 2017 +

--
 CHANGES.txt  | 8 +++-
 .../cql3/statements/PermissionsManagementStatement.java  | 5 +
 2 files changed, 12 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/71c1f986/CHANGES.txt
--
diff --cc CHANGES.txt
index 36f058b,0982de9..7551a7f
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,13 -1,5 +1,18 @@@
 -2.2.10
++3.0.13
++Merged from 2.2:
+  * Fix GRANT/REVOKE when keyspace isn't specified (CASSANDRA-13053)
++
++
 +3.0.12
 + * Prevent data loss on upgrade 2.1 - 3.0 by adding component separator to 
LogRecord absolute path (CASSANDRA-13294)
 + * Improve testing on macOS by eliminating sigar logging (CASSANDRA-13233)
 + * Cqlsh copy-from should error out when csv contains invalid data for 
collections (CASSANDRA-13071)
 + * Update c.yaml doc for offheap memtables (CASSANDRA-13179)
 + * Faster StreamingHistogram (CASSANDRA-13038)
 + * Legacy deserializer can create unexpected boundary range tombstones 
(CASSANDRA-13237)
 + * Remove unnecessary assertion from AntiCompactionTest (CASSANDRA-13070)
 + * Fix cqlsh COPY for dates before 1900 (CASSANDRA-13185)
- Merged from 2.2
++Merged from 2.2:
   * Avoid race on receiver by starting streaming sender thread after sending 
init message (CASSANDRA-12886)
   * Fix "multiple versions of ant detected..." when running ant test 
(CASSANDRA-13232)
   * Coalescing strategy sleeps too much (CASSANDRA-13090)
@@@ -19,47 -12,8 +24,48 @@@ Merged from 2.1
   * Remove unused repositories (CASSANDRA-13278)
   * Log stacktrace of uncaught exceptions (CASSANDRA-13108)
  
+ 
 -2.2.9
 +3.0.11
 + * Use keyspace replication settings on system.size_estimates table 
(CASSANDRA-9639)
 + * Add vm.max_map_count StartupCheck (CASSANDRA-13008)
 + * Hint related logging should include the IP address of the destination in 
addition to 
 +   host ID (CASSANDRA-13205)
 + * Reloading logback.xml does not work (CASSANDRA-13173)
 + * Lightweight transactions temporarily fail after upgrade from 2.1 to 3.0 
(CASSANDRA-13109)
 + * Duplicate rows after upgrading from 2.1.16 to 3.0.10/3.9 (CASSANDRA-13125)
 + * Fix UPDATE queries with empty IN restrictions (CASSANDRA-13152)
 + * Abort or retry on failed hints delivery (CASSANDRA-13124)
 + * Fix handling of partition with partition-level deletion plus
 +   live rows in sstabledump (CASSANDRA-13177)
 + * Provide user workaround when system_schema.columns does not contain entries
 +   for a table that's in system_schema.tables (CASSANDRA-13180)
 + * Dump threads when unit tests time out (CASSANDRA-13117)
 + * Better error when modifying function permissions without explicit keyspace 
(CASSANDRA-12925)
 + * Indexer is not correctly invoked when building indexes over sstables 
(CASSANDRA-13075)
 + * Read repair is not blocking repair to finish in foreground repair 
(CASSANDRA-13115)
 + * Stress daemon help is incorrect (CASSANDRA-12563)
 + * Remove ALTER TYPE support (CASSANDRA-12443)
 + * Fix assertion for certain legacy range tombstone pattern (CASSANDRA-12203)
 + * Set javac encoding to utf-8 (CASSANDRA-11077)
 + * Replace empty strings with null values if they cannot be converted 
(CASSANDRA-12794)
 + * Fixed flacky SSTableRewriterTest: check file counts before calling 
validateCFS (CASSANDRA-12348)
 + * Fix deserialization of 2.x DeletedCells (CASSANDRA-12620)
 + * Add parent repair session id to anticompaction log message 
(CASSANDRA-12186)
 + * Improve contention handling on failure to acquire MV lock for streaming 
and hints (CASSANDRA-12905)
 + * Fix DELETE and UPDATE queries with empty IN restrictions (CASSANDRA-12829)
 + * Mark MVs as built after successful bootstrap (CASSANDRA-12984)
 + * Estimated TS drop-time histogram updated with Cell.NO_DELETION_TIME 
(CASSANDRA-13040)
 + * Nodetool compactionstats fails with NullPointerException (CASSANDRA-13021)
 + * Thread local pools never cleaned up (CASSANDRA-13033)
 + * Set RPC_READY to false when draining or if a node is marked as shutdown 
(CASSANDRA-12781)
 + * Make sure sstables only get committed when it's safe to discard commit log 
records (CASSANDRA-12956)
 + * Reject default_time_to_live option when 

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

2017-03-07 Thread aleksey
Merge branch 'cassandra-2.2' into cassandra-3.0


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

Branch: refs/heads/cassandra-3.0
Commit: 71c1f986656c83fa62b5ad464b8947efd89e207d
Parents: 50560aa e4be2d0
Author: Aleksey Yeschenko 
Authored: Wed Mar 8 00:19:54 2017 +
Committer: Aleksey Yeschenko 
Committed: Wed Mar 8 00:19:54 2017 +

--
 CHANGES.txt  | 8 +++-
 .../cql3/statements/PermissionsManagementStatement.java  | 5 +
 2 files changed, 12 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/71c1f986/CHANGES.txt
--
diff --cc CHANGES.txt
index 36f058b,0982de9..7551a7f
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,13 -1,5 +1,18 @@@
 -2.2.10
++3.0.13
++Merged from 2.2:
+  * Fix GRANT/REVOKE when keyspace isn't specified (CASSANDRA-13053)
++
++
 +3.0.12
 + * Prevent data loss on upgrade 2.1 - 3.0 by adding component separator to 
LogRecord absolute path (CASSANDRA-13294)
 + * Improve testing on macOS by eliminating sigar logging (CASSANDRA-13233)
 + * Cqlsh copy-from should error out when csv contains invalid data for 
collections (CASSANDRA-13071)
 + * Update c.yaml doc for offheap memtables (CASSANDRA-13179)
 + * Faster StreamingHistogram (CASSANDRA-13038)
 + * Legacy deserializer can create unexpected boundary range tombstones 
(CASSANDRA-13237)
 + * Remove unnecessary assertion from AntiCompactionTest (CASSANDRA-13070)
 + * Fix cqlsh COPY for dates before 1900 (CASSANDRA-13185)
- Merged from 2.2
++Merged from 2.2:
   * Avoid race on receiver by starting streaming sender thread after sending 
init message (CASSANDRA-12886)
   * Fix "multiple versions of ant detected..." when running ant test 
(CASSANDRA-13232)
   * Coalescing strategy sleeps too much (CASSANDRA-13090)
@@@ -19,47 -12,8 +24,48 @@@ Merged from 2.1
   * Remove unused repositories (CASSANDRA-13278)
   * Log stacktrace of uncaught exceptions (CASSANDRA-13108)
  
+ 
 -2.2.9
 +3.0.11
 + * Use keyspace replication settings on system.size_estimates table 
(CASSANDRA-9639)
 + * Add vm.max_map_count StartupCheck (CASSANDRA-13008)
 + * Hint related logging should include the IP address of the destination in 
addition to 
 +   host ID (CASSANDRA-13205)
 + * Reloading logback.xml does not work (CASSANDRA-13173)
 + * Lightweight transactions temporarily fail after upgrade from 2.1 to 3.0 
(CASSANDRA-13109)
 + * Duplicate rows after upgrading from 2.1.16 to 3.0.10/3.9 (CASSANDRA-13125)
 + * Fix UPDATE queries with empty IN restrictions (CASSANDRA-13152)
 + * Abort or retry on failed hints delivery (CASSANDRA-13124)
 + * Fix handling of partition with partition-level deletion plus
 +   live rows in sstabledump (CASSANDRA-13177)
 + * Provide user workaround when system_schema.columns does not contain entries
 +   for a table that's in system_schema.tables (CASSANDRA-13180)
 + * Dump threads when unit tests time out (CASSANDRA-13117)
 + * Better error when modifying function permissions without explicit keyspace 
(CASSANDRA-12925)
 + * Indexer is not correctly invoked when building indexes over sstables 
(CASSANDRA-13075)
 + * Read repair is not blocking repair to finish in foreground repair 
(CASSANDRA-13115)
 + * Stress daemon help is incorrect (CASSANDRA-12563)
 + * Remove ALTER TYPE support (CASSANDRA-12443)
 + * Fix assertion for certain legacy range tombstone pattern (CASSANDRA-12203)
 + * Set javac encoding to utf-8 (CASSANDRA-11077)
 + * Replace empty strings with null values if they cannot be converted 
(CASSANDRA-12794)
 + * Fixed flacky SSTableRewriterTest: check file counts before calling 
validateCFS (CASSANDRA-12348)
 + * Fix deserialization of 2.x DeletedCells (CASSANDRA-12620)
 + * Add parent repair session id to anticompaction log message 
(CASSANDRA-12186)
 + * Improve contention handling on failure to acquire MV lock for streaming 
and hints (CASSANDRA-12905)
 + * Fix DELETE and UPDATE queries with empty IN restrictions (CASSANDRA-12829)
 + * Mark MVs as built after successful bootstrap (CASSANDRA-12984)
 + * Estimated TS drop-time histogram updated with Cell.NO_DELETION_TIME 
(CASSANDRA-13040)
 + * Nodetool compactionstats fails with NullPointerException (CASSANDRA-13021)
 + * Thread local pools never cleaned up (CASSANDRA-13033)
 + * Set RPC_READY to false when draining or if a node is marked as shutdown 
(CASSANDRA-12781)
 + * Make sure sstables only get committed when it's safe to discard commit log 
records (CASSANDRA-12956)
 + * Reject default_time_to_live option when 

[04/10] cassandra git commit: Fix GRANT/REVOKE when keyspace isn't specified

2017-03-07 Thread aleksey
Fix GRANT/REVOKE when keyspace isn't specified

patch by Aleksey Yeschenko; reviewed by Sam Tunnicliffe for
CASSANDRA-13053


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

Branch: refs/heads/trunk
Commit: e4be2d06b756106d7ad31b36b3cc46bc97088064
Parents: 44fefef
Author: Aleksey Yeschenko 
Authored: Tue Feb 28 18:23:00 2017 +
Committer: Aleksey Yeschenko 
Committed: Wed Mar 8 00:16:10 2017 +

--
 CHANGES.txt | 2 ++
 .../cql3/statements/PermissionsManagementStatement.java | 5 +
 2 files changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4be2d06/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index ca1aa27..0982de9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.10
+ * Fix GRANT/REVOKE when keyspace isn't specified (CASSANDRA-13053)
  * Avoid race on receiver by starting streaming sender thread after sending 
init message (CASSANDRA-12886)
  * Fix "multiple versions of ant detected..." when running ant test 
(CASSANDRA-13232)
  * Coalescing strategy sleeps too much (CASSANDRA-13090)
@@ -11,6 +12,7 @@ Merged from 2.1:
  * Remove unused repositories (CASSANDRA-13278)
  * Log stacktrace of uncaught exceptions (CASSANDRA-13108)
 
+
 2.2.9
  * Fix negative mean latency metric (CASSANDRA-12876)
  * Use only one file pointer when creating commitlog segments (CASSANDRA-12539)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4be2d06/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
--
diff --git 
a/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
 
b/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
index b22e400..56a2f26 100644
--- 
a/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
+++ 
b/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
@@ -50,6 +50,7 @@ public abstract class PermissionsManagementStatement extends 
AuthorizationStatem
 throw new InvalidRequestException(String.format("Role %s doesn't 
exist", grantee.getRoleName()));
 
 // if a keyspace is omitted when GRANT/REVOKE ON TABLE , we 
need to correct the resource.
+// called both here and in checkAccess(), as in some cases we do not 
call the latter.
 resource = maybeCorrectResource(resource, state);
 
 // altering permissions on builtin functions is not supported
@@ -65,8 +66,12 @@ public abstract class PermissionsManagementStatement extends 
AuthorizationStatem
 
 public void checkAccess(ClientState state) throws UnauthorizedException
 {
+// if a keyspace is omitted when GRANT/REVOKE ON TABLE , we 
need to correct the resource.
+resource = maybeCorrectResource(resource, state);
+
 // check that the user has AUTHORIZE permission on the resource or its 
parents, otherwise reject GRANT/REVOKE.
 state.ensureHasPermission(Permission.AUTHORIZE, resource);
+
 // check that the user has [a single permission or all in case of ALL] 
on the resource or its parents.
 for (Permission p : permissions)
 state.ensureHasPermission(p, resource);



[02/10] cassandra git commit: Fix GRANT/REVOKE when keyspace isn't specified

2017-03-07 Thread aleksey
Fix GRANT/REVOKE when keyspace isn't specified

patch by Aleksey Yeschenko; reviewed by Sam Tunnicliffe for
CASSANDRA-13053


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

Branch: refs/heads/cassandra-3.0
Commit: e4be2d06b756106d7ad31b36b3cc46bc97088064
Parents: 44fefef
Author: Aleksey Yeschenko 
Authored: Tue Feb 28 18:23:00 2017 +
Committer: Aleksey Yeschenko 
Committed: Wed Mar 8 00:16:10 2017 +

--
 CHANGES.txt | 2 ++
 .../cql3/statements/PermissionsManagementStatement.java | 5 +
 2 files changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4be2d06/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index ca1aa27..0982de9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.10
+ * Fix GRANT/REVOKE when keyspace isn't specified (CASSANDRA-13053)
  * Avoid race on receiver by starting streaming sender thread after sending 
init message (CASSANDRA-12886)
  * Fix "multiple versions of ant detected..." when running ant test 
(CASSANDRA-13232)
  * Coalescing strategy sleeps too much (CASSANDRA-13090)
@@ -11,6 +12,7 @@ Merged from 2.1:
  * Remove unused repositories (CASSANDRA-13278)
  * Log stacktrace of uncaught exceptions (CASSANDRA-13108)
 
+
 2.2.9
  * Fix negative mean latency metric (CASSANDRA-12876)
  * Use only one file pointer when creating commitlog segments (CASSANDRA-12539)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4be2d06/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
--
diff --git 
a/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
 
b/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
index b22e400..56a2f26 100644
--- 
a/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
+++ 
b/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
@@ -50,6 +50,7 @@ public abstract class PermissionsManagementStatement extends 
AuthorizationStatem
 throw new InvalidRequestException(String.format("Role %s doesn't 
exist", grantee.getRoleName()));
 
 // if a keyspace is omitted when GRANT/REVOKE ON TABLE , we 
need to correct the resource.
+// called both here and in checkAccess(), as in some cases we do not 
call the latter.
 resource = maybeCorrectResource(resource, state);
 
 // altering permissions on builtin functions is not supported
@@ -65,8 +66,12 @@ public abstract class PermissionsManagementStatement extends 
AuthorizationStatem
 
 public void checkAccess(ClientState state) throws UnauthorizedException
 {
+// if a keyspace is omitted when GRANT/REVOKE ON TABLE , we 
need to correct the resource.
+resource = maybeCorrectResource(resource, state);
+
 // check that the user has AUTHORIZE permission on the resource or its 
parents, otherwise reject GRANT/REVOKE.
 state.ensureHasPermission(Permission.AUTHORIZE, resource);
+
 // check that the user has [a single permission or all in case of ALL] 
on the resource or its parents.
 for (Permission p : permissions)
 state.ensureHasPermission(p, resource);



[01/10] cassandra git commit: Fix GRANT/REVOKE when keyspace isn't specified

2017-03-07 Thread aleksey
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 44fefeffa -> e4be2d06b
  refs/heads/cassandra-3.0 50560aaf0 -> 71c1f9866
  refs/heads/cassandra-3.11 e99585983 -> 2b62cb997
  refs/heads/trunk f3cd28d85 -> 66e2c1b90


Fix GRANT/REVOKE when keyspace isn't specified

patch by Aleksey Yeschenko; reviewed by Sam Tunnicliffe for
CASSANDRA-13053


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

Branch: refs/heads/cassandra-2.2
Commit: e4be2d06b756106d7ad31b36b3cc46bc97088064
Parents: 44fefef
Author: Aleksey Yeschenko 
Authored: Tue Feb 28 18:23:00 2017 +
Committer: Aleksey Yeschenko 
Committed: Wed Mar 8 00:16:10 2017 +

--
 CHANGES.txt | 2 ++
 .../cql3/statements/PermissionsManagementStatement.java | 5 +
 2 files changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4be2d06/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index ca1aa27..0982de9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.10
+ * Fix GRANT/REVOKE when keyspace isn't specified (CASSANDRA-13053)
  * Avoid race on receiver by starting streaming sender thread after sending 
init message (CASSANDRA-12886)
  * Fix "multiple versions of ant detected..." when running ant test 
(CASSANDRA-13232)
  * Coalescing strategy sleeps too much (CASSANDRA-13090)
@@ -11,6 +12,7 @@ Merged from 2.1:
  * Remove unused repositories (CASSANDRA-13278)
  * Log stacktrace of uncaught exceptions (CASSANDRA-13108)
 
+
 2.2.9
  * Fix negative mean latency metric (CASSANDRA-12876)
  * Use only one file pointer when creating commitlog segments (CASSANDRA-12539)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4be2d06/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
--
diff --git 
a/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
 
b/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
index b22e400..56a2f26 100644
--- 
a/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
+++ 
b/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
@@ -50,6 +50,7 @@ public abstract class PermissionsManagementStatement extends 
AuthorizationStatem
 throw new InvalidRequestException(String.format("Role %s doesn't 
exist", grantee.getRoleName()));
 
 // if a keyspace is omitted when GRANT/REVOKE ON TABLE , we 
need to correct the resource.
+// called both here and in checkAccess(), as in some cases we do not 
call the latter.
 resource = maybeCorrectResource(resource, state);
 
 // altering permissions on builtin functions is not supported
@@ -65,8 +66,12 @@ public abstract class PermissionsManagementStatement extends 
AuthorizationStatem
 
 public void checkAccess(ClientState state) throws UnauthorizedException
 {
+// if a keyspace is omitted when GRANT/REVOKE ON TABLE , we 
need to correct the resource.
+resource = maybeCorrectResource(resource, state);
+
 // check that the user has AUTHORIZE permission on the resource or its 
parents, otherwise reject GRANT/REVOKE.
 state.ensureHasPermission(Permission.AUTHORIZE, resource);
+
 // check that the user has [a single permission or all in case of ALL] 
on the resource or its parents.
 for (Permission p : permissions)
 state.ensureHasPermission(p, resource);



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

2017-03-07 Thread aleksey
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/66e2c1b9
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/66e2c1b9
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/66e2c1b9

Branch: refs/heads/trunk
Commit: 66e2c1b90c4f6c03e950034b676a131ebdb33228
Parents: f3cd28d 2b62cb9
Author: Aleksey Yeschenko 
Authored: Wed Mar 8 00:22:42 2017 +
Committer: Aleksey Yeschenko 
Committed: Wed Mar 8 00:22:42 2017 +

--
 CHANGES.txt | 1 +
 .../cql3/statements/PermissionsManagementStatement.java | 5 +
 2 files changed, 6 insertions(+)
--


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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/66e2c1b9/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
--



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

2017-03-07 Thread aleksey
Merge branch 'cassandra-2.2' into cassandra-3.0


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

Branch: refs/heads/trunk
Commit: 71c1f986656c83fa62b5ad464b8947efd89e207d
Parents: 50560aa e4be2d0
Author: Aleksey Yeschenko 
Authored: Wed Mar 8 00:19:54 2017 +
Committer: Aleksey Yeschenko 
Committed: Wed Mar 8 00:19:54 2017 +

--
 CHANGES.txt  | 8 +++-
 .../cql3/statements/PermissionsManagementStatement.java  | 5 +
 2 files changed, 12 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/71c1f986/CHANGES.txt
--
diff --cc CHANGES.txt
index 36f058b,0982de9..7551a7f
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,13 -1,5 +1,18 @@@
 -2.2.10
++3.0.13
++Merged from 2.2:
+  * Fix GRANT/REVOKE when keyspace isn't specified (CASSANDRA-13053)
++
++
 +3.0.12
 + * Prevent data loss on upgrade 2.1 - 3.0 by adding component separator to 
LogRecord absolute path (CASSANDRA-13294)
 + * Improve testing on macOS by eliminating sigar logging (CASSANDRA-13233)
 + * Cqlsh copy-from should error out when csv contains invalid data for 
collections (CASSANDRA-13071)
 + * Update c.yaml doc for offheap memtables (CASSANDRA-13179)
 + * Faster StreamingHistogram (CASSANDRA-13038)
 + * Legacy deserializer can create unexpected boundary range tombstones 
(CASSANDRA-13237)
 + * Remove unnecessary assertion from AntiCompactionTest (CASSANDRA-13070)
 + * Fix cqlsh COPY for dates before 1900 (CASSANDRA-13185)
- Merged from 2.2
++Merged from 2.2:
   * Avoid race on receiver by starting streaming sender thread after sending 
init message (CASSANDRA-12886)
   * Fix "multiple versions of ant detected..." when running ant test 
(CASSANDRA-13232)
   * Coalescing strategy sleeps too much (CASSANDRA-13090)
@@@ -19,47 -12,8 +24,48 @@@ Merged from 2.1
   * Remove unused repositories (CASSANDRA-13278)
   * Log stacktrace of uncaught exceptions (CASSANDRA-13108)
  
+ 
 -2.2.9
 +3.0.11
 + * Use keyspace replication settings on system.size_estimates table 
(CASSANDRA-9639)
 + * Add vm.max_map_count StartupCheck (CASSANDRA-13008)
 + * Hint related logging should include the IP address of the destination in 
addition to 
 +   host ID (CASSANDRA-13205)
 + * Reloading logback.xml does not work (CASSANDRA-13173)
 + * Lightweight transactions temporarily fail after upgrade from 2.1 to 3.0 
(CASSANDRA-13109)
 + * Duplicate rows after upgrading from 2.1.16 to 3.0.10/3.9 (CASSANDRA-13125)
 + * Fix UPDATE queries with empty IN restrictions (CASSANDRA-13152)
 + * Abort or retry on failed hints delivery (CASSANDRA-13124)
 + * Fix handling of partition with partition-level deletion plus
 +   live rows in sstabledump (CASSANDRA-13177)
 + * Provide user workaround when system_schema.columns does not contain entries
 +   for a table that's in system_schema.tables (CASSANDRA-13180)
 + * Dump threads when unit tests time out (CASSANDRA-13117)
 + * Better error when modifying function permissions without explicit keyspace 
(CASSANDRA-12925)
 + * Indexer is not correctly invoked when building indexes over sstables 
(CASSANDRA-13075)
 + * Read repair is not blocking repair to finish in foreground repair 
(CASSANDRA-13115)
 + * Stress daemon help is incorrect (CASSANDRA-12563)
 + * Remove ALTER TYPE support (CASSANDRA-12443)
 + * Fix assertion for certain legacy range tombstone pattern (CASSANDRA-12203)
 + * Set javac encoding to utf-8 (CASSANDRA-11077)
 + * Replace empty strings with null values if they cannot be converted 
(CASSANDRA-12794)
 + * Fixed flacky SSTableRewriterTest: check file counts before calling 
validateCFS (CASSANDRA-12348)
 + * Fix deserialization of 2.x DeletedCells (CASSANDRA-12620)
 + * Add parent repair session id to anticompaction log message 
(CASSANDRA-12186)
 + * Improve contention handling on failure to acquire MV lock for streaming 
and hints (CASSANDRA-12905)
 + * Fix DELETE and UPDATE queries with empty IN restrictions (CASSANDRA-12829)
 + * Mark MVs as built after successful bootstrap (CASSANDRA-12984)
 + * Estimated TS drop-time histogram updated with Cell.NO_DELETION_TIME 
(CASSANDRA-13040)
 + * Nodetool compactionstats fails with NullPointerException (CASSANDRA-13021)
 + * Thread local pools never cleaned up (CASSANDRA-13033)
 + * Set RPC_READY to false when draining or if a node is marked as shutdown 
(CASSANDRA-12781)
 + * Make sure sstables only get committed when it's safe to discard commit log 
records (CASSANDRA-12956)
 + * Reject default_time_to_live option when creating or 

[03/10] cassandra git commit: Fix GRANT/REVOKE when keyspace isn't specified

2017-03-07 Thread aleksey
Fix GRANT/REVOKE when keyspace isn't specified

patch by Aleksey Yeschenko; reviewed by Sam Tunnicliffe for
CASSANDRA-13053


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

Branch: refs/heads/cassandra-3.11
Commit: e4be2d06b756106d7ad31b36b3cc46bc97088064
Parents: 44fefef
Author: Aleksey Yeschenko 
Authored: Tue Feb 28 18:23:00 2017 +
Committer: Aleksey Yeschenko 
Committed: Wed Mar 8 00:16:10 2017 +

--
 CHANGES.txt | 2 ++
 .../cql3/statements/PermissionsManagementStatement.java | 5 +
 2 files changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4be2d06/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index ca1aa27..0982de9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.10
+ * Fix GRANT/REVOKE when keyspace isn't specified (CASSANDRA-13053)
  * Avoid race on receiver by starting streaming sender thread after sending 
init message (CASSANDRA-12886)
  * Fix "multiple versions of ant detected..." when running ant test 
(CASSANDRA-13232)
  * Coalescing strategy sleeps too much (CASSANDRA-13090)
@@ -11,6 +12,7 @@ Merged from 2.1:
  * Remove unused repositories (CASSANDRA-13278)
  * Log stacktrace of uncaught exceptions (CASSANDRA-13108)
 
+
 2.2.9
  * Fix negative mean latency metric (CASSANDRA-12876)
  * Use only one file pointer when creating commitlog segments (CASSANDRA-12539)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4be2d06/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
--
diff --git 
a/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
 
b/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
index b22e400..56a2f26 100644
--- 
a/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
+++ 
b/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
@@ -50,6 +50,7 @@ public abstract class PermissionsManagementStatement extends 
AuthorizationStatem
 throw new InvalidRequestException(String.format("Role %s doesn't 
exist", grantee.getRoleName()));
 
 // if a keyspace is omitted when GRANT/REVOKE ON TABLE , we 
need to correct the resource.
+// called both here and in checkAccess(), as in some cases we do not 
call the latter.
 resource = maybeCorrectResource(resource, state);
 
 // altering permissions on builtin functions is not supported
@@ -65,8 +66,12 @@ public abstract class PermissionsManagementStatement extends 
AuthorizationStatem
 
 public void checkAccess(ClientState state) throws UnauthorizedException
 {
+// if a keyspace is omitted when GRANT/REVOKE ON TABLE , we 
need to correct the resource.
+resource = maybeCorrectResource(resource, state);
+
 // check that the user has AUTHORIZE permission on the resource or its 
parents, otherwise reject GRANT/REVOKE.
 state.ensureHasPermission(Permission.AUTHORIZE, resource);
+
 // check that the user has [a single permission or all in case of ALL] 
on the resource or its parents.
 for (Permission p : permissions)
 state.ensureHasPermission(p, resource);



[08/10] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11

2017-03-07 Thread aleksey
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/2b62cb99
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/2b62cb99
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/2b62cb99

Branch: refs/heads/cassandra-3.11
Commit: 2b62cb997ed163c85b0cb50e3198935b38aa2fb6
Parents: e995859 71c1f98
Author: Aleksey Yeschenko 
Authored: Wed Mar 8 00:22:35 2017 +
Committer: Aleksey Yeschenko 
Committed: Wed Mar 8 00:22:35 2017 +

--
 CHANGES.txt | 2 ++
 .../cql3/statements/PermissionsManagementStatement.java | 5 +
 2 files changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2b62cb99/CHANGES.txt
--
diff --cc CHANGES.txt
index 3852a64,7551a7f..88599b7
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -30,137 -39,6 +30,139 @@@ Merged from 3.0
 live rows in sstabledump (CASSANDRA-13177)
   * Provide user workaround when system_schema.columns does not contain entries
 for a table that's in system_schema.tables (CASSANDRA-13180)
 +Merged from 2.2:
++ * Fix GRANT/REVOKE when keyspace isn't specified (CASSANDRA-13053)
 + * Fix flaky LongLeveledCompactionStrategyTest (CASSANDRA-12202)
 + * Fix failing COPY TO STDOUT (CASSANDRA-12497)
 + * Fix ColumnCounter::countAll behaviour for reverse queries (CASSANDRA-13222)
 + * Exceptions encountered calling getSeeds() breaks OTC thread 
(CASSANDRA-13018)
 + * Fix negative mean latency metric (CASSANDRA-12876)
 + * Use only one file pointer when creating commitlog segments 
(CASSANDRA-12539)
 +Merged from 2.1:
 + * Remove unused repositories (CASSANDRA-13278)
 + * Log stacktrace of uncaught exceptions (CASSANDRA-13108)
 + * Use portable stderr for java error in startup (CASSANDRA-13211)
 + * Fix Thread Leak in OutboundTcpConnection (CASSANDRA-13204)
 + * Coalescing strategy can enter infinite loop (CASSANDRA-13159)
 +
++
 +3.10
 + * Fix secondary index queries regression (CASSANDRA-13013)
 + * Add duration type to the protocol V5 (CASSANDRA-12850)
 + * Fix duration type validation (CASSANDRA-13143)
 + * Fix flaky GcCompactionTest (CASSANDRA-12664)
 + * Fix TestHintedHandoff.hintedhandoff_decom_test (CASSANDRA-13058)
 + * Fixed query monitoring for range queries (CASSANDRA-13050)
 + * Remove outboundBindAny configuration property (CASSANDRA-12673)
 + * Use correct bounds for all-data range when filtering (CASSANDRA-12666)
 + * Remove timing window in test case (CASSANDRA-12875)
 + * Resolve unit testing without JCE security libraries installed 
(CASSANDRA-12945)
 + * Fix inconsistencies in cassandra-stress load balancing policy 
(CASSANDRA-12919)
 + * Fix validation of non-frozen UDT cells (CASSANDRA-12916)
 + * Don't shut down socket input/output on StreamSession (CASSANDRA-12903)
 + * Fix Murmur3PartitionerTest (CASSANDRA-12858)
 + * Move cqlsh syntax rules into separate module and allow easier 
customization (CASSANDRA-12897)
 + * Fix CommitLogSegmentManagerTest (CASSANDRA-12283)
 + * Fix cassandra-stress truncate option (CASSANDRA-12695)
 + * Fix crossNode value when receiving messages (CASSANDRA-12791)
 + * Don't load MX4J beans twice (CASSANDRA-12869)
 + * Extend native protocol request flags, add versions to SUPPORTED, and 
introduce ProtocolVersion enum (CASSANDRA-12838)
 + * Set JOINING mode when running pre-join tasks (CASSANDRA-12836)
 + * remove net.mintern.primitive library due to license issue (CASSANDRA-12845)
 + * Properly format IPv6 addresses when logging JMX service URL 
(CASSANDRA-12454)
 + * Optimize the vnode allocation for single replica per DC (CASSANDRA-12777)
 + * Use non-token restrictions for bounds when token restrictions are 
overridden (CASSANDRA-12419)
 + * Fix CQLSH auto completion for PER PARTITION LIMIT (CASSANDRA-12803)
 + * Use different build directories for Eclipse and Ant (CASSANDRA-12466)
 + * Avoid potential AttributeError in cqlsh due to no table metadata 
(CASSANDRA-12815)
 + * Fix RandomReplicationAwareTokenAllocatorTest.testExistingCluster 
(CASSANDRA-12812)
 + * Upgrade commons-codec to 1.9 (CASSANDRA-12790)
 + * Make the fanout size for LeveledCompactionStrategy to be configurable 
(CASSANDRA-11550)
 + * Add duration data type (CASSANDRA-11873)
 + * Fix timeout in ReplicationAwareTokenAllocatorTest (CASSANDRA-12784)
 + * Improve sum aggregate functions (CASSANDRA-12417)
 + * Make cassandra.yaml docs for batch_size_*_threshold_in_kb reflect changes 
in CASSANDRA-10876 (CASSANDRA-12761)
 + * cqlsh fails to format collections when using aliases (CASSANDRA-11534)
 + * Check for hash conflicts in prepared statements (CASSANDRA-12733)
 + * Exit query parsing upon 

cassandra-builds git commit: Use custom workspace on cqlsh child jobs for shorter paths

2017-03-07 Thread mshuler
Repository: cassandra-builds
Updated Branches:
  refs/heads/master 829c66e42 -> d94b05fd9


Use custom workspace on cqlsh child jobs for shorter paths


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

Branch: refs/heads/master
Commit: d94b05fd948ba0b56ae3d0f9b2e49a63caa93915
Parents: 829c66e
Author: Michael Shuler 
Authored: Tue Mar 7 18:18:01 2017 -0600
Committer: Michael Shuler 
Committed: Tue Mar 7 18:18:01 2017 -0600

--
 jenkins-dsl/cassandra_job_dsl_seed.groovy | 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra-builds/blob/d94b05fd/jenkins-dsl/cassandra_job_dsl_seed.groovy
--
diff --git a/jenkins-dsl/cassandra_job_dsl_seed.groovy 
b/jenkins-dsl/cassandra_job_dsl_seed.groovy
index 760efd8..9dcf7bb 100644
--- a/jenkins-dsl/cassandra_job_dsl_seed.groovy
+++ b/jenkins-dsl/cassandra_job_dsl_seed.groovy
@@ -191,6 +191,8 @@ matrixJob('Cassandra-template-cqlsh-tests') {
 jdk(jdkLabel)
 label('label', slaveLabel)
 }
+// this should prevent long path expansion from the axis definitions
+childCustomWorkspace('.')
 scm {
 git {
 remote {
@@ -455,6 +457,8 @@ matrixJob('Cassandra-devbranch-cqlsh-tests') {
 jdk(jdkLabel)
 label('label', slaveLabel)
 }
+// this should prevent long path expansion from the axis definitions
+childCustomWorkspace('.')
 scm {
 git {
 remote {



[cassandra] Git Push Summary [forced push!] [Forced Update!]

2017-03-07 Thread aleksey
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 e83501088 -> 44fefeffa (forced update)


[cassandra] Git Push Summary [forced push!] [Forced Update!]

2017-03-07 Thread aleksey
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.0 ddda76810 -> 50560aaf0 (forced update)


[cassandra] Git Push Summary [forced push!] [Forced Update!]

2017-03-07 Thread aleksey
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.11 a7f6bf8cb -> e99585983 (forced update)


[cassandra] Git Push Summary [forced push!] [Forced Update!]

2017-03-07 Thread aleksey
Repository: cassandra
Updated Branches:
  refs/heads/trunk 78d648fb4 -> f3cd28d85 (forced update)


[08/10] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11

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

Branch: refs/heads/cassandra-3.11
Commit: a7f6bf8cb9d3a963098a7c8ae77c56132f821f7e
Parents: e995859 ddda768
Author: Aleksey Yeschenko 
Authored: Wed Mar 8 00:10:43 2017 +
Committer: Aleksey Yeschenko 
Committed: Wed Mar 8 00:10:43 2017 +

--
 CHANGES.txt | 2 ++
 .../cql3/statements/PermissionsManagementStatement.java | 5 +
 2 files changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a7f6bf8c/CHANGES.txt
--
diff --cc CHANGES.txt
index 3852a64,7551a7f..88599b7
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -30,137 -39,6 +30,139 @@@ Merged from 3.0
 live rows in sstabledump (CASSANDRA-13177)
   * Provide user workaround when system_schema.columns does not contain entries
 for a table that's in system_schema.tables (CASSANDRA-13180)
 +Merged from 2.2:
++ * Fix GRANT/REVOKE when keyspace isn't specified (CASSANDRA-13053)
 + * Fix flaky LongLeveledCompactionStrategyTest (CASSANDRA-12202)
 + * Fix failing COPY TO STDOUT (CASSANDRA-12497)
 + * Fix ColumnCounter::countAll behaviour for reverse queries (CASSANDRA-13222)
 + * Exceptions encountered calling getSeeds() breaks OTC thread 
(CASSANDRA-13018)
 + * Fix negative mean latency metric (CASSANDRA-12876)
 + * Use only one file pointer when creating commitlog segments 
(CASSANDRA-12539)
 +Merged from 2.1:
 + * Remove unused repositories (CASSANDRA-13278)
 + * Log stacktrace of uncaught exceptions (CASSANDRA-13108)
 + * Use portable stderr for java error in startup (CASSANDRA-13211)
 + * Fix Thread Leak in OutboundTcpConnection (CASSANDRA-13204)
 + * Coalescing strategy can enter infinite loop (CASSANDRA-13159)
 +
++
 +3.10
 + * Fix secondary index queries regression (CASSANDRA-13013)
 + * Add duration type to the protocol V5 (CASSANDRA-12850)
 + * Fix duration type validation (CASSANDRA-13143)
 + * Fix flaky GcCompactionTest (CASSANDRA-12664)
 + * Fix TestHintedHandoff.hintedhandoff_decom_test (CASSANDRA-13058)
 + * Fixed query monitoring for range queries (CASSANDRA-13050)
 + * Remove outboundBindAny configuration property (CASSANDRA-12673)
 + * Use correct bounds for all-data range when filtering (CASSANDRA-12666)
 + * Remove timing window in test case (CASSANDRA-12875)
 + * Resolve unit testing without JCE security libraries installed 
(CASSANDRA-12945)
 + * Fix inconsistencies in cassandra-stress load balancing policy 
(CASSANDRA-12919)
 + * Fix validation of non-frozen UDT cells (CASSANDRA-12916)
 + * Don't shut down socket input/output on StreamSession (CASSANDRA-12903)
 + * Fix Murmur3PartitionerTest (CASSANDRA-12858)
 + * Move cqlsh syntax rules into separate module and allow easier 
customization (CASSANDRA-12897)
 + * Fix CommitLogSegmentManagerTest (CASSANDRA-12283)
 + * Fix cassandra-stress truncate option (CASSANDRA-12695)
 + * Fix crossNode value when receiving messages (CASSANDRA-12791)
 + * Don't load MX4J beans twice (CASSANDRA-12869)
 + * Extend native protocol request flags, add versions to SUPPORTED, and 
introduce ProtocolVersion enum (CASSANDRA-12838)
 + * Set JOINING mode when running pre-join tasks (CASSANDRA-12836)
 + * remove net.mintern.primitive library due to license issue (CASSANDRA-12845)
 + * Properly format IPv6 addresses when logging JMX service URL 
(CASSANDRA-12454)
 + * Optimize the vnode allocation for single replica per DC (CASSANDRA-12777)
 + * Use non-token restrictions for bounds when token restrictions are 
overridden (CASSANDRA-12419)
 + * Fix CQLSH auto completion for PER PARTITION LIMIT (CASSANDRA-12803)
 + * Use different build directories for Eclipse and Ant (CASSANDRA-12466)
 + * Avoid potential AttributeError in cqlsh due to no table metadata 
(CASSANDRA-12815)
 + * Fix RandomReplicationAwareTokenAllocatorTest.testExistingCluster 
(CASSANDRA-12812)
 + * Upgrade commons-codec to 1.9 (CASSANDRA-12790)
 + * Make the fanout size for LeveledCompactionStrategy to be configurable 
(CASSANDRA-11550)
 + * Add duration data type (CASSANDRA-11873)
 + * Fix timeout in ReplicationAwareTokenAllocatorTest (CASSANDRA-12784)
 + * Improve sum aggregate functions (CASSANDRA-12417)
 + * Make cassandra.yaml docs for batch_size_*_threshold_in_kb reflect changes 
in CASSANDRA-10876 (CASSANDRA-12761)
 + * cqlsh fails to format collections when using aliases (CASSANDRA-11534)
 + * Check for hash conflicts in prepared statements (CASSANDRA-12733)
 + * Exit query parsing upon 

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

2017-03-07 Thread aleksey
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/78d648fb
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/78d648fb
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/78d648fb

Branch: refs/heads/trunk
Commit: 78d648fb47191c739c9dcd952386d561905e16d4
Parents: f3cd28d a7f6bf8
Author: Aleksey Yeschenko 
Authored: Wed Mar 8 00:11:02 2017 +
Committer: Aleksey Yeschenko 
Committed: Wed Mar 8 00:11:02 2017 +

--
 CHANGES.txt | 1 +
 .../cql3/statements/PermissionsManagementStatement.java | 5 +
 2 files changed, 6 insertions(+)
--


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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/78d648fb/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
--



[03/10] cassandra git commit: CASSANDRA-13053: Properly handle GRANT/REVOKE authz when keyspace isn't set

2017-03-07 Thread aleksey
CASSANDRA-13053: Properly handle GRANT/REVOKE authz when keyspace isn't set


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

Branch: refs/heads/cassandra-3.11
Commit: e8350108866be740218ce296a02d3ae3fdc3b077
Parents: 44fefef
Author: Aleksey Yeschenko 
Authored: Tue Feb 28 18:23:00 2017 +
Committer: Aleksey Yeschenko 
Committed: Tue Mar 7 23:54:46 2017 +

--
 CHANGES.txt | 2 ++
 .../cql3/statements/PermissionsManagementStatement.java | 5 +
 2 files changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e8350108/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index ca1aa27..0982de9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.10
+ * Fix GRANT/REVOKE when keyspace isn't specified (CASSANDRA-13053)
  * Avoid race on receiver by starting streaming sender thread after sending 
init message (CASSANDRA-12886)
  * Fix "multiple versions of ant detected..." when running ant test 
(CASSANDRA-13232)
  * Coalescing strategy sleeps too much (CASSANDRA-13090)
@@ -11,6 +12,7 @@ Merged from 2.1:
  * Remove unused repositories (CASSANDRA-13278)
  * Log stacktrace of uncaught exceptions (CASSANDRA-13108)
 
+
 2.2.9
  * Fix negative mean latency metric (CASSANDRA-12876)
  * Use only one file pointer when creating commitlog segments (CASSANDRA-12539)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e8350108/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
--
diff --git 
a/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
 
b/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
index b22e400..56a2f26 100644
--- 
a/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
+++ 
b/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
@@ -50,6 +50,7 @@ public abstract class PermissionsManagementStatement extends 
AuthorizationStatem
 throw new InvalidRequestException(String.format("Role %s doesn't 
exist", grantee.getRoleName()));
 
 // if a keyspace is omitted when GRANT/REVOKE ON TABLE , we 
need to correct the resource.
+// called both here and in checkAccess(), as in some cases we do not 
call the latter.
 resource = maybeCorrectResource(resource, state);
 
 // altering permissions on builtin functions is not supported
@@ -65,8 +66,12 @@ public abstract class PermissionsManagementStatement extends 
AuthorizationStatem
 
 public void checkAccess(ClientState state) throws UnauthorizedException
 {
+// if a keyspace is omitted when GRANT/REVOKE ON TABLE , we 
need to correct the resource.
+resource = maybeCorrectResource(resource, state);
+
 // check that the user has AUTHORIZE permission on the resource or its 
parents, otherwise reject GRANT/REVOKE.
 state.ensureHasPermission(Permission.AUTHORIZE, resource);
+
 // check that the user has [a single permission or all in case of ALL] 
on the resource or its parents.
 for (Permission p : permissions)
 state.ensureHasPermission(p, resource);



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

2017-03-07 Thread aleksey
Merge branch 'cassandra-2.2' into cassandra-3.0


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

Branch: refs/heads/cassandra-3.11
Commit: ddda768103f75536b1b363c86c79750e34d5e8d8
Parents: 50560aa e835010
Author: Aleksey Yeschenko 
Authored: Tue Mar 7 23:57:35 2017 +
Committer: Aleksey Yeschenko 
Committed: Tue Mar 7 23:57:35 2017 +

--
 CHANGES.txt  | 8 +++-
 .../cql3/statements/PermissionsManagementStatement.java  | 5 +
 2 files changed, 12 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ddda7681/CHANGES.txt
--
diff --cc CHANGES.txt
index 36f058b,0982de9..7551a7f
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,13 -1,5 +1,18 @@@
 -2.2.10
++3.0.13
++Merged from 2.2:
+  * Fix GRANT/REVOKE when keyspace isn't specified (CASSANDRA-13053)
++
++
 +3.0.12
 + * Prevent data loss on upgrade 2.1 - 3.0 by adding component separator to 
LogRecord absolute path (CASSANDRA-13294)
 + * Improve testing on macOS by eliminating sigar logging (CASSANDRA-13233)
 + * Cqlsh copy-from should error out when csv contains invalid data for 
collections (CASSANDRA-13071)
 + * Update c.yaml doc for offheap memtables (CASSANDRA-13179)
 + * Faster StreamingHistogram (CASSANDRA-13038)
 + * Legacy deserializer can create unexpected boundary range tombstones 
(CASSANDRA-13237)
 + * Remove unnecessary assertion from AntiCompactionTest (CASSANDRA-13070)
 + * Fix cqlsh COPY for dates before 1900 (CASSANDRA-13185)
- Merged from 2.2
++Merged from 2.2:
   * Avoid race on receiver by starting streaming sender thread after sending 
init message (CASSANDRA-12886)
   * Fix "multiple versions of ant detected..." when running ant test 
(CASSANDRA-13232)
   * Coalescing strategy sleeps too much (CASSANDRA-13090)
@@@ -19,47 -12,8 +24,48 @@@ Merged from 2.1
   * Remove unused repositories (CASSANDRA-13278)
   * Log stacktrace of uncaught exceptions (CASSANDRA-13108)
  
+ 
 -2.2.9
 +3.0.11
 + * Use keyspace replication settings on system.size_estimates table 
(CASSANDRA-9639)
 + * Add vm.max_map_count StartupCheck (CASSANDRA-13008)
 + * Hint related logging should include the IP address of the destination in 
addition to 
 +   host ID (CASSANDRA-13205)
 + * Reloading logback.xml does not work (CASSANDRA-13173)
 + * Lightweight transactions temporarily fail after upgrade from 2.1 to 3.0 
(CASSANDRA-13109)
 + * Duplicate rows after upgrading from 2.1.16 to 3.0.10/3.9 (CASSANDRA-13125)
 + * Fix UPDATE queries with empty IN restrictions (CASSANDRA-13152)
 + * Abort or retry on failed hints delivery (CASSANDRA-13124)
 + * Fix handling of partition with partition-level deletion plus
 +   live rows in sstabledump (CASSANDRA-13177)
 + * Provide user workaround when system_schema.columns does not contain entries
 +   for a table that's in system_schema.tables (CASSANDRA-13180)
 + * Dump threads when unit tests time out (CASSANDRA-13117)
 + * Better error when modifying function permissions without explicit keyspace 
(CASSANDRA-12925)
 + * Indexer is not correctly invoked when building indexes over sstables 
(CASSANDRA-13075)
 + * Read repair is not blocking repair to finish in foreground repair 
(CASSANDRA-13115)
 + * Stress daemon help is incorrect (CASSANDRA-12563)
 + * Remove ALTER TYPE support (CASSANDRA-12443)
 + * Fix assertion for certain legacy range tombstone pattern (CASSANDRA-12203)
 + * Set javac encoding to utf-8 (CASSANDRA-11077)
 + * Replace empty strings with null values if they cannot be converted 
(CASSANDRA-12794)
 + * Fixed flacky SSTableRewriterTest: check file counts before calling 
validateCFS (CASSANDRA-12348)
 + * Fix deserialization of 2.x DeletedCells (CASSANDRA-12620)
 + * Add parent repair session id to anticompaction log message 
(CASSANDRA-12186)
 + * Improve contention handling on failure to acquire MV lock for streaming 
and hints (CASSANDRA-12905)
 + * Fix DELETE and UPDATE queries with empty IN restrictions (CASSANDRA-12829)
 + * Mark MVs as built after successful bootstrap (CASSANDRA-12984)
 + * Estimated TS drop-time histogram updated with Cell.NO_DELETION_TIME 
(CASSANDRA-13040)
 + * Nodetool compactionstats fails with NullPointerException (CASSANDRA-13021)
 + * Thread local pools never cleaned up (CASSANDRA-13033)
 + * Set RPC_READY to false when draining or if a node is marked as shutdown 
(CASSANDRA-12781)
 + * Make sure sstables only get committed when it's safe to discard commit log 
records (CASSANDRA-12956)
 + * Reject default_time_to_live option when 

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

2017-03-07 Thread aleksey
Merge branch 'cassandra-2.2' into cassandra-3.0


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

Branch: refs/heads/trunk
Commit: ddda768103f75536b1b363c86c79750e34d5e8d8
Parents: 50560aa e835010
Author: Aleksey Yeschenko 
Authored: Tue Mar 7 23:57:35 2017 +
Committer: Aleksey Yeschenko 
Committed: Tue Mar 7 23:57:35 2017 +

--
 CHANGES.txt  | 8 +++-
 .../cql3/statements/PermissionsManagementStatement.java  | 5 +
 2 files changed, 12 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ddda7681/CHANGES.txt
--
diff --cc CHANGES.txt
index 36f058b,0982de9..7551a7f
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,13 -1,5 +1,18 @@@
 -2.2.10
++3.0.13
++Merged from 2.2:
+  * Fix GRANT/REVOKE when keyspace isn't specified (CASSANDRA-13053)
++
++
 +3.0.12
 + * Prevent data loss on upgrade 2.1 - 3.0 by adding component separator to 
LogRecord absolute path (CASSANDRA-13294)
 + * Improve testing on macOS by eliminating sigar logging (CASSANDRA-13233)
 + * Cqlsh copy-from should error out when csv contains invalid data for 
collections (CASSANDRA-13071)
 + * Update c.yaml doc for offheap memtables (CASSANDRA-13179)
 + * Faster StreamingHistogram (CASSANDRA-13038)
 + * Legacy deserializer can create unexpected boundary range tombstones 
(CASSANDRA-13237)
 + * Remove unnecessary assertion from AntiCompactionTest (CASSANDRA-13070)
 + * Fix cqlsh COPY for dates before 1900 (CASSANDRA-13185)
- Merged from 2.2
++Merged from 2.2:
   * Avoid race on receiver by starting streaming sender thread after sending 
init message (CASSANDRA-12886)
   * Fix "multiple versions of ant detected..." when running ant test 
(CASSANDRA-13232)
   * Coalescing strategy sleeps too much (CASSANDRA-13090)
@@@ -19,47 -12,8 +24,48 @@@ Merged from 2.1
   * Remove unused repositories (CASSANDRA-13278)
   * Log stacktrace of uncaught exceptions (CASSANDRA-13108)
  
+ 
 -2.2.9
 +3.0.11
 + * Use keyspace replication settings on system.size_estimates table 
(CASSANDRA-9639)
 + * Add vm.max_map_count StartupCheck (CASSANDRA-13008)
 + * Hint related logging should include the IP address of the destination in 
addition to 
 +   host ID (CASSANDRA-13205)
 + * Reloading logback.xml does not work (CASSANDRA-13173)
 + * Lightweight transactions temporarily fail after upgrade from 2.1 to 3.0 
(CASSANDRA-13109)
 + * Duplicate rows after upgrading from 2.1.16 to 3.0.10/3.9 (CASSANDRA-13125)
 + * Fix UPDATE queries with empty IN restrictions (CASSANDRA-13152)
 + * Abort or retry on failed hints delivery (CASSANDRA-13124)
 + * Fix handling of partition with partition-level deletion plus
 +   live rows in sstabledump (CASSANDRA-13177)
 + * Provide user workaround when system_schema.columns does not contain entries
 +   for a table that's in system_schema.tables (CASSANDRA-13180)
 + * Dump threads when unit tests time out (CASSANDRA-13117)
 + * Better error when modifying function permissions without explicit keyspace 
(CASSANDRA-12925)
 + * Indexer is not correctly invoked when building indexes over sstables 
(CASSANDRA-13075)
 + * Read repair is not blocking repair to finish in foreground repair 
(CASSANDRA-13115)
 + * Stress daemon help is incorrect (CASSANDRA-12563)
 + * Remove ALTER TYPE support (CASSANDRA-12443)
 + * Fix assertion for certain legacy range tombstone pattern (CASSANDRA-12203)
 + * Set javac encoding to utf-8 (CASSANDRA-11077)
 + * Replace empty strings with null values if they cannot be converted 
(CASSANDRA-12794)
 + * Fixed flacky SSTableRewriterTest: check file counts before calling 
validateCFS (CASSANDRA-12348)
 + * Fix deserialization of 2.x DeletedCells (CASSANDRA-12620)
 + * Add parent repair session id to anticompaction log message 
(CASSANDRA-12186)
 + * Improve contention handling on failure to acquire MV lock for streaming 
and hints (CASSANDRA-12905)
 + * Fix DELETE and UPDATE queries with empty IN restrictions (CASSANDRA-12829)
 + * Mark MVs as built after successful bootstrap (CASSANDRA-12984)
 + * Estimated TS drop-time histogram updated with Cell.NO_DELETION_TIME 
(CASSANDRA-13040)
 + * Nodetool compactionstats fails with NullPointerException (CASSANDRA-13021)
 + * Thread local pools never cleaned up (CASSANDRA-13033)
 + * Set RPC_READY to false when draining or if a node is marked as shutdown 
(CASSANDRA-12781)
 + * Make sure sstables only get committed when it's safe to discard commit log 
records (CASSANDRA-12956)
 + * Reject default_time_to_live option when creating or 

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

2017-03-07 Thread aleksey
Merge branch 'cassandra-2.2' into cassandra-3.0


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

Branch: refs/heads/cassandra-3.0
Commit: ddda768103f75536b1b363c86c79750e34d5e8d8
Parents: 50560aa e835010
Author: Aleksey Yeschenko 
Authored: Tue Mar 7 23:57:35 2017 +
Committer: Aleksey Yeschenko 
Committed: Tue Mar 7 23:57:35 2017 +

--
 CHANGES.txt  | 8 +++-
 .../cql3/statements/PermissionsManagementStatement.java  | 5 +
 2 files changed, 12 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ddda7681/CHANGES.txt
--
diff --cc CHANGES.txt
index 36f058b,0982de9..7551a7f
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,13 -1,5 +1,18 @@@
 -2.2.10
++3.0.13
++Merged from 2.2:
+  * Fix GRANT/REVOKE when keyspace isn't specified (CASSANDRA-13053)
++
++
 +3.0.12
 + * Prevent data loss on upgrade 2.1 - 3.0 by adding component separator to 
LogRecord absolute path (CASSANDRA-13294)
 + * Improve testing on macOS by eliminating sigar logging (CASSANDRA-13233)
 + * Cqlsh copy-from should error out when csv contains invalid data for 
collections (CASSANDRA-13071)
 + * Update c.yaml doc for offheap memtables (CASSANDRA-13179)
 + * Faster StreamingHistogram (CASSANDRA-13038)
 + * Legacy deserializer can create unexpected boundary range tombstones 
(CASSANDRA-13237)
 + * Remove unnecessary assertion from AntiCompactionTest (CASSANDRA-13070)
 + * Fix cqlsh COPY for dates before 1900 (CASSANDRA-13185)
- Merged from 2.2
++Merged from 2.2:
   * Avoid race on receiver by starting streaming sender thread after sending 
init message (CASSANDRA-12886)
   * Fix "multiple versions of ant detected..." when running ant test 
(CASSANDRA-13232)
   * Coalescing strategy sleeps too much (CASSANDRA-13090)
@@@ -19,47 -12,8 +24,48 @@@ Merged from 2.1
   * Remove unused repositories (CASSANDRA-13278)
   * Log stacktrace of uncaught exceptions (CASSANDRA-13108)
  
+ 
 -2.2.9
 +3.0.11
 + * Use keyspace replication settings on system.size_estimates table 
(CASSANDRA-9639)
 + * Add vm.max_map_count StartupCheck (CASSANDRA-13008)
 + * Hint related logging should include the IP address of the destination in 
addition to 
 +   host ID (CASSANDRA-13205)
 + * Reloading logback.xml does not work (CASSANDRA-13173)
 + * Lightweight transactions temporarily fail after upgrade from 2.1 to 3.0 
(CASSANDRA-13109)
 + * Duplicate rows after upgrading from 2.1.16 to 3.0.10/3.9 (CASSANDRA-13125)
 + * Fix UPDATE queries with empty IN restrictions (CASSANDRA-13152)
 + * Abort or retry on failed hints delivery (CASSANDRA-13124)
 + * Fix handling of partition with partition-level deletion plus
 +   live rows in sstabledump (CASSANDRA-13177)
 + * Provide user workaround when system_schema.columns does not contain entries
 +   for a table that's in system_schema.tables (CASSANDRA-13180)
 + * Dump threads when unit tests time out (CASSANDRA-13117)
 + * Better error when modifying function permissions without explicit keyspace 
(CASSANDRA-12925)
 + * Indexer is not correctly invoked when building indexes over sstables 
(CASSANDRA-13075)
 + * Read repair is not blocking repair to finish in foreground repair 
(CASSANDRA-13115)
 + * Stress daemon help is incorrect (CASSANDRA-12563)
 + * Remove ALTER TYPE support (CASSANDRA-12443)
 + * Fix assertion for certain legacy range tombstone pattern (CASSANDRA-12203)
 + * Set javac encoding to utf-8 (CASSANDRA-11077)
 + * Replace empty strings with null values if they cannot be converted 
(CASSANDRA-12794)
 + * Fixed flacky SSTableRewriterTest: check file counts before calling 
validateCFS (CASSANDRA-12348)
 + * Fix deserialization of 2.x DeletedCells (CASSANDRA-12620)
 + * Add parent repair session id to anticompaction log message 
(CASSANDRA-12186)
 + * Improve contention handling on failure to acquire MV lock for streaming 
and hints (CASSANDRA-12905)
 + * Fix DELETE and UPDATE queries with empty IN restrictions (CASSANDRA-12829)
 + * Mark MVs as built after successful bootstrap (CASSANDRA-12984)
 + * Estimated TS drop-time histogram updated with Cell.NO_DELETION_TIME 
(CASSANDRA-13040)
 + * Nodetool compactionstats fails with NullPointerException (CASSANDRA-13021)
 + * Thread local pools never cleaned up (CASSANDRA-13033)
 + * Set RPC_READY to false when draining or if a node is marked as shutdown 
(CASSANDRA-12781)
 + * Make sure sstables only get committed when it's safe to discard commit log 
records (CASSANDRA-12956)
 + * Reject default_time_to_live option when 

[09/10] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11

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

Branch: refs/heads/trunk
Commit: a7f6bf8cb9d3a963098a7c8ae77c56132f821f7e
Parents: e995859 ddda768
Author: Aleksey Yeschenko 
Authored: Wed Mar 8 00:10:43 2017 +
Committer: Aleksey Yeschenko 
Committed: Wed Mar 8 00:10:43 2017 +

--
 CHANGES.txt | 2 ++
 .../cql3/statements/PermissionsManagementStatement.java | 5 +
 2 files changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a7f6bf8c/CHANGES.txt
--
diff --cc CHANGES.txt
index 3852a64,7551a7f..88599b7
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -30,137 -39,6 +30,139 @@@ Merged from 3.0
 live rows in sstabledump (CASSANDRA-13177)
   * Provide user workaround when system_schema.columns does not contain entries
 for a table that's in system_schema.tables (CASSANDRA-13180)
 +Merged from 2.2:
++ * Fix GRANT/REVOKE when keyspace isn't specified (CASSANDRA-13053)
 + * Fix flaky LongLeveledCompactionStrategyTest (CASSANDRA-12202)
 + * Fix failing COPY TO STDOUT (CASSANDRA-12497)
 + * Fix ColumnCounter::countAll behaviour for reverse queries (CASSANDRA-13222)
 + * Exceptions encountered calling getSeeds() breaks OTC thread 
(CASSANDRA-13018)
 + * Fix negative mean latency metric (CASSANDRA-12876)
 + * Use only one file pointer when creating commitlog segments 
(CASSANDRA-12539)
 +Merged from 2.1:
 + * Remove unused repositories (CASSANDRA-13278)
 + * Log stacktrace of uncaught exceptions (CASSANDRA-13108)
 + * Use portable stderr for java error in startup (CASSANDRA-13211)
 + * Fix Thread Leak in OutboundTcpConnection (CASSANDRA-13204)
 + * Coalescing strategy can enter infinite loop (CASSANDRA-13159)
 +
++
 +3.10
 + * Fix secondary index queries regression (CASSANDRA-13013)
 + * Add duration type to the protocol V5 (CASSANDRA-12850)
 + * Fix duration type validation (CASSANDRA-13143)
 + * Fix flaky GcCompactionTest (CASSANDRA-12664)
 + * Fix TestHintedHandoff.hintedhandoff_decom_test (CASSANDRA-13058)
 + * Fixed query monitoring for range queries (CASSANDRA-13050)
 + * Remove outboundBindAny configuration property (CASSANDRA-12673)
 + * Use correct bounds for all-data range when filtering (CASSANDRA-12666)
 + * Remove timing window in test case (CASSANDRA-12875)
 + * Resolve unit testing without JCE security libraries installed 
(CASSANDRA-12945)
 + * Fix inconsistencies in cassandra-stress load balancing policy 
(CASSANDRA-12919)
 + * Fix validation of non-frozen UDT cells (CASSANDRA-12916)
 + * Don't shut down socket input/output on StreamSession (CASSANDRA-12903)
 + * Fix Murmur3PartitionerTest (CASSANDRA-12858)
 + * Move cqlsh syntax rules into separate module and allow easier 
customization (CASSANDRA-12897)
 + * Fix CommitLogSegmentManagerTest (CASSANDRA-12283)
 + * Fix cassandra-stress truncate option (CASSANDRA-12695)
 + * Fix crossNode value when receiving messages (CASSANDRA-12791)
 + * Don't load MX4J beans twice (CASSANDRA-12869)
 + * Extend native protocol request flags, add versions to SUPPORTED, and 
introduce ProtocolVersion enum (CASSANDRA-12838)
 + * Set JOINING mode when running pre-join tasks (CASSANDRA-12836)
 + * remove net.mintern.primitive library due to license issue (CASSANDRA-12845)
 + * Properly format IPv6 addresses when logging JMX service URL 
(CASSANDRA-12454)
 + * Optimize the vnode allocation for single replica per DC (CASSANDRA-12777)
 + * Use non-token restrictions for bounds when token restrictions are 
overridden (CASSANDRA-12419)
 + * Fix CQLSH auto completion for PER PARTITION LIMIT (CASSANDRA-12803)
 + * Use different build directories for Eclipse and Ant (CASSANDRA-12466)
 + * Avoid potential AttributeError in cqlsh due to no table metadata 
(CASSANDRA-12815)
 + * Fix RandomReplicationAwareTokenAllocatorTest.testExistingCluster 
(CASSANDRA-12812)
 + * Upgrade commons-codec to 1.9 (CASSANDRA-12790)
 + * Make the fanout size for LeveledCompactionStrategy to be configurable 
(CASSANDRA-11550)
 + * Add duration data type (CASSANDRA-11873)
 + * Fix timeout in ReplicationAwareTokenAllocatorTest (CASSANDRA-12784)
 + * Improve sum aggregate functions (CASSANDRA-12417)
 + * Make cassandra.yaml docs for batch_size_*_threshold_in_kb reflect changes 
in CASSANDRA-10876 (CASSANDRA-12761)
 + * cqlsh fails to format collections when using aliases (CASSANDRA-11534)
 + * Check for hash conflicts in prepared statements (CASSANDRA-12733)
 + * Exit query parsing upon first error 

[04/10] cassandra git commit: CASSANDRA-13053: Properly handle GRANT/REVOKE authz when keyspace isn't set

2017-03-07 Thread aleksey
CASSANDRA-13053: Properly handle GRANT/REVOKE authz when keyspace isn't set


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

Branch: refs/heads/trunk
Commit: e8350108866be740218ce296a02d3ae3fdc3b077
Parents: 44fefef
Author: Aleksey Yeschenko 
Authored: Tue Feb 28 18:23:00 2017 +
Committer: Aleksey Yeschenko 
Committed: Tue Mar 7 23:54:46 2017 +

--
 CHANGES.txt | 2 ++
 .../cql3/statements/PermissionsManagementStatement.java | 5 +
 2 files changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e8350108/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index ca1aa27..0982de9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.10
+ * Fix GRANT/REVOKE when keyspace isn't specified (CASSANDRA-13053)
  * Avoid race on receiver by starting streaming sender thread after sending 
init message (CASSANDRA-12886)
  * Fix "multiple versions of ant detected..." when running ant test 
(CASSANDRA-13232)
  * Coalescing strategy sleeps too much (CASSANDRA-13090)
@@ -11,6 +12,7 @@ Merged from 2.1:
  * Remove unused repositories (CASSANDRA-13278)
  * Log stacktrace of uncaught exceptions (CASSANDRA-13108)
 
+
 2.2.9
  * Fix negative mean latency metric (CASSANDRA-12876)
  * Use only one file pointer when creating commitlog segments (CASSANDRA-12539)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e8350108/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
--
diff --git 
a/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
 
b/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
index b22e400..56a2f26 100644
--- 
a/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
+++ 
b/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
@@ -50,6 +50,7 @@ public abstract class PermissionsManagementStatement extends 
AuthorizationStatem
 throw new InvalidRequestException(String.format("Role %s doesn't 
exist", grantee.getRoleName()));
 
 // if a keyspace is omitted when GRANT/REVOKE ON TABLE , we 
need to correct the resource.
+// called both here and in checkAccess(), as in some cases we do not 
call the latter.
 resource = maybeCorrectResource(resource, state);
 
 // altering permissions on builtin functions is not supported
@@ -65,8 +66,12 @@ public abstract class PermissionsManagementStatement extends 
AuthorizationStatem
 
 public void checkAccess(ClientState state) throws UnauthorizedException
 {
+// if a keyspace is omitted when GRANT/REVOKE ON TABLE , we 
need to correct the resource.
+resource = maybeCorrectResource(resource, state);
+
 // check that the user has AUTHORIZE permission on the resource or its 
parents, otherwise reject GRANT/REVOKE.
 state.ensureHasPermission(Permission.AUTHORIZE, resource);
+
 // check that the user has [a single permission or all in case of ALL] 
on the resource or its parents.
 for (Permission p : permissions)
 state.ensureHasPermission(p, resource);



[01/10] cassandra git commit: CASSANDRA-13053: Properly handle GRANT/REVOKE authz when keyspace isn't set

2017-03-07 Thread aleksey
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 44fefeffa -> e83501088
  refs/heads/cassandra-3.0 50560aaf0 -> ddda76810
  refs/heads/cassandra-3.11 e99585983 -> a7f6bf8cb
  refs/heads/trunk f3cd28d85 -> 78d648fb4


CASSANDRA-13053: Properly handle GRANT/REVOKE authz when keyspace isn't set


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

Branch: refs/heads/cassandra-2.2
Commit: e8350108866be740218ce296a02d3ae3fdc3b077
Parents: 44fefef
Author: Aleksey Yeschenko 
Authored: Tue Feb 28 18:23:00 2017 +
Committer: Aleksey Yeschenko 
Committed: Tue Mar 7 23:54:46 2017 +

--
 CHANGES.txt | 2 ++
 .../cql3/statements/PermissionsManagementStatement.java | 5 +
 2 files changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e8350108/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index ca1aa27..0982de9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.10
+ * Fix GRANT/REVOKE when keyspace isn't specified (CASSANDRA-13053)
  * Avoid race on receiver by starting streaming sender thread after sending 
init message (CASSANDRA-12886)
  * Fix "multiple versions of ant detected..." when running ant test 
(CASSANDRA-13232)
  * Coalescing strategy sleeps too much (CASSANDRA-13090)
@@ -11,6 +12,7 @@ Merged from 2.1:
  * Remove unused repositories (CASSANDRA-13278)
  * Log stacktrace of uncaught exceptions (CASSANDRA-13108)
 
+
 2.2.9
  * Fix negative mean latency metric (CASSANDRA-12876)
  * Use only one file pointer when creating commitlog segments (CASSANDRA-12539)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e8350108/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
--
diff --git 
a/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
 
b/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
index b22e400..56a2f26 100644
--- 
a/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
+++ 
b/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
@@ -50,6 +50,7 @@ public abstract class PermissionsManagementStatement extends 
AuthorizationStatem
 throw new InvalidRequestException(String.format("Role %s doesn't 
exist", grantee.getRoleName()));
 
 // if a keyspace is omitted when GRANT/REVOKE ON TABLE , we 
need to correct the resource.
+// called both here and in checkAccess(), as in some cases we do not 
call the latter.
 resource = maybeCorrectResource(resource, state);
 
 // altering permissions on builtin functions is not supported
@@ -65,8 +66,12 @@ public abstract class PermissionsManagementStatement extends 
AuthorizationStatem
 
 public void checkAccess(ClientState state) throws UnauthorizedException
 {
+// if a keyspace is omitted when GRANT/REVOKE ON TABLE , we 
need to correct the resource.
+resource = maybeCorrectResource(resource, state);
+
 // check that the user has AUTHORIZE permission on the resource or its 
parents, otherwise reject GRANT/REVOKE.
 state.ensureHasPermission(Permission.AUTHORIZE, resource);
+
 // check that the user has [a single permission or all in case of ALL] 
on the resource or its parents.
 for (Permission p : permissions)
 state.ensureHasPermission(p, resource);



[02/10] cassandra git commit: CASSANDRA-13053: Properly handle GRANT/REVOKE authz when keyspace isn't set

2017-03-07 Thread aleksey
CASSANDRA-13053: Properly handle GRANT/REVOKE authz when keyspace isn't set


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

Branch: refs/heads/cassandra-3.0
Commit: e8350108866be740218ce296a02d3ae3fdc3b077
Parents: 44fefef
Author: Aleksey Yeschenko 
Authored: Tue Feb 28 18:23:00 2017 +
Committer: Aleksey Yeschenko 
Committed: Tue Mar 7 23:54:46 2017 +

--
 CHANGES.txt | 2 ++
 .../cql3/statements/PermissionsManagementStatement.java | 5 +
 2 files changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e8350108/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index ca1aa27..0982de9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.10
+ * Fix GRANT/REVOKE when keyspace isn't specified (CASSANDRA-13053)
  * Avoid race on receiver by starting streaming sender thread after sending 
init message (CASSANDRA-12886)
  * Fix "multiple versions of ant detected..." when running ant test 
(CASSANDRA-13232)
  * Coalescing strategy sleeps too much (CASSANDRA-13090)
@@ -11,6 +12,7 @@ Merged from 2.1:
  * Remove unused repositories (CASSANDRA-13278)
  * Log stacktrace of uncaught exceptions (CASSANDRA-13108)
 
+
 2.2.9
  * Fix negative mean latency metric (CASSANDRA-12876)
  * Use only one file pointer when creating commitlog segments (CASSANDRA-12539)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e8350108/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
--
diff --git 
a/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
 
b/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
index b22e400..56a2f26 100644
--- 
a/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
+++ 
b/src/java/org/apache/cassandra/cql3/statements/PermissionsManagementStatement.java
@@ -50,6 +50,7 @@ public abstract class PermissionsManagementStatement extends 
AuthorizationStatem
 throw new InvalidRequestException(String.format("Role %s doesn't 
exist", grantee.getRoleName()));
 
 // if a keyspace is omitted when GRANT/REVOKE ON TABLE , we 
need to correct the resource.
+// called both here and in checkAccess(), as in some cases we do not 
call the latter.
 resource = maybeCorrectResource(resource, state);
 
 // altering permissions on builtin functions is not supported
@@ -65,8 +66,12 @@ public abstract class PermissionsManagementStatement extends 
AuthorizationStatem
 
 public void checkAccess(ClientState state) throws UnauthorizedException
 {
+// if a keyspace is omitted when GRANT/REVOKE ON TABLE , we 
need to correct the resource.
+resource = maybeCorrectResource(resource, state);
+
 // check that the user has AUTHORIZE permission on the resource or its 
parents, otherwise reject GRANT/REVOKE.
 state.ensureHasPermission(Permission.AUTHORIZE, resource);
+
 // check that the user has [a single permission or all in case of ALL] 
on the resource or its parents.
 for (Permission p : permissions)
 state.ensureHasPermission(p, resource);



[jira] [Created] (CASSANDRA-13307) The specification of protocol version in cqlsh means the python driver doesn't automatically downgrade protocol version.

2017-03-07 Thread Matt Byrd (JIRA)
Matt Byrd created CASSANDRA-13307:
-

 Summary: The specification of protocol version in cqlsh means the 
python driver doesn't automatically downgrade protocol version.
 Key: CASSANDRA-13307
 URL: https://issues.apache.org/jira/browse/CASSANDRA-13307
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
Reporter: Matt Byrd
Assignee: Matt Byrd
Priority: Minor


Hi,
Looks like we've regressed on the issue described in:
https://issues.apache.org/jira/browse/CASSANDRA-9467
In that we're no longer able to connect from newer cqlsh versions
(e.g trunk) to older versions of Cassandra with a lower version of the protocol 
(e.g 2.1 with protocol version 3)

The problem seems to be that we're relying on the ability for the client to 
automatically downgrade protocol version implemented in Cassandra here:
https://issues.apache.org/jira/browse/CASSANDRA-12838
and utilised in the python client here:
https://datastax-oss.atlassian.net/browse/PYTHON-240

The problem however comes when we implemented:
https://datastax-oss.atlassian.net/browse/PYTHON-537
"Don't downgrade protocol version if explicitly set" 
(included when we bumped from 3.5.0 to 3.7.0 of the python driver as part of 
fixing: https://issues.apache.org/jira/browse/CASSANDRA-11534)

Since we do explicitly specify the protocol version in the bin/cqlsh.py.

I've got a patch which just adds an option to explicitly specify the protocol 
version (for those who want to do that) and then otherwise defaults to not 
setting the protocol version, i.e using the protocol version from the client 
which we ship, which should by default be the same protocol as the server.
Then it should downgrade gracefully as was intended. 
Let me know if that seems reasonable.
Thanks,
Matt




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (CASSANDRA-12513) IOException (No such file or directory) closing MessagingService's server socket (locally)

2017-03-07 Thread Jeff Jirsa (JIRA)

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

Jeff Jirsa updated CASSANDRA-12513:
---
Reviewer: Michael Kjellman

> IOException (No such file or directory) closing MessagingService's server 
> socket (locally)
> --
>
> Key: CASSANDRA-12513
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12513
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Robert Stupp
>Assignee: Robert Stupp
>Priority: Minor
> Fix For: 3.0.x
>
>
> _Sometimes_ the {{RemoveTest}} fails with the following exception. It's not 
> related to the test itself.
> The exception is risen in 
> {{ServerSocketChannelImpl.implCloseSelectableChannel}} where it checks that a 
> thread ID is non-zero. The {{thread}} instance field is set inside its accept 
> and poll methods. It looks like this is caused by some race condition - i.e. 
> stopping in debugger at certain points prevents it from being triggered.
> I could not find any misuse in the code base - but want to document this 
> issue.
> No difference between 8u92 and 8u102
> {code}
> INFO  [ACCEPT-/127.0.0.1] 2016-08-22 08:35:16,606 ?:? - MessagingService has 
> terminated the accept() thread
> java.io.IOError: java.io.IOException: No such file or directory
>   at 
> org.apache.cassandra.net.MessagingService.shutdown(MessagingService.java:914)
>   at org.apache.cassandra.service.RemoveTest.tearDown(RemoveTest.java:103)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:498)
>   at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
>   at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>   at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
>   at 
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:37)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:44)
>   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
>   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
>   at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
>   at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
>   at 
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
>   at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
>   at org.junit.runner.JUnitCore.run(JUnitCore.java:159)
>   at 
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117)
>   at 
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
>   at 
> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:262)
>   at 
> com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:84)
> Caused by: java.io.IOException: No such file or directory
>   at sun.nio.ch.NativeThread.signal(Native Method)
>   at 
> sun.nio.ch.ServerSocketChannelImpl.implCloseSelectableChannel(ServerSocketChannelImpl.java:292)
>   at 
> java.nio.channels.spi.AbstractSelectableChannel.implCloseChannel(AbstractSelectableChannel.java:234)
>   at 
> java.nio.channels.spi.AbstractInterruptibleChannel.close(AbstractInterruptibleChannel.java:115)
>   at sun.nio.ch.ServerSocketAdaptor.close(ServerSocketAdaptor.java:137)
>   at 
> org.apache.cassandra.net.MessagingService$SocketThread.close(MessagingService.java:1249)
>   at 
> org.apache.cassandra.net.MessagingService.shutdown(MessagingService.java:904)
>   ... 22 more
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-12489) consecutive repairs of same range always finds 'out of sync' in sane cluster

2017-03-07 Thread Kurt Greaves (JIRA)

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

Kurt Greaves commented on CASSANDRA-12489:
--

Reaper supports incremental repairs as well, without splitting the ranges (or 
at least that's what I'm led to believe). In which case it should just run 
repairs so they don't occur at the same time. As Marcus says, incremental 
repairs reduce the amount of data that needs to be repaired, while splitting on 
the ranges still repairs all the data, but just in a more manageable fashion.

> consecutive repairs of same range always finds 'out of sync' in sane cluster
> 
>
> Key: CASSANDRA-12489
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12489
> Project: Cassandra
>  Issue Type: Bug
>  Components: Streaming and Messaging
>Reporter: Benjamin Roth
>Assignee: Benjamin Roth
>  Labels: lhf
> Attachments: trace_3_10.1.log.gz, trace_3_10.2.log.gz, 
> trace_3_10.3.log.gz, trace_3_10.4.log.gz, trace_3_9.1.log.gz, 
> trace_3_9.2.log.gz
>
>
> No matter how often or when I run the same subrange repair, it ALWAYS tells 
> me that some ranges are our of sync. Tested in 3.9 + 3.10 (git trunk of 
> 2016-08-17). The cluster is sane. All nodes are up, cluster is not overloaded.
> I guess this is not a desired behaviour. I'd expect that a repair does what 
> it says and a consecutive repair shouldn't report "out of syncs" any more if 
> the cluster is sane.
> Especially for tables with MVs that puts a lot of pressure during repair as 
> ranges are repaired over and over again.
> See traces of different runs attached.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


cassandra-builds git commit: Disable cqlsh jobs temporarily - venv long path issue..

2017-03-07 Thread mshuler
Repository: cassandra-builds
Updated Branches:
  refs/heads/master 99da20ebf -> 829c66e42


Disable cqlsh jobs temporarily - venv long path issue..


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

Branch: refs/heads/master
Commit: 829c66e42456dfa6e7f57846622a926d06f8f912
Parents: 99da20e
Author: Michael Shuler 
Authored: Tue Mar 7 15:33:26 2017 -0600
Committer: Michael Shuler 
Committed: Tue Mar 7 15:33:26 2017 -0600

--
 jenkins-dsl/cassandra_job_dsl_seed.groovy | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra-builds/blob/829c66e4/jenkins-dsl/cassandra_job_dsl_seed.groovy
--
diff --git a/jenkins-dsl/cassandra_job_dsl_seed.groovy 
b/jenkins-dsl/cassandra_job_dsl_seed.groovy
index 04edf61..760efd8 100644
--- a/jenkins-dsl/cassandra_job_dsl_seed.groovy
+++ b/jenkins-dsl/cassandra_job_dsl_seed.groovy
@@ -309,7 +309,7 @@ cassandraBranches.each {
  * Main branch cqlsh jobs
  */
 matrixJob("${jobNamePrefix}-cqlsh-tests") {
-disabled(false)
+disabled(true)
 using('Cassandra-template-cqlsh-tests')
 configure { node ->
 node / scm / branches / 'hudson.plugins.git.BranchSpec' / 
name(branchName)
@@ -433,6 +433,7 @@ job('Cassandra-devbranch-dtest') {
  * Parameterized Dev Branch cqlsh-tests
  */
 matrixJob('Cassandra-devbranch-cqlsh-tests') {
+disabled(true)
 description(jobDescription)
 logRotator {
 numToKeep(10)



cassandra-builds git commit: Drop label restriction on matrix lightweight executor

2017-03-07 Thread mshuler
Repository: cassandra-builds
Updated Branches:
  refs/heads/master c7c15dea5 -> 99da20ebf


Drop label restriction on matrix lightweight executor

The parent matrix job does not really perform any function other than to
shepherd the children job matrices, which is where the work is done.
This lightweight parent job can run anywhere. The label restriction was
taking up a non-executing slot on the slave and preventing any other
concurrency throttled jobs from running on the slave.


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

Branch: refs/heads/master
Commit: 99da20ebf94b4701025372e50ce61de185ac3bd1
Parents: c7c15de
Author: Michael Shuler 
Authored: Tue Mar 7 14:54:25 2017 -0600
Committer: Michael Shuler 
Committed: Tue Mar 7 14:54:25 2017 -0600

--
 jenkins-dsl/cassandra_job_dsl_seed.groovy | 2 --
 1 file changed, 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra-builds/blob/99da20eb/jenkins-dsl/cassandra_job_dsl_seed.groovy
--
diff --git a/jenkins-dsl/cassandra_job_dsl_seed.groovy 
b/jenkins-dsl/cassandra_job_dsl_seed.groovy
index da1be46..04edf61 100644
--- a/jenkins-dsl/cassandra_job_dsl_seed.groovy
+++ b/jenkins-dsl/cassandra_job_dsl_seed.groovy
@@ -175,7 +175,6 @@ job('Cassandra-template-dtest') {
 matrixJob('Cassandra-template-cqlsh-tests') {
 disabled(true)
 description(jobDescription)
-label(slaveLabel)
 logRotator {
 numToKeep(10)
 }
@@ -435,7 +434,6 @@ job('Cassandra-devbranch-dtest') {
  */
 matrixJob('Cassandra-devbranch-cqlsh-tests') {
 description(jobDescription)
-label(slaveLabel)
 logRotator {
 numToKeep(10)
 }



[jira] [Commented] (CASSANDRA-13132) Add currentTimestamp and currentDate functions

2017-03-07 Thread Alex Petrov (JIRA)

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

Alex Petrov commented on CASSANDRA-13132:
-

Sure!   [~jjirsa], that's weird since I've flipped the status and put a +1 LGTM 
comment in the dialog box. Might have clicked something wrong.

+1 from my side 

> Add currentTimestamp and currentDate functions
> --
>
> Key: CASSANDRA-13132
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13132
> Project: Cassandra
>  Issue Type: Improvement
>  Components: CQL
>Reporter: Benjamin Lerer
>Assignee: Benjamin Lerer
> Fix For: 4.0
>
>
> Today, the only way to get the current {{timestamp}} or {{date}} is to 
> convert using the {{toTimestamp}} and {{toDate}} functions the output of 
> {{now()}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13132) Add currentTimestamp and currentDate functions

2017-03-07 Thread Jeff Jirsa (JIRA)

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

Jeff Jirsa commented on CASSANDRA-13132:


Can we get actual "+1" in comments rather than just flipping status? 

> Add currentTimestamp and currentDate functions
> --
>
> Key: CASSANDRA-13132
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13132
> Project: Cassandra
>  Issue Type: Improvement
>  Components: CQL
>Reporter: Benjamin Lerer
>Assignee: Benjamin Lerer
> Fix For: 4.0
>
>
> Today, the only way to get the current {{timestamp}} or {{date}} is to 
> convert using the {{toTimestamp}} and {{toDate}} functions the output of 
> {{now()}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13053) GRANT/REVOKE on table without keyspace performs permissions check incorrectly

2017-03-07 Thread Sam Tunnicliffe (JIRA)

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

Sam Tunnicliffe commented on CASSANDRA-13053:
-

+1

> GRANT/REVOKE on table without keyspace performs permissions check incorrectly
> -
>
> Key: CASSANDRA-13053
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13053
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
>Reporter: Sam Tunnicliffe
>Assignee: Aleksey Yeschenko
>Priority: Minor
> Fix For: 2.2.x, 3.0.x, 3.11.x
>
>
> When a {{GRANT}} or {{REVOKE}} statement is executed on a table without 
> specifying the keyspace, we attempt to use the client session's keyspace to 
> qualify the resource. 
> This is done when validating the statement, which occurs after checking that 
> the user executing the statement has sufficient permissions. This means that 
> the permissions checking uses an incorrect resource, namely a table with a 
> null keyspace. If that user is a superuser, then no error is encountered as 
> superuser privs implicitly grants *all* permissions. If the user is not a 
> superuser, then the {{GRANT}} or {{REVOKE}} fails with an ugly error, 
> regardless of which keyspace the client session is bound to:
> {code}
> Unauthorized: Error from server: code=2100 [Unauthorized] message="User admin 
> has no AUTHORIZE permission on  or any of its parents"
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (CASSANDRA-13053) GRANT/REVOKE on table without keyspace performs permissions check incorrectly

2017-03-07 Thread Sam Tunnicliffe (JIRA)

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

Sam Tunnicliffe updated CASSANDRA-13053:

Status: Ready to Commit  (was: Patch Available)

> GRANT/REVOKE on table without keyspace performs permissions check incorrectly
> -
>
> Key: CASSANDRA-13053
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13053
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
>Reporter: Sam Tunnicliffe
>Assignee: Aleksey Yeschenko
>Priority: Minor
> Fix For: 2.2.x, 3.0.x, 3.11.x
>
>
> When a {{GRANT}} or {{REVOKE}} statement is executed on a table without 
> specifying the keyspace, we attempt to use the client session's keyspace to 
> qualify the resource. 
> This is done when validating the statement, which occurs after checking that 
> the user executing the statement has sufficient permissions. This means that 
> the permissions checking uses an incorrect resource, namely a table with a 
> null keyspace. If that user is a superuser, then no error is encountered as 
> superuser privs implicitly grants *all* permissions. If the user is not a 
> superuser, then the {{GRANT}} or {{REVOKE}} fails with an ugly error, 
> regardless of which keyspace the client session is bound to:
> {code}
> Unauthorized: Error from server: code=2100 [Unauthorized] message="User admin 
> has no AUTHORIZE permission on  or any of its parents"
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


cassandra-builds git commit: Restrict slave label on cqlsh matrix job children

2017-03-07 Thread mshuler
Repository: cassandra-builds
Updated Branches:
  refs/heads/master c687f09b4 -> c7c15dea5


Restrict slave label on cqlsh matrix job children


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

Branch: refs/heads/master
Commit: c7c15dea5c2cfcdcaf8dc9cf3b1f058ef9ee50fb
Parents: c687f09
Author: Michael Shuler 
Authored: Tue Mar 7 13:48:59 2017 -0600
Committer: Michael Shuler 
Committed: Tue Mar 7 13:48:59 2017 -0600

--
 jenkins-dsl/cassandra_job_dsl_seed.groovy | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra-builds/blob/c7c15dea/jenkins-dsl/cassandra_job_dsl_seed.groovy
--
diff --git a/jenkins-dsl/cassandra_job_dsl_seed.groovy 
b/jenkins-dsl/cassandra_job_dsl_seed.groovy
index e069309..da1be46 100644
--- a/jenkins-dsl/cassandra_job_dsl_seed.groovy
+++ b/jenkins-dsl/cassandra_job_dsl_seed.groovy
@@ -190,6 +190,7 @@ matrixJob('Cassandra-template-cqlsh-tests') {
 axes {
 text('cython', 'yes', 'no')
 jdk(jdkLabel)
+label('label', slaveLabel)
 }
 scm {
 git {
@@ -453,6 +454,7 @@ matrixJob('Cassandra-devbranch-cqlsh-tests') {
 axes {
 text('cython', 'yes', 'no')
 jdk(jdkLabel)
+label('label', slaveLabel)
 }
 scm {
 git {



[jira] [Commented] (CASSANDRA-13265) Expiration in OutboundTcpConnection can block the reader Thread

2017-03-07 Thread Ariel Weisberg (JIRA)

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

Ariel Weisberg commented on CASSANDRA-13265:


Awesome.
* [This needs to be configurable from the YAML and via JMX. Add it to 
{{StorageProxyMBean}}/{{StorageProxy}}, store the value in {{Config}} then get 
it from {{DatabaseDescriptor}} it will need to be a volatile field in 
{{Config}}. Add a setter and a getter. I have the setter return the previous 
value, but a lot of the existing ones don't. 10 seconds is also way too high as 
a default. I propose 200 milliseconds. It's an improvement over today, but 
still aggressive at trying to free memory. Also use 
{{java.util.concurrent.TimeUnit}} to convert to the value you 
want.|https://github.com/apache/cassandra/pull/95/files#diff-c7ef124561c4cde1c906f28ad3883a88R134]
* [It should include drained messages as well. To be 100% correct you would 
have to count how many messages you have iterated over and sent and then 
subtract.|https://github.com/apache/cassandra/pull/95/files#diff-c7ef124561c4cde1c906f28ad3883a88R261]
* [Typo, "thus 
letting"|https://github.com/apache/cassandra/pull/95/files#diff-c7ef124561c4cde1c906f28ad3883a88R604]
* [Extra line 
break|https://github.com/apache/cassandra/pull/95/files#diff-c7ef124561c4cde1c906f28ad3883a88R625]
* [We don't do/allow author 
tags|https://github.com/apache/cassandra/pull/95/files#diff-c16fff43d2aafe61a4219656d1ab6f9eR26]
* [Use 
TimeUnit|https://github.com/apache/cassandra/pull/95/files#diff-c16fff43d2aafe61a4219656d1ab6f9eR36]
* [It isn't using the 
constant.|https://github.com/apache/cassandra/pull/95/files#diff-c16fff43d2aafe61a4219656d1ab6f9eR118]
* [Just in case maybe assert the droppable/non-droppable status of the verbs. 
Or does it not matter since the tests will fail 
anyways?|https://github.com/apache/cassandra/pull/95/files#diff-c16fff43d2aafe61a4219656d1ab6f9eR33]

I had a sad and unfortunate thought. We are going about expiring wrong by 
counting messages. We really want to expire based on the weight of the queue. 
Also I really really hate that bounded queues that aren't weighted are a thing. 
Let's not do that here though since I want to backport this to other versions.


> Expiration in OutboundTcpConnection can block the reader Thread
> ---
>
> Key: CASSANDRA-13265
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13265
> Project: Cassandra
>  Issue Type: Bug
> Environment: Cassandra 3.0.9
> Java HotSpot(TM) 64-Bit Server VM version 25.112-b15 (Java version 
> 1.8.0_112-b15)
> Linux 3.16
>Reporter: Christian Esken
>Assignee: Christian Esken
> Attachments: cassandra.pb-cache4-dus.2017-02-17-19-36-26.chist.xz, 
> cassandra.pb-cache4-dus.2017-02-17-19-36-26.td.xz
>
>
> I observed that sometimes a single node in a Cassandra cluster fails to 
> communicate to the other nodes. This can happen at any time, during peak load 
> or low load. Restarting that single node from the cluster fixes the issue.
> Before going in to details, I want to state that I have analyzed the 
> situation and am already developing a possible fix. Here is the analysis so 
> far:
> - A Threaddump in this situation showed  324 Threads in the 
> OutboundTcpConnection class that want to lock the backlog queue for doing 
> expiration.
> - A class histogram shows 262508 instances of 
> OutboundTcpConnection$QueuedMessage.
> What is the effect of it? As soon as the Cassandra node has reached a certain 
> amount of queued messages, it starts thrashing itself to death. Each of the 
> Thread fully locks the Queue for reading and writing by calling 
> iterator.next(), making the situation worse and worse.
> - Writing: Only after 262508 locking operation it can progress with actually 
> writing to the Queue.
> - Reading: Is also blocked, as 324 Threads try to do iterator.next(), and 
> fully lock the Queue
> This means: Writing blocks the Queue for reading, and readers might even be 
> starved which makes the situation even worse.
> -
> The setup is:
>  - 3-node cluster
>  - replication factor 2
>  - Consistency LOCAL_ONE
>  - No remote DC's
>  - high write throughput (10 INSERT statements per second and more during 
> peak times).
>  



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


cassandra-builds git commit: Move JDK to matrix axis

2017-03-07 Thread mshuler
Repository: cassandra-builds
Updated Branches:
  refs/heads/master 2bb7a6c51 -> c687f09b4


Move JDK to matrix axis


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

Branch: refs/heads/master
Commit: c687f09b4af445030b3d6a22e9c9b28647059e13
Parents: 2bb7a6c
Author: Michael Shuler 
Authored: Tue Mar 7 12:40:13 2017 -0600
Committer: Michael Shuler 
Committed: Tue Mar 7 12:40:13 2017 -0600

--
 jenkins-dsl/cassandra_job_dsl_seed.groovy | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra-builds/blob/c687f09b/jenkins-dsl/cassandra_job_dsl_seed.groovy
--
diff --git a/jenkins-dsl/cassandra_job_dsl_seed.groovy 
b/jenkins-dsl/cassandra_job_dsl_seed.groovy
index 35ae725..e069309 100644
--- a/jenkins-dsl/cassandra_job_dsl_seed.groovy
+++ b/jenkins-dsl/cassandra_job_dsl_seed.groovy
@@ -175,7 +175,6 @@ job('Cassandra-template-dtest') {
 matrixJob('Cassandra-template-cqlsh-tests') {
 disabled(true)
 description(jobDescription)
-jdk(jdkLabel)
 label(slaveLabel)
 logRotator {
 numToKeep(10)
@@ -190,6 +189,7 @@ matrixJob('Cassandra-template-cqlsh-tests') {
 }
 axes {
 text('cython', 'yes', 'no')
+jdk(jdkLabel)
 }
 scm {
 git {
@@ -434,7 +434,6 @@ job('Cassandra-devbranch-dtest') {
  */
 matrixJob('Cassandra-devbranch-cqlsh-tests') {
 description(jobDescription)
-jdk(jdkLabel)
 label(slaveLabel)
 logRotator {
 numToKeep(10)
@@ -451,6 +450,10 @@ matrixJob('Cassandra-devbranch-cqlsh-tests') {
 stringParam('REPO', 'apache', 'The github user/org to clone cassandra 
repo from')
 stringParam('BRANCH', 'trunk', 'The branch of cassandra to checkout')
 }
+axes {
+text('cython', 'yes', 'no')
+jdk(jdkLabel)
+}
 scm {
 git {
 remote {



[jira] [Commented] (CASSANDRA-13257) Add repair streaming preview

2017-03-07 Thread Blake Eggleston (JIRA)

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

Blake Eggleston commented on CASSANDRA-13257:
-

[~yukim] I've pushed commits converting the preview to use streaming instead of 
merkle tree diffs. A squashed version is 
[here|https://github.com/bdeggleston/cassandra/tree/13257-squashed]

New ci runs are here:
|[dtest|http://cassci.datastax.com/job/bdeggleston-13257-squashed-dtest/]|[testall|http://cassci.datastax.com/job/bdeggleston-13257-squashed-testall/]|

> Add repair streaming preview
> 
>
> Key: CASSANDRA-13257
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13257
> Project: Cassandra
>  Issue Type: New Feature
>Reporter: Blake Eggleston
>Assignee: Blake Eggleston
>
> It would be useful to be able to estimate the amount of repair streaming that 
> needs to be done, without actually doing any streaming. Our main motivation 
> for this having something this is validating CASSANDRA-9143 in production, 
> but I’d imagine it could also be a useful tool in troubleshooting.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13010) nodetool compactionstats should say which disk a compaction is writing to

2017-03-07 Thread Alex Lourie (JIRA)

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

Alex Lourie commented on CASSANDRA-13010:
-

[~rustyrazorblade] I've updated the patch with the suggested UI changes. It 
will now group compactions by a directory.

Please let me know how it looks, and also I'd love a feedback for the actual 
implementation of the feature.

Thanks!

> nodetool compactionstats should say which disk a compaction is writing to
> -
>
> Key: CASSANDRA-13010
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13010
> Project: Cassandra
>  Issue Type: New Feature
>Reporter: Jon Haddad
>Assignee: Alex Lourie
>  Labels: lhf
>




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (CASSANDRA-13306) Builds fetch source jars for build dependencies, not just source dependencies

2017-03-07 Thread Joel Knighton (JIRA)
Joel Knighton created CASSANDRA-13306:
-

 Summary: Builds fetch source jars for build dependencies, not just 
source dependencies
 Key: CASSANDRA-13306
 URL: https://issues.apache.org/jira/browse/CASSANDRA-13306
 Project: Cassandra
  Issue Type: Bug
  Components: Build
Reporter: Joel Knighton


A recent commit without a linked JIRA cleaned up dead imports and also added a 
{{sourcesFilesetId}} to artifact fetching for the build-deps-pom. This causes 
ant to fetch source jars for the build deps, but we have an explicit separate 
build-deps-pom-sources that fetches sources.

This happened in commit {{e96ce6d132129025ff6b923129cb67eed2f97931}}.

Was this an intentional change, [~dbrosius]? It seems to conflate the separate 
build-deps-pom and build-deps-pom-sources.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


cassandra-builds git commit: Add dev branch parameterized cqlsh-tests job

2017-03-07 Thread mshuler
Repository: cassandra-builds
Updated Branches:
  refs/heads/master e7c5e2beb -> 2bb7a6c51


Add dev branch parameterized cqlsh-tests job


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

Branch: refs/heads/master
Commit: 2bb7a6c51921271f0aa5879dd8529d3350eccf3b
Parents: e7c5e2b
Author: Michael Shuler 
Authored: Tue Mar 7 11:46:07 2017 -0600
Committer: Michael Shuler 
Committed: Tue Mar 7 11:46:07 2017 -0600

--
 jenkins-dsl/cassandra_job_dsl_seed.groovy | 51 ++
 1 file changed, 51 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra-builds/blob/2bb7a6c5/jenkins-dsl/cassandra_job_dsl_seed.groovy
--
diff --git a/jenkins-dsl/cassandra_job_dsl_seed.groovy 
b/jenkins-dsl/cassandra_job_dsl_seed.groovy
index a51133f..35ae725 100644
--- a/jenkins-dsl/cassandra_job_dsl_seed.groovy
+++ b/jenkins-dsl/cassandra_job_dsl_seed.groovy
@@ -428,3 +428,54 @@ job('Cassandra-devbranch-dtest') {
 }
 }
 }
+
+/**
+ * Parameterized Dev Branch cqlsh-tests
+ */
+matrixJob('Cassandra-devbranch-cqlsh-tests') {
+description(jobDescription)
+jdk(jdkLabel)
+label(slaveLabel)
+logRotator {
+numToKeep(10)
+}
+wrappers {
+timeout {
+noActivity(1200)
+}
+}
+throttleConcurrentBuilds {
+categories(['Cassandra'])
+}
+parameters {
+stringParam('REPO', 'apache', 'The github user/org to clone cassandra 
repo from')
+stringParam('BRANCH', 'trunk', 'The branch of cassandra to checkout')
+}
+scm {
+git {
+remote {
+url('https://github.com/${REPO}/cassandra.git')
+}
+branch('${BRANCH}')
+extensions {
+cleanAfterCheckout()
+}
+}
+}
+steps {
+buildDescription('', buildDescStr)
+shell("git clean -xdff ; git clone ${buildsRepo} ; git clone 
${dtestRepo}")
+shell('./cassandra-builds/build-scripts/cassandra-cqlsh-tests.sh')
+}
+publishers {
+junit {
+testResults('cqlshlib.xml, nosetests.xml')
+testDataPublishers {
+stabilityTestDataPublisher()
+}
+}
+postBuildTask {
+task('.', 'echo "Finding job process orphans.."; if pgrep -af 
${JOB_BASE_NAME}; then pkill -9 -f ${JOB_BASE_NAME}; fi')
+}
+}
+}



[jira] [Assigned] (CASSANDRA-12921) Parallel opening of sstables slows down startup

2017-03-07 Thread Joshua McKenzie (JIRA)

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

Joshua McKenzie reassigned CASSANDRA-12921:
---

Assignee: Chris Lohfink

> Parallel opening of sstables slows down startup
> ---
>
> Key: CASSANDRA-12921
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12921
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Branimir Lambov
>Assignee: Chris Lohfink
>Priority: Minor
>
> [{{SSTableReader.openAll}}|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java#L545],
>  used by initial startup, spawns multiple threads to open sstables.
> This is a bad idea as the longest step in the opening process is the loading 
> of bloom filters and when this is done in parallel the drives have to do a 
> lot of unnecessary seeking.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (CASSANDRA-13289) Make it possible to monitor an ideal consistency level separate from actual consistency level

2017-03-07 Thread Blake Eggleston (JIRA)

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

Blake Eggleston updated CASSANDRA-13289:

Reviewer: Blake Eggleston

> Make it possible to monitor an ideal consistency level separate from actual 
> consistency level
> -
>
> Key: CASSANDRA-13289
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13289
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Core
>Reporter: Ariel Weisberg
>Assignee: Ariel Weisberg
> Fix For: 4.0
>
>
> As an operator there are several issues related to multi-datacenter 
> replication and consistency you may want to have more information on from 
> your production database.
> For instance. If your application writes at LOCAL_QUORUM how often are those 
> writes failing to achieve EACH_QUORUM at other data centers. If you failed 
> your application over to one of those data centers roughly how inconsistent 
> might it be given the number of writes that didn't propagate since the last 
> incremental repair?
> You might also want to know roughly what the latency of writes would be if 
> you switched to a different consistency level. For instance you are writing 
> at LOCAL_QUORUM and want to know what would happen if you switched to 
> EACH_QUORUM.
> The proposed change is to allow an ideal_consistency_level to be specified in 
> cassandra.yaml as well as get/set via JMX. If no ideal consistency level is 
> specified no additional tracking is done.
> if an ideal consistency level is specified then the 
> {{AbstractWriteResponesHandler}} will contain a delegate WriteResponseHandler 
> that tracks whether the ideal consistency level is met before a write times 
> out. It also tracks the latency for achieving the ideal CL  of successful 
> writes.
> These two metrics would be reported on a per keyspace basis.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-12811) testall failure in org.apache.cassandra.cql3.validation.operations.DeleteTest.testDeleteWithOneClusteringColumns-compression

2017-03-07 Thread Alex Petrov (JIRA)

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

Alex Petrov commented on CASSANDRA-12811:
-

The problem turned out to be as follows (quite tricky and seems like a complete 
coincidence of different things that went wrong):

  * {{DELETE}} that fails uses a special syntax: it uses {{(clustering) = 
(?)}}, note the brackets around the clustering and a question mark. This means 
that it wasn't a single column, but rather a multiple column condition (at 
least that's how it's currently handled internally)
  * {{flush}} is controlled and things are either flushed together or queried 
from the memtable together. Viewing the logs revealed that there's a flush 
happening in parallel (might be coinciding with a flush during the parallel run 
on a CI, which made it so hard to reproduce.
  * because of both of these conditions, we end up querying data from sstables 
and range tombstones (!!) from memtable. Memtable queries for range tombstones 
are currently not working, since we're not querying deletions at all 
[here|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/filter/ClusteringIndexNamesFilter.java#L139]
 which in turn calls [search 
iterator|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/partitions/AbstractBTreePartition.java#L134],
 which, unlike the [unfiltered 
iterator|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/partitions/AbstractBTreePartition.java#L191-L195]
 doesn't query deletion info at all.

Patch is on under way, but it might be worth to discuss both the issue with 
parallel flushes (might be we should use unique names for keyspaces to avoid 
unintended flushes?), and "fake" multi-column relationships.

> testall failure in 
> org.apache.cassandra.cql3.validation.operations.DeleteTest.testDeleteWithOneClusteringColumns-compression
> 
>
> Key: CASSANDRA-12811
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12811
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Sean McCarthy
>Assignee: Alex Petrov
>  Labels: test-failure
>
> example failure:
> http://cassci.datastax.com/job/cassandra-3.X_testall/34/testReport/org.apache.cassandra.cql3.validation.operations/DeleteTest/testDeleteWithOneClusteringColumns_compression/
> {code}
> Error Message
> Expected empty result but got 1 rows
> {code}
> {code}
> Stacktrace
> junit.framework.AssertionFailedError: Expected empty result but got 1 rows
>   at org.apache.cassandra.cql3.CQLTester.assertEmpty(CQLTester.java:1089)
>   at 
> org.apache.cassandra.cql3.validation.operations.DeleteTest.testDeleteWithOneClusteringColumns(DeleteTest.java:463)
>   at 
> org.apache.cassandra.cql3.validation.operations.DeleteTest.testDeleteWithOneClusteringColumns(DeleteTest.java:427)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13305) Slice.isEmpty() returns false for some empty slices

2017-03-07 Thread Joshua McKenzie (JIRA)

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

Joshua McKenzie commented on CASSANDRA-13305:
-

[~blambov] to review

> Slice.isEmpty() returns false for some empty slices
> ---
>
> Key: CASSANDRA-13305
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13305
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Sylvain Lebresne
>Assignee: Sylvain Lebresne
> Fix For: 3.0.x, 3.11.x
>
>
> {{Slice.isEmpty}} is currently defined as {{comparator.compare(end, start) < 
> 0}} but this shouldn't be a strict inequality. Indeed, the way 
> {{Slice.Bound}} is defined, having a start equal to an end implies a range 
> like {{[1, 1)}}, but that range is definitively empty and something we 
> shouldn't let in as that would break merging and other range tombstone 
> related code.
> In practice, if you can currently insert such empty range (with something 
> like {{DELETE FROM t WHERE k = 'foo' AND i >= 1 AND i < 1}}), and that can 
> trigger assertions in {{RangeTomstoneList}} (and possibly other problem).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (CASSANDRA-13305) Slice.isEmpty() returns false for some empty slices

2017-03-07 Thread Joshua McKenzie (JIRA)

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

Joshua McKenzie updated CASSANDRA-13305:

Reviewer: Branimir Lambov

> Slice.isEmpty() returns false for some empty slices
> ---
>
> Key: CASSANDRA-13305
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13305
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Sylvain Lebresne
>Assignee: Sylvain Lebresne
> Fix For: 3.0.x, 3.11.x
>
>
> {{Slice.isEmpty}} is currently defined as {{comparator.compare(end, start) < 
> 0}} but this shouldn't be a strict inequality. Indeed, the way 
> {{Slice.Bound}} is defined, having a start equal to an end implies a range 
> like {{[1, 1)}}, but that range is definitively empty and something we 
> shouldn't let in as that would break merging and other range tombstone 
> related code.
> In practice, if you can currently insert such empty range (with something 
> like {{DELETE FROM t WHERE k = 'foo' AND i >= 1 AND i < 1}}), and that can 
> trigger assertions in {{RangeTomstoneList}} (and possibly other problem).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


cassandra-builds git commit: Add cqlsh-tests template and main branch jobs

2017-03-07 Thread mshuler
Repository: cassandra-builds
Updated Branches:
  refs/heads/master a1f0d3309 -> e7c5e2beb


Add cqlsh-tests template and main branch jobs


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

Branch: refs/heads/master
Commit: e7c5e2beb07ea651a6fdf2c970637706e3cc5662
Parents: a1f0d33
Author: Michael Shuler 
Authored: Tue Mar 7 11:10:57 2017 -0600
Committer: Michael Shuler 
Committed: Tue Mar 7 11:10:57 2017 -0600

--
 jenkins-dsl/cassandra_job_dsl_seed.groovy | 67 ++
 1 file changed, 67 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra-builds/blob/e7c5e2be/jenkins-dsl/cassandra_job_dsl_seed.groovy
--
diff --git a/jenkins-dsl/cassandra_job_dsl_seed.groovy 
b/jenkins-dsl/cassandra_job_dsl_seed.groovy
index 857ea0c..a51133f 100644
--- a/jenkins-dsl/cassandra_job_dsl_seed.groovy
+++ b/jenkins-dsl/cassandra_job_dsl_seed.groovy
@@ -169,6 +169,59 @@ job('Cassandra-template-dtest') {
 }
 }
 
+/**
+ * cqlsh template
+ */
+matrixJob('Cassandra-template-cqlsh-tests') {
+disabled(true)
+description(jobDescription)
+jdk(jdkLabel)
+label(slaveLabel)
+logRotator {
+numToKeep(10)
+}
+wrappers {
+timeout {
+noActivity(1200)
+}
+}
+throttleConcurrentBuilds {
+categories(['Cassandra'])
+}
+axes {
+text('cython', 'yes', 'no')
+}
+scm {
+git {
+remote {
+url(mainRepo)
+}
+branch('*/null')
+extensions {
+cleanAfterCheckout()
+}
+}
+}
+triggers {
+scm('@weekly')
+}
+steps {
+buildDescription('', buildDescStr)
+shell("git clean -xdff ; git clone ${buildsRepo} ; git clone 
${dtestRepo}")
+}
+publishers {
+junit {
+testResults('cqlshlib.xml, nosetests.xml')
+testDataPublishers {
+stabilityTestDataPublisher()
+}
+}
+postBuildTask {
+task('.', 'echo "Finding job process orphans.."; if pgrep -af 
${JOB_BASE_NAME}; then pkill -9 -f ${JOB_BASE_NAME}; fi')
+}
+}
+}
+
 
 //
 // Branch Job Definitions
@@ -251,6 +304,20 @@ cassandraBranches.each {
 }
 }
 }
+
+/**
+ * Main branch cqlsh jobs
+ */
+matrixJob("${jobNamePrefix}-cqlsh-tests") {
+disabled(false)
+using('Cassandra-template-cqlsh-tests')
+configure { node ->
+node / scm / branches / 'hudson.plugins.git.BranchSpec' / 
name(branchName)
+}
+steps {
+shell('./cassandra-builds/build-scripts/cassandra-cqlsh-tests.sh')
+}
+}
 }
 
 



[jira] [Commented] (CASSANDRA-13265) Expiration in OutboundTcpConnection can block the reader Thread

2017-03-07 Thread Christian Esken (JIRA)

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

Christian Esken commented on CASSANDRA-13265:
-

I added three changes:
- Implemented unit test
- Count dropped messages if Cassandra cannot write to the socket 
- Fix the QueuedMessage.isTimedOut(), which was prone to a System.nanoTime() 
wrap bug, as it used a check of type: aNanos < bNanos

> Expiration in OutboundTcpConnection can block the reader Thread
> ---
>
> Key: CASSANDRA-13265
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13265
> Project: Cassandra
>  Issue Type: Bug
> Environment: Cassandra 3.0.9
> Java HotSpot(TM) 64-Bit Server VM version 25.112-b15 (Java version 
> 1.8.0_112-b15)
> Linux 3.16
>Reporter: Christian Esken
>Assignee: Christian Esken
> Attachments: cassandra.pb-cache4-dus.2017-02-17-19-36-26.chist.xz, 
> cassandra.pb-cache4-dus.2017-02-17-19-36-26.td.xz
>
>
> I observed that sometimes a single node in a Cassandra cluster fails to 
> communicate to the other nodes. This can happen at any time, during peak load 
> or low load. Restarting that single node from the cluster fixes the issue.
> Before going in to details, I want to state that I have analyzed the 
> situation and am already developing a possible fix. Here is the analysis so 
> far:
> - A Threaddump in this situation showed  324 Threads in the 
> OutboundTcpConnection class that want to lock the backlog queue for doing 
> expiration.
> - A class histogram shows 262508 instances of 
> OutboundTcpConnection$QueuedMessage.
> What is the effect of it? As soon as the Cassandra node has reached a certain 
> amount of queued messages, it starts thrashing itself to death. Each of the 
> Thread fully locks the Queue for reading and writing by calling 
> iterator.next(), making the situation worse and worse.
> - Writing: Only after 262508 locking operation it can progress with actually 
> writing to the Queue.
> - Reading: Is also blocked, as 324 Threads try to do iterator.next(), and 
> fully lock the Queue
> This means: Writing blocks the Queue for reading, and readers might even be 
> starved which makes the situation even worse.
> -
> The setup is:
>  - 3-node cluster
>  - replication factor 2
>  - Consistency LOCAL_ONE
>  - No remote DC's
>  - high write throughput (10 INSERT statements per second and more during 
> peak times).
>  



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (CASSANDRA-13132) Add currentTimestamp and currentDate functions

2017-03-07 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer updated CASSANDRA-13132:
---
Fix Version/s: (was: 4.x)
   4.0

> Add currentTimestamp and currentDate functions
> --
>
> Key: CASSANDRA-13132
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13132
> Project: Cassandra
>  Issue Type: Improvement
>  Components: CQL
>Reporter: Benjamin Lerer
>Assignee: Benjamin Lerer
> Fix For: 4.0
>
>
> Today, the only way to get the current {{timestamp}} or {{date}} is to 
> convert using the {{toTimestamp}} and {{toDate}} functions the output of 
> {{now()}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13132) Add currentTimestamp and currentDate functions

2017-03-07 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer commented on CASSANDRA-13132:


Thanks for the review.

> Add currentTimestamp and currentDate functions
> --
>
> Key: CASSANDRA-13132
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13132
> Project: Cassandra
>  Issue Type: Improvement
>  Components: CQL
>Reporter: Benjamin Lerer
>Assignee: Benjamin Lerer
> Fix For: 4.x
>
>
> Today, the only way to get the current {{timestamp}} or {{date}} is to 
> convert using the {{toTimestamp}} and {{toDate}} functions the output of 
> {{now()}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (CASSANDRA-13132) Add currentTimestamp and currentDate functions

2017-03-07 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer updated CASSANDRA-13132:
---
Resolution: Fixed
Status: Resolved  (was: Ready to Commit)

Committed into trunk at f3cd28d8595774b70027997fff06d11b1b88c651

> Add currentTimestamp and currentDate functions
> --
>
> Key: CASSANDRA-13132
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13132
> Project: Cassandra
>  Issue Type: Improvement
>  Components: CQL
>Reporter: Benjamin Lerer
>Assignee: Benjamin Lerer
> Fix For: 4.x
>
>
> Today, the only way to get the current {{timestamp}} or {{date}} is to 
> convert using the {{toTimestamp}} and {{toDate}} functions the output of 
> {{now()}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


cassandra git commit: Add the currentTimestamp, currentDate, currentTime and currentTimeUUID functions

2017-03-07 Thread blerer
Repository: cassandra
Updated Branches:
  refs/heads/trunk ae0604f08 -> f3cd28d85


Add the currentTimestamp, currentDate, currentTime and currentTimeUUID functions

patch by Benjamin Lerer; reviewed by Alex Petrov for CASSANDRA-13132


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

Branch: refs/heads/trunk
Commit: f3cd28d8595774b70027997fff06d11b1b88c651
Parents: ae0604f
Author: Benjamin Lerer 
Authored: Tue Mar 7 17:49:14 2017 +0100
Committer: Benjamin Lerer 
Committed: Tue Mar 7 17:49:14 2017 +0100

--
 CHANGES.txt |  1 +
 NEWS.txt|  2 ++
 doc/source/cql/changes.rst  |  9 ++-
 doc/source/cql/functions.rst| 25 +++-
 .../apache/cassandra/cql3/QueryProcessor.java   |  2 +-
 .../cassandra/cql3/functions/TimeFcts.java  | 10 +---
 .../apache/cassandra/db/marshal/TimeType.java   |  9 +++
 .../org/apache/cassandra/schema/Schema.java |  2 +-
 8 files changed, 53 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f3cd28d8/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 6cf571a..3c06d32 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 4.0
+ * Add the currentTimestamp, currentDate, currentTime and currentTimeUUID 
functions (CASSANDRA-13132)
  * Remove config option index_interval (CASSANDRA-10671)
  * Reduce lock contention for collection types and serializers 
(CASSANDRA-13271)
  * Make it possible to override MessagingService.Verb ids (CASSANDRA-13283)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f3cd28d8/NEWS.txt
--
diff --git a/NEWS.txt b/NEWS.txt
index 027786d7..cfb48e2 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -18,6 +18,8 @@ using the provided 'sstableupgrade' tool.
 
 New features
 
+   - 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.
  See CASSANDRA-11936
- Support for arithmetic operations on number has been added. See 
CASSANDRA-11935

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f3cd28d8/doc/source/cql/changes.rst
--
diff --git a/doc/source/cql/changes.rst b/doc/source/cql/changes.rst
index 08ee5d1..6691f15 100644
--- a/doc/source/cql/changes.rst
+++ b/doc/source/cql/changes.rst
@@ -21,6 +21,14 @@ Changes
 
 The following describes the changes in each version of CQL.
 
+3.4.5
+^
+
+- Adds support for arithmetic operators (:jira:`11935`)
+- Adds support for ``+`` and ``-`` operations on dates (:jira:`11936`)
+- Adds ``currentTimestamp``, ``currentDate``, ``currentTime`` and 
``currentTimeUUID`` functions (:jira:`13132`)
+
+
 3.4.4
 ^
 
@@ -34,7 +42,6 @@ The following describes the changes in each version of CQL.
 - Support for ``GROUP BY`` (:jira:`10707`).
 - Adds a ``DEFAULT UNSET`` option for ``INSERT JSON`` to ignore omitted 
columns (:jira:`11424`).
 - Allows ``null`` as a legal value for TTL on insert and update. It will be 
treated as equivalent to inserting a 0 (:jira:`12216`).
-- Adds support for arithmetic operators (:jira:`11935`)
 
 3.4.2
 ^

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f3cd28d8/doc/source/cql/functions.rst
--
diff --git a/doc/source/cql/functions.rst b/doc/source/cql/functions.rst
index 6ae7cbf..965125a 100644
--- a/doc/source/cql/functions.rst
+++ b/doc/source/cql/functions.rst
@@ -143,6 +143,8 @@ time the function is invoked. Note that this method is 
useful for insertion but
 
 will never return any result by design, since the value returned by ``now()`` 
is guaranteed to be unique.
 
+``currentTimeUUID`` is an alias of ``now``.
+
 ``minTimeuuid`` and ``maxTimeuuid``
 ###
 
@@ -164,8 +166,29 @@ maxTimeuuid('2013-01-01 00:05+')``.
particular, the value returned by these 2 methods will not be unique. This 
means you should only use those methods
for querying (as in the example above). Inserting the result of those 
methods is almost certainly *a bad idea*.
 
+Datetime functions
+``
+
+Retrieving the current date/time
+
+
+The following functions can be used to retrieve the date/time at 

[jira] [Resolved] (CASSANDRA-12839) CommitLogReplayException: Unexpected error deserializing mutation

2017-03-07 Thread Jeff Jirsa (JIRA)

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

Jeff Jirsa resolved CASSANDRA-12839.

Resolution: Duplicate

Resolving as duplicate of CASSANDRA-12121 - we'll track this issue there. 

> CommitLogReplayException: Unexpected error deserializing mutation
> -
>
> Key: CASSANDRA-12839
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12839
> Project: Cassandra
>  Issue Type: Bug
> Environment: Ubuntu, Cassandra 3.7, RF3
>Reporter: Malte Pickhan
>Priority: Critical
>
> We wanted to run a *nodetool repair*  on the affected node. This was not 
> possible due to CASSANDRA-12694.
> Therefore we wanted to shutdown the node in order to run scrubsstables. After 
> this was done, bootstrapping the node was not possible anymore. It was not 
> possible since it wasn't able to replay the commitlog. Unfortunately we 
> didn't run a drain before.
> {quote}
> org.apache.cassandra.db.commitlog.CommitLogReplayer$CommitLogReplayException: 
> Unexpected error deserializing mutation; saved to 
> /tmp/mutation4616409546670104469dat.  This may be caused by replaying a 
> mutation against a table with the same name but incompatible schema.  
> Exception follows: java.io.IOError: java.io.IOException: Corrupt empty row 
> found in unfiltered partition
> {quote}
> Two days before that, we actually did some modification on the table and 
> dropped a column.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[cassandra] Git Push Summary

2017-03-07 Thread mshuler
Repository: cassandra
Updated Tags:  refs/tags/3.0.12-tentative [created] 50560aaf0


[3/6] cassandra git commit: Update debian/changelog for 3.0.12 release

2017-03-07 Thread mshuler
Update debian/changelog for 3.0.12 release


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

Branch: refs/heads/trunk
Commit: 50560aaf0f2d395271ade59ba9b900a84cae70f1
Parents: 1ba68a1
Author: Michael Shuler 
Authored: Tue Mar 7 09:30:12 2017 -0600
Committer: Michael Shuler 
Committed: Tue Mar 7 09:30:12 2017 -0600

--
 debian/changelog | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/50560aaf/debian/changelog
--
diff --git a/debian/changelog b/debian/changelog
index 62873dd..5ced67c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,8 @@
-cassandra (3.0.12) UNRELEASED; urgency=medium
+cassandra (3.0.12) unstable; urgency=medium
 
   * New release
 
- -- Michael Shuler   Tue, 21 Feb 2017 14:06:07 -0600
+ -- Michael Shuler   Tue, 07 Mar 2017 09:28:21 -0600
 
 cassandra (3.0.11) unstable; urgency=medium
 



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

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

Branch: refs/heads/trunk
Commit: ae0604f08b0ef37fb7739b6fc223653f8acfba89
Parents: 46283cd e995859
Author: Michael Shuler 
Authored: Tue Mar 7 09:30:48 2017 -0600
Committer: Michael Shuler 
Committed: Tue Mar 7 09:30:48 2017 -0600

--

--




[2/6] cassandra git commit: Update debian/changelog for 3.0.12 release

2017-03-07 Thread mshuler
Update debian/changelog for 3.0.12 release


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

Branch: refs/heads/cassandra-3.11
Commit: 50560aaf0f2d395271ade59ba9b900a84cae70f1
Parents: 1ba68a1
Author: Michael Shuler 
Authored: Tue Mar 7 09:30:12 2017 -0600
Committer: Michael Shuler 
Committed: Tue Mar 7 09:30:12 2017 -0600

--
 debian/changelog | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/50560aaf/debian/changelog
--
diff --git a/debian/changelog b/debian/changelog
index 62873dd..5ced67c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,8 @@
-cassandra (3.0.12) UNRELEASED; urgency=medium
+cassandra (3.0.12) unstable; urgency=medium
 
   * New release
 
- -- Michael Shuler   Tue, 21 Feb 2017 14:06:07 -0600
+ -- Michael Shuler   Tue, 07 Mar 2017 09:28:21 -0600
 
 cassandra (3.0.11) unstable; urgency=medium
 



[1/6] cassandra git commit: Update debian/changelog for 3.0.12 release

2017-03-07 Thread mshuler
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.0 1ba68a1e5 -> 50560aaf0
  refs/heads/cassandra-3.11 f070f1e20 -> e99585983
  refs/heads/trunk 46283cdc5 -> ae0604f08


Update debian/changelog for 3.0.12 release


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

Branch: refs/heads/cassandra-3.0
Commit: 50560aaf0f2d395271ade59ba9b900a84cae70f1
Parents: 1ba68a1
Author: Michael Shuler 
Authored: Tue Mar 7 09:30:12 2017 -0600
Committer: Michael Shuler 
Committed: Tue Mar 7 09:30:12 2017 -0600

--
 debian/changelog | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/50560aaf/debian/changelog
--
diff --git a/debian/changelog b/debian/changelog
index 62873dd..5ced67c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,8 @@
-cassandra (3.0.12) UNRELEASED; urgency=medium
+cassandra (3.0.12) unstable; urgency=medium
 
   * New release
 
- -- Michael Shuler   Tue, 21 Feb 2017 14:06:07 -0600
+ -- Michael Shuler   Tue, 07 Mar 2017 09:28:21 -0600
 
 cassandra (3.0.11) unstable; urgency=medium
 



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

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

Branch: refs/heads/cassandra-3.11
Commit: e99585983bda72c0fc4468001158cf0dfe985b1d
Parents: f070f1e 50560aa
Author: Michael Shuler 
Authored: Tue Mar 7 09:30:34 2017 -0600
Committer: Michael Shuler 
Committed: Tue Mar 7 09:30:34 2017 -0600

--

--




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

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

Branch: refs/heads/trunk
Commit: e99585983bda72c0fc4468001158cf0dfe985b1d
Parents: f070f1e 50560aa
Author: Michael Shuler 
Authored: Tue Mar 7 09:30:34 2017 -0600
Committer: Michael Shuler 
Committed: Tue Mar 7 09:30:34 2017 -0600

--

--




[jira] [Commented] (CASSANDRA-13053) GRANT/REVOKE on table without keyspace performs permissions check incorrectly

2017-03-07 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-13053:
---

dtest PR: https://github.com/riptano/cassandra-dtest/pull/1450

> GRANT/REVOKE on table without keyspace performs permissions check incorrectly
> -
>
> Key: CASSANDRA-13053
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13053
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
>Reporter: Sam Tunnicliffe
>Assignee: Aleksey Yeschenko
>Priority: Minor
> Fix For: 2.2.x, 3.0.x, 3.11.x
>
>
> When a {{GRANT}} or {{REVOKE}} statement is executed on a table without 
> specifying the keyspace, we attempt to use the client session's keyspace to 
> qualify the resource. 
> This is done when validating the statement, which occurs after checking that 
> the user executing the statement has sufficient permissions. This means that 
> the permissions checking uses an incorrect resource, namely a table with a 
> null keyspace. If that user is a superuser, then no error is encountered as 
> superuser privs implicitly grants *all* permissions. If the user is not a 
> superuser, then the {{GRANT}} or {{REVOKE}} fails with an ugly error, 
> regardless of which keyspace the client session is bound to:
> {code}
> Unauthorized: Error from server: code=2100 [Unauthorized] message="User admin 
> has no AUTHORIZE permission on  or any of its parents"
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-12839) CommitLogReplayException: Unexpected error deserializing mutation

2017-03-07 Thread Malte Pickhan (JIRA)

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

Malte Pickhan commented on CASSANDRA-12839:
---

[~jjirsa]Sorry for the delayed response. We actually recovered the node by 
replaying from a healthy one.

> CommitLogReplayException: Unexpected error deserializing mutation
> -
>
> Key: CASSANDRA-12839
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12839
> Project: Cassandra
>  Issue Type: Bug
> Environment: Ubuntu, Cassandra 3.7, RF3
>Reporter: Malte Pickhan
>Priority: Critical
>
> We wanted to run a *nodetool repair*  on the affected node. This was not 
> possible due to CASSANDRA-12694.
> Therefore we wanted to shutdown the node in order to run scrubsstables. After 
> this was done, bootstrapping the node was not possible anymore. It was not 
> possible since it wasn't able to replay the commitlog. Unfortunately we 
> didn't run a drain before.
> {quote}
> org.apache.cassandra.db.commitlog.CommitLogReplayer$CommitLogReplayException: 
> Unexpected error deserializing mutation; saved to 
> /tmp/mutation4616409546670104469dat.  This may be caused by replaying a 
> mutation against a table with the same name but incompatible schema.  
> Exception follows: java.io.IOError: java.io.IOException: Corrupt empty row 
> found in unfiltered partition
> {quote}
> Two days before that, we actually did some modification on the table and 
> dropped a column.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (CASSANDRA-13297) Cleanup naming around native transport version parsing

2017-03-07 Thread Joshua McKenzie (JIRA)

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

Joshua McKenzie updated CASSANDRA-13297:

Issue Type: Improvement  (was: Bug)

> Cleanup naming around native transport version parsing
> --
>
> Key: CASSANDRA-13297
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13297
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Michael Kjellman
>
> While [~jasobrown] and myself were chasing down how features and versions are 
> parsed in the binary protocol, it took us a while to realize that the 
> following check in StartupMessage that creates a {{CassandraVersion}} object 
> is actually parsing the *CQL* Version (but again.. with a class named 
> {{CassandraVersion}}...)
> {code}
> if (new CassandraVersion(cqlVersion).compareTo(new 
> CassandraVersion("2.99.0")) < 0)
> {code}
> It then turns out there is already a {{CqlVersion}} class that has some of 
> what we want but only appears to be being used by Stress.
> This isn't very clear so renaming the classes to make it obvious that we're 
> parsing a CQL Language version vs. the Cassandra Server version vs. the 
> Binary Native Protocol version will make this situation slightly better for 
> people trying to contribute to the codebase.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (CASSANDRA-13289) Make it possible to monitor an ideal consistency level separate from actual consistency level

2017-03-07 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-13289:
--
Issue Type: New Feature  (was: Bug)

> Make it possible to monitor an ideal consistency level separate from actual 
> consistency level
> -
>
> Key: CASSANDRA-13289
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13289
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Core
>Reporter: Ariel Weisberg
>Assignee: Ariel Weisberg
> Fix For: 4.0
>
>
> As an operator there are several issues related to multi-datacenter 
> replication and consistency you may want to have more information on from 
> your production database.
> For instance. If your application writes at LOCAL_QUORUM how often are those 
> writes failing to achieve EACH_QUORUM at other data centers. If you failed 
> your application over to one of those data centers roughly how inconsistent 
> might it be given the number of writes that didn't propagate since the last 
> incremental repair?
> You might also want to know roughly what the latency of writes would be if 
> you switched to a different consistency level. For instance you are writing 
> at LOCAL_QUORUM and want to know what would happen if you switched to 
> EACH_QUORUM.
> The proposed change is to allow an ideal_consistency_level to be specified in 
> cassandra.yaml as well as get/set via JMX. If no ideal consistency level is 
> specified no additional tracking is done.
> if an ideal consistency level is specified then the 
> {{AbstractWriteResponesHandler}} will contain a delegate WriteResponseHandler 
> that tracks whether the ideal consistency level is met before a write times 
> out. It also tracks the latency for achieving the ideal CL  of successful 
> writes.
> These two metrics would be reported on a per keyspace basis.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13282) Commitlog replay may fail if last mutation is within 4 bytes of end of segment

2017-03-07 Thread Joshua McKenzie (JIRA)

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

Joshua McKenzie commented on CASSANDRA-13282:
-

[~blambov] to review.

> Commitlog replay may fail if last mutation is within 4 bytes of end of segment
> --
>
> Key: CASSANDRA-13282
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13282
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Jeff Jirsa
>Assignee: Jeff Jirsa
> Fix For: 2.2.x, 3.0.x, 3.11.x, 4.x
>
> Attachments: whiteboard.png
>
>
> Following CASSANDRA-9749 , stricter correctness checks on commitlog replay 
> can incorrectly detect "corrupt segments" and stop commitlog replay (and 
> potentially stop cassandra, depending on the configured policy). In 
> {{CommitlogReplayer#replaySyncSection}} we try to read a 4 byte int 
> {{serializedSize}}, and if it's 0 (which will happen due to zeroing when the 
> segment was created), we continue on to the next segment. However, it appears 
> that if a mutation is sized such that it ends with 1, 2, or 3 bytes remaining 
> in the segment, we'll pass the {{isEOF}} on the while loop but fail to read 
> the {{serializedSize}} int, and fail. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (CASSANDRA-13282) Commitlog replay may fail if last mutation is within 4 bytes of end of segment

2017-03-07 Thread Joshua McKenzie (JIRA)

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

Joshua McKenzie updated CASSANDRA-13282:

Reviewer: Branimir Lambov

> Commitlog replay may fail if last mutation is within 4 bytes of end of segment
> --
>
> Key: CASSANDRA-13282
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13282
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Jeff Jirsa
>Assignee: Jeff Jirsa
> Fix For: 2.2.x, 3.0.x, 3.11.x, 4.x
>
> Attachments: whiteboard.png
>
>
> Following CASSANDRA-9749 , stricter correctness checks on commitlog replay 
> can incorrectly detect "corrupt segments" and stop commitlog replay (and 
> potentially stop cassandra, depending on the configured policy). In 
> {{CommitlogReplayer#replaySyncSection}} we try to read a 4 byte int 
> {{serializedSize}}, and if it's 0 (which will happen due to zeroing when the 
> segment was created), we continue on to the next segment. However, it appears 
> that if a mutation is sized such that it ends with 1, 2, or 3 bytes remaining 
> in the segment, we'll pass the {{isEOF}} on the while loop but fail to read 
> the {{serializedSize}} int, and fail. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Comment Edited] (CASSANDRA-13289) Make it possible to monitor an ideal consistency level separate from actual consistency level

2017-03-07 Thread Romain Hardouin (JIRA)

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

Romain Hardouin edited comment on CASSANDRA-13289 at 3/7/17 9:07 AM:
-

bq. Yes you can set it via JMX.
Great, thanks!

Typo in cassandra.yaml: {{requested by each each write}}
Also, I don't see where {{import javax.xml.crypto.Data}} is used in 
StorageProxy.  


was (Author: rha):
> Yes you can set it via JMX.
Great, thanks!

Typo in cassandra.yaml: {{requested by each each write}}

> Make it possible to monitor an ideal consistency level separate from actual 
> consistency level
> -
>
> Key: CASSANDRA-13289
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13289
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Ariel Weisberg
>Assignee: Ariel Weisberg
> Fix For: 4.0
>
>
> As an operator there are several issues related to multi-datacenter 
> replication and consistency you may want to have more information on from 
> your production database.
> For instance. If your application writes at LOCAL_QUORUM how often are those 
> writes failing to achieve EACH_QUORUM at other data centers. If you failed 
> your application over to one of those data centers roughly how inconsistent 
> might it be given the number of writes that didn't propagate since the last 
> incremental repair?
> You might also want to know roughly what the latency of writes would be if 
> you switched to a different consistency level. For instance you are writing 
> at LOCAL_QUORUM and want to know what would happen if you switched to 
> EACH_QUORUM.
> The proposed change is to allow an ideal_consistency_level to be specified in 
> cassandra.yaml as well as get/set via JMX. If no ideal consistency level is 
> specified no additional tracking is done.
> if an ideal consistency level is specified then the 
> {{AbstractWriteResponesHandler}} will contain a delegate WriteResponseHandler 
> that tracks whether the ideal consistency level is met before a write times 
> out. It also tracks the latency for achieving the ideal CL  of successful 
> writes.
> These two metrics would be reported on a per keyspace basis.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (CASSANDRA-13305) Slice.isEmpty() returns false for some empty slices

2017-03-07 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-13305:
-
Status: Patch Available  (was: Open)

Patch is trivial, but attaching a unit test to demonstrate the problem too.

| [13305-3.0|https://github.com/pcmanus/cassandra/commits/13305-3.0] | 
[utests|http://cassci.datastax.com/job/pcmanus-13305-3.0-testall] | 
[dtests|http://cassci.datastax.com/job/pcmanus-13305-3.0-dtest] |
| [13305-3.11|https://github.com/pcmanus/cassandra/commits/13305-3.11] | 
[utests|http://cassci.datastax.com/job/pcmanus-13305-3.11-testall] | 
[dtests|http://cassci.datastax.com/job/pcmanus-13305-3.11-dtest] |


> Slice.isEmpty() returns false for some empty slices
> ---
>
> Key: CASSANDRA-13305
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13305
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Sylvain Lebresne
>Assignee: Sylvain Lebresne
> Fix For: 3.0.x, 3.11.x
>
>
> {{Slice.isEmpty}} is currently defined as {{comparator.compare(end, start) < 
> 0}} but this shouldn't be a strict inequality. Indeed, the way 
> {{Slice.Bound}} is defined, having a start equal to an end implies a range 
> like {{[1, 1)}}, but that range is definitively empty and something we 
> shouldn't let in as that would break merging and other range tombstone 
> related code.
> In practice, if you can currently insert such empty range (with something 
> like {{DELETE FROM t WHERE k = 'foo' AND i >= 1 AND i < 1}}), and that can 
> trigger assertions in {{RangeTomstoneList}} (and possibly other problem).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (CASSANDRA-13305) Slice.isEmpty() returns false for some empty slices

2017-03-07 Thread Sylvain Lebresne (JIRA)
Sylvain Lebresne created CASSANDRA-13305:


 Summary: Slice.isEmpty() returns false for some empty slices
 Key: CASSANDRA-13305
 URL: https://issues.apache.org/jira/browse/CASSANDRA-13305
 Project: Cassandra
  Issue Type: Bug
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
 Fix For: 3.0.x, 3.11.x


{{Slice.isEmpty}} is currently defined as {{comparator.compare(end, start) < 
0}} but this shouldn't be a strict inequality. Indeed, the way {{Slice.Bound}} 
is defined, having a start equal to an end implies a range like {{[1, 1)}}, but 
that range is definitively empty and something we shouldn't let in as that 
would break merging and other range tombstone related code.

In practice, if you can currently insert such empty range (with something like 
{{DELETE FROM t WHERE k = 'foo' AND i >= 1 AND i < 1}}), and that can trigger 
assertions in {{RangeTomstoneList}} (and possibly other problem).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13300) Upgrade the jna version to 4.3.0

2017-03-07 Thread Robert Stupp (JIRA)

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

Robert Stupp commented on CASSANDRA-13300:
--

I think the (eventually?) complete list of CPU architectures is. I think we 
should warn on anything else (thinking of ARM for example).
* 32 bit x86: x86, i386, i486, i586, i686, pentium
* 64 bit x86_64-like: x86_64, amd64, em64t


> Upgrade the jna version to 4.3.0
> 
>
> Key: CASSANDRA-13300
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13300
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Configuration
>Reporter: Amitkumar Ghatwal
>Assignee: Jason Brown
>
> Could you please upgrade the jna version present in the github cassandra
> location : https://github.com/apache/cassandra/blob/trunk/lib/jna-4.0.0.jar
> to below latest version   - 4.3.0 -
> http://repo1.maven.org/maven2/net/java/dev/jna/jna/4.3.0/jna-4.3.0-javadoc.jar



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13300) Upgrade the jna version to 4.3.0

2017-03-07 Thread Amitkumar Ghatwal (JIRA)

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

Amitkumar Ghatwal commented on CASSANDRA-13300:
---

hi Jason , looks like you've done the above change here : 
https://github.com/jasobrown/cassandra/commit/7b570a192d1126504c6148c25d46dcf27eea9bda.
 Do point me out if you've have done the changes elsewhere

As mentioned here , jna version upgrade will be only in the cassandra trunk . 
Please do let me know when the jna version will be reflected here - 
https://github.com/apache/cassandra/blob/trunk/lib/jna-4.*.*.jar 


 

> Upgrade the jna version to 4.3.0
> 
>
> Key: CASSANDRA-13300
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13300
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Configuration
>Reporter: Amitkumar Ghatwal
>Assignee: Jason Brown
>
> Could you please upgrade the jna version present in the github cassandra
> location : https://github.com/apache/cassandra/blob/trunk/lib/jna-4.0.0.jar
> to below latest version   - 4.3.0 -
> http://repo1.maven.org/maven2/net/java/dev/jna/jna/4.3.0/jna-4.3.0-javadoc.jar



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)