[jira] [Updated] (CASSANDRA-13636) No documentation on how to handle error in repair

2018-01-19 Thread Jeff Jirsa (JIRA)

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

Jeff Jirsa updated CASSANDRA-13636:
---
Description: 
After having a node go down and restarted, I ran an incremental repair. It 
exited with the following error:
{code:java}
[2017-06-26 04:01:12,241] Repair command #39 finished in 0 seconds
[2017-06-26 04:01:12,250] Starting repair command #40, repairing keyspace fgp 
with repair options (parallelism: parallel, primary range: false, incremental: 
true, job threads: 1, ColumnFamilies: [], dataCenters: [], hosts: [], # of 
ranges: 790)
[2017-06-26 04:01:12,468] Did not get positive replies from all endpoints. List 
of failed endpoint(s): [10.0.2.13]
[2017-06-26 04:01:12,469] Repair command #40 finished with error
error: Repair job has failed with the error message: [2017-06-26 04:01:12,468] 
Did not get positive replies from all endpoints. List of failed endpoint(s): 
[10.0.2.13]
– StackTrace –
java.lang.RuntimeException: Repair job has failed with the error message: 
[2017-06-26 04:01:12,468] Did not get positive replies from all endpoints. List 
of failed endpoint(s): [10.0.2.13]
at org.apache.cassandra.tools.RepairRunner.progress(RepairRunner.java:115)
at 
org.apache.cassandra.utils.progress.jmx.JMXNotificationProgressListener.handleNotification(JMXNotificationProgressListener.java:77)
at 
com.sun.jmx.remote.internal.ClientNotifForwarder$NotifFetcher.dispatchNotification(ClientNotifForwarder.java:583)
at 
com.sun.jmx.remote.internal.ClientNotifForwarder$NotifFetcher.doRun(ClientNotifForwarder.java:533)
at 
com.sun.jmx.remote.internal.ClientNotifForwarder$NotifFetcher.run(ClientNotifForwarder.java:452)
at 
com.sun.jmx.remote.internal.ClientNotifForwarder$LinearExecutor$1.run(ClientNotifForwarder.java:108){code}
On the node that did not provide a positive reply, the logs showed:
{code:java}
INFO 04:01:12 repair #176c3760-5a24-11e7-868e-97841c634787 Starting 
anticompaction for system_traces.events on 0/[] sstables
INFO 04:01:12 repair #176c3760-5a24-11e7-868e-97841c634787 Completed 
anticompaction successfully
INFO 04:01:12 repair #176c3760-5a24-11e7-868e-97841c634787 Completed 
anticompaction successfully
ERROR 04:01:12 Table with id ffcc2ef0-3122-11e7-8f76-b3cac7d588b7 was dropped 
during prepare phase of repair
{code}
I was unable to find documentation which describes this situation or how to 
recover from this situation. Running a full repair results in the same error.

  was:
After having a node go down and restarted, I ran an incremental repair.  It 
exited with the following error:

[2017-06-26 04:01:12,241] Repair command #39 finished in 0 seconds
[2017-06-26 04:01:12,250] Starting repair command #40, repairing keyspace fgp 
with repair options (parallelism: parallel, primary range: false, incremental: 
true, job threads: 1, ColumnFamilies: [], dataCenters: [], hosts: [], # of 
ranges: 790)
[2017-06-26 04:01:12,468] Did not get positive replies from all endpoints. List 
of failed endpoint(s): [10.0.2.13]
[2017-06-26 04:01:12,469] Repair command #40 finished with error
error: Repair job has failed with the error message: [2017-06-26 04:01:12,468] 
Did not get positive replies from all endpoints. List of failed endpoint(s): 
[10.0.2.13]
-- StackTrace --
java.lang.RuntimeException: Repair job has failed with the error message: 
[2017-06-26 04:01:12,468] Did not get positive replies from all endpoints. List 
of failed endpoint(s): [10.0.2.13]
at 
org.apache.cassandra.tools.RepairRunner.progress(RepairRunner.java:115)
at 
org.apache.cassandra.utils.progress.jmx.JMXNotificationProgressListener.handleNotification(JMXNotificationProgressListener.java:77)
at 
com.sun.jmx.remote.internal.ClientNotifForwarder$NotifFetcher.dispatchNotification(ClientNotifForwarder.java:583)
at 
com.sun.jmx.remote.internal.ClientNotifForwarder$NotifFetcher.doRun(ClientNotifForwarder.java:533)
at 
com.sun.jmx.remote.internal.ClientNotifForwarder$NotifFetcher.run(ClientNotifForwarder.java:452)
at 
com.sun.jmx.remote.internal.ClientNotifForwarder$LinearExecutor$1.run(ClientNotifForwarder.java:108)

On the node that did not provide a positive reply, the logs showed:

INFO  04:01:12 [repair #176c3760-5a24-11e7-868e-97841c634787] Starting 
anticompaction for system_traces.events on 0/[] sstables
INFO  04:01:12 [repair #176c3760-5a24-11e7-868e-97841c634787] Completed 
anticompaction successfully
INFO  04:01:12 [repair #176c3760-5a24-11e7-868e-97841c634787] Completed 
anticompaction successfully
ERROR 04:01:12 Table with id ffcc2ef0-3122-11e7-8f76-b3cac7d588b7 was dropped 
during prepare phase of repair

I was unable to find documentation which describes this situation or how to 
recover from this situation. Running a full repair results in the same error.






> No documentation on how to handle error in repair
> -
>
> 

[jira] [Updated] (CASSANDRA-13891) fromJson(null) throws java.lang.NullPointerException on Cassandra

2018-01-19 Thread Jeff Jirsa (JIRA)

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

Jeff Jirsa updated CASSANDRA-13891:
---
Description: 
Basically, {{fromJson}} throws a {{java.lang.NullPointerException}} when NULL 
is passed, instead of just returning a NULL itself. Say I create a UDT and a 
table as follows:
{code:java}
create type type1
(
id int,
name text
);

create table table1
(
id int,
t FROZEN,

primary key (id)
);{code}
And then try and insert a row as such:

{{insert into table1 (id, t) VALUES (1, fromJson(null));}}

I get the error: {{java.lang.NullPointerException}}

This works as expected: {{insert into table1 (id, t) VALUES (1, null);}}

Programmatically, one does not always know when a UDT will be null, hence me 
expecting {{fromJson}} to just return NULL.

  was:
Basically, {{fromJson}} throws a {{java.lang.NullPointerException}} when NULL 
is passed, instead of just returning a NULL itself. Say I create a UDT and a 
table as follows:

create type type1
(
id int,
name text
);

create table table1
(
id int,
t FROZEN,

primary key (id)
);

And then try and insert a row as such:

{{insert into table1 (id, t) VALUES (1, fromJson(null));}}

I get the error: {{java.lang.NullPointerException}}

This works as expected: {{insert into table1 (id, t) VALUES (1, null);}}

Programmatically, one does not always know when a UDT will be null, hence me 
expecting {{fromJson}} to just return NULL.



> fromJson(null) throws java.lang.NullPointerException on Cassandra
> -
>
> Key: CASSANDRA-13891
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13891
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
> Environment: Cassandra 3.11
>Reporter: Marcel Villet
>Priority: Minor
>
> Basically, {{fromJson}} throws a {{java.lang.NullPointerException}} when NULL 
> is passed, instead of just returning a NULL itself. Say I create a UDT and a 
> table as follows:
> {code:java}
> create type type1
> (
> id int,
> name text
> );
> create table table1
> (
> id int,
> t FROZEN,
> primary key (id)
> );{code}
> And then try and insert a row as such:
> {{insert into table1 (id, t) VALUES (1, fromJson(null));}}
> I get the error: {{java.lang.NullPointerException}}
> This works as expected: {{insert into table1 (id, t) VALUES (1, null);}}
> Programmatically, one does not always know when a UDT will be null, hence me 
> expecting {{fromJson}} to just return NULL.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Updated] (CASSANDRA-14176) Cannot export & import data containing no-break space (U+00A0)

2018-01-19 Thread Jeff Jirsa (JIRA)

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

Jeff Jirsa updated CASSANDRA-14176:
---
Assignee: Marcel Dopita
  Status: Patch Available  (was: Open)

Marking patch available. 

> Cannot export & import data containing no-break space (U+00A0)
> --
>
> Key: CASSANDRA-14176
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14176
> Project: Cassandra
>  Issue Type: Bug
>  Components: Libraries
>Reporter: Marcel Dopita
>Assignee: Marcel Dopita
>Priority: Major
> Attachments: fix.patch
>
>
> We were unable to export and then import the same data to Cassandra - like 
> line breaks or the no-break space (U+00A0).
> Adding v.decode() to copyutil.py fixed most characters like line breaks etc.
> Only after using the included patch, the character U+00A0 was correctly 
> stored in Cassandra and successfully (verifiable) exported & imported & 
> exported.
>  
> {code:java}
> diff --git a/pylib/cqlshlib/copyutil.py b/pylib/cqlshlib/copyutil.py
> index 7f97b49..883c957 100644
> --- a/pylib/cqlshlib/copyutil.py
> +++ b/pylib/cqlshlib/copyutil.py
> @@ -1871,7 +1871,7 @@ class ImportConversion(object):
>  return bytearray.fromhex(v[2:])
>  
>  def convert_text(v, **_):
> -    return v
> +    return v.decode('string_escape')
>  
>  def convert_uuid(v, **_):
>  return UUID(v)
> diff --git a/pylib/cqlshlib/formatting.py b/pylib/cqlshlib/formatting.py
> index 803ea63..79eb691 100644
> --- a/pylib/cqlshlib/formatting.py
> +++ b/pylib/cqlshlib/formatting.py
> @@ -33,7 +33,7 @@ from util import UTC
>  
>  is_win = platform.system() == 'Windows'
>  
> -unicode_controlchars_re = re.compile(r'[\x00-\x31\x7f-\xa0]')
> +unicode_controlchars_re = re.compile(r'[\x00-\x31]')
>  controlchars_re = re.compile(r'[\x00-\x31\x7f-\xff]')
> {code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Commented] (CASSANDRA-14172) Select with multiple clustering columns and inequality doesn't work

2018-01-19 Thread Samuel Wu (JIRA)

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

Samuel Wu commented on CASSANDRA-14172:
---

Thank you, Benjamin, for the explanation. But this doesn't seem to explain my 
case.

Let's remove the time part from the timestamp to make it easy to read and also 
convert 2516201604308 to 2049-09-25.

So my query is (studydate, birthday, discoverytime) < 
(2049-09-25,1970-01-01,1970-01-01) and it return a result in (2018-01-17, 
1970-01-02, 2018-01-17). It doesn't make sense to me.

I checked with my database admin and was told the Cassandra server I'm on is 
actually 3.11.1. Is there way for me to verify the version?

Regards, Samuel Wu

> Select with multiple clustering columns and inequality doesn't work
> ---
>
> Key: CASSANDRA-14172
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14172
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
> Environment: com.datastax.cassandra:cassandra-driver-core:3.3.0 on 
> linux
>Reporter: Samuel Wu
>Priority: Major
> Attachments: graycol.gif
>
>
> * I have a table created as the following command.
>  * CREATE TABLE IF NOT EXISTS test.discrepancies(
>  modality text,
>  disease text,
>  location text,
>  type text,
>  status text,
>  studyDate timestamp,
>  birthDay timestamp,
>  discoveryTime timestamp,
>  reportId uuid,
>  mrn text,
>  firstName text,
>  PRIMARY KEY ((location, modality, disease), type, status, studyDate, 
> birthDay, discoveryTime)
> );
>  * The following data are populated in the table
>  *  location | modality | disease  | type | status | studydate                
>        | birthday                        | discoverytime                   | 
> firstname | mrn  | reportid
> --+--+--+--++-+-+-+---+--+--
>      West |       CX | disease1 |  PLD |   OPEN | 2018-01-17 
> 15:06:44.138000+ | 1970-01-02 10:17:36.789000+ | 2018-01-17 
> 15:06:44.138000+ |     name1 | mrn1 | 9a545096-6191-4275-86b3-cc89e181f494
>  
>  * When the following command was run, I would expect no row found since the 
> birthday and discoveoytime is out of range. 
>  * select * from test.discrepancies where disease='disease1' and 
> location='West' and modality='CX' and type='PLD' and status='OPEN' and 
> (studydate, birthday, discoverytime) < (2516201604308,0,0);
>  * But the above row was returned instead.
>  * This feature was implemented in 
> https://issues.apache.org/jira/browse/CASSANDRA-4851
>  * see https://docs.datastax.com/en/cql/3.3/cql/cql_using/useQueryIN.html



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Created] (CASSANDRA-14178) MAX_TTL doesn't account for leap years currently

2018-01-19 Thread Madhav (JIRA)
Madhav created CASSANDRA-14178:
--

 Summary: MAX_TTL doesn't account for leap years currently
 Key: CASSANDRA-14178
 URL: https://issues.apache.org/jira/browse/CASSANDRA-14178
 Project: Cassandra
  Issue Type: Bug
  Components: Configuration, Core, CQL
Reporter: Madhav


Currently at the trunk (and in all prior versions), we've MAX_TTL value defined 
as 20 years in seconds, which really isn't 20 years as it currently doesn't 
account for leap years.
{code:java}
https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/cql3/Attributes.java#L43

/**
* If this limit is ever raised, make sure @{@link Integer#MAX_VALUE} is not 
allowed,
* as this is used as a flag to represent expired liveness.
*
* See {@link org.apache.cassandra.db.LivenessInfo#EXPIRED_LIVENESS_TTL}
*/
public static final int MAX_TTL = 20 * 365 * 24 * 60 * 60; // 20 years in 
seconds
{code}
Either perform actual date calculation to account for leap years or not call it 
as "20 years in seconds" as this breaks many code relying on it for playing 
with dates.

 

This was originally introduced as part of [this 
commit|https://github.com/apache/cassandra/commit/46fc843bbd39bf6b007fb6d1c8e823f8b3ba2425]
 part of CASSANDRA-4771



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Updated] (CASSANDRA-14148) test_no_base_column_in_view_pk_complex_timestamp_with_flush - materialized_views_test.TestMaterializedViews frequently fails in CI

2018-01-19 Thread Paulo Motta (JIRA)

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

Paulo Motta updated CASSANDRA-14148:

Reviewer: Paulo Motta

> test_no_base_column_in_view_pk_complex_timestamp_with_flush - 
> materialized_views_test.TestMaterializedViews frequently fails in CI
> --
>
> Key: CASSANDRA-14148
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14148
> Project: Cassandra
>  Issue Type: Bug
>  Components: Testing
>Reporter: Michael Kjellman
>Assignee: Marcus Eriksson
>Priority: Major
>
> test_no_base_column_in_view_pk_complex_timestamp_with_flush - 
> materialized_views_test.TestMaterializedViews frequently fails in CI
> self =  0x7f849b25cf60>
> @since('3.0')
> def test_no_base_column_in_view_pk_complex_timestamp_with_flush(self):
> >   self._test_no_base_column_in_view_pk_complex_timestamp(flush=True)
> materialized_views_test.py:970: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> materialized_views_test.py:1066: in 
> _test_no_base_column_in_view_pk_complex_timestamp
> assert_one(session, "SELECT * FROM t", [1, 1, None, None, None, 1])
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> session = 
> query = 'SELECT * FROM t', expected = [1, 1, None, None, None, 1], cl = None
> def assert_one(session, query, expected, cl=None):
> """
> Assert query returns one row.
> @param session Session to use
> @param query Query to run
> @param expected Expected results from query
> @param cl Optional Consistency Level setting. Default ONE
> 
> Examples:
> assert_one(session, "LIST USERS", ['cassandra', True])
> assert_one(session, query, [0, 0])
> """
> simple_query = SimpleStatement(query, consistency_level=cl)
> res = session.execute(simple_query)
> list_res = _rows_to_list(res)
> >   assert list_res == [expected], "Expected {} from {}, but got 
> > {}".format([expected], query, list_res)
> E   AssertionError: Expected [[1, 1, None, None, None, 1]] from SELECT * 
> FROM t, but got []



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Updated] (CASSANDRA-9067) BloomFilter serialization format should not change byte ordering

2018-01-19 Thread Jason Brown (JIRA)

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

Jason Brown updated CASSANDRA-9067:
---
   Resolution: Fixed
Fix Version/s: (was: 4.x)
   4.0
   Status: Resolved  (was: Patch Available)

committed as sha {{d6cc5943250a7c19adb42ef86dc9a186d4e52166}}

Thanks, [~jay.zhuang]!

> BloomFilter serialization format should not change byte ordering
> 
>
> Key: CASSANDRA-9067
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9067
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Benedict
>Assignee: Jay Zhuang
>Priority: Minor
> Fix For: 4.0
>
>
> As a follow-up to CASSANDRA-9066 and CASSANDRA-9060, it appears we do some 
> unnecessary byte swapping during the serialization of bloom filters, which 
> makes the logic slower and harder to follow. We should either perform them 
> more efficiently (using Long.reverseBytes) or, preferably, eliminate the 
> conversion altogether since it does not appear to serve any purpose.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



cassandra git commit: New Bloomfilter format without changing the byte ordering

2018-01-19 Thread jasobrown
Repository: cassandra
Updated Branches:
  refs/heads/trunk 716d08f90 -> d6cc59432


New Bloomfilter format without changing the byte ordering

patch by Jay Zhuang; reviewed by jasobrown for CASSANDRA-9067


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

Branch: refs/heads/trunk
Commit: d6cc5943250a7c19adb42ef86dc9a186d4e52166
Parents: 716d08f
Author: Jay Zhuang 
Authored: Sun Jan 14 20:42:57 2018 -0800
Committer: Jason Brown 
Committed: Fri Jan 19 06:40:50 2018 -0800

--
 CHANGES.txt |   1 +
 .../io/sstable/format/SSTableReader.java|   8 +-
 .../cassandra/io/sstable/format/Version.java|   7 ++
 .../io/sstable/format/big/BigFormat.java|  14 ++-
 .../io/sstable/format/big/BigTableWriter.java   |   2 +-
 .../cassandra/utils/BloomFilterSerializer.java  |   8 +-
 .../apache/cassandra/utils/FilterFactory.java   |  14 ---
 .../org/apache/cassandra/utils/obs/IBitSet.java |   4 +-
 .../cassandra/utils/obs/OffHeapBitSet.java  |  60 +++
 .../legacy_na_clust/na-1-big-CompressionInfo.db | Bin 87 -> 87 bytes
 .../legacy_na_clust/na-1-big-Data.db| Bin 5215 -> 5259 bytes
 .../legacy_na_clust/na-1-big-Digest.crc32   |   2 +-
 .../legacy_na_clust/na-1-big-Filter.db  | Bin 24 -> 24 bytes
 .../legacy_na_clust/na-1-big-Index.db   | Bin 157553 -> 157553 bytes
 .../legacy_na_clust/na-1-big-Statistics.db  | Bin 7095 -> 7095 bytes
 .../legacy_na_clust/na-1-big-TOC.txt|   6 +-
 .../na-1-big-CompressionInfo.db | Bin 79 -> 79 bytes
 .../legacy_na_clust_counter/na-1-big-Data.db| Bin 5781 -> 5888 bytes
 .../na-1-big-Digest.crc32   |   2 +-
 .../legacy_na_clust_counter/na-1-big-Filter.db  | Bin 24 -> 24 bytes
 .../legacy_na_clust_counter/na-1-big-Index.db   | Bin 157553 -> 157553 bytes
 .../na-1-big-Statistics.db  | Bin 7104 -> 7104 bytes
 .../legacy_na_clust_counter/na-1-big-TOC.txt|   6 +-
 .../legacy_na_simple/na-1-big-Data.db   | Bin 89 -> 89 bytes
 .../legacy_na_simple/na-1-big-Digest.crc32  |   2 +-
 .../legacy_na_simple/na-1-big-Filter.db | Bin 24 -> 24 bytes
 .../legacy_na_simple/na-1-big-Statistics.db | Bin 4648 -> 4648 bytes
 .../legacy_na_simple/na-1-big-TOC.txt   |   6 +-
 .../legacy_na_simple_counter/na-1-big-Data.db   | Bin 146 -> 140 bytes
 .../na-1-big-Digest.crc32   |   2 +-
 .../legacy_na_simple_counter/na-1-big-Filter.db | Bin 24 -> 24 bytes
 .../na-1-big-Statistics.db  | Bin 4657 -> 4657 bytes
 .../legacy_na_simple_counter/na-1-big-TOC.txt   |   6 +-
 .../serialization/4.0/utils.BloomFilter1000.bin | Bin 0 -> 2500016 bytes
 .../microbench/BloomFilterSerializerBench.java  |  99 +++
 .../cassandra/io/sstable/LegacySSTableTest.java |   3 +-
 .../apache/cassandra/utils/BloomFilterTest.java |  24 +++--
 .../cassandra/utils/SerializationsTest.java |  49 +++--
 .../cassandra/utils/obs/OffHeapBitSetTest.java  |  21 ++--
 39 files changed, 257 insertions(+), 89 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d6cc5943/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 65a7a40..fd0acb9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 4.0
+ * BloomFilter serialization format should not change byte ordering 
(CASSANDRA-9067)
  * Remove unused on-heap BloomFilter implementation (CASSANDRA-14152)
  * Delete temp test files on exit (CASSANDRA-14153)
  * Make PartitionUpdate and Mutation immutable (CASSANDRA-13867)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d6cc5943/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
--
diff --git a/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java 
b/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
index 6722e1b..757b9a8 100644
--- a/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
+++ b/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
@@ -75,6 +75,7 @@ import org.apache.cassandra.utils.*;
 import org.apache.cassandra.utils.concurrent.OpOrder;
 import org.apache.cassandra.utils.concurrent.Ref;
 import org.apache.cassandra.utils.concurrent.SelfRefCounted;
+import org.apache.cassandra.utils.BloomFilterSerializer;
 
 import static 
org.apache.cassandra.db.Directories.SECONDARY_INDEX_NAME_SEPARATOR;
 
@@ -728,7 +729,7 @@ public abstract class SSTableReader 

[jira] [Updated] (CASSANDRA-14140) Add unittest for Schema migration change (CASSANDRA-14109)

2018-01-19 Thread Jason Brown (JIRA)

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

Jason Brown updated CASSANDRA-14140:

   Resolution: Fixed
Fix Version/s: 3.11.2
   Status: Resolved  (was: Patch Available)

When running the {{GossiperTest}} in a loop (I have a script that does this), I 
kept getting strange, race-like errors. I looked at the unit test, and I see 
you were calling the {{SchemaLoader}} methods in the {{@Test}} function. I 
moved those calls to a {{@BeforeClass}} method, and the problems went away. I 
went ahead and changed on commit.

Committed as sha {{e7b9c1f50a9875682b480a3ab69e662f4b097d4d}}. Thanks!

> Add unittest for Schema migration change (CASSANDRA-14109)
> --
>
> Key: CASSANDRA-14140
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14140
> Project: Cassandra
>  Issue Type: Sub-task
>  Components: Testing
>Reporter: Jay Zhuang
>Assignee: Jay Zhuang
>Priority: Minor
>  Labels: testing
> Fix For: 3.11.2
>
>
> It's a fairly big change, would be better to have a few unittest.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[2/3] cassandra git commit: Add Unittest for schema migration fix

2018-01-19 Thread jasobrown
Add Unittest for schema migration fix

patch by Jay Zhuang; reviewed by jasobrown for CASSANDRA-14140


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

Branch: refs/heads/trunk
Commit: e7b9c1f50a9875682b480a3ab69e662f4b097d4d
Parents: d0b7566
Author: Jay Zhuang 
Authored: Wed Dec 27 15:25:36 2017 -0800
Committer: Jason Brown 
Committed: Fri Jan 19 06:17:51 2018 -0800

--
 CHANGES.txt |   1 +
 .../apache/cassandra/gms/VersionedValue.java|   9 +-
 .../apache/cassandra/schema/SchemaKeyspace.java |  19 ++--
 .../cassandra/service/StorageService.java   |  25 -
 .../org/apache/cassandra/gms/GossiperTest.java  |  69 -
 .../cassandra/schema/SchemaKeyspaceTest.java| 102 +++
 6 files changed, 188 insertions(+), 37 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e7b9c1f5/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index c06ad0d..5e4c40a 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.11.2
+ * Add Unittest for schema migration fix (CASSANDRA-14140)
  * Print correct snitch info from nodetool describecluster (CASSANDRA-13528)
  * Close socket on error during connect on OutboundTcpConnection 
(CASSANDRA-9630)
  * Enable CDC unittest (CASSANDRA-14141)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e7b9c1f5/src/java/org/apache/cassandra/gms/VersionedValue.java
--
diff --git a/src/java/org/apache/cassandra/gms/VersionedValue.java 
b/src/java/org/apache/cassandra/gms/VersionedValue.java
index d9c8d0b..0ec1712 100644
--- a/src/java/org/apache/cassandra/gms/VersionedValue.java
+++ b/src/java/org/apache/cassandra/gms/VersionedValue.java
@@ -24,6 +24,7 @@ import java.util.UUID;
 
 import static java.nio.charset.StandardCharsets.ISO_8859_1;
 
+import com.google.common.annotations.VisibleForTesting;
 import com.google.common.collect.Iterables;
 
 import org.apache.cassandra.db.TypeSizes;
@@ -250,7 +251,13 @@ public class VersionedValue implements 
Comparable
 
 public VersionedValue releaseVersion()
 {
-return new VersionedValue(FBUtilities.getReleaseVersionString());
+return releaseVersion(FBUtilities.getReleaseVersionString());
+}
+
+@VisibleForTesting
+public VersionedValue releaseVersion(String version)
+{
+return new VersionedValue(version);
 }
 
 public VersionedValue networkVersion()

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e7b9c1f5/src/java/org/apache/cassandra/schema/SchemaKeyspace.java
--
diff --git a/src/java/org/apache/cassandra/schema/SchemaKeyspace.java 
b/src/java/org/apache/cassandra/schema/SchemaKeyspace.java
index b6add96..164e32d 100644
--- a/src/java/org/apache/cassandra/schema/SchemaKeyspace.java
+++ b/src/java/org/apache/cassandra/schema/SchemaKeyspace.java
@@ -25,6 +25,7 @@ import java.util.*;
 import java.util.concurrent.TimeUnit;
 import java.util.stream.Collectors;
 
+import com.google.common.annotations.VisibleForTesting;
 import com.google.common.collect.*;
 import com.google.common.collect.Maps;
 import org.slf4j.Logger;
@@ -109,7 +110,7 @@ public final class SchemaKeyspace
  * for digest calculations, otherwise the nodes will never agree on the 
schema during a rolling upgrade, see CASSANDRA-13559.
  */
 public static final ImmutableList ALL_FOR_DIGEST =
-ImmutableList.of(KEYSPACES, TABLES, COLUMNS, DROPPED_COLUMNS, 
TRIGGERS, VIEWS, TYPES, FUNCTIONS, AGGREGATES, INDEXES);
+ImmutableList.of(KEYSPACES, TABLES, COLUMNS, TRIGGERS, VIEWS, TYPES, 
FUNCTIONS, AGGREGATES, INDEXES);
 
 private static final CFMetaData Keyspaces =
 compile(KEYSPACES,
@@ -317,6 +318,14 @@ public final class SchemaKeyspace
  */
 public static Pair calculateSchemaDigest()
 {
+Set cdc = 
Collections.singleton(ByteBufferUtil.bytes("cdc"));
+
+return calculateSchemaDigest(cdc);
+}
+
+@VisibleForTesting
+static Pair calculateSchemaDigest(Set 
columnsToExclude)
+{
 MessageDigest digest;
 MessageDigest digest30;
 try
@@ -328,15 +337,9 @@ public final class SchemaKeyspace
 {
 throw new RuntimeException(e);
 }
-Set cdc = 
Collections.singleton(ByteBufferUtil.bytes("cdc"));
 
 for (String table : ALL_FOR_DIGEST)
 

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

2018-01-19 Thread jasobrown
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/716d08f9
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/716d08f9
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/716d08f9

Branch: refs/heads/trunk
Commit: 716d08f9090deb4c0c48096b5044186d270feb45
Parents: 1cb91ea e7b9c1f
Author: Jason Brown 
Authored: Fri Jan 19 06:20:11 2018 -0800
Committer: Jason Brown 
Committed: Fri Jan 19 06:20:11 2018 -0800

--

--



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



[1/3] cassandra git commit: Add Unittest for schema migration fix

2018-01-19 Thread jasobrown
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.11 d0b7566ff -> e7b9c1f50
  refs/heads/trunk 1cb91eaaa -> 716d08f90


Add Unittest for schema migration fix

patch by Jay Zhuang; reviewed by jasobrown for CASSANDRA-14140


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

Branch: refs/heads/cassandra-3.11
Commit: e7b9c1f50a9875682b480a3ab69e662f4b097d4d
Parents: d0b7566
Author: Jay Zhuang 
Authored: Wed Dec 27 15:25:36 2017 -0800
Committer: Jason Brown 
Committed: Fri Jan 19 06:17:51 2018 -0800

--
 CHANGES.txt |   1 +
 .../apache/cassandra/gms/VersionedValue.java|   9 +-
 .../apache/cassandra/schema/SchemaKeyspace.java |  19 ++--
 .../cassandra/service/StorageService.java   |  25 -
 .../org/apache/cassandra/gms/GossiperTest.java  |  69 -
 .../cassandra/schema/SchemaKeyspaceTest.java| 102 +++
 6 files changed, 188 insertions(+), 37 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e7b9c1f5/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index c06ad0d..5e4c40a 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.11.2
+ * Add Unittest for schema migration fix (CASSANDRA-14140)
  * Print correct snitch info from nodetool describecluster (CASSANDRA-13528)
  * Close socket on error during connect on OutboundTcpConnection 
(CASSANDRA-9630)
  * Enable CDC unittest (CASSANDRA-14141)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e7b9c1f5/src/java/org/apache/cassandra/gms/VersionedValue.java
--
diff --git a/src/java/org/apache/cassandra/gms/VersionedValue.java 
b/src/java/org/apache/cassandra/gms/VersionedValue.java
index d9c8d0b..0ec1712 100644
--- a/src/java/org/apache/cassandra/gms/VersionedValue.java
+++ b/src/java/org/apache/cassandra/gms/VersionedValue.java
@@ -24,6 +24,7 @@ import java.util.UUID;
 
 import static java.nio.charset.StandardCharsets.ISO_8859_1;
 
+import com.google.common.annotations.VisibleForTesting;
 import com.google.common.collect.Iterables;
 
 import org.apache.cassandra.db.TypeSizes;
@@ -250,7 +251,13 @@ public class VersionedValue implements 
Comparable
 
 public VersionedValue releaseVersion()
 {
-return new VersionedValue(FBUtilities.getReleaseVersionString());
+return releaseVersion(FBUtilities.getReleaseVersionString());
+}
+
+@VisibleForTesting
+public VersionedValue releaseVersion(String version)
+{
+return new VersionedValue(version);
 }
 
 public VersionedValue networkVersion()

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e7b9c1f5/src/java/org/apache/cassandra/schema/SchemaKeyspace.java
--
diff --git a/src/java/org/apache/cassandra/schema/SchemaKeyspace.java 
b/src/java/org/apache/cassandra/schema/SchemaKeyspace.java
index b6add96..164e32d 100644
--- a/src/java/org/apache/cassandra/schema/SchemaKeyspace.java
+++ b/src/java/org/apache/cassandra/schema/SchemaKeyspace.java
@@ -25,6 +25,7 @@ import java.util.*;
 import java.util.concurrent.TimeUnit;
 import java.util.stream.Collectors;
 
+import com.google.common.annotations.VisibleForTesting;
 import com.google.common.collect.*;
 import com.google.common.collect.Maps;
 import org.slf4j.Logger;
@@ -109,7 +110,7 @@ public final class SchemaKeyspace
  * for digest calculations, otherwise the nodes will never agree on the 
schema during a rolling upgrade, see CASSANDRA-13559.
  */
 public static final ImmutableList ALL_FOR_DIGEST =
-ImmutableList.of(KEYSPACES, TABLES, COLUMNS, DROPPED_COLUMNS, 
TRIGGERS, VIEWS, TYPES, FUNCTIONS, AGGREGATES, INDEXES);
+ImmutableList.of(KEYSPACES, TABLES, COLUMNS, TRIGGERS, VIEWS, TYPES, 
FUNCTIONS, AGGREGATES, INDEXES);
 
 private static final CFMetaData Keyspaces =
 compile(KEYSPACES,
@@ -317,6 +318,14 @@ public final class SchemaKeyspace
  */
 public static Pair calculateSchemaDigest()
 {
+Set cdc = 
Collections.singleton(ByteBufferUtil.bytes("cdc"));
+
+return calculateSchemaDigest(cdc);
+}
+
+@VisibleForTesting
+static Pair calculateSchemaDigest(Set 
columnsToExclude)
+{
 MessageDigest digest;
 MessageDigest digest30;
 try
@@ -328,15 +337,9 @@ public final class SchemaKeyspace
 {
 throw new 

[jira] [Resolved] (CASSANDRA-14175) Incorrect documentation about CASSANDRA_INCLUDE priority

2018-01-19 Thread Jason Brown (JIRA)

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

Jason Brown resolved CASSANDRA-14175.
-
   Resolution: Fixed
 Assignee: Jason Brown
Fix Version/s: 4.0
   3.11.2
   3.0.16

lol - nice find ;) Ninja-committed as sha 
{{1cb91ed8169a7b680f1f6ab6b1418ce56e61}}

Thanks!

> Incorrect documentation about CASSANDRA_INCLUDE priority
> 
>
> Key: CASSANDRA-14175
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14175
> Project: Cassandra
>  Issue Type: Bug
>  Components: Documentation and Website
>Reporter: Marcel Dopita
>Assignee: Jason Brown
>Priority: Trivial
> Fix For: 3.0.16, 3.11.2, 4.0
>
>
> In _bin/cassandra_ the comments say:
> {quote}The lowest priority search path is the same directory as the startup 
> script...
> {quote}
> However the "same directory" currently has the *highest* priority:
> {code:java}
> # Locations (in order) to use when searching for an include file.
> for include in "`dirname "$0"`/cassandra.in.sh" \
>"$HOME/.cassandra.in.sh" \
>/usr/share/cassandra/cassandra.in.sh \
>/usr/local/share/cassandra/cassandra.in.sh \
>/opt/cassandra/cassandra.in.sh; do
> if [ -r "$include" ]; then
> . "$include"
> break
> fi
> done
> {code}
> It looks like around the release of v 2.0.0 the order was changed but the 
> comments stayed the same.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[2/6] cassandra git commit: ninja-fix a minor documentation oversight in bin/cassandra (CASSANDRA-14175)

2018-01-19 Thread jasobrown
ninja-fix a minor documentation oversight in bin/cassandra (CASSANDRA-14175)


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

Branch: refs/heads/cassandra-3.11
Commit: 0d728c194349b210ffc85f892c8492dca39b31f6
Parents: 685dde1
Author: Jason Brown 
Authored: Fri Jan 19 05:12:45 2018 -0800
Committer: Jason Brown 
Committed: Fri Jan 19 05:12:45 2018 -0800

--
 bin/cassandra | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0d728c19/bin/cassandra
--
diff --git a/bin/cassandra b/bin/cassandra
index 1305db9..95ab4c0 100755
--- a/bin/cassandra
+++ b/bin/cassandra
@@ -33,7 +33,7 @@
 #
 # As a convenience, a fragment of shell is sourced in order to set one or
 # more of these variables. This so-called `include' can be placed in a 
-# number of locations and will be searched for in order. The lowest 
+# number of locations and will be searched for in order. The highest 
 # priority search path is the same directory as the startup script, and
 # since this is the location of the sample in the project tree, it should
 # almost work Out Of The Box.


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



[1/6] cassandra git commit: ninja-fix a minor documentation oversight in bin/cassandra (CASSANDRA-14175)

2018-01-19 Thread jasobrown
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.0 685dde10e -> 0d728c194
  refs/heads/cassandra-3.11 fc3357a00 -> d0b7566ff
  refs/heads/trunk f428c4262 -> 1cb91eaaa


ninja-fix a minor documentation oversight in bin/cassandra (CASSANDRA-14175)


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

Branch: refs/heads/cassandra-3.0
Commit: 0d728c194349b210ffc85f892c8492dca39b31f6
Parents: 685dde1
Author: Jason Brown 
Authored: Fri Jan 19 05:12:45 2018 -0800
Committer: Jason Brown 
Committed: Fri Jan 19 05:12:45 2018 -0800

--
 bin/cassandra | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0d728c19/bin/cassandra
--
diff --git a/bin/cassandra b/bin/cassandra
index 1305db9..95ab4c0 100755
--- a/bin/cassandra
+++ b/bin/cassandra
@@ -33,7 +33,7 @@
 #
 # As a convenience, a fragment of shell is sourced in order to set one or
 # more of these variables. This so-called `include' can be placed in a 
-# number of locations and will be searched for in order. The lowest 
+# number of locations and will be searched for in order. The highest 
 # priority search path is the same directory as the startup script, and
 # since this is the location of the sample in the project tree, it should
 # almost work Out Of The Box.


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



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

2018-01-19 Thread jasobrown
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/1cb91eaa
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/1cb91eaa
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/1cb91eaa

Branch: refs/heads/trunk
Commit: 1cb91ed8169a7b680f1f6ab6b1418ce56e61
Parents: f428c42 d0b7566
Author: Jason Brown 
Authored: Fri Jan 19 05:14:58 2018 -0800
Committer: Jason Brown 
Committed: Fri Jan 19 05:15:28 2018 -0800

--
 bin/cassandra | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--



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



[3/6] cassandra git commit: ninja-fix a minor documentation oversight in bin/cassandra (CASSANDRA-14175)

2018-01-19 Thread jasobrown
ninja-fix a minor documentation oversight in bin/cassandra (CASSANDRA-14175)


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

Branch: refs/heads/trunk
Commit: 0d728c194349b210ffc85f892c8492dca39b31f6
Parents: 685dde1
Author: Jason Brown 
Authored: Fri Jan 19 05:12:45 2018 -0800
Committer: Jason Brown 
Committed: Fri Jan 19 05:12:45 2018 -0800

--
 bin/cassandra | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0d728c19/bin/cassandra
--
diff --git a/bin/cassandra b/bin/cassandra
index 1305db9..95ab4c0 100755
--- a/bin/cassandra
+++ b/bin/cassandra
@@ -33,7 +33,7 @@
 #
 # As a convenience, a fragment of shell is sourced in order to set one or
 # more of these variables. This so-called `include' can be placed in a 
-# number of locations and will be searched for in order. The lowest 
+# number of locations and will be searched for in order. The highest 
 # priority search path is the same directory as the startup script, and
 # since this is the location of the sample in the project tree, it should
 # almost work Out Of The Box.


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



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

2018-01-19 Thread jasobrown
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/d0b7566f
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d0b7566f
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d0b7566f

Branch: refs/heads/trunk
Commit: d0b7566ff8386c4246ec24232256e7860338b724
Parents: fc3357a 0d728c1
Author: Jason Brown 
Authored: Fri Jan 19 05:14:20 2018 -0800
Committer: Jason Brown 
Committed: Fri Jan 19 05:14:45 2018 -0800

--
 bin/cassandra | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d0b7566f/bin/cassandra
--


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



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

2018-01-19 Thread jasobrown
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/d0b7566f
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d0b7566f
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d0b7566f

Branch: refs/heads/cassandra-3.11
Commit: d0b7566ff8386c4246ec24232256e7860338b724
Parents: fc3357a 0d728c1
Author: Jason Brown 
Authored: Fri Jan 19 05:14:20 2018 -0800
Committer: Jason Brown 
Committed: Fri Jan 19 05:14:45 2018 -0800

--
 bin/cassandra | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d0b7566f/bin/cassandra
--


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



[jira] [Resolved] (CASSANDRA-14177) Why LCS create one large temp file in one disk when add New Node or after rebuild

2018-01-19 Thread Marcus Eriksson (JIRA)

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

Marcus Eriksson resolved CASSANDRA-14177.
-
Resolution: Duplicate

you can probably use CASSANDRA-6621 to avoid this - set 
{{-Dcassandra.disable_stcs_in_l0=true}} on startup

If you upgrade to 2.2 you would most likely benefit from CASSANDRA-7460

and in 3.11 you would be helped by CASSANDRA-6696 - if you have 12 data 
directories it would probably be a good idea to start evaluating that

> Why LCS create one large temp file in one disk when add New Node or after 
> rebuild
> -
>
> Key: CASSANDRA-14177
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14177
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Compaction
>Reporter: zhaoyan
>Priority: Major
>
> Cassandra 2.1.15
> we use LCS  12*2T disks  ,   2~3T per node.
> there is one problem after we add one new node or rebuild from anthoer DC.
> At the new node.
> the SSTables in each level will changes like this:
> step 1:  [12341/4, 0, 0, 0, 0, 0, 0, 0, 0]
> =>
> step 2:  [18/4, 10, 17, 0, 0, 0, 0, 0, 0]
> =>
> step 3: [0, 10, 103/100, 1004/1000, 1622, 0, 0, 0, 0]
>  
> during the process, there will be one large compaction task in step 2.  and 
> produce a large temporary file in only one disk.  then the large temporary  
> file will split many small files.
> but sometimes, the large temporary  file is too large. the 2T disk is not 
> enough for it.  then the compaction task failed.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Created] (CASSANDRA-14177) Why LCS create one large temp file in one disk when add New Node or after rebuild

2018-01-19 Thread zhaoyan (JIRA)
zhaoyan created CASSANDRA-14177:
---

 Summary: Why LCS create one large temp file in one disk when add 
New Node or after rebuild
 Key: CASSANDRA-14177
 URL: https://issues.apache.org/jira/browse/CASSANDRA-14177
 Project: Cassandra
  Issue Type: Improvement
  Components: Compaction
Reporter: zhaoyan


Cassandra 2.1.15

we use LCS  12*2T disks  ,   2~3T per node.

there is one problem after we add one new node or rebuild from anthoer DC.

At the new node.

the SSTables in each level will changes like this:

step 1:  [12341/4, 0, 0, 0, 0, 0, 0, 0, 0]

=>

step 2:  [18/4, 10, 17, 0, 0, 0, 0, 0, 0]

=>

step 3: [0, 10, 103/100, 1004/1000, 1622, 0, 0, 0, 0]

 

during the process, there will be one large compaction task in step 2.  and 
produce a large temporary file in only one disk.  then the large temporary  
file will split many small files.

but sometimes, the large temporary  file is too large. the 2T disk is not 
enough for it.  then the compaction task failed.

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Created] (CASSANDRA-14176) Cannot export & import data containing no-break space (U+00A0)

2018-01-19 Thread Marcel Dopita (JIRA)
Marcel Dopita created CASSANDRA-14176:
-

 Summary: Cannot export & import data containing no-break space 
(U+00A0)
 Key: CASSANDRA-14176
 URL: https://issues.apache.org/jira/browse/CASSANDRA-14176
 Project: Cassandra
  Issue Type: Bug
  Components: Libraries
Reporter: Marcel Dopita
 Attachments: fix.patch

We were unable to export and then import the same data to Cassandra - like line 
breaks or the no-break space (U+00A0).

Adding v.decode() to copyutil.py fixed most characters like line breaks etc.

Only after using the included patch, the character U+00A0 was correctly stored 
in Cassandra and successfully (verifiable) exported & imported & exported.

 
{code:java}
diff --git a/pylib/cqlshlib/copyutil.py b/pylib/cqlshlib/copyutil.py
index 7f97b49..883c957 100644
--- a/pylib/cqlshlib/copyutil.py
+++ b/pylib/cqlshlib/copyutil.py
@@ -1871,7 +1871,7 @@ class ImportConversion(object):
 return bytearray.fromhex(v[2:])
 
 def convert_text(v, **_):
-    return v
+    return v.decode('string_escape')
 
 def convert_uuid(v, **_):
 return UUID(v)
diff --git a/pylib/cqlshlib/formatting.py b/pylib/cqlshlib/formatting.py
index 803ea63..79eb691 100644
--- a/pylib/cqlshlib/formatting.py
+++ b/pylib/cqlshlib/formatting.py
@@ -33,7 +33,7 @@ from util import UTC
 
 is_win = platform.system() == 'Windows'
 
-unicode_controlchars_re = re.compile(r'[\x00-\x31\x7f-\xa0]')
+unicode_controlchars_re = re.compile(r'[\x00-\x31]')
 controlchars_re = re.compile(r'[\x00-\x31\x7f-\xff]')
{code}
 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Comment Edited] (CASSANDRA-14172) Select with multiple clustering columns and inequality doesn't work

2018-01-19 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer edited comment on CASSANDRA-14172 at 1/19/18 8:56 AM:
-

{quote}Once I removed the birthday and discoverytime out of the key, the 
command you suggested worked fine.
{quote}
Filtering is supported on clustering columns since version 3.6 
(CASSANDRA-11310). So it will depends on which version you are.
{quote}Just want to confirm with you. In the following query, the last "AND" 
means "plus", not the logical AND, right?
{quote}
No, it is really a logical {{AND}}. A lower limit and an upper one on the full 
clustering key.

Under the hood for each partition C* keep the rows ordered by clustering key 
(eg. ({{1,1)}}, {{(1,2)}}, ({{1,3)}}, ({{1,4)}}, ({{2,1)}}, ({{2,2)}}, 
({{2,3)}}, ...).
 For C*
{code:java}
(c1, c2) >= (1,3) AND (c1, c2) <= (2, 2){code}
means that you want to retrieve, for the selected partitions, all the rows that 
have a clustering key in the range [(1,3), (2,2)]. In our example, the rows 
with the clustering keys: ({{1,3)}}, ({{1,4)}}, ({{2,1)}}, ({{2,2)}}


was (Author: blerer):
{quote}Once I removed the birthday and discoverytime out of the key, the 
command you suggested worked fine.
{quote}
Filtering is supported on clustering columns since version 3.6 
(CASSANDRA-11310). So it will depends on which version you are.
{quote}Just want to confirm with you. In the following query, the last "AND" 
means "plus", not the logical AND, right?
{quote}
No, it is really a logical {{AND}}. A lower limit and an upper one on the full 
clustering key.

Under the hood for each partition C* keep the rows ordered by clustering key 
(eg. ({{1,1)}}, {{(1,2)}}, ({{1,3)}}, ({{1,4)}}, ({{2,1)}}, ({{2,2)}}, 
({{2,3)}}, ...).
 For C*
{code:java}
(c1, c2) >= (1,3) AND (c1, c2) <= (2, 2){code}
means that you want to retrieve, for the selected partitions, all the rows that 
have a clustering key in the range [({{1,3)}}, ({{2,2)}}]. In our example, the 
rows with the clustering keys: ({{1,3)}}, ({{1,4)}}, ({{2,1)}}, ({{2,2)}}

> Select with multiple clustering columns and inequality doesn't work
> ---
>
> Key: CASSANDRA-14172
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14172
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
> Environment: com.datastax.cassandra:cassandra-driver-core:3.3.0 on 
> linux
>Reporter: Samuel Wu
>Priority: Major
> Attachments: graycol.gif
>
>
> * I have a table created as the following command.
>  * CREATE TABLE IF NOT EXISTS test.discrepancies(
>  modality text,
>  disease text,
>  location text,
>  type text,
>  status text,
>  studyDate timestamp,
>  birthDay timestamp,
>  discoveryTime timestamp,
>  reportId uuid,
>  mrn text,
>  firstName text,
>  PRIMARY KEY ((location, modality, disease), type, status, studyDate, 
> birthDay, discoveryTime)
> );
>  * The following data are populated in the table
>  *  location | modality | disease  | type | status | studydate                
>        | birthday                        | discoverytime                   | 
> firstname | mrn  | reportid
> --+--+--+--++-+-+-+---+--+--
>      West |       CX | disease1 |  PLD |   OPEN | 2018-01-17 
> 15:06:44.138000+ | 1970-01-02 10:17:36.789000+ | 2018-01-17 
> 15:06:44.138000+ |     name1 | mrn1 | 9a545096-6191-4275-86b3-cc89e181f494
>  
>  * When the following command was run, I would expect no row found since the 
> birthday and discoveoytime is out of range. 
>  * select * from test.discrepancies where disease='disease1' and 
> location='West' and modality='CX' and type='PLD' and status='OPEN' and 
> (studydate, birthday, discoverytime) < (2516201604308,0,0);
>  * But the above row was returned instead.
>  * This feature was implemented in 
> https://issues.apache.org/jira/browse/CASSANDRA-4851
>  * see https://docs.datastax.com/en/cql/3.3/cql/cql_using/useQueryIN.html



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Comment Edited] (CASSANDRA-14172) Select with multiple clustering columns and inequality doesn't work

2018-01-19 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer edited comment on CASSANDRA-14172 at 1/19/18 8:55 AM:
-

{quote}Once I removed the birthday and discoverytime out of the key, the 
command you suggested worked fine.
{quote}
Filtering is supported on clustering columns since version 3.6 
(CASSANDRA-11310). So it will depends on which version you are.
{quote}Just want to confirm with you. In the following query, the last "AND" 
means "plus", not the logical AND, right?
{quote}
No, it is really a logical {{AND}}. A lower limit and an upper one on the full 
clustering key.

Under the hood for each partition C* keep the rows ordered by clustering key 
(eg. ({{1,1)}}, {{(1,2)}}, ({{1,3)}}, ({{1,4)}}, ({{2,1)}}, ({{2,2)}}, 
({{2,3)}}, ...).
 For C*
{code:java}
(c1, c2) >= (1,3) AND (c1, c2) <= (2, 2){code}
means that you want to retrieve, for the selected partitions, all the rows that 
have a clustering key in the range [({{1,3)}}, ({{2,2)}}]. In our example, the 
rows with the clustering keys: ({{1,3)}}, ({{1,4)}}, ({{2,1)}}, ({{2,2)}}


was (Author: blerer):
{quote}Once I removed the birthday and discoverytime out of the key, the 
command you suggested worked fine.
{quote}
Filtering is supported on clustering columns since version 3.6 
(CASSANDRA-11310). So it will depends on which version you are.
{quote}Just want to confirm with you. In the following query, the last "AND" 
means "plus", not the logical AND, right?
{quote}
No, it is really a logical {{AND}}. A lower limit and an upper one on the full 
clustering key.

Under the hood for each partition C* keep the rows ordered by clustering key 
(eg. +{{1.1}}+, +{{1.2}}+, +{{1.3}}+, +{{1.4}}+, +{{2.1}}+, +{{2.2}}+, 
+{{2.3}}+, ...).
 For C*
{code:java}
(c1, c2) >= (1,3) AND (c1, c2) <= (2, 2){code}
means that you want to retrieve, for the selected partitions, all the rows that 
have a clustering key in the range [+{{1.}}{{3}}+, +{{2.2}}+ ]. In our example, 
the rows with the clustering keys: +{{1.2}}+, +{{1.3}}+, +{{1.4}}+, +{{2.1}}+, 
+{{2.2}}+

> Select with multiple clustering columns and inequality doesn't work
> ---
>
> Key: CASSANDRA-14172
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14172
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
> Environment: com.datastax.cassandra:cassandra-driver-core:3.3.0 on 
> linux
>Reporter: Samuel Wu
>Priority: Major
> Attachments: graycol.gif
>
>
> * I have a table created as the following command.
>  * CREATE TABLE IF NOT EXISTS test.discrepancies(
>  modality text,
>  disease text,
>  location text,
>  type text,
>  status text,
>  studyDate timestamp,
>  birthDay timestamp,
>  discoveryTime timestamp,
>  reportId uuid,
>  mrn text,
>  firstName text,
>  PRIMARY KEY ((location, modality, disease), type, status, studyDate, 
> birthDay, discoveryTime)
> );
>  * The following data are populated in the table
>  *  location | modality | disease  | type | status | studydate                
>        | birthday                        | discoverytime                   | 
> firstname | mrn  | reportid
> --+--+--+--++-+-+-+---+--+--
>      West |       CX | disease1 |  PLD |   OPEN | 2018-01-17 
> 15:06:44.138000+ | 1970-01-02 10:17:36.789000+ | 2018-01-17 
> 15:06:44.138000+ |     name1 | mrn1 | 9a545096-6191-4275-86b3-cc89e181f494
>  
>  * When the following command was run, I would expect no row found since the 
> birthday and discoveoytime is out of range. 
>  * select * from test.discrepancies where disease='disease1' and 
> location='West' and modality='CX' and type='PLD' and status='OPEN' and 
> (studydate, birthday, discoverytime) < (2516201604308,0,0);
>  * But the above row was returned instead.
>  * This feature was implemented in 
> https://issues.apache.org/jira/browse/CASSANDRA-4851
>  * see https://docs.datastax.com/en/cql/3.3/cql/cql_using/useQueryIN.html



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Commented] (CASSANDRA-14172) Select with multiple clustering columns and inequality doesn't work

2018-01-19 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer commented on CASSANDRA-14172:


{quote}Once I removed the birthday and discoverytime out of the key, the 
command you suggested worked fine.
{quote}
Filtering is supported on clustering columns since version 3.6 
(CASSANDRA-11310). So it will depends on which version you are.
{quote}Just want to confirm with you. In the following query, the last "AND" 
means "plus", not the logical AND, right?
{quote}
No, it is really a logical {{AND}}. A lower limit and an upper one on the full 
clustering key.

Under the hood for each partition C* keep the rows ordered by clustering key 
(eg. +{{1.1}}+, +{{1.2}}+, +{{1.3}}+, +{{1.4}}+, +{{2.1}}+, +{{2.2}}+, 
+{{2.3}}+, ...).
 For C*
{code:java}
(c1, c2) >= (1,3) AND (c1, c2) <= (2, 2){code}
means that you want to retrieve, for the selected partitions, all the rows that 
have a clustering key in the range [+{{1.}}{{3}}+, +{{2.2}}+ ]. In our example, 
the rows with the clustering keys: +{{1.2}}+, +{{1.3}}+, +{{1.4}}+, +{{2.1}}+, 
+{{2.2}}+

> Select with multiple clustering columns and inequality doesn't work
> ---
>
> Key: CASSANDRA-14172
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14172
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
> Environment: com.datastax.cassandra:cassandra-driver-core:3.3.0 on 
> linux
>Reporter: Samuel Wu
>Priority: Major
> Attachments: graycol.gif
>
>
> * I have a table created as the following command.
>  * CREATE TABLE IF NOT EXISTS test.discrepancies(
>  modality text,
>  disease text,
>  location text,
>  type text,
>  status text,
>  studyDate timestamp,
>  birthDay timestamp,
>  discoveryTime timestamp,
>  reportId uuid,
>  mrn text,
>  firstName text,
>  PRIMARY KEY ((location, modality, disease), type, status, studyDate, 
> birthDay, discoveryTime)
> );
>  * The following data are populated in the table
>  *  location | modality | disease  | type | status | studydate                
>        | birthday                        | discoverytime                   | 
> firstname | mrn  | reportid
> --+--+--+--++-+-+-+---+--+--
>      West |       CX | disease1 |  PLD |   OPEN | 2018-01-17 
> 15:06:44.138000+ | 1970-01-02 10:17:36.789000+ | 2018-01-17 
> 15:06:44.138000+ |     name1 | mrn1 | 9a545096-6191-4275-86b3-cc89e181f494
>  
>  * When the following command was run, I would expect no row found since the 
> birthday and discoveoytime is out of range. 
>  * select * from test.discrepancies where disease='disease1' and 
> location='West' and modality='CX' and type='PLD' and status='OPEN' and 
> (studydate, birthday, discoverytime) < (2516201604308,0,0);
>  * But the above row was returned instead.
>  * This feature was implemented in 
> https://issues.apache.org/jira/browse/CASSANDRA-4851
>  * see https://docs.datastax.com/en/cql/3.3/cql/cql_using/useQueryIN.html



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Commented] (CASSANDRA-14165) execute_prepared_cql3_query with LIKE not working

2018-01-19 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer commented on CASSANDRA-14165:


In which C* version are you? This problem should have been fixed by: 
CASSANDRA-11456

> execute_prepared_cql3_query with LIKE not working
> -
>
> Key: CASSANDRA-14165
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14165
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Alexandr Gorbachev
>Assignee: Benjamin Lerer
>Priority: Major
>
> Hello ,
> I have faced up with following issue.
>  Seems like LIKE is not supported by 'execute_prepared_cql3_query'.
>  Is it by desing or somehow it is possible to find a workaroud or to fix this 
> issue?
> More details. Query looks like :
>  SELECT * FROM tabke WHERE a= ? AND b = ? AND c IN (?,?,?,?,?,?,?) AND column 
> LIKE ? ALLOW FILTERING;
>  Is not working.
> If I send directly query in prepare statement.
>  So actully wihout passing parameters in preare statement, just like plain 
> query, then this is working:
>  SELECT * FROM tabke WHERE a= '1' AND b = '2' AND c IN ('3','4') AND column 
> LIKE '%A%' ALLOW FILTERING;
> Could you please suggest also where it is possible to find 
> description/definition of 'execute_prepared_cql3_query'.
>  
> Thank you for help.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Created] (CASSANDRA-14175) Incorrect documentation about CASSANDRA_INCLUDE priority

2018-01-19 Thread Marcel Dopita (JIRA)
Marcel Dopita created CASSANDRA-14175:
-

 Summary: Incorrect documentation about CASSANDRA_INCLUDE priority
 Key: CASSANDRA-14175
 URL: https://issues.apache.org/jira/browse/CASSANDRA-14175
 Project: Cassandra
  Issue Type: Bug
  Components: Documentation and Website
Reporter: Marcel Dopita


In _bin/cassandra_ the comments say:
{quote}The lowest priority search path is the same directory as the startup 
script...
{quote}
However the "same directory" currently has the *highest* priority:
{code:java}
# Locations (in order) to use when searching for an include file.
for include in "`dirname "$0"`/cassandra.in.sh" \
   "$HOME/.cassandra.in.sh" \
   /usr/share/cassandra/cassandra.in.sh \
   /usr/local/share/cassandra/cassandra.in.sh \
   /opt/cassandra/cassandra.in.sh; do
if [ -r "$include" ]; then
. "$include"
break
fi
done
{code}
It looks like around the release of v 2.0.0 the order was changed but the 
comments stayed the same.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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