[jira] [Updated] (CASSANDRA-11363) High Blocked NTR When Connecting
[ https://issues.apache.org/jira/browse/CASSANDRA-11363?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nate McCall updated CASSANDRA-11363: Fix Version/s: (was: 3.9) > High Blocked NTR When Connecting > > > Key: CASSANDRA-11363 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11363 > Project: Cassandra > Issue Type: Bug > Components: Coordination >Reporter: Russell Bradberry >Assignee: T Jake Luciani > Fix For: 2.1.16, 2.2.8, 3.10, 3.0.10 > > Attachments: cassandra-102-cms.stack, cassandra-102-g1gc.stack, > max_queued_ntr_property.txt, thread-queue-2.1.txt > > > When upgrading from 2.1.9 to 2.1.13, we are witnessing an issue where the > machine load increases to very high levels (> 120 on an 8 core machine) and > native transport requests get blocked in tpstats. > I was able to reproduce this in both CMS and G1GC as well as on JVM 7 and 8. > The issue does not seem to affect the nodes running 2.1.9. > The issue seems to coincide with the number of connections OR the number of > total requests being processed at a given time (as the latter increases with > the former in our system) > Currently there is between 600 and 800 client connections on each machine and > each machine is handling roughly 2000-3000 client requests per second. > Disabling the binary protocol fixes the issue for this node but isn't a > viable option cluster-wide. > Here is the output from tpstats: > {code} > Pool NameActive Pending Completed Blocked All > time blocked > MutationStage 0 88387821 0 > 0 > ReadStage 0 0 355860 0 > 0 > RequestResponseStage 0 72532457 0 > 0 > ReadRepairStage 0 0150 0 > 0 > CounterMutationStage 32 104 897560 0 > 0 > MiscStage 0 0 0 0 > 0 > HintedHandoff 0 0 65 0 > 0 > GossipStage 0 0 2338 0 > 0 > CacheCleanupExecutor 0 0 0 0 > 0 > InternalResponseStage 0 0 0 0 > 0 > CommitLogArchiver 0 0 0 0 > 0 > CompactionExecutor2 190474 0 > 0 > ValidationExecutor0 0 0 0 > 0 > MigrationStage0 0 10 0 > 0 > AntiEntropyStage 0 0 0 0 > 0 > PendingRangeCalculator0 0310 0 > 0 > Sampler 0 0 0 0 > 0 > MemtableFlushWriter 110 94 0 > 0 > MemtablePostFlush 134257 0 > 0 > MemtableReclaimMemory 0 0 94 0 > 0 > Native-Transport-Requests 128 156 38795716 > 278451 > Message type Dropped > READ 0 > RANGE_SLICE 0 > _TRACE 0 > MUTATION 0 > COUNTER_MUTATION 0 > BINARY 0 > REQUEST_RESPONSE 0 > PAGED_RANGE 0 > READ_REPAIR 0 > {code} > Attached is the jstack output for both CMS and G1GC. > Flight recordings are here: > https://s3.amazonaws.com/simple-logs/cassandra-102-cms.jfr > https://s3.amazonaws.com/simple-logs/cassandra-102-g1gc.jfr > It is interesting to note that while the flight recording was taking place, > the load on the machine went back to healthy, and when the flight recording > finished the load went back to > 100. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
cassandra git commit: Fix CHANGES.txt
Repository: cassandra Updated Branches: refs/heads/cassandra-3.0 ade38b207 -> 699de73ab Fix CHANGES.txt Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/699de73a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/699de73a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/699de73a Branch: refs/heads/cassandra-3.0 Commit: 699de73abb750603cc1c19b62eb60946933900a6 Parents: ade38b2 Author: Nate McCallAuthored: Tue Sep 20 15:05:22 2016 +1200 Committer: Nate McCall Committed: Tue Sep 20 15:05:22 2016 +1200 -- CHANGES.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/699de73a/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 6759897..791f99c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,8 @@ 3.0.10 * Extend ColumnIdentifier.internedInstances key to include the type that generated the byte buffer (CASSANDRA-12516) * Backport CASSANDRA-10756 (race condition in NativeTransportService shutdown) (CASSANDRA-12472) +Merged from 2.1: + * Add system property to set the max number of native transport requests in queue (CASSANDRA-11363) 3.0.9 @@ -81,7 +83,6 @@ Merged from 2.2: * Improve streaming synchronization and fault tolerance (CASSANDRA-11414) * MemoryUtil.getShort() should return an unsigned short also for architectures not supporting unaligned memory accesses (CASSANDRA-11973) Merged from 2.1: - * Add system property to set the max number of native transport requests in queue (CASSANDRA-11363) * Fix queries with empty ByteBuffer values in clustering column restrictions (CASSANDRA-12127) * Disable passing control to post-flush after flush failure to prevent data loss (CASSANDRA-11828) * Allow STCS-in-L0 compactions to reduce scope with LCS (CASSANDRA-12040)
[jira] [Updated] (CASSANDRA-11363) High Blocked NTR When Connecting
[ https://issues.apache.org/jira/browse/CASSANDRA-11363?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nate McCall updated CASSANDRA-11363: Reproduced In: 3.0.3, 2.1.13, 2.1.12 (was: 2.1.12, 2.1.13, 3.0.3) Fix Version/s: 3.0.10 3.10 3.9 2.1.16 > High Blocked NTR When Connecting > > > Key: CASSANDRA-11363 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11363 > Project: Cassandra > Issue Type: Bug > Components: Coordination >Reporter: Russell Bradberry >Assignee: T Jake Luciani > Fix For: 2.1.16, 2.2.8, 3.9, 3.10, 3.0.10 > > Attachments: cassandra-102-cms.stack, cassandra-102-g1gc.stack, > max_queued_ntr_property.txt, thread-queue-2.1.txt > > > When upgrading from 2.1.9 to 2.1.13, we are witnessing an issue where the > machine load increases to very high levels (> 120 on an 8 core machine) and > native transport requests get blocked in tpstats. > I was able to reproduce this in both CMS and G1GC as well as on JVM 7 and 8. > The issue does not seem to affect the nodes running 2.1.9. > The issue seems to coincide with the number of connections OR the number of > total requests being processed at a given time (as the latter increases with > the former in our system) > Currently there is between 600 and 800 client connections on each machine and > each machine is handling roughly 2000-3000 client requests per second. > Disabling the binary protocol fixes the issue for this node but isn't a > viable option cluster-wide. > Here is the output from tpstats: > {code} > Pool NameActive Pending Completed Blocked All > time blocked > MutationStage 0 88387821 0 > 0 > ReadStage 0 0 355860 0 > 0 > RequestResponseStage 0 72532457 0 > 0 > ReadRepairStage 0 0150 0 > 0 > CounterMutationStage 32 104 897560 0 > 0 > MiscStage 0 0 0 0 > 0 > HintedHandoff 0 0 65 0 > 0 > GossipStage 0 0 2338 0 > 0 > CacheCleanupExecutor 0 0 0 0 > 0 > InternalResponseStage 0 0 0 0 > 0 > CommitLogArchiver 0 0 0 0 > 0 > CompactionExecutor2 190474 0 > 0 > ValidationExecutor0 0 0 0 > 0 > MigrationStage0 0 10 0 > 0 > AntiEntropyStage 0 0 0 0 > 0 > PendingRangeCalculator0 0310 0 > 0 > Sampler 0 0 0 0 > 0 > MemtableFlushWriter 110 94 0 > 0 > MemtablePostFlush 134257 0 > 0 > MemtableReclaimMemory 0 0 94 0 > 0 > Native-Transport-Requests 128 156 38795716 > 278451 > Message type Dropped > READ 0 > RANGE_SLICE 0 > _TRACE 0 > MUTATION 0 > COUNTER_MUTATION 0 > BINARY 0 > REQUEST_RESPONSE 0 > PAGED_RANGE 0 > READ_REPAIR 0 > {code} > Attached is the jstack output for both CMS and G1GC. > Flight recordings are here: > https://s3.amazonaws.com/simple-logs/cassandra-102-cms.jfr > https://s3.amazonaws.com/simple-logs/cassandra-102-g1gc.jfr > It is interesting to note that while the flight recording was taking place, > the load on the machine went back to healthy, and when the flight recording > finished the load went back to > 100. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-11363) High Blocked NTR When Connecting
[ https://issues.apache.org/jira/browse/CASSANDRA-11363?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nate McCall updated CASSANDRA-11363: Fix Version/s: 2.2.8 > High Blocked NTR When Connecting > > > Key: CASSANDRA-11363 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11363 > Project: Cassandra > Issue Type: Bug > Components: Coordination >Reporter: Russell Bradberry >Assignee: T Jake Luciani > Fix For: 2.1.16, 2.2.8, 3.9, 3.10, 3.0.10 > > Attachments: cassandra-102-cms.stack, cassandra-102-g1gc.stack, > max_queued_ntr_property.txt, thread-queue-2.1.txt > > > When upgrading from 2.1.9 to 2.1.13, we are witnessing an issue where the > machine load increases to very high levels (> 120 on an 8 core machine) and > native transport requests get blocked in tpstats. > I was able to reproduce this in both CMS and G1GC as well as on JVM 7 and 8. > The issue does not seem to affect the nodes running 2.1.9. > The issue seems to coincide with the number of connections OR the number of > total requests being processed at a given time (as the latter increases with > the former in our system) > Currently there is between 600 and 800 client connections on each machine and > each machine is handling roughly 2000-3000 client requests per second. > Disabling the binary protocol fixes the issue for this node but isn't a > viable option cluster-wide. > Here is the output from tpstats: > {code} > Pool NameActive Pending Completed Blocked All > time blocked > MutationStage 0 88387821 0 > 0 > ReadStage 0 0 355860 0 > 0 > RequestResponseStage 0 72532457 0 > 0 > ReadRepairStage 0 0150 0 > 0 > CounterMutationStage 32 104 897560 0 > 0 > MiscStage 0 0 0 0 > 0 > HintedHandoff 0 0 65 0 > 0 > GossipStage 0 0 2338 0 > 0 > CacheCleanupExecutor 0 0 0 0 > 0 > InternalResponseStage 0 0 0 0 > 0 > CommitLogArchiver 0 0 0 0 > 0 > CompactionExecutor2 190474 0 > 0 > ValidationExecutor0 0 0 0 > 0 > MigrationStage0 0 10 0 > 0 > AntiEntropyStage 0 0 0 0 > 0 > PendingRangeCalculator0 0310 0 > 0 > Sampler 0 0 0 0 > 0 > MemtableFlushWriter 110 94 0 > 0 > MemtablePostFlush 134257 0 > 0 > MemtableReclaimMemory 0 0 94 0 > 0 > Native-Transport-Requests 128 156 38795716 > 278451 > Message type Dropped > READ 0 > RANGE_SLICE 0 > _TRACE 0 > MUTATION 0 > COUNTER_MUTATION 0 > BINARY 0 > REQUEST_RESPONSE 0 > PAGED_RANGE 0 > READ_REPAIR 0 > {code} > Attached is the jstack output for both CMS and G1GC. > Flight recordings are here: > https://s3.amazonaws.com/simple-logs/cassandra-102-cms.jfr > https://s3.amazonaws.com/simple-logs/cassandra-102-g1gc.jfr > It is interesting to note that while the flight recording was taking place, > the load on the machine went back to healthy, and when the flight recording > finished the load went back to > 100. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Resolved] (CASSANDRA-11363) High Blocked NTR When Connecting
[ https://issues.apache.org/jira/browse/CASSANDRA-11363?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nate McCall resolved CASSANDRA-11363. - Resolution: Fixed Reviewer: Nate McCall Reproduced In: 3.0.3, 2.1.13, 2.1.12 (was: 2.1.12, 2.1.13, 3.0.3) Committed to: 2.1.16, 2.2.8, 3.0.9, 3.10, trunk. > High Blocked NTR When Connecting > > > Key: CASSANDRA-11363 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11363 > Project: Cassandra > Issue Type: Bug > Components: Coordination >Reporter: Russell Bradberry >Assignee: T Jake Luciani > Attachments: cassandra-102-cms.stack, cassandra-102-g1gc.stack, > max_queued_ntr_property.txt, thread-queue-2.1.txt > > > When upgrading from 2.1.9 to 2.1.13, we are witnessing an issue where the > machine load increases to very high levels (> 120 on an 8 core machine) and > native transport requests get blocked in tpstats. > I was able to reproduce this in both CMS and G1GC as well as on JVM 7 and 8. > The issue does not seem to affect the nodes running 2.1.9. > The issue seems to coincide with the number of connections OR the number of > total requests being processed at a given time (as the latter increases with > the former in our system) > Currently there is between 600 and 800 client connections on each machine and > each machine is handling roughly 2000-3000 client requests per second. > Disabling the binary protocol fixes the issue for this node but isn't a > viable option cluster-wide. > Here is the output from tpstats: > {code} > Pool NameActive Pending Completed Blocked All > time blocked > MutationStage 0 88387821 0 > 0 > ReadStage 0 0 355860 0 > 0 > RequestResponseStage 0 72532457 0 > 0 > ReadRepairStage 0 0150 0 > 0 > CounterMutationStage 32 104 897560 0 > 0 > MiscStage 0 0 0 0 > 0 > HintedHandoff 0 0 65 0 > 0 > GossipStage 0 0 2338 0 > 0 > CacheCleanupExecutor 0 0 0 0 > 0 > InternalResponseStage 0 0 0 0 > 0 > CommitLogArchiver 0 0 0 0 > 0 > CompactionExecutor2 190474 0 > 0 > ValidationExecutor0 0 0 0 > 0 > MigrationStage0 0 10 0 > 0 > AntiEntropyStage 0 0 0 0 > 0 > PendingRangeCalculator0 0310 0 > 0 > Sampler 0 0 0 0 > 0 > MemtableFlushWriter 110 94 0 > 0 > MemtablePostFlush 134257 0 > 0 > MemtableReclaimMemory 0 0 94 0 > 0 > Native-Transport-Requests 128 156 38795716 > 278451 > Message type Dropped > READ 0 > RANGE_SLICE 0 > _TRACE 0 > MUTATION 0 > COUNTER_MUTATION 0 > BINARY 0 > REQUEST_RESPONSE 0 > PAGED_RANGE 0 > READ_REPAIR 0 > {code} > Attached is the jstack output for both CMS and G1GC. > Flight recordings are here: > https://s3.amazonaws.com/simple-logs/cassandra-102-cms.jfr > https://s3.amazonaws.com/simple-logs/cassandra-102-g1gc.jfr > It is interesting to note that while the flight recording was taking place, > the load on the machine went back to healthy, and when the flight recording > finished the load went back to > 100. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-12131) system_schema corruption causing nodes to not restart
[ https://issues.apache.org/jira/browse/CASSANDRA-12131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15505388#comment-15505388 ] Aleksey Yeschenko commented on CASSANDRA-12131: --- It's unfortunate, but again, I don't see what can be done here on Cassandra side :\ > system_schema corruption causing nodes to not restart > - > > Key: CASSANDRA-12131 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12131 > Project: Cassandra > Issue Type: Bug >Reporter: Tom van der Woerdt >Priority: Critical > > h2. Symptoms > * Existing nodes fail to restart > * system_schema has broken data > * `nodetool describecluster` shows a full disagreement > This happened on two clusters I manage, and so far I have no idea why. I'll > describe symptoms and info on what I did to (partially) resolve this. Hope > the actual bug can get fixed. > All clusters run with the binary distribution from cassandra.apache.org. One > cluster runs on CentOS 6, the other CentOS 7, but both with Java 8u77. The > issue was seen on version 3.0.4 and during an upgrade from 3.0.6 to 3.0.7. > h2. Cluster 1 > Version: 3.0.4 > Hardware: 2 datacenters, 3 machines each > Network: 1Gbit, <1ms within the dc, <20ms cross-dc > This happened several months ago. I found out the hard way that every node > had a different schema_version when I tried to restart a node and it didn't > come back. Assuming it was just a single unhappy node, I ignored it and > restarted a second node (in a different datacenter) which also did not come > back. > I like my quorums so I didn't restart the other nodes. `nodetool > describecluster` showed that every node had a different schema version. > Querying system_schema showed a lot of records with their keys set to > `\0\0\0\0(...)\0\0`. Cassandra logs indicated corrupted data, which was then > fixed by running scrub. > Of course that didn't actually fix the data and using CQL I removed most of > the rows in system_schema that looked wrong. After doing that `nodetool > describecluster' agreed on a schema version again. I've attached the python > script I used to remove the records from the 'columns' table (fix.py), > similar scripts were used for other tables. > That didn't actually remove all the records, some proved impossible to delete > : > {code} > # Partial output from the query "select * from system_schema.columns" > | regular | -1 |text > system_distributed | > \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 > | > \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 > | none |exception_stacktrace > | regular | -1 |text > system_distributed | > \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 > | > \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 | none | > finished_at > | regular | -1 | timestamp > system_distributed | > \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 > | > \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 | none | > keyspace_name > {code} > ... so I just left those there as it doesn't seem to impact the cluster other > than spewing this error every minute : > {code} > ERROR [CompactionExecutor:20] 2016-07-04 14:19:59,798 > CassandraDaemon.java:201 - Exception in thread > Thread[CompactionExecutor:20,1,main] > java.lang.AssertionError: Invalid clustering for the table: > org.apache.cassandra.db.Clustering$2@661b79a > at > org.apache.cassandra.db.Clustering$Serializer.serialize(Clustering.java:136) > ~[apache-cassandra-3.0.7.jar:3.0.7] > at > org.apache.cassandra.db.rows.UnfilteredSerializer.serialize(UnfilteredSerializer.java:159) > ~[apache-cassandra-3.0.7.jar:3.0.7] > at > org.apache.cassandra.db.rows.UnfilteredSerializer.serialize(UnfilteredSerializer.java:108) > ~[apache-cassandra-3.0.7.jar:3.0.7] > at > org.apache.cassandra.db.ColumnIndex$Builder.add(ColumnIndex.java:144) > ~[apache-cassandra-3.0.7.jar:3.0.7] > at > org.apache.cassandra.db.ColumnIndex$Builder.build(ColumnIndex.java:112) > ~[apache-cassandra-3.0.7.jar:3.0.7] > at > org.apache.cassandra.db.ColumnIndex.writeAndBuildIndex(ColumnIndex.java:52) > ~[apache-cassandra-3.0.7.jar:3.0.7] > {code} > The cluster works fine now, minus the phantom rows and minutely error on > every node. As for the two boxes that got killed, they were `removenode`d and > added back, somewhere in this process. > h2. Cluster 2 > Version: 3.0.6 > Hardware: 3 datacenters, 13 machines total > Network: 1Gbit,
[jira] [Resolved] (CASSANDRA-12131) system_schema corruption causing nodes to not restart
[ https://issues.apache.org/jira/browse/CASSANDRA-12131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aleksey Yeschenko resolved CASSANDRA-12131. --- Resolution: Cannot Reproduce Fix Version/s: (was: 3.0.x) > system_schema corruption causing nodes to not restart > - > > Key: CASSANDRA-12131 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12131 > Project: Cassandra > Issue Type: Bug >Reporter: Tom van der Woerdt >Priority: Critical > > h2. Symptoms > * Existing nodes fail to restart > * system_schema has broken data > * `nodetool describecluster` shows a full disagreement > This happened on two clusters I manage, and so far I have no idea why. I'll > describe symptoms and info on what I did to (partially) resolve this. Hope > the actual bug can get fixed. > All clusters run with the binary distribution from cassandra.apache.org. One > cluster runs on CentOS 6, the other CentOS 7, but both with Java 8u77. The > issue was seen on version 3.0.4 and during an upgrade from 3.0.6 to 3.0.7. > h2. Cluster 1 > Version: 3.0.4 > Hardware: 2 datacenters, 3 machines each > Network: 1Gbit, <1ms within the dc, <20ms cross-dc > This happened several months ago. I found out the hard way that every node > had a different schema_version when I tried to restart a node and it didn't > come back. Assuming it was just a single unhappy node, I ignored it and > restarted a second node (in a different datacenter) which also did not come > back. > I like my quorums so I didn't restart the other nodes. `nodetool > describecluster` showed that every node had a different schema version. > Querying system_schema showed a lot of records with their keys set to > `\0\0\0\0(...)\0\0`. Cassandra logs indicated corrupted data, which was then > fixed by running scrub. > Of course that didn't actually fix the data and using CQL I removed most of > the rows in system_schema that looked wrong. After doing that `nodetool > describecluster' agreed on a schema version again. I've attached the python > script I used to remove the records from the 'columns' table (fix.py), > similar scripts were used for other tables. > That didn't actually remove all the records, some proved impossible to delete > : > {code} > # Partial output from the query "select * from system_schema.columns" > | regular | -1 |text > system_distributed | > \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 > | > \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 > | none |exception_stacktrace > | regular | -1 |text > system_distributed | > \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 > | > \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 | none | > finished_at > | regular | -1 | timestamp > system_distributed | > \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 > | > \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 | none | > keyspace_name > {code} > ... so I just left those there as it doesn't seem to impact the cluster other > than spewing this error every minute : > {code} > ERROR [CompactionExecutor:20] 2016-07-04 14:19:59,798 > CassandraDaemon.java:201 - Exception in thread > Thread[CompactionExecutor:20,1,main] > java.lang.AssertionError: Invalid clustering for the table: > org.apache.cassandra.db.Clustering$2@661b79a > at > org.apache.cassandra.db.Clustering$Serializer.serialize(Clustering.java:136) > ~[apache-cassandra-3.0.7.jar:3.0.7] > at > org.apache.cassandra.db.rows.UnfilteredSerializer.serialize(UnfilteredSerializer.java:159) > ~[apache-cassandra-3.0.7.jar:3.0.7] > at > org.apache.cassandra.db.rows.UnfilteredSerializer.serialize(UnfilteredSerializer.java:108) > ~[apache-cassandra-3.0.7.jar:3.0.7] > at > org.apache.cassandra.db.ColumnIndex$Builder.add(ColumnIndex.java:144) > ~[apache-cassandra-3.0.7.jar:3.0.7] > at > org.apache.cassandra.db.ColumnIndex$Builder.build(ColumnIndex.java:112) > ~[apache-cassandra-3.0.7.jar:3.0.7] > at > org.apache.cassandra.db.ColumnIndex.writeAndBuildIndex(ColumnIndex.java:52) > ~[apache-cassandra-3.0.7.jar:3.0.7] > {code} > The cluster works fine now, minus the phantom rows and minutely error on > every node. As for the two boxes that got killed, they were `removenode`d and > added back, somewhere in this process. > h2. Cluster 2 > Version: 3.0.6 > Hardware: 3 datacenters, 13 machines total > Network: 1Gbit, <1ms within the dc, <50ms cross-dc > This is a
[jira] [Updated] (CASSANDRA-12672) Automate Nodetool Documentation
[ https://issues.apache.org/jira/browse/CASSANDRA-12672?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jeremy Hanna updated CASSANDRA-12672: - Labels: documentaion lhf (was: documentaion) > Automate Nodetool Documentation > --- > > Key: CASSANDRA-12672 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12672 > Project: Cassandra > Issue Type: Improvement > Components: Documentation and Website >Reporter: Andrew Baker >Priority: Minor > Labels: documentaion, lhf > Fix For: 3.x > > > nodetool.rst has this: > todo:: Try to autogenerate this from Nodetool’s help. > creating a ticket to submit this work against -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Resolved] (CASSANDRA-12259) Weird select issue on counters
[ https://issues.apache.org/jira/browse/CASSANDRA-12259?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aleksey Yeschenko resolved CASSANDRA-12259. --- Resolution: Duplicate > Weird select issue on counters > -- > > Key: CASSANDRA-12259 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12259 > Project: Cassandra > Issue Type: Bug > Environment: datastax-3.6.0, CentOS 7, x86_64 >Reporter: Gábor Auth > > Tried to select value from a counter table: > {code} > cassandra@cqlsh:keyspace> select id,science,treasury,tutorial from counters > where id='38cab4b0-4e8e-11e6-a443-55982d8a0e8d'; > id | science | treasury | tutorial > --+-+--+-- > 38cab4b0-4e8e-11e6-a443-55982d8a0e8d | 2379459 | 100 |5 > (1 rows) > cassandra@cqlsh:keyspace> select * from counters where > id='38cab4b0-4e8e-11e6-a443-55982d8a0e8d'; > id | science | treasury | tutorial > --+-+--+-- > 38cab4b0-4e8e-11e6-a443-55982d8a0e8d | 2379459 | 100 |5 > (1 rows) > cassandra@cqlsh:keyspace> select tutorial from counters where > id='38cab4b0-4e8e-11e6-a443-55982d8a0e8d'; > ReadTimeout: code=1200 [Coordinator node timed out waiting for replica nodes' > responses] message="Operation timed out - received only 0 responses." > info={'received_responses': 0, 'required_responses': 1, 'consistency': 'ONE'} > {code} > Meanwhile in the log of the node: > {code} > WARN [SharedPool-Worker-2] 2016-07-21 11:21:09,055 > AbstractLocalAwareExecutorService.java:169 - Uncaught exception on thread > Thread[SharedPool-Worker-2,5,main]: {} > java.lang.RuntimeException: java.lang.IndexOutOfBoundsException > at > org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2470) > ~[apache-cassandra-3.6.0.jar:3.6.0] > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > ~[na:1.8.0_91] > at > org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:164) > ~[apache-cassandra-3.6.0.jar:3.6.0] > at > org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$LocalSessionFutureTask.run(AbstractLocalAwareExecutorService.java:136) > [apache-cassandra-3.6.0.jar:3.6.0] > at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:105) > [apache-cassandra-3.6.0.jar:3.6.0] > at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91] > Caused by: java.lang.IndexOutOfBoundsException: null > at java.nio.Buffer.checkIndex(Buffer.java:546) ~[na:1.8.0_91] > at java.nio.HeapByteBuffer.getShort(HeapByteBuffer.java:314) > ~[na:1.8.0_91] > at > org.apache.cassandra.db.context.CounterContext.headerLength(CounterContext.java:141) > ~[apache-cassandra-3.6.0.jar:3.6.0] > at > org.apache.cassandra.db.context.CounterContext.access$100(CounterContext.java:76) > ~[apache-cassandra-3.6.0.jar:3.6.0] > at > org.apache.cassandra.db.context.CounterContext$ContextState.(CounterContext.java:758) > ~[apache-cassandra-3.6.0.jar:3.6.0] > at > org.apache.cassandra.db.context.CounterContext$ContextState.wrap(CounterContext.java:765) > ~[apache-cassandra-3.6.0.jar:3.6.0] > > > at > org.apache.cassandra.db.context.CounterContext.merge(CounterContext.java:272) > ~[apache-cassandra-3.6.0.jar:3.6.0] > > > at > org.apache.cassandra.db.Conflicts.mergeCounterValues(Conflicts.java:76) > ~[apache-cassandra-3.6.0.jar:3.6.0] > > > at org.apache.cassandra.db.rows.Cells.reconcile(Cells.java:143) > ~[apache-cassandra-3.6.0.jar:3.6.0] > > > at > org.apache.cassandra.db.rows.Row$Merger$ColumnDataReducer.getReduced(Row.java:591) > ~[apache-cassandra-3.6.0.jar:3.6.0] > > > at > org.apache.cassandra.db.rows.Row$Merger$ColumnDataReducer.getReduced(Row.java:549) > ~[apache-cassandra-3.6.0.jar:3.6.0]
[jira] [Commented] (CASSANDRA-12259) Weird select issue on counters
[ https://issues.apache.org/jira/browse/CASSANDRA-12259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15505382#comment-15505382 ] Aleksey Yeschenko commented on CASSANDRA-12259: --- Pretty sure this is a duplicate of CASSANDRA-11726. If you can still see the issue there, feel free to reopen. Otherwise closing as a Duplicate. Thanks. > Weird select issue on counters > -- > > Key: CASSANDRA-12259 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12259 > Project: Cassandra > Issue Type: Bug > Environment: datastax-3.6.0, CentOS 7, x86_64 >Reporter: Gábor Auth > > Tried to select value from a counter table: > {code} > cassandra@cqlsh:keyspace> select id,science,treasury,tutorial from counters > where id='38cab4b0-4e8e-11e6-a443-55982d8a0e8d'; > id | science | treasury | tutorial > --+-+--+-- > 38cab4b0-4e8e-11e6-a443-55982d8a0e8d | 2379459 | 100 |5 > (1 rows) > cassandra@cqlsh:keyspace> select * from counters where > id='38cab4b0-4e8e-11e6-a443-55982d8a0e8d'; > id | science | treasury | tutorial > --+-+--+-- > 38cab4b0-4e8e-11e6-a443-55982d8a0e8d | 2379459 | 100 |5 > (1 rows) > cassandra@cqlsh:keyspace> select tutorial from counters where > id='38cab4b0-4e8e-11e6-a443-55982d8a0e8d'; > ReadTimeout: code=1200 [Coordinator node timed out waiting for replica nodes' > responses] message="Operation timed out - received only 0 responses." > info={'received_responses': 0, 'required_responses': 1, 'consistency': 'ONE'} > {code} > Meanwhile in the log of the node: > {code} > WARN [SharedPool-Worker-2] 2016-07-21 11:21:09,055 > AbstractLocalAwareExecutorService.java:169 - Uncaught exception on thread > Thread[SharedPool-Worker-2,5,main]: {} > java.lang.RuntimeException: java.lang.IndexOutOfBoundsException > at > org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2470) > ~[apache-cassandra-3.6.0.jar:3.6.0] > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > ~[na:1.8.0_91] > at > org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:164) > ~[apache-cassandra-3.6.0.jar:3.6.0] > at > org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$LocalSessionFutureTask.run(AbstractLocalAwareExecutorService.java:136) > [apache-cassandra-3.6.0.jar:3.6.0] > at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:105) > [apache-cassandra-3.6.0.jar:3.6.0] > at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91] > Caused by: java.lang.IndexOutOfBoundsException: null > at java.nio.Buffer.checkIndex(Buffer.java:546) ~[na:1.8.0_91] > at java.nio.HeapByteBuffer.getShort(HeapByteBuffer.java:314) > ~[na:1.8.0_91] > at > org.apache.cassandra.db.context.CounterContext.headerLength(CounterContext.java:141) > ~[apache-cassandra-3.6.0.jar:3.6.0] > at > org.apache.cassandra.db.context.CounterContext.access$100(CounterContext.java:76) > ~[apache-cassandra-3.6.0.jar:3.6.0] > at > org.apache.cassandra.db.context.CounterContext$ContextState.(CounterContext.java:758) > ~[apache-cassandra-3.6.0.jar:3.6.0] > at > org.apache.cassandra.db.context.CounterContext$ContextState.wrap(CounterContext.java:765) > ~[apache-cassandra-3.6.0.jar:3.6.0] > > > at > org.apache.cassandra.db.context.CounterContext.merge(CounterContext.java:272) > ~[apache-cassandra-3.6.0.jar:3.6.0] > > > at > org.apache.cassandra.db.Conflicts.mergeCounterValues(Conflicts.java:76) > ~[apache-cassandra-3.6.0.jar:3.6.0] > > > at org.apache.cassandra.db.rows.Cells.reconcile(Cells.java:143) > ~[apache-cassandra-3.6.0.jar:3.6.0] > > > at > org.apache.cassandra.db.rows.Row$Merger$ColumnDataReducer.getReduced(Row.java:591) > ~[apache-cassandra-3.6.0.jar:3.6.0] > > >
[jira] [Created] (CASSANDRA-12672) Automate Nodetool Documentation
Andrew Baker created CASSANDRA-12672: Summary: Automate Nodetool Documentation Key: CASSANDRA-12672 URL: https://issues.apache.org/jira/browse/CASSANDRA-12672 Project: Cassandra Issue Type: Improvement Components: Documentation and Website Reporter: Andrew Baker Priority: Minor Fix For: 3.x nodetool.rst has this: todo:: Try to autogenerate this from Nodetool’s help. creating a ticket to submit this work against -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[32/50] [abbrv] cassandra git commit: Fix paging for 2.x to 3.x upgrades
Fix paging for 2.x to 3.x upgrades patch by Benjamin Lerer; reviewed by Sylvain Lebresne for CASSANDRA-11195 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/932f3ebb Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/932f3ebb Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/932f3ebb Branch: refs/heads/cassandra-3.9 Commit: 932f3ebbe9005582a4e253c84f4f20aef3a0abac Parents: 893fd21 Author: Benjamin LererAuthored: Mon Sep 12 10:27:58 2016 +0200 Committer: Benjamin Lerer Committed: Mon Sep 12 10:27:58 2016 +0200 -- CHANGES.txt| 1 + src/java/org/apache/cassandra/db/ReadCommand.java | 8 +++- src/java/org/apache/cassandra/db/ReadResponse.java | 11 --- 3 files changed, 8 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/932f3ebb/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 798496a..459d591 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 3.0.9 + * Fix paging for 2.x to 3.x upgrades (CASSANDRA-11195) * select_distinct_with_deletions_test failing on non-vnode environments (CASSANDRA-11126) * Stack Overflow returned to queries while upgrading (CASSANDRA-12527) * Fix legacy regex for temporary files from 2.2 (CASSANDRA-12565) http://git-wip-us.apache.org/repos/asf/cassandra/blob/932f3ebb/src/java/org/apache/cassandra/db/ReadCommand.java -- diff --git a/src/java/org/apache/cassandra/db/ReadCommand.java b/src/java/org/apache/cassandra/db/ReadCommand.java index c1762f1..70c770d 100644 --- a/src/java/org/apache/cassandra/db/ReadCommand.java +++ b/src/java/org/apache/cassandra/db/ReadCommand.java @@ -1016,7 +1016,7 @@ public abstract class ReadCommand implements ReadQuery // slice filter's stop. DataRange.Paging pagingRange = (DataRange.Paging) rangeCommand.dataRange(); Clustering lastReturned = pagingRange.getLastReturned(); -Slice.Bound newStart = Slice.Bound.exclusiveStartOf(lastReturned); +Slice.Bound newStart = Slice.Bound.inclusiveStartOf(lastReturned); Slice lastSlice = filter.requestedSlices().get(filter.requestedSlices().size() - 1); ByteBufferUtil.writeWithShortLength(LegacyLayout.encodeBound(metadata, newStart, true), out); ByteBufferUtil.writeWithShortLength(LegacyLayout.encodeClustering(metadata, lastSlice.end().clustering()), out); @@ -1025,10 +1025,8 @@ public abstract class ReadCommand implements ReadQuery // command-level limit // Pre-3.0 we would always request one more row than we actually needed and the command-level "start" would -// be the last-returned cell name, so the response would always include it. When dealing with compound comparators, -// we can pass an exclusive start and use the normal limit. However, when dealing with non-compound comparators, -// pre-3.0 nodes cannot perform exclusive slices, so we need to request one extra row. -int maxResults = rangeCommand.limits().count() + (metadata.isCompound() ? 0 : 1); +// be the last-returned cell name, so the response would always include it. +int maxResults = rangeCommand.limits().count() + 1; out.writeInt(maxResults); // countCQL3Rows http://git-wip-us.apache.org/repos/asf/cassandra/blob/932f3ebb/src/java/org/apache/cassandra/db/ReadResponse.java -- diff --git a/src/java/org/apache/cassandra/db/ReadResponse.java b/src/java/org/apache/cassandra/db/ReadResponse.java index 2304cb4..12f0b15 100644 --- a/src/java/org/apache/cassandra/db/ReadResponse.java +++ b/src/java/org/apache/cassandra/db/ReadResponse.java @@ -280,13 +280,10 @@ public abstract class ReadResponse ClusteringIndexFilter filter = command.clusteringIndexFilter(partition.partitionKey()); -// Pre-3.0, we didn't have a way to express exclusivity for non-composite comparators, so all slices were -// inclusive on both ends. If we have exclusive slice ends, we need to filter the results here. -UnfilteredRowIterator iterator; -if (!command.metadata().isCompound()) -iterator = filter.filter(partition.sliceableUnfilteredIterator(command.columnFilter(), filter.isReversed())); -else -iterator = partition.unfilteredIterator(command.columnFilter(), Slices.ALL,
[50/50] [abbrv] cassandra git commit: Merge branch 'cassandra-3.9' into trunk
Merge branch 'cassandra-3.9' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/94460842 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/94460842 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/94460842 Branch: refs/heads/trunk Commit: 944608428116b47c25596dd14ef0e697b971197f Parents: 1050544 bb371ea Author: Nate McCallAuthored: Tue Sep 20 14:18:58 2016 +1200 Committer: Nate McCall Committed: Tue Sep 20 14:21:42 2016 +1200 -- CHANGES.txt | 3 ++- .../org/apache/cassandra/transport/RequestThreadPoolExecutor.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/94460842/CHANGES.txt --
[09/50] [abbrv] cassandra git commit: Fix nodetool repair exits with 0 for some errors
Fix nodetool repair exits with 0 for some errors patch by Blake Eggleston; reviewed by yukim for CASSANDRA-12508 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f092f7be Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f092f7be Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f092f7be Branch: refs/heads/cassandra-3.9 Commit: f092f7be2f315b9804d7160cb7f5a40f1df38155 Parents: 0fd07e8 Author: Blake EgglestonAuthored: Mon Aug 15 08:38:01 2016 -0700 Committer: Yuki Morishita Committed: Fri Aug 26 08:26:21 2016 -0500 -- CHANGES.txt | 1 + src/java/org/apache/cassandra/tools/RepairRunner.java | 4 2 files changed, 5 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f092f7be/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index d6f2a9d..59c8a4b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 3.0.9 + * Fix nodetool repair exits with 0 for some errors (CASSANDRA-12508) * Do not shut down BatchlogManager twice during drain (CASSANDRA-12504) * Disk failure policy should not be invoked on out of space (CASSANDRA-12385) * Calculate last compacted key on startup (CASSANDRA-6216) http://git-wip-us.apache.org/repos/asf/cassandra/blob/f092f7be/src/java/org/apache/cassandra/tools/RepairRunner.java -- diff --git a/src/java/org/apache/cassandra/tools/RepairRunner.java b/src/java/org/apache/cassandra/tools/RepairRunner.java index 0813775..12ae5b8 100644 --- a/src/java/org/apache/cassandra/tools/RepairRunner.java +++ b/src/java/org/apache/cassandra/tools/RepairRunner.java @@ -110,6 +110,10 @@ public class RepairRunner extends JMXNotificationProgressListener message = message + " (progress: " + (int)event.getProgressPercentage() + "%)"; } out.println(message); +if (type == ProgressEventType.ERROR) +{ +error = new RuntimeException("Repair job has failed with the error message: " + message); +} if (type == ProgressEventType.COMPLETE) { condition.signalAll();
[08/50] [abbrv] cassandra git commit: Fix ant eclipse-warnings in 3.0
Fix ant eclipse-warnings in 3.0 Patch by Sam Tunnicliffe; reviewed by Tyler Hobbs for CASSANDRA-12528 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/0fd07e83 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/0fd07e83 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/0fd07e83 Branch: refs/heads/cassandra-3.9 Commit: 0fd07e832be6e9c97ca968977ba2abdf9d5cd809 Parents: 4dbc4f5 Author: Sam TunnicliffeAuthored: Wed Aug 24 13:32:30 2016 +0100 Committer: Sam Tunnicliffe Committed: Fri Aug 26 10:48:42 2016 +0100 -- .../db/compaction/TimeWindowCompactionStrategy.java | 3 +++ src/java/org/apache/cassandra/tools/SSTableExport.java | 11 +++ 2 files changed, 10 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/0fd07e83/src/java/org/apache/cassandra/db/compaction/TimeWindowCompactionStrategy.java -- diff --git a/src/java/org/apache/cassandra/db/compaction/TimeWindowCompactionStrategy.java b/src/java/org/apache/cassandra/db/compaction/TimeWindowCompactionStrategy.java index e2ab7dc..1aae633 100644 --- a/src/java/org/apache/cassandra/db/compaction/TimeWindowCompactionStrategy.java +++ b/src/java/org/apache/cassandra/db/compaction/TimeWindowCompactionStrategy.java @@ -71,6 +71,7 @@ public class TimeWindowCompactionStrategy extends AbstractCompactionStrategy } @Override +@SuppressWarnings("resource") // transaction is closed by AbstractCompactionTask::execute public AbstractCompactionTask getNextBackgroundTask(int gcBefore) { while (true) @@ -323,6 +324,7 @@ public class TimeWindowCompactionStrategy extends AbstractCompactionStrategy } @Override +@SuppressWarnings("resource") // transaction is closed by AbstractCompactionTask::execute public synchronized Collection getMaximalTask(int gcBefore, boolean splitOutput) { Iterable filteredSSTables = filterSuspectSSTables(sstables); @@ -335,6 +337,7 @@ public class TimeWindowCompactionStrategy extends AbstractCompactionStrategy } @Override +@SuppressWarnings("resource") // transaction is closed by AbstractCompactionTask::execute public synchronized AbstractCompactionTask getUserDefinedTask(Collection sstables, int gcBefore) { assert !sstables.isEmpty(); // checked for by CM.submitUserDefined http://git-wip-us.apache.org/repos/asf/cassandra/blob/0fd07e83/src/java/org/apache/cassandra/tools/SSTableExport.java -- diff --git a/src/java/org/apache/cassandra/tools/SSTableExport.java b/src/java/org/apache/cassandra/tools/SSTableExport.java index cc6b84b..cff1516 100644 --- a/src/java/org/apache/cassandra/tools/SSTableExport.java +++ b/src/java/org/apache/cassandra/tools/SSTableExport.java @@ -180,10 +180,13 @@ public class SSTableExport CFMetaData metadata = metadataFromSSTable(desc); if (cmd.hasOption(ENUMERATE_KEYS_OPTION)) { -JsonTransformer.keysToJson(null, iterToStream(new KeyIterator(desc, metadata)), - cmd.hasOption(RAW_TIMESTAMPS), - metadata, - System.out); +try (KeyIterator iter = new KeyIterator(desc, metadata)) +{ +JsonTransformer.keysToJson(null, iterToStream(iter), + cmd.hasOption(RAW_TIMESTAMPS), + metadata, + System.out); +} } else {
[24/50] [abbrv] cassandra git commit: cqlshlib tests: increase default execute timeout
cqlshlib tests: increase default execute timeout Patch by Stefania Alborghetti; reviewed by Philip Thompson for CASSANDRA-12481 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/40c2d45c Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/40c2d45c Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/40c2d45c Branch: refs/heads/cassandra-3.9 Commit: 40c2d45c5ed3828c8f5e3aebec673b81d231d465 Parents: 77924b3 Author: Stefania AlborghettiAuthored: Wed Aug 31 15:13:45 2016 +0800 Committer: Stefania Alborghetti Committed: Thu Sep 1 10:18:35 2016 +0800 -- CHANGES.txt| 1 + pylib/cqlshlib/test/cassconnect.py | 2 ++ 2 files changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/40c2d45c/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index d7e9394..a6a1114 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.2.8 + * cqlshlib tests: increase default execute timeout (CASSANDRA-12481) * Forward writes to replacement node when replace_address != broadcast_address (CASSANDRA-8523) * Enable repair -pr and -local together (fix regression of CASSANDRA-7450) (CASSANDRA-12522) * Fail repair on non-existing table (CASSANDRA-12279) http://git-wip-us.apache.org/repos/asf/cassandra/blob/40c2d45c/pylib/cqlshlib/test/cassconnect.py -- diff --git a/pylib/cqlshlib/test/cassconnect.py b/pylib/cqlshlib/test/cassconnect.py index 4a1311e..71f7565 100644 --- a/pylib/cqlshlib/test/cassconnect.py +++ b/pylib/cqlshlib/test/cassconnect.py @@ -116,6 +116,8 @@ def cassandra_cursor(cql_version=None, ks=''): conn = get_cassandra_connection(cql_version=cql_version) try: c = conn.connect(ks) +# increase default timeout to fix flacky tests, see CASSANDRA-12481 +c.default_timeout = 60.0 # if ks is not None: # c.execute('USE %s;' % quote_name(c, ks)) yield c
[44/50] [abbrv] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
Merge branch 'cassandra-2.1' into cassandra-2.2 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/465496f3 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/465496f3 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/465496f3 Branch: refs/heads/cassandra-3.0 Commit: 465496f3a356f44d3754adbc1cbe305100854956 Parents: ad4a91d 6fb89b9 Author: Nate McCallAuthored: Tue Sep 20 14:10:10 2016 +1200 Committer: Nate McCall Committed: Tue Sep 20 14:11:33 2016 +1200 -- CHANGES.txt | 3 ++- .../org/apache/cassandra/transport/RequestThreadPoolExecutor.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/465496f3/CHANGES.txt -- diff --cc CHANGES.txt index fae713e,1438e98..6c5fded --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,33 -1,7 +1,34 @@@ -2.1.16 +2.2.8 + * Add local address entry in PropertyFileSnitch (CASSANDRA-11332) + * cqlshlib tests: increase default execute timeout (CASSANDRA-12481) + * Forward writes to replacement node when replace_address != broadcast_address (CASSANDRA-8523) + * Enable repair -pr and -local together (fix regression of CASSANDRA-7450) (CASSANDRA-12522) + * Fail repair on non-existing table (CASSANDRA-12279) + * cqlsh copy: fix missing counter values (CASSANDRA-12476) + * Move migration tasks to non-periodic queue, assure flush executor shutdown after non-periodic executor (CASSANDRA-12251) + * cqlsh copy: fixed possible race in initializing feeding thread (CASSANDRA-11701) + * Only set broadcast_rpc_address on Ec2MultiRegionSnitch if it's not set (CASSANDRA-11357) + * Update StorageProxy range metrics for timeouts, failures and unavailables (CASSANDRA-9507) + * Add Sigar to classes included in clientutil.jar (CASSANDRA-11635) + * Add decay to histograms and timers used for metrics (CASSANDRA-11752) + * Fix hanging stream session (CASSANDRA-10992) + * Add byteman support for testing (CASSANDRA-12377) + * Fix INSERT JSON, fromJson() support of smallint, tinyint types (CASSANDRA-12371) + * Restore JVM metric export for metric reporters (CASSANDRA-12312) + * Release sstables of failed stream sessions only when outgoing transfers are finished (CASSANDRA-11345) + * Revert CASSANDRA-11427 (CASSANDRA-12351) + * Wait for tracing events before returning response and query at same consistency level client side (CASSANDRA-11465) + * cqlsh copyutil should get host metadata by connected address (CASSANDRA-11979) + * Fixed cqlshlib.test.remove_test_db (CASSANDRA-12214) + * Synchronize ThriftServer::stop() (CASSANDRA-12105) + * Use dedicated thread for JMX notifications (CASSANDRA-12146) + * NPE when trying to remove purgable tombstones from result (CASSANDRA-12143) + * Improve streaming synchronization and fault tolerance (CASSANDRA-11414) + * MemoryUtil.getShort() should return an unsigned short also for architectures not supporting unaligned memory accesses (CASSANDRA-11973) + * Don't write shadowed range tombstone (CASSANDRA-12030) +Merged from 2.1: - * Fix queries with empty ByteBuffer values in clustering column restrictions (CASSANDRA-12127) + * Add system property to set the max number of native transport requests in queue (CASSANDRA-11363) - * Include column family parameter when -st and -et are provided (CASSANDRA-11866) + * Fix queries with empty ByteBuffer values in clustering column restrictions (CASSANDRA-12127) * Disable passing control to post-flush after flush failure to prevent data loss (CASSANDRA-11828) * Allow STCS-in-L0 compactions to reduce scope with LCS (CASSANDRA-12040) * cannot use cql since upgrading python to 2.7.11+ (CASSANDRA-11850) http://git-wip-us.apache.org/repos/asf/cassandra/blob/465496f3/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java -- diff --cc src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java index 289f3e3,75b983a..75dd05d --- a/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java +++ b/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java @@@ -30,12 -30,12 +30,12 @@@ import static org.apache.cassandra.conc public class RequestThreadPoolExecutor extends AbstractEventExecutor { - private final static int MAX_QUEUED_REQUESTS = 128; + private final static int MAX_QUEUED_REQUESTS = Integer.getInteger("cassandra.max_queued_native_transport_requests", 128); private final static String THREAD_FACTORY_ID = "Native-Transport-Requests"; -private final TracingAwareExecutorService
[45/50] [abbrv] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0
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/ade38b20 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ade38b20 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ade38b20 Branch: refs/heads/cassandra-3.9 Commit: ade38b20740b8ce2e626e256d2e2f934a3024a16 Parents: 4bc3aa9 465496f Author: Nate McCallAuthored: Tue Sep 20 14:13:10 2016 +1200 Committer: Nate McCall Committed: Tue Sep 20 14:15:03 2016 +1200 -- CHANGES.txt | 3 ++- .../org/apache/cassandra/transport/RequestThreadPoolExecutor.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/ade38b20/CHANGES.txt -- diff --cc CHANGES.txt index b61c76c,6c5fded..6759897 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -78,10 -22,13 +78,11 @@@ Merged from 2.2 * Fixed cqlshlib.test.remove_test_db (CASSANDRA-12214) * Synchronize ThriftServer::stop() (CASSANDRA-12105) * Use dedicated thread for JMX notifications (CASSANDRA-12146) - * NPE when trying to remove purgable tombstones from result (CASSANDRA-12143) * Improve streaming synchronization and fault tolerance (CASSANDRA-11414) * MemoryUtil.getShort() should return an unsigned short also for architectures not supporting unaligned memory accesses (CASSANDRA-11973) - * Don't write shadowed range tombstone (CASSANDRA-12030) Merged from 2.1: - * Fix queries with empty ByteBuffer values in clustering column restrictions (CASSANDRA-12127) + * Add system property to set the max number of native transport requests in queue (CASSANDRA-11363) + * Fix queries with empty ByteBuffer values in clustering column restrictions (CASSANDRA-12127) * Disable passing control to post-flush after flush failure to prevent data loss (CASSANDRA-11828) * Allow STCS-in-L0 compactions to reduce scope with LCS (CASSANDRA-12040) * cannot use cql since upgrading python to 2.7.11+ (CASSANDRA-11850)
[46/50] [abbrv] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0
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/ade38b20 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ade38b20 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ade38b20 Branch: refs/heads/cassandra-3.0 Commit: ade38b20740b8ce2e626e256d2e2f934a3024a16 Parents: 4bc3aa9 465496f Author: Nate McCallAuthored: Tue Sep 20 14:13:10 2016 +1200 Committer: Nate McCall Committed: Tue Sep 20 14:15:03 2016 +1200 -- CHANGES.txt | 3 ++- .../org/apache/cassandra/transport/RequestThreadPoolExecutor.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/ade38b20/CHANGES.txt -- diff --cc CHANGES.txt index b61c76c,6c5fded..6759897 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -78,10 -22,13 +78,11 @@@ Merged from 2.2 * Fixed cqlshlib.test.remove_test_db (CASSANDRA-12214) * Synchronize ThriftServer::stop() (CASSANDRA-12105) * Use dedicated thread for JMX notifications (CASSANDRA-12146) - * NPE when trying to remove purgable tombstones from result (CASSANDRA-12143) * Improve streaming synchronization and fault tolerance (CASSANDRA-11414) * MemoryUtil.getShort() should return an unsigned short also for architectures not supporting unaligned memory accesses (CASSANDRA-11973) - * Don't write shadowed range tombstone (CASSANDRA-12030) Merged from 2.1: - * Fix queries with empty ByteBuffer values in clustering column restrictions (CASSANDRA-12127) + * Add system property to set the max number of native transport requests in queue (CASSANDRA-11363) + * Fix queries with empty ByteBuffer values in clustering column restrictions (CASSANDRA-12127) * Disable passing control to post-flush after flush failure to prevent data loss (CASSANDRA-11828) * Allow STCS-in-L0 compactions to reduce scope with LCS (CASSANDRA-12040) * cannot use cql since upgrading python to 2.7.11+ (CASSANDRA-11850)
[40/50] [abbrv] cassandra git commit: Add system property to set the max number of native transport requests in queue
Add system property to set the max number of native transport requests in queue Patch by Jake Luciani; reviewed by Nate McCall for CASSANDRA-11363 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6fb89b90 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6fb89b90 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6fb89b90 Branch: refs/heads/cassandra-2.1 Commit: 6fb89b905cf620200956fefa11c2dac8988a8837 Parents: 95b2d02 Author: Nate McCallAuthored: Tue Sep 20 13:22:50 2016 +1200 Committer: Nate McCall Committed: Tue Sep 20 14:07:57 2016 +1200 -- CHANGES.txt| 1 + .../org/apache/cassandra/transport/RequestThreadPoolExecutor.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/6fb89b90/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index c1c6c78..1438e98 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.16 + * Add system property to set the max number of native transport requests in queue (CASSANDRA-11363) * Include column family parameter when -st and -et are provided (CASSANDRA-11866) * Fix queries with empty ByteBuffer values in clustering column restrictions (CASSANDRA-12127) * Disable passing control to post-flush after flush failure to prevent data loss (CASSANDRA-11828) http://git-wip-us.apache.org/repos/asf/cassandra/blob/6fb89b90/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java -- diff --git a/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java b/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java index 9cac645..75b983a 100644 --- a/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java +++ b/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java @@ -30,7 +30,7 @@ import static org.apache.cassandra.concurrent.JMXEnabledSharedExecutorPool.SHARE public class RequestThreadPoolExecutor extends AbstractEventExecutor { -private final static int MAX_QUEUED_REQUESTS = 128; +private final static int MAX_QUEUED_REQUESTS = Integer.getInteger("cassandra.max_queued_native_transport_requests", 128); private final static String THREAD_FACTORY_ID = "Native-Transport-Requests"; private final TracingAwareExecutorService wrapped = SHARED.newExecutor(DatabaseDescriptor.getNativeTransportMaxThreads(), MAX_QUEUED_REQUESTS,
[28/50] [abbrv] cassandra git commit: Add local address entry in PropertyFileSnitch
Add local address entry in PropertyFileSnitch Patch by Branimir Lambov; reviewed by Carl Yeksigian for CASSANDRA-11332 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/ad4a91da Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ad4a91da Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ad4a91da Branch: refs/heads/cassandra-3.9 Commit: ad4a91da788d58a3d473e8e5e05caeb9339443f4 Parents: 40c2d45 Author: Carl YeksigianAuthored: Thu Sep 1 17:10:09 2016 -0400 Committer: Carl Yeksigian Committed: Thu Sep 1 17:10:09 2016 -0400 -- CHANGES.txt | 1 + .../org/apache/cassandra/locator/PropertyFileSnitch.java | 11 +-- 2 files changed, 10 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/ad4a91da/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index a6a1114..fae713e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.2.8 + * Add local address entry in PropertyFileSnitch (CASSANDRA-11332) * cqlshlib tests: increase default execute timeout (CASSANDRA-12481) * Forward writes to replacement node when replace_address != broadcast_address (CASSANDRA-8523) * Enable repair -pr and -local together (fix regression of CASSANDRA-7450) (CASSANDRA-12522) http://git-wip-us.apache.org/repos/asf/cassandra/blob/ad4a91da/src/java/org/apache/cassandra/locator/PropertyFileSnitch.java -- diff --git a/src/java/org/apache/cassandra/locator/PropertyFileSnitch.java b/src/java/org/apache/cassandra/locator/PropertyFileSnitch.java index bfd8e8e..8cc6549 100644 --- a/src/java/org/apache/cassandra/locator/PropertyFileSnitch.java +++ b/src/java/org/apache/cassandra/locator/PropertyFileSnitch.java @@ -186,10 +186,17 @@ public class PropertyFileSnitch extends AbstractNetworkTopologySnitch reloadedMap.put(host, token); } } -if (reloadedDefaultDCRack == null && !reloadedMap.containsKey(FBUtilities.getBroadcastAddress())) +InetAddress broadcastAddress = FBUtilities.getBroadcastAddress(); +String[] localInfo = reloadedMap.get(broadcastAddress); +if (reloadedDefaultDCRack == null && localInfo == null) throw new ConfigurationException(String.format("Snitch definitions at %s do not define a location for " + "this node's broadcast address %s, nor does it provides a default", - SNITCH_PROPERTIES_FILENAME, FBUtilities.getBroadcastAddress())); + SNITCH_PROPERTIES_FILENAME, broadcastAddress)); +// OutboundTcpConnectionPool.getEndpoint() converts our broadcast address to local, +// make sure we can be found at that as well. +InetAddress localAddress = FBUtilities.getLocalAddress(); +if (!localAddress.equals(broadcastAddress) && !reloadedMap.containsKey(localAddress)) +reloadedMap.put(localAddress, localInfo); if (isUpdate && !livenessCheck(reloadedMap, reloadedDefaultDCRack)) return;
[49/50] [abbrv] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.9
Merge branch 'cassandra-3.0' into cassandra-3.9 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/bb371ead Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/bb371ead Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/bb371ead Branch: refs/heads/cassandra-3.9 Commit: bb371eadacb1dee81aa099ad3b18e61aa804dbae Parents: c11c7d7 ade38b2 Author: Nate McCallAuthored: Tue Sep 20 14:16:00 2016 +1200 Committer: Nate McCall Committed: Tue Sep 20 14:17:50 2016 +1200 -- CHANGES.txt | 3 ++- .../org/apache/cassandra/transport/RequestThreadPoolExecutor.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/bb371ead/CHANGES.txt -- diff --cc CHANGES.txt index e849d28,6759897..8628348 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -93,13 -80,9 +93,14 @@@ Merged from 2.2 * Use dedicated thread for JMX notifications (CASSANDRA-12146) * Improve streaming synchronization and fault tolerance (CASSANDRA-11414) * MemoryUtil.getShort() should return an unsigned short also for architectures not supporting unaligned memory accesses (CASSANDRA-11973) + * Allow nodetool info to run with readonly JMX access (CASSANDRA-11755) + * Validate bloom_filter_fp_chance against lowest supported + value when the table is created (CASSANDRA-11920) + * Don't send erroneous NEW_NODE notifications on restart (CASSANDRA-11038) + * StorageService shutdown hook should use a volatile variable (CASSANDRA-11984) Merged from 2.1: - * Fix queries with empty ByteBuffer values in clustering column restrictions (CASSANDRA-12127) + * Add system property to set the max number of native transport requests in queue (CASSANDRA-11363) + * Fix queries with empty ByteBuffer values in clustering column restrictions (CASSANDRA-12127) * Disable passing control to post-flush after flush failure to prevent data loss (CASSANDRA-11828) * Allow STCS-in-L0 compactions to reduce scope with LCS (CASSANDRA-12040) * cannot use cql since upgrading python to 2.7.11+ (CASSANDRA-11850)
[48/50] [abbrv] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.9
Merge branch 'cassandra-3.0' into cassandra-3.9 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/bb371ead Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/bb371ead Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/bb371ead Branch: refs/heads/trunk Commit: bb371eadacb1dee81aa099ad3b18e61aa804dbae Parents: c11c7d7 ade38b2 Author: Nate McCallAuthored: Tue Sep 20 14:16:00 2016 +1200 Committer: Nate McCall Committed: Tue Sep 20 14:17:50 2016 +1200 -- CHANGES.txt | 3 ++- .../org/apache/cassandra/transport/RequestThreadPoolExecutor.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/bb371ead/CHANGES.txt -- diff --cc CHANGES.txt index e849d28,6759897..8628348 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -93,13 -80,9 +93,14 @@@ Merged from 2.2 * Use dedicated thread for JMX notifications (CASSANDRA-12146) * Improve streaming synchronization and fault tolerance (CASSANDRA-11414) * MemoryUtil.getShort() should return an unsigned short also for architectures not supporting unaligned memory accesses (CASSANDRA-11973) + * Allow nodetool info to run with readonly JMX access (CASSANDRA-11755) + * Validate bloom_filter_fp_chance against lowest supported + value when the table is created (CASSANDRA-11920) + * Don't send erroneous NEW_NODE notifications on restart (CASSANDRA-11038) + * StorageService shutdown hook should use a volatile variable (CASSANDRA-11984) Merged from 2.1: - * Fix queries with empty ByteBuffer values in clustering column restrictions (CASSANDRA-12127) + * Add system property to set the max number of native transport requests in queue (CASSANDRA-11363) + * Fix queries with empty ByteBuffer values in clustering column restrictions (CASSANDRA-12127) * Disable passing control to post-flush after flush failure to prevent data loss (CASSANDRA-11828) * Allow STCS-in-L0 compactions to reduce scope with LCS (CASSANDRA-12040) * cannot use cql since upgrading python to 2.7.11+ (CASSANDRA-11850)
[29/50] [abbrv] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0
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/cded2764 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/cded2764 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/cded2764 Branch: refs/heads/cassandra-3.9 Commit: cded2764534d3f7a6ed5bd379523258b7cd3a04a Parents: 5847222 ad4a91d Author: Carl YeksigianAuthored: Thu Sep 1 17:11:12 2016 -0400 Committer: Carl Yeksigian Committed: Thu Sep 1 17:11:12 2016 -0400 -- CHANGES.txt | 1 + .../org/apache/cassandra/locator/PropertyFileSnitch.java | 11 +-- 2 files changed, 10 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/cded2764/CHANGES.txt -- diff --cc CHANGES.txt index e5e2b9c,fae713e..5cf351a --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,53 -1,5 +1,54 @@@ -2.2.8 +3.0.9 + * select_distinct_with_deletions_test failing on non-vnode environments (CASSANDRA-11126) + * Stack Overflow returned to queries while upgrading (CASSANDRA-12527) + * Fix legacy regex for temporary files from 2.2 (CASSANDRA-12565) + * Add option to state current gc_grace_seconds to tools/bin/sstablemetadata (CASSANDRA-12208) + * Fix file system race condition that may cause LogAwareFileLister to fail to classify files (CASSANDRA-11889) + * Fix file handle leaks due to simultaneous compaction/repair and + listing snapshots, calculating snapshot sizes, or making schema + changes (CASSANDRA-11594) + * Fix nodetool repair exits with 0 for some errors (CASSANDRA-12508) + * Do not shut down BatchlogManager twice during drain (CASSANDRA-12504) + * Disk failure policy should not be invoked on out of space (CASSANDRA-12385) + * Calculate last compacted key on startup (CASSANDRA-6216) + * Add schema to snapshot manifest, add USING TIMESTAMP clause to ALTER TABLE statements (CASSANDRA-7190) + * Fix clean interval not sent to commit log for empty memtable flush (CASSANDRA-12436) + * Fix potential resource leak in RMIServerSocketFactoryImpl (CASSANDRA-12331) + * Backport CASSANDRA-12002 (CASSANDRA-12177) + * Make sure compaction stats are updated when compaction is interrupted (CASSANDRA-12100) + * Fix potential bad messaging service message for paged range reads + within mixed-version 3.x clusters (CASSANDRA-12249) + * Change commitlog and sstables to track dirty and clean intervals (CASSANDRA-11828) + * NullPointerException during compaction on table with static columns (CASSANDRA-12336) + * Fixed ConcurrentModificationException when reading metrics in GraphiteReporter (CASSANDRA-11823) + * Fix upgrade of super columns on thrift (CASSANDRA-12335) + * Fixed flacky BlacklistingCompactionsTest, switched to fixed size types and increased corruption size (CASSANDRA-12359) + * Rerun ReplicationAwareTokenAllocatorTest on failure to avoid flakiness (CASSANDRA-12277) + * Exception when computing read-repair for range tombstones (CASSANDRA-12263) + * Lost counter writes in compact table and static columns (CASSANDRA-12219) + * AssertionError with MVs on updating a row that isn't indexed due to a null value (CASSANDRA-12247) + * Disable RR and speculative retry with EACH_QUORUM reads (CASSANDRA-11980) + * Add option to override compaction space check (CASSANDRA-12180) + * Faster startup by only scanning each directory for temporary files once (CASSANDRA-12114) + * Respond with v1/v2 protocol header when responding to driver that attempts + to connect with too low of a protocol version (CASSANDRA-11464) + * NullPointerExpception when reading/compacting table (CASSANDRA-11988) + * Fix problem with undeleteable rows on upgrade to new sstable format (CASSANDRA-12144) + * Fix paging logic for deleted partitions with static columns (CASSANDRA-12107) + * Wait until the message is being send to decide which serializer must be used (CASSANDRA-11393) + * Fix migration of static thrift column names with non-text comparators (CASSANDRA-12147) + * Fix upgrading sparse tables that are incorrectly marked as dense (CASSANDRA-11315) + * Fix reverse queries ignoring range tombstones (CASSANDRA-11733) + * Avoid potential race when rebuilding CFMetaData (CASSANDRA-12098) + * Avoid missing sstables when getting the canonical sstables (CASSANDRA-11996) + * Always select the live sstables when getting sstables in bounds (CASSANDRA-11944) + * Fix column ordering of results with static columns for Thrift requests in + a mixed 2.x/3.x cluster, also fix potential non-resolved duplication of + those static columns in query results (CASSANDRA-12123) + * Avoid digest mismatch with empty but
[25/50] [abbrv] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0
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/20dd606e Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/20dd606e Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/20dd606e Branch: refs/heads/cassandra-3.9 Commit: 20dd606e7bf49f3954af85407b65e304401fed7d Parents: a1d9a02 40c2d45 Author: Stefania AlborghettiAuthored: Thu Sep 1 10:19:25 2016 +0800 Committer: Stefania Alborghetti Committed: Thu Sep 1 10:19:25 2016 +0800 -- CHANGES.txt| 1 + pylib/cqlshlib/test/cassconnect.py | 2 ++ 2 files changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/20dd606e/CHANGES.txt -- diff --cc CHANGES.txt index 8fde74e,a6a1114..0d425d6 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,51 -1,5 +1,52 @@@ -2.2.8 +3.0.9 + * Fix legacy regex for temporary files from 2.2 (CASSANDRA-12565) + * Add option to state current gc_grace_seconds to tools/bin/sstablemetadata (CASSANDRA-12208) + * Fix file system race condition that may cause LogAwareFileLister to fail to classify files (CASSANDRA-11889) + * Fix file handle leaks due to simultaneous compaction/repair and + listing snapshots, calculating snapshot sizes, or making schema + changes (CASSANDRA-11594) + * Fix nodetool repair exits with 0 for some errors (CASSANDRA-12508) + * Do not shut down BatchlogManager twice during drain (CASSANDRA-12504) + * Disk failure policy should not be invoked on out of space (CASSANDRA-12385) + * Calculate last compacted key on startup (CASSANDRA-6216) + * Add schema to snapshot manifest, add USING TIMESTAMP clause to ALTER TABLE statements (CASSANDRA-7190) + * Fix clean interval not sent to commit log for empty memtable flush (CASSANDRA-12436) + * Fix potential resource leak in RMIServerSocketFactoryImpl (CASSANDRA-12331) + * Backport CASSANDRA-12002 (CASSANDRA-12177) + * Make sure compaction stats are updated when compaction is interrupted (CASSANDRA-12100) + * Fix potential bad messaging service message for paged range reads + within mixed-version 3.x clusters (CASSANDRA-12249) + * Change commitlog and sstables to track dirty and clean intervals (CASSANDRA-11828) + * NullPointerException during compaction on table with static columns (CASSANDRA-12336) + * Fixed ConcurrentModificationException when reading metrics in GraphiteReporter (CASSANDRA-11823) + * Fix upgrade of super columns on thrift (CASSANDRA-12335) + * Fixed flacky BlacklistingCompactionsTest, switched to fixed size types and increased corruption size (CASSANDRA-12359) + * Rerun ReplicationAwareTokenAllocatorTest on failure to avoid flakiness (CASSANDRA-12277) + * Exception when computing read-repair for range tombstones (CASSANDRA-12263) + * Lost counter writes in compact table and static columns (CASSANDRA-12219) + * AssertionError with MVs on updating a row that isn't indexed due to a null value (CASSANDRA-12247) + * Disable RR and speculative retry with EACH_QUORUM reads (CASSANDRA-11980) + * Add option to override compaction space check (CASSANDRA-12180) + * Faster startup by only scanning each directory for temporary files once (CASSANDRA-12114) + * Respond with v1/v2 protocol header when responding to driver that attempts + to connect with too low of a protocol version (CASSANDRA-11464) + * NullPointerExpception when reading/compacting table (CASSANDRA-11988) + * Fix problem with undeleteable rows on upgrade to new sstable format (CASSANDRA-12144) + * Fix paging logic for deleted partitions with static columns (CASSANDRA-12107) + * Wait until the message is being send to decide which serializer must be used (CASSANDRA-11393) + * Fix migration of static thrift column names with non-text comparators (CASSANDRA-12147) + * Fix upgrading sparse tables that are incorrectly marked as dense (CASSANDRA-11315) + * Fix reverse queries ignoring range tombstones (CASSANDRA-11733) + * Avoid potential race when rebuilding CFMetaData (CASSANDRA-12098) + * Avoid missing sstables when getting the canonical sstables (CASSANDRA-11996) + * Always select the live sstables when getting sstables in bounds (CASSANDRA-11944) + * Fix column ordering of results with static columns for Thrift requests in + a mixed 2.x/3.x cluster, also fix potential non-resolved duplication of + those static columns in query results (CASSANDRA-12123) + * Avoid digest mismatch with empty but static rows (CASSANDRA-12090) + * Fix EOF exception when altering column type (CASSANDRA-11820) +Merged from 2.2: + * cqlshlib tests: increase default execute timeout (CASSANDRA-12481)
[20/50] [abbrv] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0
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/e4a53f4d Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e4a53f4d Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e4a53f4d Branch: refs/heads/cassandra-3.9 Commit: e4a53f4d3160833af3ea7917a35e7e35ae02786d Parents: ab98b11 b39d984 Author: Aleksey YeschenkoAuthored: Wed Aug 31 20:24:03 2016 +0100 Committer: Aleksey Yeschenko Committed: Wed Aug 31 20:25:24 2016 +0100 -- CHANGES.txt | 1 + src/java/org/apache/cassandra/gms/Gossiper.java | 5 +- .../apache/cassandra/gms/VersionedValue.java| 6 + .../apache/cassandra/locator/TokenMetadata.java | 52 ++- .../cassandra/service/LoadBroadcaster.java | 2 +- .../cassandra/service/StorageService.java | 136 +++ 6 files changed, 173 insertions(+), 29 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4a53f4d/CHANGES.txt -- diff --cc CHANGES.txt index 4b77e4d,d7e9394..30931d3 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,50 -1,5 +1,51 @@@ -2.2.8 +3.0.9 + * Add option to state current gc_grace_seconds to tools/bin/sstablemetadata (CASSANDRA-12208) + * Fix file system race condition that may cause LogAwareFileLister to fail to classify files (CASSANDRA-11889) + * Fix file handle leaks due to simultaneous compaction/repair and + listing snapshots, calculating snapshot sizes, or making schema + changes (CASSANDRA-11594) + * Fix nodetool repair exits with 0 for some errors (CASSANDRA-12508) + * Do not shut down BatchlogManager twice during drain (CASSANDRA-12504) + * Disk failure policy should not be invoked on out of space (CASSANDRA-12385) + * Calculate last compacted key on startup (CASSANDRA-6216) + * Add schema to snapshot manifest, add USING TIMESTAMP clause to ALTER TABLE statements (CASSANDRA-7190) + * Fix clean interval not sent to commit log for empty memtable flush (CASSANDRA-12436) + * Fix potential resource leak in RMIServerSocketFactoryImpl (CASSANDRA-12331) + * Backport CASSANDRA-12002 (CASSANDRA-12177) + * Make sure compaction stats are updated when compaction is interrupted (CASSANDRA-12100) + * Fix potential bad messaging service message for paged range reads + within mixed-version 3.x clusters (CASSANDRA-12249) + * Change commitlog and sstables to track dirty and clean intervals (CASSANDRA-11828) + * NullPointerException during compaction on table with static columns (CASSANDRA-12336) + * Fixed ConcurrentModificationException when reading metrics in GraphiteReporter (CASSANDRA-11823) + * Fix upgrade of super columns on thrift (CASSANDRA-12335) + * Fixed flacky BlacklistingCompactionsTest, switched to fixed size types and increased corruption size (CASSANDRA-12359) + * Rerun ReplicationAwareTokenAllocatorTest on failure to avoid flakiness (CASSANDRA-12277) + * Exception when computing read-repair for range tombstones (CASSANDRA-12263) + * Lost counter writes in compact table and static columns (CASSANDRA-12219) + * AssertionError with MVs on updating a row that isn't indexed due to a null value (CASSANDRA-12247) + * Disable RR and speculative retry with EACH_QUORUM reads (CASSANDRA-11980) + * Add option to override compaction space check (CASSANDRA-12180) + * Faster startup by only scanning each directory for temporary files once (CASSANDRA-12114) + * Respond with v1/v2 protocol header when responding to driver that attempts + to connect with too low of a protocol version (CASSANDRA-11464) + * NullPointerExpception when reading/compacting table (CASSANDRA-11988) + * Fix problem with undeleteable rows on upgrade to new sstable format (CASSANDRA-12144) + * Fix paging logic for deleted partitions with static columns (CASSANDRA-12107) + * Wait until the message is being send to decide which serializer must be used (CASSANDRA-11393) + * Fix migration of static thrift column names with non-text comparators (CASSANDRA-12147) + * Fix upgrading sparse tables that are incorrectly marked as dense (CASSANDRA-11315) + * Fix reverse queries ignoring range tombstones (CASSANDRA-11733) + * Avoid potential race when rebuilding CFMetaData (CASSANDRA-12098) + * Avoid missing sstables when getting the canonical sstables (CASSANDRA-11996) + * Always select the live sstables when getting sstables in bounds (CASSANDRA-11944) + * Fix column ordering of results with static columns for Thrift requests in + a mixed 2.x/3.x cluster, also fix potential non-resolved duplication of + those static columns in query results (CASSANDRA-12123) + * Avoid digest mismatch with
[18/50] [abbrv] cassandra git commit: Add option to state current gc_grace_seconds to tools/bin/sstablemetadata
Add option to state current gc_grace_seconds to tools/bin/sstablemetadata Patch by marcuse; reviewed by yukim for CASSANDRA-12208 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/ab98b115 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ab98b115 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ab98b115 Branch: refs/heads/cassandra-3.9 Commit: ab98b1151ecb61a62df30b9777fa962d60e97767 Parents: 4133c74 Author: Marcus ErikssonAuthored: Tue Aug 9 10:36:01 2016 +0200 Committer: Marcus Eriksson Committed: Wed Aug 31 09:34:00 2016 +0200 -- CHANGES.txt | 1 + .../cassandra/tools/SSTableMetadataViewer.java | 42 +--- 2 files changed, 38 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/ab98b115/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 5349c14..4b77e4d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 3.0.9 + * Add option to state current gc_grace_seconds to tools/bin/sstablemetadata (CASSANDRA-12208) * Fix file system race condition that may cause LogAwareFileLister to fail to classify files (CASSANDRA-11889) * Fix file handle leaks due to simultaneous compaction/repair and listing snapshots, calculating snapshot sizes, or making schema http://git-wip-us.apache.org/repos/asf/cassandra/blob/ab98b115/src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java -- diff --git a/src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java b/src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java index 5f7513f..6076e32 100644 --- a/src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java +++ b/src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java @@ -23,6 +23,15 @@ import java.io.PrintStream; import java.util.EnumSet; import java.util.Map; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.CommandLineParser; +import org.apache.commons.cli.HelpFormatter; +import org.apache.commons.cli.Option; +import org.apache.commons.cli.OptionBuilder; +import org.apache.commons.cli.Options; +import org.apache.commons.cli.ParseException; +import org.apache.commons.cli.PosixParser; + import org.apache.cassandra.io.sstable.Descriptor; import org.apache.cassandra.io.sstable.metadata.*; @@ -31,21 +40,37 @@ import org.apache.cassandra.io.sstable.metadata.*; */ public class SSTableMetadataViewer { +private static final String GCGS_KEY = "gc_grace_seconds"; + /** * @param args a list of sstables whose metadata we're interested in */ public static void main(String[] args) throws IOException { PrintStream out = System.out; -if (args.length == 0) +Option optGcgs = new Option(null, GCGS_KEY, true, "The "+GCGS_KEY+" to use when calculating droppable tombstones"); + +Options options = new Options(); +options.addOption(optGcgs); +CommandLine cmd = null; +CommandLineParser parser = new PosixParser(); +try +{ +cmd = parser.parse(options, args); +} +catch (ParseException e) { -out.println("Usage: sstablemetadata "); -System.exit(1); +printHelp(options, out); } +if (cmd.getArgs().length == 0) +{ +printHelp(options, out); +} +int gcgs = Integer.parseInt(cmd.getOptionValue(GCGS_KEY, "0")); Util.initDatabaseDescriptor(); -for (String fname : args) +for (String fname : cmd.getArgs()) { if (new File(fname).exists()) { @@ -67,7 +92,7 @@ public class SSTableMetadataViewer out.printf("Maximum timestamp: %s%n", stats.maxTimestamp); out.printf("SSTable max local deletion time: %s%n", stats.maxLocalDeletionTime); out.printf("Compression ratio: %s%n", stats.compressionRatio); -out.printf("Estimated droppable tombstones: %s%n", stats.getEstimatedDroppableTombstoneRatio((int) (System.currentTimeMillis() / 1000))); +out.printf("Estimated droppable tombstones: %s%n", stats.getEstimatedDroppableTombstoneRatio((int) (System.currentTimeMillis() / 1000) - gcgs)); out.printf("SSTable Level: %d%n", stats.sstableLevel); out.printf("Repaired at: %d%n", stats.repairedAt); out.printf("Replay positions covered: %s\n", stats.commitLogIntervals); @@ -90,6 +115,13 @@ public class SSTableMetadataViewer } }
[47/50] [abbrv] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0
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/ade38b20 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ade38b20 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ade38b20 Branch: refs/heads/trunk Commit: ade38b20740b8ce2e626e256d2e2f934a3024a16 Parents: 4bc3aa9 465496f Author: Nate McCallAuthored: Tue Sep 20 14:13:10 2016 +1200 Committer: Nate McCall Committed: Tue Sep 20 14:15:03 2016 +1200 -- CHANGES.txt | 3 ++- .../org/apache/cassandra/transport/RequestThreadPoolExecutor.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/ade38b20/CHANGES.txt -- diff --cc CHANGES.txt index b61c76c,6c5fded..6759897 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -78,10 -22,13 +78,11 @@@ Merged from 2.2 * Fixed cqlshlib.test.remove_test_db (CASSANDRA-12214) * Synchronize ThriftServer::stop() (CASSANDRA-12105) * Use dedicated thread for JMX notifications (CASSANDRA-12146) - * NPE when trying to remove purgable tombstones from result (CASSANDRA-12143) * Improve streaming synchronization and fault tolerance (CASSANDRA-11414) * MemoryUtil.getShort() should return an unsigned short also for architectures not supporting unaligned memory accesses (CASSANDRA-11973) - * Don't write shadowed range tombstone (CASSANDRA-12030) Merged from 2.1: - * Fix queries with empty ByteBuffer values in clustering column restrictions (CASSANDRA-12127) + * Add system property to set the max number of native transport requests in queue (CASSANDRA-11363) + * Fix queries with empty ByteBuffer values in clustering column restrictions (CASSANDRA-12127) * Disable passing control to post-flush after flush failure to prevent data loss (CASSANDRA-11828) * Allow STCS-in-L0 compactions to reduce scope with LCS (CASSANDRA-12040) * cannot use cql since upgrading python to 2.7.11+ (CASSANDRA-11850)
[07/50] [abbrv] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0
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/4dbc4f58 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4dbc4f58 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4dbc4f58 Branch: refs/heads/cassandra-3.9 Commit: 4dbc4f585619129884a62b57aada281925e402ef Parents: b89ffe7 5f6a124 Author: Sam TunnicliffeAuthored: Fri Aug 26 10:45:59 2016 +0100 Committer: Sam Tunnicliffe Committed: Fri Aug 26 10:45:59 2016 +0100 -- --
[14/50] [abbrv] cassandra git commit: Enable repair -pr and -local together (fix regression of CASSANDRA-7450)
Enable repair -pr and -local together (fix regression of CASSANDRA-7450) Patch by Jérôme Mainaud; Reviewed by Paulo Motta for CASSANDRA-12522 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6eff0829 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6eff0829 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6eff0829 Branch: refs/heads/cassandra-3.9 Commit: 6eff0829d2b3fe8fcac6622971b66792a4e82fef Parents: acd46ab Author: Jérôme MainaudAuthored: Fri Aug 26 20:51:40 2016 -0300 Committer: Aleksey Yeschenko Committed: Tue Aug 30 16:46:01 2016 +0100 -- CHANGES.txt | 1 + .../cassandra/repair/messages/RepairOption.java | 6 +- .../cassandra/service/StorageService.java | 2 +- .../repair/messages/RepairOptionTest.java | 20 4 files changed, 27 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/6eff0829/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 74c44f8..0f7cf0e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.2.8 + * Enable repair -pr and -local together (fix regression of CASSANDRA-7450) (CASSANDRA-12522) * Fail repair on non-existing table (CASSANDRA-12279) * cqlsh copy: fix missing counter values (CASSANDRA-12476) * Move migration tasks to non-periodic queue, assure flush executor shutdown after non-periodic executor (CASSANDRA-12251) http://git-wip-us.apache.org/repos/asf/cassandra/blob/6eff0829/src/java/org/apache/cassandra/repair/messages/RepairOption.java -- diff --git a/src/java/org/apache/cassandra/repair/messages/RepairOption.java b/src/java/org/apache/cassandra/repair/messages/RepairOption.java index d50a2ed..44a1e57 100644 --- a/src/java/org/apache/cassandra/repair/messages/RepairOption.java +++ b/src/java/org/apache/cassandra/repair/messages/RepairOption.java @@ -208,7 +208,7 @@ public class RepairOption { throw new IllegalArgumentException("Too many job threads. Max is " + MAX_JOB_THREADS); } -if (primaryRange && (!dataCenters.isEmpty() || !hosts.isEmpty())) +if (primaryRange && ((!dataCenters.isEmpty() && !option.isInLocalDCOnly()) || !hosts.isEmpty())) { throw new IllegalArgumentException("You need to run primary range repair on all nodes in the cluster."); } @@ -303,6 +303,10 @@ public class RepairOption return isSubrangeRepair; } +public boolean isInLocalDCOnly() { +return dataCenters.size() == 1 && dataCenters.contains(DatabaseDescriptor.getLocalDataCenter()); +} + @Override public String toString() { http://git-wip-us.apache.org/repos/asf/cassandra/blob/6eff0829/src/java/org/apache/cassandra/service/StorageService.java -- diff --git a/src/java/org/apache/cassandra/service/StorageService.java b/src/java/org/apache/cassandra/service/StorageService.java index e8ab54e..48a291b 100644 --- a/src/java/org/apache/cassandra/service/StorageService.java +++ b/src/java/org/apache/cassandra/service/StorageService.java @@ -2801,7 +2801,7 @@ public class StorageService extends NotificationBroadcasterSupport implements IE if (option.getDataCenters().isEmpty() && option.getHosts().isEmpty()) option.getRanges().addAll(getPrimaryRanges(keyspace)); // except dataCenters only contain local DC (i.e. -local) -else if (option.getDataCenters().size() == 1 && option.getDataCenters().contains(DatabaseDescriptor.getLocalDataCenter())) +else if (option.isInLocalDCOnly()) option.getRanges().addAll(getPrimaryRangesWithinDC(keyspace)); else throw new IllegalArgumentException("You need to run primary range repair on all nodes in the cluster."); http://git-wip-us.apache.org/repos/asf/cassandra/blob/6eff0829/test/unit/org/apache/cassandra/repair/messages/RepairOptionTest.java -- diff --git a/test/unit/org/apache/cassandra/repair/messages/RepairOptionTest.java b/test/unit/org/apache/cassandra/repair/messages/RepairOptionTest.java index cc6f46a..a0eea4e 100644 --- a/test/unit/org/apache/cassandra/repair/messages/RepairOptionTest.java +++ b/test/unit/org/apache/cassandra/repair/messages/RepairOptionTest.java @@ -97,6 +97,26 @@ public class RepairOptionTest } @Test +public void testPrWithLocalParseOptions() +{ +
[23/50] [abbrv] cassandra git commit: Fix legacy regex for temporary files from 2.2
Fix legacy regex for temporary files from 2.2 Patch by Stefania Alborghetti; reviewed by Robert Stupp for CASSANDRA-12565 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a1d9a029 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a1d9a029 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a1d9a029 Branch: refs/heads/cassandra-3.9 Commit: a1d9a0295c54aa044eedef7812f8ac89cc62fb2b Parents: b56def4 Author: Stefania AlborghettiAuthored: Tue Aug 30 17:09:16 2016 +0800 Committer: Stefania Alborghetti Committed: Thu Sep 1 10:05:37 2016 +0800 -- CHANGES.txt | 1 + .../org/apache/cassandra/io/sstable/Descriptor.java | 2 +- .../tmp-lb-3-big-Data.db | Bin 0 -> 93 bytes .../tmp-lb-3-big-Index.db | Bin 0 -> 54 bytes .../org/apache/cassandra/db/SystemKeyspaceTest.java | 8 5 files changed, 6 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/a1d9a029/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 30931d3..8fde74e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 3.0.9 + * Fix legacy regex for temporary files from 2.2 (CASSANDRA-12565) * Add option to state current gc_grace_seconds to tools/bin/sstablemetadata (CASSANDRA-12208) * Fix file system race condition that may cause LogAwareFileLister to fail to classify files (CASSANDRA-11889) * Fix file handle leaks due to simultaneous compaction/repair and http://git-wip-us.apache.org/repos/asf/cassandra/blob/a1d9a029/src/java/org/apache/cassandra/io/sstable/Descriptor.java -- diff --git a/src/java/org/apache/cassandra/io/sstable/Descriptor.java b/src/java/org/apache/cassandra/io/sstable/Descriptor.java index ff4abfc..e979a7d 100644 --- a/src/java/org/apache/cassandra/io/sstable/Descriptor.java +++ b/src/java/org/apache/cassandra/io/sstable/Descriptor.java @@ -186,7 +186,7 @@ public class Descriptor private final static String LEGACY_COMP_IN_PROG_REGEX_STR = "^compactions_in_progress(\\-[\\d,a-f]{32})?$"; private final static Pattern LEGACY_COMP_IN_PROG_REGEX = Pattern.compile(LEGACY_COMP_IN_PROG_REGEX_STR); -private final static String LEGACY_TMP_REGEX_STR = "^((.*)\\-(.*)\\-)?tmp(link)?\\-(la|ka)\\-(\\d)*\\-(.*)$"; +private final static String LEGACY_TMP_REGEX_STR = "^((.*)\\-(.*)\\-)?tmp(link)?\\-((?:l|k).)\\-(\\d)*\\-(.*)$"; private final static Pattern LEGACY_TMP_REGEX = Pattern.compile(LEGACY_TMP_REGEX_STR); public static boolean isLegacyFile(File file) http://git-wip-us.apache.org/repos/asf/cassandra/blob/a1d9a029/test/data/migration-sstables/2.2/keyspace1/test-dfcc85801bc811e5aa694b06169f4ffa/tmp-lb-3-big-Data.db -- diff --git a/test/data/migration-sstables/2.2/keyspace1/test-dfcc85801bc811e5aa694b06169f4ffa/tmp-lb-3-big-Data.db b/test/data/migration-sstables/2.2/keyspace1/test-dfcc85801bc811e5aa694b06169f4ffa/tmp-lb-3-big-Data.db new file mode 100644 index 000..2d5e60a Binary files /dev/null and b/test/data/migration-sstables/2.2/keyspace1/test-dfcc85801bc811e5aa694b06169f4ffa/tmp-lb-3-big-Data.db differ http://git-wip-us.apache.org/repos/asf/cassandra/blob/a1d9a029/test/data/migration-sstables/2.2/keyspace1/test-dfcc85801bc811e5aa694b06169f4ffa/tmp-lb-3-big-Index.db -- diff --git a/test/data/migration-sstables/2.2/keyspace1/test-dfcc85801bc811e5aa694b06169f4ffa/tmp-lb-3-big-Index.db b/test/data/migration-sstables/2.2/keyspace1/test-dfcc85801bc811e5aa694b06169f4ffa/tmp-lb-3-big-Index.db new file mode 100644 index 000..d3923ab Binary files /dev/null and b/test/data/migration-sstables/2.2/keyspace1/test-dfcc85801bc811e5aa694b06169f4ffa/tmp-lb-3-big-Index.db differ http://git-wip-us.apache.org/repos/asf/cassandra/blob/a1d9a029/test/unit/org/apache/cassandra/db/SystemKeyspaceTest.java -- diff --git a/test/unit/org/apache/cassandra/db/SystemKeyspaceTest.java b/test/unit/org/apache/cassandra/db/SystemKeyspaceTest.java index d770610..8e58373 100644 --- a/test/unit/org/apache/cassandra/db/SystemKeyspaceTest.java +++ b/test/unit/org/apache/cassandra/db/SystemKeyspaceTest.java @@ -178,23 +178,23 @@ public class SystemKeyspaceTest @Test public void testMigrateDataDirs_2_1() throws IOException { -testMigrateDataDirs("2.1"); +testMigrateDataDirs("2.1", 5); // see
[21/50] [abbrv] cassandra git commit: Cleanup MessagingService socket after catching Throwable (ninja #11841)
Cleanup MessagingService socket after catching Throwable (ninja #11841) Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/77924b37 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/77924b37 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/77924b37 Branch: refs/heads/cassandra-3.9 Commit: 77924b37c9bd28af8bfdc77edc9c7d6717c8085d Parents: b39d984 Author: Paulo MottaAuthored: Mon Aug 15 17:19:38 2016 -0300 Committer: Yuki Morishita Committed: Wed Aug 31 16:04:32 2016 -0500 -- .../org/apache/cassandra/net/IncomingStreamingConnection.java | 5 ++--- src/java/org/apache/cassandra/net/MessagingService.java | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/77924b37/src/java/org/apache/cassandra/net/IncomingStreamingConnection.java -- diff --git a/src/java/org/apache/cassandra/net/IncomingStreamingConnection.java b/src/java/org/apache/cassandra/net/IncomingStreamingConnection.java index ab262c7..f7dc240 100644 --- a/src/java/org/apache/cassandra/net/IncomingStreamingConnection.java +++ b/src/java/org/apache/cassandra/net/IncomingStreamingConnection.java @@ -74,10 +74,9 @@ public class IncomingStreamingConnection extends Thread implements Closeable // parallelize said streams and the socket is blocking, so we might deadlock. StreamResultFuture.initReceivingSide(init.sessionIndex, init.planId, init.description, init.from, this, init.isForOutgoing, version, init.keepSSTableLevel, init.isIncremental); } -catch (IOException e) +catch (Throwable t) { -logger.error(String.format("IOException while reading from socket from %s, closing: %s", - socket.getRemoteSocketAddress(), e)); +logger.error("Error while reading from socket from {}.", socket.getRemoteSocketAddress(), t); close(); } } http://git-wip-us.apache.org/repos/asf/cassandra/blob/77924b37/src/java/org/apache/cassandra/net/MessagingService.java -- diff --git a/src/java/org/apache/cassandra/net/MessagingService.java b/src/java/org/apache/cassandra/net/MessagingService.java index 8c8a333..fb0c9ca 100644 --- a/src/java/org/apache/cassandra/net/MessagingService.java +++ b/src/java/org/apache/cassandra/net/MessagingService.java @@ -1034,9 +1034,9 @@ public final class MessagingService implements MessagingServiceMBean logger.error("SSL handshake error for inbound connection from " + socket, e); FileUtils.closeQuietly(socket); } -catch (IOException e) +catch (Throwable t) { -logger.trace("Error reading the socket " + socket, e); +logger.trace("Error reading the socket {}", socket, t); FileUtils.closeQuietly(socket); } }
[36/50] [abbrv] cassandra git commit: Add system property to set the max number of native transport requests in queue
Add system property to set the max number of native transport requests in queue Patch by Jake Luciani; reviewed by Nate McCall for CASSANDRA-11363 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6fb89b90 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6fb89b90 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6fb89b90 Branch: refs/heads/cassandra-2.2 Commit: 6fb89b905cf620200956fefa11c2dac8988a8837 Parents: 95b2d02 Author: Nate McCallAuthored: Tue Sep 20 13:22:50 2016 +1200 Committer: Nate McCall Committed: Tue Sep 20 14:07:57 2016 +1200 -- CHANGES.txt| 1 + .../org/apache/cassandra/transport/RequestThreadPoolExecutor.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/6fb89b90/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index c1c6c78..1438e98 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.16 + * Add system property to set the max number of native transport requests in queue (CASSANDRA-11363) * Include column family parameter when -st and -et are provided (CASSANDRA-11866) * Fix queries with empty ByteBuffer values in clustering column restrictions (CASSANDRA-12127) * Disable passing control to post-flush after flush failure to prevent data loss (CASSANDRA-11828) http://git-wip-us.apache.org/repos/asf/cassandra/blob/6fb89b90/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java -- diff --git a/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java b/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java index 9cac645..75b983a 100644 --- a/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java +++ b/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java @@ -30,7 +30,7 @@ import static org.apache.cassandra.concurrent.JMXEnabledSharedExecutorPool.SHARE public class RequestThreadPoolExecutor extends AbstractEventExecutor { -private final static int MAX_QUEUED_REQUESTS = 128; +private final static int MAX_QUEUED_REQUESTS = Integer.getInteger("cassandra.max_queued_native_transport_requests", 128); private final static String THREAD_FACTORY_ID = "Native-Transport-Requests"; private final TracingAwareExecutorService wrapped = SHARED.newExecutor(DatabaseDescriptor.getNativeTransportMaxThreads(), MAX_QUEUED_REQUESTS,
[38/50] [abbrv] cassandra git commit: Add system property to set the max number of native transport requests in queue
Add system property to set the max number of native transport requests in queue Patch by Jake Luciani; reviewed by Nate McCall for CASSANDRA-11363 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6fb89b90 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6fb89b90 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6fb89b90 Branch: refs/heads/cassandra-3.9 Commit: 6fb89b905cf620200956fefa11c2dac8988a8837 Parents: 95b2d02 Author: Nate McCallAuthored: Tue Sep 20 13:22:50 2016 +1200 Committer: Nate McCall Committed: Tue Sep 20 14:07:57 2016 +1200 -- CHANGES.txt| 1 + .../org/apache/cassandra/transport/RequestThreadPoolExecutor.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/6fb89b90/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index c1c6c78..1438e98 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.16 + * Add system property to set the max number of native transport requests in queue (CASSANDRA-11363) * Include column family parameter when -st and -et are provided (CASSANDRA-11866) * Fix queries with empty ByteBuffer values in clustering column restrictions (CASSANDRA-12127) * Disable passing control to post-flush after flush failure to prevent data loss (CASSANDRA-11828) http://git-wip-us.apache.org/repos/asf/cassandra/blob/6fb89b90/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java -- diff --git a/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java b/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java index 9cac645..75b983a 100644 --- a/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java +++ b/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java @@ -30,7 +30,7 @@ import static org.apache.cassandra.concurrent.JMXEnabledSharedExecutorPool.SHARE public class RequestThreadPoolExecutor extends AbstractEventExecutor { -private final static int MAX_QUEUED_REQUESTS = 128; +private final static int MAX_QUEUED_REQUESTS = Integer.getInteger("cassandra.max_queued_native_transport_requests", 128); private final static String THREAD_FACTORY_ID = "Native-Transport-Requests"; private final TracingAwareExecutorService wrapped = SHARED.newExecutor(DatabaseDescriptor.getNativeTransportMaxThreads(), MAX_QUEUED_REQUESTS,
[34/50] [abbrv] cassandra git commit: Backport CASSANDRA-10756 (race condition in NativeTransportService shutdown)
Backport CASSANDRA-10756 (race condition in NativeTransportService shutdown) Patch by Alex Petrov; reviewed by Joel Knighton for CASSANDRA-12472 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/85ed48a1 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/85ed48a1 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/85ed48a1 Branch: refs/heads/cassandra-3.9 Commit: 85ed48a1d9ac5aafb2a914a05ef6a620eeec5d0d Parents: d600f51 Author: Alex PetrovAuthored: Tue Sep 13 09:49:02 2016 +0200 Committer: Aleksey Yeschenko Committed: Mon Sep 19 16:41:57 2016 -0700 -- CHANGES.txt | 4 .../apache/cassandra/service/NativeTransportService.java | 11 +-- 2 files changed, 5 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/85ed48a1/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index f0ec3e3..5fd8e5e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,7 @@ +3.0.10 + * Backport CASSANDRA-10756 (race condition in NativeTransportService shutdown) (CASSANDRA-12472) + + 3.0.9 * Handle composite prefixes with final EOC=0 as in 2.x and refactor LegacyLayout.decodeBound (CASSANDRA-12423) * Fix paging for 2.x to 3.x upgrades (CASSANDRA-11195) http://git-wip-us.apache.org/repos/asf/cassandra/blob/85ed48a1/src/java/org/apache/cassandra/service/NativeTransportService.java -- diff --git a/src/java/org/apache/cassandra/service/NativeTransportService.java b/src/java/org/apache/cassandra/service/NativeTransportService.java index eff3a89..48839f1 100644 --- a/src/java/org/apache/cassandra/service/NativeTransportService.java +++ b/src/java/org/apache/cassandra/service/NativeTransportService.java @@ -145,16 +145,7 @@ public class NativeTransportService servers = Collections.emptyList(); // shutdown executors used by netty for native transport server -Future wgStop = workerGroup.shutdownGracefully(0, 0, TimeUnit.SECONDS); - -try -{ -wgStop.await(5000); -} -catch (InterruptedException e1) -{ -Thread.currentThread().interrupt(); -} +workerGroup.shutdownGracefully(3, 5, TimeUnit.SECONDS).awaitUninterruptibly(); // shutdownGracefully not implemented yet in RequestThreadPoolExecutor eventExecutorGroup.shutdown();
[13/50] [abbrv] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0
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/8303fd1f Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8303fd1f Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8303fd1f Branch: refs/heads/cassandra-3.9 Commit: 8303fd1f5c23b45b65b662db423fa6bbd2832635 Parents: 5cda140 acd46ab Author: Aleksey YeschenkoAuthored: Tue Aug 30 16:33:31 2016 +0100 Committer: Aleksey Yeschenko Committed: Tue Aug 30 16:33:31 2016 +0100 -- CHANGES.txt | 1 + .../apache/cassandra/repair/RepairRunnable.java | 18 ++ 2 files changed, 15 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/8303fd1f/CHANGES.txt -- diff --cc CHANGES.txt index 7a1fbc5,74c44f8..fcbf1e4 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,49 -1,5 +1,50 @@@ -2.2.8 +3.0.9 + * Fix file system race condition that may cause LogAwareFileLister to fail to classify files (CASSANDRA-11889) + * Fix file handle leaks due to simultaneous compaction/repair and + listing snapshots, calculating snapshot sizes, or making schema + changes (CASSANDRA-11594) + * Fix nodetool repair exits with 0 for some errors (CASSANDRA-12508) + * Do not shut down BatchlogManager twice during drain (CASSANDRA-12504) + * Disk failure policy should not be invoked on out of space (CASSANDRA-12385) + * Calculate last compacted key on startup (CASSANDRA-6216) + * Add schema to snapshot manifest, add USING TIMESTAMP clause to ALTER TABLE statements (CASSANDRA-7190) + * Fix clean interval not sent to commit log for empty memtable flush (CASSANDRA-12436) + * Fix potential resource leak in RMIServerSocketFactoryImpl (CASSANDRA-12331) + * Backport CASSANDRA-12002 (CASSANDRA-12177) + * Make sure compaction stats are updated when compaction is interrupted (CASSANDRA-12100) + * Fix potential bad messaging service message for paged range reads + within mixed-version 3.x clusters (CASSANDRA-12249) + * Change commitlog and sstables to track dirty and clean intervals (CASSANDRA-11828) + * NullPointerException during compaction on table with static columns (CASSANDRA-12336) + * Fixed ConcurrentModificationException when reading metrics in GraphiteReporter (CASSANDRA-11823) + * Fix upgrade of super columns on thrift (CASSANDRA-12335) + * Fixed flacky BlacklistingCompactionsTest, switched to fixed size types and increased corruption size (CASSANDRA-12359) + * Rerun ReplicationAwareTokenAllocatorTest on failure to avoid flakiness (CASSANDRA-12277) + * Exception when computing read-repair for range tombstones (CASSANDRA-12263) + * Lost counter writes in compact table and static columns (CASSANDRA-12219) + * AssertionError with MVs on updating a row that isn't indexed due to a null value (CASSANDRA-12247) + * Disable RR and speculative retry with EACH_QUORUM reads (CASSANDRA-11980) + * Add option to override compaction space check (CASSANDRA-12180) + * Faster startup by only scanning each directory for temporary files once (CASSANDRA-12114) + * Respond with v1/v2 protocol header when responding to driver that attempts + to connect with too low of a protocol version (CASSANDRA-11464) + * NullPointerExpception when reading/compacting table (CASSANDRA-11988) + * Fix problem with undeleteable rows on upgrade to new sstable format (CASSANDRA-12144) + * Fix paging logic for deleted partitions with static columns (CASSANDRA-12107) + * Wait until the message is being send to decide which serializer must be used (CASSANDRA-11393) + * Fix migration of static thrift column names with non-text comparators (CASSANDRA-12147) + * Fix upgrading sparse tables that are incorrectly marked as dense (CASSANDRA-11315) + * Fix reverse queries ignoring range tombstones (CASSANDRA-11733) + * Avoid potential race when rebuilding CFMetaData (CASSANDRA-12098) + * Avoid missing sstables when getting the canonical sstables (CASSANDRA-11996) + * Always select the live sstables when getting sstables in bounds (CASSANDRA-11944) + * Fix column ordering of results with static columns for Thrift requests in + a mixed 2.x/3.x cluster, also fix potential non-resolved duplication of + those static columns in query results (CASSANDRA-12123) + * Avoid digest mismatch with empty but static rows (CASSANDRA-12090) + * Fix EOF exception when altering column type (CASSANDRA-11820) +Merged from 2.2: + * Fail repair on non-existing table (CASSANDRA-12279) * cqlsh copy: fix missing counter values (CASSANDRA-12476) * Move migration tasks to non-periodic queue, assure flush executor shutdown after
[33/50] [abbrv] cassandra git commit: Handle composite prefixes with final EOC=0 as in 2.x and refactor LegacyLayout.decodeBound
Handle composite prefixes with final EOC=0 as in 2.x and refactor LegacyLayout.decodeBound patch by Stefania Alborghetti and Sylvain Lebresne; reviewed by Tyler Hobbs and Sylvain Lebresne for CASSANDRA-12423 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d600f51e Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d600f51e Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d600f51e Branch: refs/heads/cassandra-3.9 Commit: d600f51ee1a3eb7b30ce3c409129567b70c22012 Parents: 932f3eb Author: Stefania AlborghettiAuthored: Tue Aug 30 16:08:09 2016 +0800 Committer: Stefania Alborghetti Committed: Mon Sep 12 16:56:30 2016 +0800 -- CHANGES.txt | 1 + .../org/apache/cassandra/db/LegacyLayout.java | 64 +++- .../cassandra/db/marshal/CompositeType.java | 26 3 files changed, 37 insertions(+), 54 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/d600f51e/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 459d591..f0ec3e3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 3.0.9 + * Handle composite prefixes with final EOC=0 as in 2.x and refactor LegacyLayout.decodeBound (CASSANDRA-12423) * Fix paging for 2.x to 3.x upgrades (CASSANDRA-11195) * select_distinct_with_deletions_test failing on non-vnode environments (CASSANDRA-11126) * Stack Overflow returned to queries while upgrading (CASSANDRA-12527) http://git-wip-us.apache.org/repos/asf/cassandra/blob/d600f51e/src/java/org/apache/cassandra/db/LegacyLayout.java -- diff --git a/src/java/org/apache/cassandra/db/LegacyLayout.java b/src/java/org/apache/cassandra/db/LegacyLayout.java index 65f9d3f..c8e7536 100644 --- a/src/java/org/apache/cassandra/db/LegacyLayout.java +++ b/src/java/org/apache/cassandra/db/LegacyLayout.java @@ -186,41 +186,49 @@ public abstract class LegacyLayout if (!bound.hasRemaining()) return isStart ? LegacyBound.BOTTOM : LegacyBound.TOP; -List components = metadata.isCompound() - ? CompositeType.deconstruct(bound) - : Collections.singletonList(new CompositeType.CompositeComponent(bound, (byte) 0)); - -// Either it's a prefix of the clustering, or it's the bound of a collection range tombstone (and thus has -// the collection column name) -assert components.size() <= metadata.comparator.size() || (!metadata.isCompactTable() && components.size() == metadata.comparator.size() + 1); - -List prefix = components.size() <= metadata.comparator.size() - ? components - : components.subList(0, metadata.comparator.size()); -Slice.Bound.Kind boundKind; +if (!metadata.isCompound()) +{ +// The non compound case is a lot easier, in that there is no EOC nor collection to worry about, so dealing +// with that first. +return new LegacyBound(isStart ? Slice.Bound.inclusiveStartOf(bound) : Slice.Bound.inclusiveEndOf(bound), false, null); +} + +int clusteringSize = metadata.comparator.size(); + +List components = CompositeType.splitName(bound); +byte eoc = CompositeType.lastEOC(bound); + +// There can be more components than the clustering size only in the case this is the bound of a collection +// range tombstone. In which case, there is exactly one more component, and that component is the name of the +// collection being selected/deleted. +assert components.size() <= clusteringSize || (!metadata.isCompactTable() && components.size() == clusteringSize + 1); + +ColumnDefinition collectionName = null; +if (components.size() > clusteringSize) +collectionName = metadata.getColumnDefinition(components.remove(clusteringSize)); + +boolean isInclusive; if (isStart) { -if (components.get(components.size() - 1).eoc > 0) -boundKind = Slice.Bound.Kind.EXCL_START_BOUND; -else -boundKind = Slice.Bound.Kind.INCL_START_BOUND; +isInclusive = eoc <= 0; } else { -if (components.get(components.size() - 1).eoc < 0) -boundKind = Slice.Bound.Kind.EXCL_END_BOUND; -else -boundKind = Slice.Bound.Kind.INCL_END_BOUND; -
[43/50] [abbrv] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
Merge branch 'cassandra-2.1' into cassandra-2.2 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/465496f3 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/465496f3 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/465496f3 Branch: refs/heads/trunk Commit: 465496f3a356f44d3754adbc1cbe305100854956 Parents: ad4a91d 6fb89b9 Author: Nate McCallAuthored: Tue Sep 20 14:10:10 2016 +1200 Committer: Nate McCall Committed: Tue Sep 20 14:11:33 2016 +1200 -- CHANGES.txt | 3 ++- .../org/apache/cassandra/transport/RequestThreadPoolExecutor.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/465496f3/CHANGES.txt -- diff --cc CHANGES.txt index fae713e,1438e98..6c5fded --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,33 -1,7 +1,34 @@@ -2.1.16 +2.2.8 + * Add local address entry in PropertyFileSnitch (CASSANDRA-11332) + * cqlshlib tests: increase default execute timeout (CASSANDRA-12481) + * Forward writes to replacement node when replace_address != broadcast_address (CASSANDRA-8523) + * Enable repair -pr and -local together (fix regression of CASSANDRA-7450) (CASSANDRA-12522) + * Fail repair on non-existing table (CASSANDRA-12279) + * cqlsh copy: fix missing counter values (CASSANDRA-12476) + * Move migration tasks to non-periodic queue, assure flush executor shutdown after non-periodic executor (CASSANDRA-12251) + * cqlsh copy: fixed possible race in initializing feeding thread (CASSANDRA-11701) + * Only set broadcast_rpc_address on Ec2MultiRegionSnitch if it's not set (CASSANDRA-11357) + * Update StorageProxy range metrics for timeouts, failures and unavailables (CASSANDRA-9507) + * Add Sigar to classes included in clientutil.jar (CASSANDRA-11635) + * Add decay to histograms and timers used for metrics (CASSANDRA-11752) + * Fix hanging stream session (CASSANDRA-10992) + * Add byteman support for testing (CASSANDRA-12377) + * Fix INSERT JSON, fromJson() support of smallint, tinyint types (CASSANDRA-12371) + * Restore JVM metric export for metric reporters (CASSANDRA-12312) + * Release sstables of failed stream sessions only when outgoing transfers are finished (CASSANDRA-11345) + * Revert CASSANDRA-11427 (CASSANDRA-12351) + * Wait for tracing events before returning response and query at same consistency level client side (CASSANDRA-11465) + * cqlsh copyutil should get host metadata by connected address (CASSANDRA-11979) + * Fixed cqlshlib.test.remove_test_db (CASSANDRA-12214) + * Synchronize ThriftServer::stop() (CASSANDRA-12105) + * Use dedicated thread for JMX notifications (CASSANDRA-12146) + * NPE when trying to remove purgable tombstones from result (CASSANDRA-12143) + * Improve streaming synchronization and fault tolerance (CASSANDRA-11414) + * MemoryUtil.getShort() should return an unsigned short also for architectures not supporting unaligned memory accesses (CASSANDRA-11973) + * Don't write shadowed range tombstone (CASSANDRA-12030) +Merged from 2.1: - * Fix queries with empty ByteBuffer values in clustering column restrictions (CASSANDRA-12127) + * Add system property to set the max number of native transport requests in queue (CASSANDRA-11363) - * Include column family parameter when -st and -et are provided (CASSANDRA-11866) + * Fix queries with empty ByteBuffer values in clustering column restrictions (CASSANDRA-12127) * Disable passing control to post-flush after flush failure to prevent data loss (CASSANDRA-11828) * Allow STCS-in-L0 compactions to reduce scope with LCS (CASSANDRA-12040) * cannot use cql since upgrading python to 2.7.11+ (CASSANDRA-11850) http://git-wip-us.apache.org/repos/asf/cassandra/blob/465496f3/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java -- diff --cc src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java index 289f3e3,75b983a..75dd05d --- a/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java +++ b/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java @@@ -30,12 -30,12 +30,12 @@@ import static org.apache.cassandra.conc public class RequestThreadPoolExecutor extends AbstractEventExecutor { - private final static int MAX_QUEUED_REQUESTS = 128; + private final static int MAX_QUEUED_REQUESTS = Integer.getInteger("cassandra.max_queued_native_transport_requests", 128); private final static String THREAD_FACTORY_ID = "Native-Transport-Requests"; -private final TracingAwareExecutorService wrapped =
[39/50] [abbrv] cassandra git commit: Add system property to set the max number of native transport requests in queue
Add system property to set the max number of native transport requests in queue Patch by Jake Luciani; reviewed by Nate McCall for CASSANDRA-11363 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6fb89b90 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6fb89b90 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6fb89b90 Branch: refs/heads/trunk Commit: 6fb89b905cf620200956fefa11c2dac8988a8837 Parents: 95b2d02 Author: Nate McCallAuthored: Tue Sep 20 13:22:50 2016 +1200 Committer: Nate McCall Committed: Tue Sep 20 14:07:57 2016 +1200 -- CHANGES.txt| 1 + .../org/apache/cassandra/transport/RequestThreadPoolExecutor.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/6fb89b90/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index c1c6c78..1438e98 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.16 + * Add system property to set the max number of native transport requests in queue (CASSANDRA-11363) * Include column family parameter when -st and -et are provided (CASSANDRA-11866) * Fix queries with empty ByteBuffer values in clustering column restrictions (CASSANDRA-12127) * Disable passing control to post-flush after flush failure to prevent data loss (CASSANDRA-11828) http://git-wip-us.apache.org/repos/asf/cassandra/blob/6fb89b90/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java -- diff --git a/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java b/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java index 9cac645..75b983a 100644 --- a/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java +++ b/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java @@ -30,7 +30,7 @@ import static org.apache.cassandra.concurrent.JMXEnabledSharedExecutorPool.SHARE public class RequestThreadPoolExecutor extends AbstractEventExecutor { -private final static int MAX_QUEUED_REQUESTS = 128; +private final static int MAX_QUEUED_REQUESTS = Integer.getInteger("cassandra.max_queued_native_transport_requests", 128); private final static String THREAD_FACTORY_ID = "Native-Transport-Requests"; private final TracingAwareExecutorService wrapped = SHARED.newExecutor(DatabaseDescriptor.getNativeTransportMaxThreads(), MAX_QUEUED_REQUESTS,
[17/50] [abbrv] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0
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/4133c74a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4133c74a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4133c74a Branch: refs/heads/cassandra-3.9 Commit: 4133c74a9cde484ec081d37b9423d0d4eacc333a Parents: 3483418 ac24b88 Author: Dave BrosiusAuthored: Tue Aug 30 22:37:54 2016 -0400 Committer: Dave Brosius Committed: Tue Aug 30 22:37:54 2016 -0400 -- .../metrics/DecayingEstimatedHistogramReservoir.java | 8 1 file changed, 4 insertions(+), 4 deletions(-) --
[26/50] [abbrv] cassandra git commit: Stack Overflow returned to queries while upgrading
Stack Overflow returned to queries while upgrading patch by Sylvain Lebresne; reviewed by Tyler Hobbs for CASSANDRA-12527 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/13928935 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/13928935 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/13928935 Branch: refs/heads/cassandra-3.9 Commit: 139289356bb9615c688778b78243ba8007b22d81 Parents: 20dd606 Author: Sylvain LebresneAuthored: Wed Aug 31 17:13:19 2016 +0200 Committer: Sylvain Lebresne Committed: Thu Sep 1 11:10:08 2016 +0200 -- CHANGES.txt | 1 + .../org/apache/cassandra/db/LegacyLayout.java | 18 ++ 2 files changed, 11 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/13928935/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 0d425d6..d111d11 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 3.0.9 + * Stack Overflow returned to queries while upgrading (CASSANDRA-12527) * Fix legacy regex for temporary files from 2.2 (CASSANDRA-12565) * Add option to state current gc_grace_seconds to tools/bin/sstablemetadata (CASSANDRA-12208) * Fix file system race condition that may cause LogAwareFileLister to fail to classify files (CASSANDRA-11889) http://git-wip-us.apache.org/repos/asf/cassandra/blob/13928935/src/java/org/apache/cassandra/db/LegacyLayout.java -- diff --git a/src/java/org/apache/cassandra/db/LegacyLayout.java b/src/java/org/apache/cassandra/db/LegacyLayout.java index 1dd4c5d..65f9d3f 100644 --- a/src/java/org/apache/cassandra/db/LegacyLayout.java +++ b/src/java/org/apache/cassandra/db/LegacyLayout.java @@ -714,16 +714,18 @@ public abstract class LegacyLayout protected LegacyCell computeNext() { -if (currentRow.hasNext()) -return currentRow.next(); +while (true) +{ +if (currentRow.hasNext()) +return currentRow.next(); -if (!iterator.hasNext()) -return endOfData(); +if (!iterator.hasNext()) +return endOfData(); -Pair row = fromRow(metadata, iterator.next()); -deletions.addAll(row.left); -currentRow = row.right; -return computeNext(); +Pair row = fromRow(metadata, iterator.next()); +deletions.addAll(row.left); +currentRow = row.right; +} } };
[03/50] [abbrv] cassandra git commit: cqlsh copy: fix missing counter values
cqlsh copy: fix missing counter values patch by Stefania Alborghetti; reviewed by Tyler Hobbs for CASSANDRA-12476 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b9fc6a5e Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b9fc6a5e Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b9fc6a5e Branch: refs/heads/cassandra-3.9 Commit: b9fc6a5e45d6f53d447839e7567d5184dede03d0 Parents: 23d4822 Author: Stefania AlborghettiAuthored: Mon Aug 22 11:29:11 2016 +0800 Committer: Stefania Alborghetti Committed: Thu Aug 25 09:09:07 2016 +0800 -- CHANGES.txt| 1 + pylib/cqlshlib/copyutil.py | 16 +--- 2 files changed, 14 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/b9fc6a5e/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index a3a34c1..001a389 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.2.8 + * cqlsh copy: fix missing counter values (CASSANDRA-12476) * Move migration tasks to non-periodic queue, assure flush executor shutdown after non-periodic executor (CASSANDRA-12251) * cqlsh copy: fixed possible race in initializing feeding thread (CASSANDRA-11701) * Only set broadcast_rpc_address on Ec2MultiRegionSnitch if it's not set (CASSANDRA-11357) http://git-wip-us.apache.org/repos/asf/cassandra/blob/b9fc6a5e/pylib/cqlshlib/copyutil.py -- diff --git a/pylib/cqlshlib/copyutil.py b/pylib/cqlshlib/copyutil.py index 460ae6a..aee2920 100644 --- a/pylib/cqlshlib/copyutil.py +++ b/pylib/cqlshlib/copyutil.py @@ -1746,6 +1746,7 @@ class ImportConversion(object): else: self.use_prepared_statements = True +self.is_counter = parent.is_counter(table_meta) self.proto_version = statement.protocol_version # the cql types and converters for the prepared statement, either the full statement or only the primary keys @@ -1974,7 +1975,14 @@ class ImportConversion(object): return converters.get(cql_type.typename, convert_unknown) def get_null_val(self): -return None if self.use_prepared_statements else "NULL" +""" +Return the null value that is inserted for fields that are missing from csv files. +For counters we should return zero so that the counter value won't be incremented. +For everything else we return nulls, this means None if we use prepared statements +or "NULL" otherwise. Note that for counters we never use prepared statements, so we +only check is_counter when use_prepared_statements is false. +""" +return None if self.use_prepared_statements else ("0" if self.is_counter else "NULL") def convert_row(self, row): """ @@ -2177,13 +2185,15 @@ class ImportProcess(ChildProcess): self._session.cluster.shutdown() ChildProcess.close(self) +def is_counter(self, table_meta): +return "counter" in [table_meta.columns[name].cql_type for name in self.valid_columns] + def make_params(self): metadata = self.session.cluster.metadata table_meta = metadata.keyspaces[self.ks].tables[self.table] prepared_statement = None -is_counter = ("counter" in [table_meta.columns[name].cql_type for name in self.valid_columns]) -if is_counter: +if self.is_counter(table_meta): query = 'UPDATE %s.%s SET %%s WHERE %%s' % (protect_name(self.ks), protect_name(self.table)) make_statement = self.wrap_make_statement(self.make_counter_batch_statement) elif self.use_prepared_statements:
[10/50] [abbrv] cassandra git commit: Fix file handle leak due to transaction logs
Fix file handle leak due to transaction logs Patch by Stefania Alborghetti; reviewed by Tyler Hobbs for CASSANDRA-11594 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/da07130e Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/da07130e Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/da07130e Branch: refs/heads/cassandra-3.9 Commit: da07130e4e08cd8645001c6f7fa9ea2acb2072ca Parents: f092f7b Author: Stefania AlborghettiAuthored: Fri Aug 26 11:58:23 2016 -0500 Committer: Tyler Hobbs Committed: Fri Aug 26 11:58:23 2016 -0500 -- CHANGES.txt | 3 +++ .../apache/cassandra/db/lifecycle/LogAwareFileLister.java | 10 ++ src/java/org/apache/cassandra/db/lifecycle/LogFile.java | 4 ++-- .../org/apache/cassandra/db/lifecycle/LogReplica.java | 4 ++-- .../org/apache/cassandra/db/lifecycle/LogReplicaSet.java | 5 +++-- .../org/apache/cassandra/db/lifecycle/LogTransaction.java | 8 ++-- 6 files changed, 18 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/da07130e/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 59c8a4b..cf14f67 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,7 @@ 3.0.9 + * Fix file handle leaks due to simultaneous compaction/repair and + listing snapshots, calculating snapshot sizes, or making schema + changes (CASSANDRA-11594) * Fix nodetool repair exits with 0 for some errors (CASSANDRA-12508) * Do not shut down BatchlogManager twice during drain (CASSANDRA-12504) * Disk failure policy should not be invoked on out of space (CASSANDRA-12385) http://git-wip-us.apache.org/repos/asf/cassandra/blob/da07130e/src/java/org/apache/cassandra/db/lifecycle/LogAwareFileLister.java -- diff --git a/src/java/org/apache/cassandra/db/lifecycle/LogAwareFileLister.java b/src/java/org/apache/cassandra/db/lifecycle/LogAwareFileLister.java index e9072c4..7728f9c 100644 --- a/src/java/org/apache/cassandra/db/lifecycle/LogAwareFileLister.java +++ b/src/java/org/apache/cassandra/db/lifecycle/LogAwareFileLister.java @@ -122,10 +122,12 @@ final class LogAwareFileLister */ void classifyFiles(File txnFile) { -LogFile txn = LogFile.make(txnFile); -readTxnLog(txn); -classifyFiles(txn); -files.put(txnFile, FileType.TXN_LOG); +try (LogFile txn = LogFile.make(txnFile)) +{ +readTxnLog(txn); +classifyFiles(txn); +files.put(txnFile, FileType.TXN_LOG); +} } void readTxnLog(LogFile txn) http://git-wip-us.apache.org/repos/asf/cassandra/blob/da07130e/src/java/org/apache/cassandra/db/lifecycle/LogFile.java -- diff --git a/src/java/org/apache/cassandra/db/lifecycle/LogFile.java b/src/java/org/apache/cassandra/db/lifecycle/LogFile.java index 6d0c835..8560410 100644 --- a/src/java/org/apache/cassandra/db/lifecycle/LogFile.java +++ b/src/java/org/apache/cassandra/db/lifecycle/LogFile.java @@ -52,7 +52,7 @@ import static org.apache.cassandra.utils.Throwables.merge; * * @see LogTransaction */ -final class LogFile +final class LogFile implements AutoCloseable { private static final Logger logger = LoggerFactory.getLogger(LogFile.class); @@ -374,7 +374,7 @@ final class LogFile return replicas.exists(); } -void close() +public void close() { replicas.close(); } http://git-wip-us.apache.org/repos/asf/cassandra/blob/da07130e/src/java/org/apache/cassandra/db/lifecycle/LogReplica.java -- diff --git a/src/java/org/apache/cassandra/db/lifecycle/LogReplica.java b/src/java/org/apache/cassandra/db/lifecycle/LogReplica.java index 79b9749..712a22d 100644 --- a/src/java/org/apache/cassandra/db/lifecycle/LogReplica.java +++ b/src/java/org/apache/cassandra/db/lifecycle/LogReplica.java @@ -34,7 +34,7 @@ import org.apache.cassandra.utils.CLibrary; * * @see LogFile */ -final class LogReplica +final class LogReplica implements AutoCloseable { private final File file; private int folderDescriptor; @@ -88,7 +88,7 @@ final class LogReplica return file.exists(); } -void close() +public void close() { if (folderDescriptor >= 0) { http://git-wip-us.apache.org/repos/asf/cassandra/blob/da07130e/src/java/org/apache/cassandra/db/lifecycle/LogReplicaSet.java -- diff
[15/50] [abbrv] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0
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/3483418b Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/3483418b Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/3483418b Branch: refs/heads/cassandra-3.9 Commit: 3483418bda4eb34b7aab5e9f80c1a0cefbc072b7 Parents: 8303fd1 6eff082 Author: Aleksey YeschenkoAuthored: Tue Aug 30 16:48:31 2016 +0100 Committer: Aleksey Yeschenko Committed: Tue Aug 30 16:48:31 2016 +0100 -- CHANGES.txt | 1 + .../cassandra/repair/messages/RepairOption.java | 6 +- .../cassandra/service/StorageService.java | 2 +- .../repair/messages/RepairOptionTest.java | 20 4 files changed, 27 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/3483418b/CHANGES.txt -- diff --cc CHANGES.txt index fcbf1e4,0f7cf0e..5349c14 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,49 -1,5 +1,50 @@@ -2.2.8 +3.0.9 + * Fix file system race condition that may cause LogAwareFileLister to fail to classify files (CASSANDRA-11889) + * Fix file handle leaks due to simultaneous compaction/repair and + listing snapshots, calculating snapshot sizes, or making schema + changes (CASSANDRA-11594) + * Fix nodetool repair exits with 0 for some errors (CASSANDRA-12508) + * Do not shut down BatchlogManager twice during drain (CASSANDRA-12504) + * Disk failure policy should not be invoked on out of space (CASSANDRA-12385) + * Calculate last compacted key on startup (CASSANDRA-6216) + * Add schema to snapshot manifest, add USING TIMESTAMP clause to ALTER TABLE statements (CASSANDRA-7190) + * Fix clean interval not sent to commit log for empty memtable flush (CASSANDRA-12436) + * Fix potential resource leak in RMIServerSocketFactoryImpl (CASSANDRA-12331) + * Backport CASSANDRA-12002 (CASSANDRA-12177) + * Make sure compaction stats are updated when compaction is interrupted (CASSANDRA-12100) + * Fix potential bad messaging service message for paged range reads + within mixed-version 3.x clusters (CASSANDRA-12249) + * Change commitlog and sstables to track dirty and clean intervals (CASSANDRA-11828) + * NullPointerException during compaction on table with static columns (CASSANDRA-12336) + * Fixed ConcurrentModificationException when reading metrics in GraphiteReporter (CASSANDRA-11823) + * Fix upgrade of super columns on thrift (CASSANDRA-12335) + * Fixed flacky BlacklistingCompactionsTest, switched to fixed size types and increased corruption size (CASSANDRA-12359) + * Rerun ReplicationAwareTokenAllocatorTest on failure to avoid flakiness (CASSANDRA-12277) + * Exception when computing read-repair for range tombstones (CASSANDRA-12263) + * Lost counter writes in compact table and static columns (CASSANDRA-12219) + * AssertionError with MVs on updating a row that isn't indexed due to a null value (CASSANDRA-12247) + * Disable RR and speculative retry with EACH_QUORUM reads (CASSANDRA-11980) + * Add option to override compaction space check (CASSANDRA-12180) + * Faster startup by only scanning each directory for temporary files once (CASSANDRA-12114) + * Respond with v1/v2 protocol header when responding to driver that attempts + to connect with too low of a protocol version (CASSANDRA-11464) + * NullPointerExpception when reading/compacting table (CASSANDRA-11988) + * Fix problem with undeleteable rows on upgrade to new sstable format (CASSANDRA-12144) + * Fix paging logic for deleted partitions with static columns (CASSANDRA-12107) + * Wait until the message is being send to decide which serializer must be used (CASSANDRA-11393) + * Fix migration of static thrift column names with non-text comparators (CASSANDRA-12147) + * Fix upgrading sparse tables that are incorrectly marked as dense (CASSANDRA-11315) + * Fix reverse queries ignoring range tombstones (CASSANDRA-11733) + * Avoid potential race when rebuilding CFMetaData (CASSANDRA-12098) + * Avoid missing sstables when getting the canonical sstables (CASSANDRA-11996) + * Always select the live sstables when getting sstables in bounds (CASSANDRA-11944) + * Fix column ordering of results with static columns for Thrift requests in + a mixed 2.x/3.x cluster, also fix potential non-resolved duplication of + those static columns in query results (CASSANDRA-12123) + * Avoid digest mismatch with empty but static rows (CASSANDRA-12090) + * Fix EOF exception when altering column type (CASSANDRA-11820) +Merged from 2.2: + * Enable repair -pr and -local together (fix regression of CASSANDRA-7450)
[05/50] [abbrv] cassandra git commit: Do not shut down BatchlogManager twice during drain
Do not shut down BatchlogManager twice during drain patch by Stefania Alborghetti; reviewed by Aleksey Yeschenko for CASSANDRA-12504 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b89ffe73 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b89ffe73 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b89ffe73 Branch: refs/heads/cassandra-3.9 Commit: b89ffe730e80cfc097aea70d747f55e87fb1ed90 Parents: 431ecdb Author: Stefania AlborghettiAuthored: Tue Aug 23 14:08:05 2016 +0800 Committer: Stefania Alborghetti Committed: Fri Aug 26 09:36:09 2016 +0800 -- CHANGES.txt | 1 + src/java/org/apache/cassandra/service/StorageService.java | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/b89ffe73/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 9bd0434..d6f2a9d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 3.0.9 + * Do not shut down BatchlogManager twice during drain (CASSANDRA-12504) * Disk failure policy should not be invoked on out of space (CASSANDRA-12385) * Calculate last compacted key on startup (CASSANDRA-6216) * Add schema to snapshot manifest, add USING TIMESTAMP clause to ALTER TABLE statements (CASSANDRA-7190) http://git-wip-us.apache.org/repos/asf/cassandra/blob/b89ffe73/src/java/org/apache/cassandra/service/StorageService.java -- diff --git a/src/java/org/apache/cassandra/service/StorageService.java b/src/java/org/apache/cassandra/service/StorageService.java index 2a167ff..498a5ee 100644 --- a/src/java/org/apache/cassandra/service/StorageService.java +++ b/src/java/org/apache/cassandra/service/StorageService.java @@ -4017,8 +4017,6 @@ public class StorageService extends NotificationBroadcasterSupport implements IE } FBUtilities.waitOnFutures(flushes); -BatchlogManager.instance.shutdown(); - HintsService.instance.shutdownBlocking(); // Interrupt on going compaction and shutdown to prevent further compaction
[22/50] [abbrv] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0
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/b56def49 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b56def49 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b56def49 Branch: refs/heads/cassandra-3.9 Commit: b56def49f575c5bc7e15f6cb947f02589b5544f2 Parents: e4a53f4 77924b3 Author: Yuki MorishitaAuthored: Wed Aug 31 16:06:28 2016 -0500 Committer: Yuki Morishita Committed: Wed Aug 31 16:06:28 2016 -0500 -- .../org/apache/cassandra/net/IncomingStreamingConnection.java | 5 ++--- src/java/org/apache/cassandra/net/MessagingService.java | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/b56def49/src/java/org/apache/cassandra/net/IncomingStreamingConnection.java -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/b56def49/src/java/org/apache/cassandra/net/MessagingService.java --
[30/50] [abbrv] cassandra git commit: fix jsontransformer for partitions with delete info for CASSANDRA-12418
fix jsontransformer for partitions with delete info for CASSANDRA-12418 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/fa148045 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/fa148045 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/fa148045 Branch: refs/heads/cassandra-3.9 Commit: fa14804543e9ed2cc781d9f8511ab7a5c22f8dd7 Parents: cded276 Author: Dave BrosiusAuthored: Sun Sep 4 01:07:13 2016 -0400 Committer: Dave Brosius Committed: Sun Sep 4 01:07:13 2016 -0400 -- CHANGES.txt | 1 + src/java/org/apache/cassandra/tools/JsonTransformer.java | 1 + 2 files changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/fa148045/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 5cf351a..21fc42c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -47,6 +47,7 @@ those static columns in query results (CASSANDRA-12123) * Avoid digest mismatch with empty but static rows (CASSANDRA-12090) * Fix EOF exception when altering column type (CASSANDRA-11820) + * Fix JsonTransformer output of partition with deletion info (CASSANDRA-12418) Merged from 2.2: * Add local address entry in PropertyFileSnitch (CASSANDRA-11332) * cqlshlib tests: increase default execute timeout (CASSANDRA-12481) http://git-wip-us.apache.org/repos/asf/cassandra/blob/fa148045/src/java/org/apache/cassandra/tools/JsonTransformer.java -- diff --git a/src/java/org/apache/cassandra/tools/JsonTransformer.java b/src/java/org/apache/cassandra/tools/JsonTransformer.java index 3deed96..590e527 100644 --- a/src/java/org/apache/cassandra/tools/JsonTransformer.java +++ b/src/java/org/apache/cassandra/tools/JsonTransformer.java @@ -193,6 +193,7 @@ public final class JsonTransformer if (!partition.partitionLevelDeletion().isLive()) { serializeDeletion(partition.partitionLevelDeletion()); +json.writeEndObject(); } else {
[27/50] [abbrv] cassandra git commit: Fix backward compatibility issues on SELECT DISTINCT queries
Fix backward compatibility issues on SELECT DISTINCT queries patch by Sylvain Lebresne; reviewed by Benjamin Lerer for CASSANDRA-11126 This fixes 2 problems: - Broken logic for deciding if a query involve static columns when serializating range slice to old nodes. - Invalid cellname in paging state when the "row marker" should be sent. Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/5847222d Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5847222d Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5847222d Branch: refs/heads/cassandra-3.9 Commit: 5847222d9b2428c201a534876f86a0ec6f6f436f Parents: 1392893 Author: Sylvain LebresneAuthored: Thu Aug 4 15:38:39 2016 +0200 Committer: Sylvain Lebresne Committed: Thu Sep 1 15:49:03 2016 +0200 -- CHANGES.txt | 1 + src/java/org/apache/cassandra/db/ReadCommand.java| 2 +- src/java/org/apache/cassandra/service/pager/PagingState.java | 7 +-- 3 files changed, 7 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/5847222d/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index d111d11..e5e2b9c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 3.0.9 + * select_distinct_with_deletions_test failing on non-vnode environments (CASSANDRA-11126) * Stack Overflow returned to queries while upgrading (CASSANDRA-12527) * Fix legacy regex for temporary files from 2.2 (CASSANDRA-12565) * Add option to state current gc_grace_seconds to tools/bin/sstablemetadata (CASSANDRA-12208) http://git-wip-us.apache.org/repos/asf/cassandra/blob/5847222d/src/java/org/apache/cassandra/db/ReadCommand.java -- diff --git a/src/java/org/apache/cassandra/db/ReadCommand.java b/src/java/org/apache/cassandra/db/ReadCommand.java index 36969f8..c1762f1 100644 --- a/src/java/org/apache/cassandra/db/ReadCommand.java +++ b/src/java/org/apache/cassandra/db/ReadCommand.java @@ -744,7 +744,7 @@ public abstract class ReadCommand implements ReadQuery out.writeInt(LegacyReadCommandSerializer.updateLimitForQuery(rangeCommand.limits().count(), filter.requestedSlices())); int compositesToGroup; -boolean selectsStatics = !rangeCommand.columnFilter().fetchedColumns().statics.isEmpty() || filter.requestedSlices().selects(Clustering.STATIC_CLUSTERING); +boolean selectsStatics = !rangeCommand.columnFilter().fetchedColumns().statics.isEmpty() && filter.requestedSlices().selects(Clustering.STATIC_CLUSTERING); if (limits.kind() == DataLimits.Kind.THRIFT_LIMIT) compositesToGroup = -1; else if (limits.isDistinct() && !selectsStatics) http://git-wip-us.apache.org/repos/asf/cassandra/blob/5847222d/src/java/org/apache/cassandra/service/pager/PagingState.java -- diff --git a/src/java/org/apache/cassandra/service/pager/PagingState.java b/src/java/org/apache/cassandra/service/pager/PagingState.java index 611523f..30e14c3 100644 --- a/src/java/org/apache/cassandra/service/pager/PagingState.java +++ b/src/java/org/apache/cassandra/service/pager/PagingState.java @@ -213,7 +213,10 @@ public class PagingState Iterator cells = row.cellsInLegacyOrder(metadata, true).iterator(); if (!cells.hasNext()) { -mark = LegacyLayout.encodeClustering(metadata, row.clustering()); +// If the last returned row has no cell, this means in 2.1/2.2 terms that we stopped on the row +// marker. Note that this shouldn't happen if the table is COMPACT. +assert !metadata.isCompactTable(); +mark = LegacyLayout.encodeCellName(metadata, row.clustering(), ByteBufferUtil.EMPTY_BYTE_BUFFER, null); } else { @@ -258,7 +261,7 @@ public class PagingState @Override public String toString() { -return ByteBufferUtil.bytesToHex(mark); +return mark == null ? "null" : ByteBufferUtil.bytesToHex(mark); } } }
[41/50] [abbrv] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
Merge branch 'cassandra-2.1' into cassandra-2.2 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/465496f3 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/465496f3 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/465496f3 Branch: refs/heads/cassandra-3.9 Commit: 465496f3a356f44d3754adbc1cbe305100854956 Parents: ad4a91d 6fb89b9 Author: Nate McCallAuthored: Tue Sep 20 14:10:10 2016 +1200 Committer: Nate McCall Committed: Tue Sep 20 14:11:33 2016 +1200 -- CHANGES.txt | 3 ++- .../org/apache/cassandra/transport/RequestThreadPoolExecutor.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/465496f3/CHANGES.txt -- diff --cc CHANGES.txt index fae713e,1438e98..6c5fded --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,33 -1,7 +1,34 @@@ -2.1.16 +2.2.8 + * Add local address entry in PropertyFileSnitch (CASSANDRA-11332) + * cqlshlib tests: increase default execute timeout (CASSANDRA-12481) + * Forward writes to replacement node when replace_address != broadcast_address (CASSANDRA-8523) + * Enable repair -pr and -local together (fix regression of CASSANDRA-7450) (CASSANDRA-12522) + * Fail repair on non-existing table (CASSANDRA-12279) + * cqlsh copy: fix missing counter values (CASSANDRA-12476) + * Move migration tasks to non-periodic queue, assure flush executor shutdown after non-periodic executor (CASSANDRA-12251) + * cqlsh copy: fixed possible race in initializing feeding thread (CASSANDRA-11701) + * Only set broadcast_rpc_address on Ec2MultiRegionSnitch if it's not set (CASSANDRA-11357) + * Update StorageProxy range metrics for timeouts, failures and unavailables (CASSANDRA-9507) + * Add Sigar to classes included in clientutil.jar (CASSANDRA-11635) + * Add decay to histograms and timers used for metrics (CASSANDRA-11752) + * Fix hanging stream session (CASSANDRA-10992) + * Add byteman support for testing (CASSANDRA-12377) + * Fix INSERT JSON, fromJson() support of smallint, tinyint types (CASSANDRA-12371) + * Restore JVM metric export for metric reporters (CASSANDRA-12312) + * Release sstables of failed stream sessions only when outgoing transfers are finished (CASSANDRA-11345) + * Revert CASSANDRA-11427 (CASSANDRA-12351) + * Wait for tracing events before returning response and query at same consistency level client side (CASSANDRA-11465) + * cqlsh copyutil should get host metadata by connected address (CASSANDRA-11979) + * Fixed cqlshlib.test.remove_test_db (CASSANDRA-12214) + * Synchronize ThriftServer::stop() (CASSANDRA-12105) + * Use dedicated thread for JMX notifications (CASSANDRA-12146) + * NPE when trying to remove purgable tombstones from result (CASSANDRA-12143) + * Improve streaming synchronization and fault tolerance (CASSANDRA-11414) + * MemoryUtil.getShort() should return an unsigned short also for architectures not supporting unaligned memory accesses (CASSANDRA-11973) + * Don't write shadowed range tombstone (CASSANDRA-12030) +Merged from 2.1: - * Fix queries with empty ByteBuffer values in clustering column restrictions (CASSANDRA-12127) + * Add system property to set the max number of native transport requests in queue (CASSANDRA-11363) - * Include column family parameter when -st and -et are provided (CASSANDRA-11866) + * Fix queries with empty ByteBuffer values in clustering column restrictions (CASSANDRA-12127) * Disable passing control to post-flush after flush failure to prevent data loss (CASSANDRA-11828) * Allow STCS-in-L0 compactions to reduce scope with LCS (CASSANDRA-12040) * cannot use cql since upgrading python to 2.7.11+ (CASSANDRA-11850) http://git-wip-us.apache.org/repos/asf/cassandra/blob/465496f3/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java -- diff --cc src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java index 289f3e3,75b983a..75dd05d --- a/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java +++ b/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java @@@ -30,12 -30,12 +30,12 @@@ import static org.apache.cassandra.conc public class RequestThreadPoolExecutor extends AbstractEventExecutor { - private final static int MAX_QUEUED_REQUESTS = 128; + private final static int MAX_QUEUED_REQUESTS = Integer.getInteger("cassandra.max_queued_native_transport_requests", 128); private final static String THREAD_FACTORY_ID = "Native-Transport-Requests"; -private final TracingAwareExecutorService
[35/50] [abbrv] cassandra git commit: Extend ColumnIdentifier.internedInstances key to include the type that generated the byte buffer
Extend ColumnIdentifier.internedInstances key to include the type that generated the byte buffer patch by Stefania Alborghetti; reviewed by Aleksey Yeschenko for CASSANDRA-12516 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4bc3aa93 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4bc3aa93 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4bc3aa93 Branch: refs/heads/cassandra-3.9 Commit: 4bc3aa93337474a29bc4ad43ff4438755c9c7ab8 Parents: 85ed48a Author: Stefania AlborghettiAuthored: Fri Sep 2 16:28:35 2016 +0800 Committer: Stefania Alborghetti Committed: Tue Sep 20 09:26:38 2016 +0800 -- CHANGES.txt | 1 + .../apache/cassandra/cql3/ColumnIdentifier.java | 46 +--- .../apache/cassandra/schema/SchemaKeyspace.java | 6 ++- .../utils/NativeSSTableLoaderClient.java| 6 ++- .../cassandra/cql3/ColumnIdentifierTest.java| 24 ++ 5 files changed, 72 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/4bc3aa93/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 5fd8e5e..b61c76c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 3.0.10 + * Extend ColumnIdentifier.internedInstances key to include the type that generated the byte buffer (CASSANDRA-12516) * Backport CASSANDRA-10756 (race condition in NativeTransportService shutdown) (CASSANDRA-12472) http://git-wip-us.apache.org/repos/asf/cassandra/blob/4bc3aa93/src/java/org/apache/cassandra/cql3/ColumnIdentifier.java -- diff --git a/src/java/org/apache/cassandra/cql3/ColumnIdentifier.java b/src/java/org/apache/cassandra/cql3/ColumnIdentifier.java index afb65e1..1e25b23 100644 --- a/src/java/org/apache/cassandra/cql3/ColumnIdentifier.java +++ b/src/java/org/apache/cassandra/cql3/ColumnIdentifier.java @@ -60,7 +60,38 @@ public class ColumnIdentifier extends Selectable implements IMeasurableMemory, C private static final long EMPTY_SIZE = ObjectSizes.measure(new ColumnIdentifier(ByteBufferUtil.EMPTY_BYTE_BUFFER, "", false)); -private static final ConcurrentMap internedInstances = new MapMaker().weakValues().makeMap(); +private static final ConcurrentMap internedInstances = new MapMaker().weakValues().makeMap(); + +private static final class InternedKey +{ +private final AbstractType type; +private final ByteBuffer bytes; + +InternedKey(AbstractType type, ByteBuffer bytes) +{ +this.type = type; +this.bytes = bytes; +} + +@Override +public boolean equals(Object o) +{ +if (this == o) +return true; + +if (o == null || getClass() != o.getClass()) +return false; + +InternedKey that = (InternedKey) o; +return bytes.equals(that.bytes) && type.equals(that.type); +} + +@Override +public int hashCode() +{ +return bytes.hashCode() + 31 * type.hashCode(); +} +} private static long prefixComparison(ByteBuffer bytes) { @@ -103,24 +134,25 @@ public class ColumnIdentifier extends Selectable implements IMeasurableMemory, C public static ColumnIdentifier getInterned(ByteBuffer bytes, AbstractType type) { -return getInterned(bytes, type.getString(bytes)); +return getInterned(type, bytes, type.getString(bytes)); } public static ColumnIdentifier getInterned(String rawText, boolean keepCase) { String text = keepCase ? rawText : rawText.toLowerCase(Locale.US); ByteBuffer bytes = ByteBufferUtil.bytes(text); -return getInterned(bytes, text); +return getInterned(UTF8Type.instance, bytes, text); } -public static ColumnIdentifier getInterned(ByteBuffer bytes, String text) +public static ColumnIdentifier getInterned(AbstractType type, ByteBuffer bytes, String text) { -ColumnIdentifier id = internedInstances.get(bytes); +InternedKey key = new InternedKey(type, bytes); +ColumnIdentifier id = internedInstances.get(key); if (id != null) return id; ColumnIdentifier created = new ColumnIdentifier(bytes, text, true); -ColumnIdentifier previous = internedInstances.putIfAbsent(bytes, created); +ColumnIdentifier previous = internedInstances.putIfAbsent(key, created); return previous == null ? created : previous; } @@
[11/50] [abbrv] cassandra git commit: Fix file system race condition that may cause LogAwareFileLister to fail to classify files
Fix file system race condition that may cause LogAwareFileLister to fail to classify files patch by Stefania Alborghetti; reviewed by Benjamin Lerer for CASSANDRA-11889 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/5cda140b Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5cda140b Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5cda140b Branch: refs/heads/cassandra-3.9 Commit: 5cda140bae05c84dde92998df1b85583be69812d Parents: da07130 Author: Stefania AlborghettiAuthored: Tue Aug 2 16:37:15 2016 +0800 Committer: Stefania Alborghetti Committed: Tue Aug 30 08:51:08 2016 +0800 -- CHANGES.txt | 1 + src/java/org/apache/cassandra/db/lifecycle/LogFile.java | 2 +- src/java/org/apache/cassandra/db/lifecycle/LogRecord.java | 9 +++-- 3 files changed, 9 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/5cda140b/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index cf14f67..7a1fbc5 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 3.0.9 + * Fix file system race condition that may cause LogAwareFileLister to fail to classify files (CASSANDRA-11889) * Fix file handle leaks due to simultaneous compaction/repair and listing snapshots, calculating snapshot sizes, or making schema changes (CASSANDRA-11594) http://git-wip-us.apache.org/repos/asf/cassandra/blob/5cda140b/src/java/org/apache/cassandra/db/lifecycle/LogFile.java -- diff --git a/src/java/org/apache/cassandra/db/lifecycle/LogFile.java b/src/java/org/apache/cassandra/db/lifecycle/LogFile.java index 8560410..da5bb39 100644 --- a/src/java/org/apache/cassandra/db/lifecycle/LogFile.java +++ b/src/java/org/apache/cassandra/db/lifecycle/LogFile.java @@ -216,7 +216,7 @@ final class LogFile implements AutoCloseable // it matches. Because we delete files from oldest to newest, the latest update time should // always match. record.status.onDiskRecord = record.withExistingFiles(); -if (record.updateTime != record.status.onDiskRecord.updateTime && record.status.onDiskRecord.numFiles > 0) +if (record.updateTime != record.status.onDiskRecord.updateTime && record.status.onDiskRecord.updateTime > 0) { record.setError(String.format("Unexpected files detected for sstable [%s], " + "record [%s]: last update time [%tT] should have been [%tT]", http://git-wip-us.apache.org/repos/asf/cassandra/blob/5cda140b/src/java/org/apache/cassandra/db/lifecycle/LogRecord.java -- diff --git a/src/java/org/apache/cassandra/db/lifecycle/LogRecord.java b/src/java/org/apache/cassandra/db/lifecycle/LogRecord.java index d7eb774..c981b02 100644 --- a/src/java/org/apache/cassandra/db/lifecycle/LogRecord.java +++ b/src/java/org/apache/cassandra/db/lifecycle/LogRecord.java @@ -26,6 +26,7 @@ import java.nio.file.Paths; import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; +import java.util.stream.Collectors; import java.util.zip.CRC32; import org.apache.cassandra.io.sstable.SSTable; @@ -156,8 +157,12 @@ final class LogRecord public static LogRecord make(Type type, List files, int minFiles, String absolutePath) { -long lastModified = files.stream().map(File::lastModified).reduce(0L, Long::max); -return new LogRecord(type, absolutePath, lastModified, Math.max(minFiles, files.size())); +// CASSANDRA-11889: File.lastModified() returns a positive value only if the file exists, therefore +// we filter by positive values to only consider the files that still exists right now, in case things +// changed on disk since getExistingFiles() was called +List positiveModifiedTimes = files.stream().map(File::lastModified).filter(lm -> lm > 0).collect(Collectors.toList()); +long lastModified = positiveModifiedTimes.stream().reduce(0L, Long::max); +return new LogRecord(type, absolutePath, lastModified, Math.max(minFiles, positiveModifiedTimes.size())); } private LogRecord(Type type, long updateTime)
[37/50] [abbrv] cassandra git commit: Add system property to set the max number of native transport requests in queue
Add system property to set the max number of native transport requests in queue Patch by Jake Luciani; reviewed by Nate McCall for CASSANDRA-11363 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6fb89b90 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6fb89b90 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6fb89b90 Branch: refs/heads/cassandra-3.0 Commit: 6fb89b905cf620200956fefa11c2dac8988a8837 Parents: 95b2d02 Author: Nate McCallAuthored: Tue Sep 20 13:22:50 2016 +1200 Committer: Nate McCall Committed: Tue Sep 20 14:07:57 2016 +1200 -- CHANGES.txt| 1 + .../org/apache/cassandra/transport/RequestThreadPoolExecutor.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/6fb89b90/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index c1c6c78..1438e98 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.16 + * Add system property to set the max number of native transport requests in queue (CASSANDRA-11363) * Include column family parameter when -st and -et are provided (CASSANDRA-11866) * Fix queries with empty ByteBuffer values in clustering column restrictions (CASSANDRA-12127) * Disable passing control to post-flush after flush failure to prevent data loss (CASSANDRA-11828) http://git-wip-us.apache.org/repos/asf/cassandra/blob/6fb89b90/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java -- diff --git a/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java b/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java index 9cac645..75b983a 100644 --- a/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java +++ b/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java @@ -30,7 +30,7 @@ import static org.apache.cassandra.concurrent.JMXEnabledSharedExecutorPool.SHARE public class RequestThreadPoolExecutor extends AbstractEventExecutor { -private final static int MAX_QUEUED_REQUESTS = 128; +private final static int MAX_QUEUED_REQUESTS = Integer.getInteger("cassandra.max_queued_native_transport_requests", 128); private final static String THREAD_FACTORY_ID = "Native-Transport-Requests"; private final TracingAwareExecutorService wrapped = SHARED.newExecutor(DatabaseDescriptor.getNativeTransportMaxThreads(), MAX_QUEUED_REQUESTS,
[01/50] [abbrv] cassandra git commit: Ninja: move ProposeCallback.response() logging to trace
Repository: cassandra Updated Branches: refs/heads/cassandra-2.1 95b2d0241 -> 6fb89b905 refs/heads/cassandra-2.2 ad4a91da7 -> 465496f3a refs/heads/cassandra-3.0 4bc3aa933 -> ade38b207 refs/heads/cassandra-3.9 c11c7d73d -> bb371eada refs/heads/trunk 105054471 -> 944608428 Ninja: move ProposeCallback.response() logging to trace This is on the client request path, and can spam the debug log. This was already moved to trace-level logging in trunk, I'm simply backporting it to 2.2. +1'ed on IRC by Paulo Motta and Jeff Jirsa Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/23d48224 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/23d48224 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/23d48224 Branch: refs/heads/cassandra-3.9 Commit: 23d4822439da2110b20348d3475ec6ee0546 Parents: 465bb5d Author: Tyler HobbsAuthored: Wed Aug 24 16:50:27 2016 -0500 Committer: Tyler Hobbs Committed: Wed Aug 24 16:50:27 2016 -0500 -- src/java/org/apache/cassandra/service/paxos/ProposeCallback.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/23d48224/src/java/org/apache/cassandra/service/paxos/ProposeCallback.java -- diff --git a/src/java/org/apache/cassandra/service/paxos/ProposeCallback.java b/src/java/org/apache/cassandra/service/paxos/ProposeCallback.java index 018dab9..b0bd163 100644 --- a/src/java/org/apache/cassandra/service/paxos/ProposeCallback.java +++ b/src/java/org/apache/cassandra/service/paxos/ProposeCallback.java @@ -59,7 +59,7 @@ public class ProposeCallback extends AbstractPaxosCallback public void response(MessageIn msg) { -logger.debug("Propose response {} from {}", msg.payload, msg.from); +logger.trace("Propose response {} from {}", msg.payload, msg.from); if (msg.payload) accepts.incrementAndGet();
[16/50] [abbrv] cassandra git commit: Fixing double division and rounding.
Fixing double division and rounding. Patch by Per Otterstrom; reviewed by dbrosius for CASSANDRA-11752 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/ac24b88e Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ac24b88e Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ac24b88e Branch: refs/heads/cassandra-3.9 Commit: ac24b88e56275583b71bd6a1feba443e05e88c39 Parents: 6eff082 Author: Per OtterstromAuthored: Tue Aug 30 22:33:49 2016 -0400 Committer: Dave Brosius Committed: Tue Aug 30 22:33:49 2016 -0400 -- .../metrics/DecayingEstimatedHistogramReservoir.java | 8 1 file changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/ac24b88e/src/java/org/apache/cassandra/metrics/DecayingEstimatedHistogramReservoir.java -- diff --git a/src/java/org/apache/cassandra/metrics/DecayingEstimatedHistogramReservoir.java b/src/java/org/apache/cassandra/metrics/DecayingEstimatedHistogramReservoir.java index 14a4366..2458164 100644 --- a/src/java/org/apache/cassandra/metrics/DecayingEstimatedHistogramReservoir.java +++ b/src/java/org/apache/cassandra/metrics/DecayingEstimatedHistogramReservoir.java @@ -179,7 +179,7 @@ public class DecayingEstimatedHistogramReservoir implements Reservoir try { -decayingBuckets.getAndAdd(index, forwardDecayWeight(now)); +decayingBuckets.getAndAdd(index, Math.round(forwardDecayWeight(now))); } finally { @@ -189,9 +189,9 @@ public class DecayingEstimatedHistogramReservoir implements Reservoir buckets.getAndIncrement(index); } -private long forwardDecayWeight(long now) +private double forwardDecayWeight(long now) { -return Math.round(Math.exp(((now - decayLandmark) / 1000L) / MEAN_LIFETIME_IN_S)); +return Math.exp(((now - decayLandmark) / 1000L) / MEAN_LIFETIME_IN_S); } /** @@ -270,7 +270,7 @@ public class DecayingEstimatedHistogramReservoir implements Reservoir try { -final long rescaleFactor = forwardDecayWeight(now); +final double rescaleFactor = forwardDecayWeight(now); decayLandmark = now; final int bucketCount = decayingBuckets.length();
[12/50] [abbrv] cassandra git commit: Fail repair on non-existing table
Fail repair on non-existing table Patch by Masataka Yamaguchi; Reviewed by Paulo Motta for CASSANDRA-12279 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/acd46ab7 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/acd46ab7 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/acd46ab7 Branch: refs/heads/cassandra-3.9 Commit: acd46ab7c4e185e474026a0bfecdd2c5e77bf46d Parents: 5f6a124 Author: Masataka YamaguchiAuthored: Wed Aug 24 17:15:41 2016 +0900 Committer: Aleksey Yeschenko Committed: Tue Aug 30 16:31:41 2016 +0100 -- CHANGES.txt | 1 + .../apache/cassandra/repair/RepairRunnable.java | 18 ++ 2 files changed, 15 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/acd46ab7/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 001a389..74c44f8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.2.8 + * Fail repair on non-existing table (CASSANDRA-12279) * cqlsh copy: fix missing counter values (CASSANDRA-12476) * Move migration tasks to non-periodic queue, assure flush executor shutdown after non-periodic executor (CASSANDRA-12251) * cqlsh copy: fixed possible race in initializing feeding thread (CASSANDRA-11701) http://git-wip-us.apache.org/repos/asf/cassandra/blob/acd46ab7/src/java/org/apache/cassandra/repair/RepairRunnable.java -- diff --git a/src/java/org/apache/cassandra/repair/RepairRunnable.java b/src/java/org/apache/cassandra/repair/RepairRunnable.java index f92310b..0f2e839 100644 --- a/src/java/org/apache/cassandra/repair/RepairRunnable.java +++ b/src/java/org/apache/cassandra/repair/RepairRunnable.java @@ -102,7 +102,7 @@ public class RepairRunnable extends WrappedRunnable implements ProgressEventNoti protected void fireErrorAndComplete(String tag, int progressCount, int totalProgress, String message) { fireProgressEvent(tag, new ProgressEvent(ProgressEventType.ERROR, progressCount, totalProgress, message)); -fireProgressEvent(tag, new ProgressEvent(ProgressEventType.COMPLETE, progressCount, totalProgress)); +fireProgressEvent(tag, new ProgressEvent(ProgressEventType.COMPLETE, progressCount, totalProgress, String.format("Repair command #%d finished with error", cmd))); } protected void runMayThrow() throws Exception @@ -112,11 +112,21 @@ public class RepairRunnable extends WrappedRunnable implements ProgressEventNoti final String tag = "repair:" + cmd; final AtomicInteger progress = new AtomicInteger(); -final int totalProgress = 3 + options.getRanges().size(); // calculate neighbors, validation, prepare for repair + number of ranges to repair +final int totalProgress = 4 + options.getRanges().size(); // get valid column families, calculate neighbors, validation, prepare for repair + number of ranges to repair String[] columnFamilies = options.getColumnFamilies().toArray(new String[options.getColumnFamilies().size()]); -Iterable validColumnFamilies = storageService.getValidColumnFamilies(false, false, keyspace, - columnFamilies); +Iterable validColumnFamilies; +try +{ +validColumnFamilies = storageService.getValidColumnFamilies(false, false, keyspace, columnFamilies); +progress.incrementAndGet(); +} +catch (IllegalArgumentException e) +{ +logger.error("Repair failed:", e); +fireErrorAndComplete(tag, progress.get(), totalProgress, e.getMessage()); +return; +} final long startTime = System.currentTimeMillis(); String message = String.format("Starting repair command #%d, repairing keyspace %s with %s", cmd, keyspace,
[04/50] [abbrv] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0
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/431ecdb6 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/431ecdb6 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/431ecdb6 Branch: refs/heads/cassandra-3.9 Commit: 431ecdb6b4dd01c4f32d9a64a7cef2a107d1366c Parents: 407dc30 b9fc6a5 Author: Stefania AlborghettiAuthored: Thu Aug 25 09:10:20 2016 +0800 Committer: Stefania Alborghetti Committed: Thu Aug 25 09:10:20 2016 +0800 -- CHANGES.txt| 1 + pylib/cqlshlib/copyutil.py | 16 +--- 2 files changed, 14 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/431ecdb6/CHANGES.txt -- diff --cc CHANGES.txt index bd1fc5d,001a389..9bd0434 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,43 -1,5 +1,44 @@@ -2.2.8 +3.0.9 + * Disk failure policy should not be invoked on out of space (CASSANDRA-12385) + * Calculate last compacted key on startup (CASSANDRA-6216) + * Add schema to snapshot manifest, add USING TIMESTAMP clause to ALTER TABLE statements (CASSANDRA-7190) + * Fix clean interval not sent to commit log for empty memtable flush (CASSANDRA-12436) + * Fix potential resource leak in RMIServerSocketFactoryImpl (CASSANDRA-12331) + * Backport CASSANDRA-12002 (CASSANDRA-12177) + * Make sure compaction stats are updated when compaction is interrupted (CASSANDRA-12100) + * Fix potential bad messaging service message for paged range reads + within mixed-version 3.x clusters (CASSANDRA-12249) + * Change commitlog and sstables to track dirty and clean intervals (CASSANDRA-11828) + * NullPointerException during compaction on table with static columns (CASSANDRA-12336) + * Fixed ConcurrentModificationException when reading metrics in GraphiteReporter (CASSANDRA-11823) + * Fix upgrade of super columns on thrift (CASSANDRA-12335) + * Fixed flacky BlacklistingCompactionsTest, switched to fixed size types and increased corruption size (CASSANDRA-12359) + * Rerun ReplicationAwareTokenAllocatorTest on failure to avoid flakiness (CASSANDRA-12277) + * Exception when computing read-repair for range tombstones (CASSANDRA-12263) + * Lost counter writes in compact table and static columns (CASSANDRA-12219) + * AssertionError with MVs on updating a row that isn't indexed due to a null value (CASSANDRA-12247) + * Disable RR and speculative retry with EACH_QUORUM reads (CASSANDRA-11980) + * Add option to override compaction space check (CASSANDRA-12180) + * Faster startup by only scanning each directory for temporary files once (CASSANDRA-12114) + * Respond with v1/v2 protocol header when responding to driver that attempts + to connect with too low of a protocol version (CASSANDRA-11464) + * NullPointerExpception when reading/compacting table (CASSANDRA-11988) + * Fix problem with undeleteable rows on upgrade to new sstable format (CASSANDRA-12144) + * Fix paging logic for deleted partitions with static columns (CASSANDRA-12107) + * Wait until the message is being send to decide which serializer must be used (CASSANDRA-11393) + * Fix migration of static thrift column names with non-text comparators (CASSANDRA-12147) + * Fix upgrading sparse tables that are incorrectly marked as dense (CASSANDRA-11315) + * Fix reverse queries ignoring range tombstones (CASSANDRA-11733) + * Avoid potential race when rebuilding CFMetaData (CASSANDRA-12098) + * Avoid missing sstables when getting the canonical sstables (CASSANDRA-11996) + * Always select the live sstables when getting sstables in bounds (CASSANDRA-11944) + * Fix column ordering of results with static columns for Thrift requests in + a mixed 2.x/3.x cluster, also fix potential non-resolved duplication of + those static columns in query results (CASSANDRA-12123) + * Avoid digest mismatch with empty but static rows (CASSANDRA-12090) + * Fix EOF exception when altering column type (CASSANDRA-11820) +Merged from 2.2: + * cqlsh copy: fix missing counter values (CASSANDRA-12476) * Move migration tasks to non-periodic queue, assure flush executor shutdown after non-periodic executor (CASSANDRA-12251) * cqlsh copy: fixed possible race in initializing feeding thread (CASSANDRA-11701) * Only set broadcast_rpc_address on Ec2MultiRegionSnitch if it's not set (CASSANDRA-11357) http://git-wip-us.apache.org/repos/asf/cassandra/blob/431ecdb6/pylib/cqlshlib/copyutil.py --
[19/50] [abbrv] cassandra git commit: Forward writes to replacement node when replace_address != broadcast_address
Forward writes to replacement node when replace_address != broadcast_address Patch by Paulo Motta; reviewed by Richard Low for CASSANDRA-8523 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b39d984f Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b39d984f Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b39d984f Branch: refs/heads/cassandra-3.9 Commit: b39d984f7bd682c7638415d65dcc4ac9bcb74e5f Parents: 6eff082 Author: Paulo MottaAuthored: Fri Jun 17 21:09:31 2016 -0300 Committer: Aleksey Yeschenko Committed: Wed Aug 31 20:21:30 2016 +0100 -- CHANGES.txt | 1 + src/java/org/apache/cassandra/gms/Gossiper.java | 5 +- .../apache/cassandra/gms/VersionedValue.java| 6 + .../apache/cassandra/locator/TokenMetadata.java | 54 ++- .../cassandra/service/LoadBroadcaster.java | 2 +- .../cassandra/service/StorageService.java | 139 +++ 6 files changed, 177 insertions(+), 30 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/b39d984f/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 0f7cf0e..d7e9394 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.2.8 + * Forward writes to replacement node when replace_address != broadcast_address (CASSANDRA-8523) * Enable repair -pr and -local together (fix regression of CASSANDRA-7450) (CASSANDRA-12522) * Fail repair on non-existing table (CASSANDRA-12279) * cqlsh copy: fix missing counter values (CASSANDRA-12476) http://git-wip-us.apache.org/repos/asf/cassandra/blob/b39d984f/src/java/org/apache/cassandra/gms/Gossiper.java -- diff --git a/src/java/org/apache/cassandra/gms/Gossiper.java b/src/java/org/apache/cassandra/gms/Gossiper.java index 00e3da8..a8f9524 100644 --- a/src/java/org/apache/cassandra/gms/Gossiper.java +++ b/src/java/org/apache/cassandra/gms/Gossiper.java @@ -76,6 +76,7 @@ public class Gossiper implements IFailureDetectionEventListener, GossiperMBean static { SILENT_SHUTDOWN_STATES.addAll(DEAD_STATES); SILENT_SHUTDOWN_STATES.add(VersionedValue.STATUS_BOOTSTRAPPING); + SILENT_SHUTDOWN_STATES.add(VersionedValue.STATUS_BOOTSTRAPPING_REPLACE); } private volatile ScheduledFuture scheduledGossipTask; @@ -333,10 +334,12 @@ public class Gossiper implements IFailureDetectionEventListener, GossiperMBean if (epState == null) return; -logger.debug("Convicting {} with status {} - alive {}", endpoint, getGossipStatus(epState), epState.isAlive()); if (!epState.isAlive()) return; +logger.debug("Convicting {} with status {} - alive {}", endpoint, getGossipStatus(epState), epState.isAlive()); + + if (isShutdown(endpoint)) { markAsShutdown(endpoint); http://git-wip-us.apache.org/repos/asf/cassandra/blob/b39d984f/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 3ea7bb4..661d3ba 100644 --- a/src/java/org/apache/cassandra/gms/VersionedValue.java +++ b/src/java/org/apache/cassandra/gms/VersionedValue.java @@ -65,6 +65,7 @@ public class VersionedValue implements Comparable // values for ApplicationState.STATUS public final static String STATUS_BOOTSTRAPPING = "BOOT"; +public final static String STATUS_BOOTSTRAPPING_REPLACE = "BOOT_REPLACE"; public final static String STATUS_NORMAL = "NORMAL"; public final static String STATUS_LEAVING = "LEAVING"; public final static String STATUS_LEFT = "LEFT"; @@ -133,6 +134,11 @@ public class VersionedValue implements Comparable return new VersionedValue(value.value); } +public VersionedValue bootReplacing(InetAddress oldNode) +{ +return new VersionedValue(versionString(VersionedValue.STATUS_BOOTSTRAPPING_REPLACE, oldNode.getHostAddress())); +} + public VersionedValue bootstrapping(Collection tokens) { return new VersionedValue(versionString(VersionedValue.STATUS_BOOTSTRAPPING, http://git-wip-us.apache.org/repos/asf/cassandra/blob/b39d984f/src/java/org/apache/cassandra/locator/TokenMetadata.java -- diff --git a/src/java/org/apache/cassandra/locator/TokenMetadata.java b/src/java/org/apache/cassandra/locator/TokenMetadata.java index de16fda..b06c9c8 100644 ---
[06/50] [abbrv] cassandra git commit: Fix ant eclipse-warnings in 2.2
Fix ant eclipse-warnings in 2.2 Patch by Sam Tunnicliffe; reviewed by Tyler Hobbs for CASSANDRA-15258 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/5f6a1248 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5f6a1248 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5f6a1248 Branch: refs/heads/cassandra-3.9 Commit: 5f6a124853e55db9953e4e2fc717f9e9fe76d1d7 Parents: b9fc6a5 Author: Sam TunnicliffeAuthored: Wed Aug 24 13:02:44 2016 +0100 Committer: Sam Tunnicliffe Committed: Fri Aug 26 10:43:55 2016 +0100 -- src/java/org/apache/cassandra/db/ColumnFamilyStore.java | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/5f6a1248/src/java/org/apache/cassandra/db/ColumnFamilyStore.java -- diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java index 0835a28..644d1f5 100644 --- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java +++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java @@ -901,7 +901,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean previousFlushFailure); logFlush(); Flush flush = new Flush(false); -ListenableFutureTask flushTask = ListenableFutureTask.create(flush, null); +ListenableFutureTask flushTask = ListenableFutureTask.create(flush, null); flushExecutor.submit(flushTask); ListenableFutureTask task = ListenableFutureTask.create(flush.postFlush); postFlushExecutor.submit(task); @@ -910,6 +910,9 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean ListenableFuture future = // If either of the two tasks errors out, resulting future must also error out. // Combine the two futures and only return post-flush result after both have completed. +// Note that flushTask will always yield null, but Futures.allAsList is +// order preserving, which is why the transform function returns the result +// from item 1 in it's input list (i.e. what was yielded by task). Futures.transform(Futures.allAsList(flushTask, task), new Function () {
[31/50] [abbrv] cassandra git commit: Fix NPE in SSTableLoader when specifying partial directory path
Fix NPE in SSTableLoader when specifying partial directory path patch by hkroger reviewed by dbrosius for CASSANDRA-12609 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/893fd21b Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/893fd21b Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/893fd21b Branch: refs/heads/cassandra-3.9 Commit: 893fd21b52254b1f7d68d87f6cf5f77f3010734b Parents: fa14804 Author: Hannu KrögerAuthored: Sun Sep 4 10:36:37 2016 -0400 Committer: Dave Brosius Committed: Sun Sep 4 10:36:37 2016 -0400 -- CHANGES.txt | 1 + src/java/org/apache/cassandra/tools/BulkLoader.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/893fd21b/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 21fc42c..798496a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -48,6 +48,7 @@ * Avoid digest mismatch with empty but static rows (CASSANDRA-12090) * Fix EOF exception when altering column type (CASSANDRA-11820) * Fix JsonTransformer output of partition with deletion info (CASSANDRA-12418) + * Fix NPE in SSTableLoader when specifying partial directory path (CASSANDRA-12609) Merged from 2.2: * Add local address entry in PropertyFileSnitch (CASSANDRA-11332) * cqlshlib tests: increase default execute timeout (CASSANDRA-12481) http://git-wip-us.apache.org/repos/asf/cassandra/blob/893fd21b/src/java/org/apache/cassandra/tools/BulkLoader.java -- diff --git a/src/java/org/apache/cassandra/tools/BulkLoader.java b/src/java/org/apache/cassandra/tools/BulkLoader.java index 2b2db15..9dba1b2 100644 --- a/src/java/org/apache/cassandra/tools/BulkLoader.java +++ b/src/java/org/apache/cassandra/tools/BulkLoader.java @@ -77,7 +77,7 @@ public class BulkLoader LoaderOptions options = LoaderOptions.parseArgs(args).validateArguments(); OutputHandler handler = new OutputHandler.SystemOutput(options.verbose, options.debug); SSTableLoader loader = new SSTableLoader( -options.directory, +options.directory.getAbsoluteFile(), new ExternalClient( options.hosts, options.nativePort,
[42/50] [abbrv] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
Merge branch 'cassandra-2.1' into cassandra-2.2 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/465496f3 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/465496f3 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/465496f3 Branch: refs/heads/cassandra-2.2 Commit: 465496f3a356f44d3754adbc1cbe305100854956 Parents: ad4a91d 6fb89b9 Author: Nate McCallAuthored: Tue Sep 20 14:10:10 2016 +1200 Committer: Nate McCall Committed: Tue Sep 20 14:11:33 2016 +1200 -- CHANGES.txt | 3 ++- .../org/apache/cassandra/transport/RequestThreadPoolExecutor.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/465496f3/CHANGES.txt -- diff --cc CHANGES.txt index fae713e,1438e98..6c5fded --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,33 -1,7 +1,34 @@@ -2.1.16 +2.2.8 + * Add local address entry in PropertyFileSnitch (CASSANDRA-11332) + * cqlshlib tests: increase default execute timeout (CASSANDRA-12481) + * Forward writes to replacement node when replace_address != broadcast_address (CASSANDRA-8523) + * Enable repair -pr and -local together (fix regression of CASSANDRA-7450) (CASSANDRA-12522) + * Fail repair on non-existing table (CASSANDRA-12279) + * cqlsh copy: fix missing counter values (CASSANDRA-12476) + * Move migration tasks to non-periodic queue, assure flush executor shutdown after non-periodic executor (CASSANDRA-12251) + * cqlsh copy: fixed possible race in initializing feeding thread (CASSANDRA-11701) + * Only set broadcast_rpc_address on Ec2MultiRegionSnitch if it's not set (CASSANDRA-11357) + * Update StorageProxy range metrics for timeouts, failures and unavailables (CASSANDRA-9507) + * Add Sigar to classes included in clientutil.jar (CASSANDRA-11635) + * Add decay to histograms and timers used for metrics (CASSANDRA-11752) + * Fix hanging stream session (CASSANDRA-10992) + * Add byteman support for testing (CASSANDRA-12377) + * Fix INSERT JSON, fromJson() support of smallint, tinyint types (CASSANDRA-12371) + * Restore JVM metric export for metric reporters (CASSANDRA-12312) + * Release sstables of failed stream sessions only when outgoing transfers are finished (CASSANDRA-11345) + * Revert CASSANDRA-11427 (CASSANDRA-12351) + * Wait for tracing events before returning response and query at same consistency level client side (CASSANDRA-11465) + * cqlsh copyutil should get host metadata by connected address (CASSANDRA-11979) + * Fixed cqlshlib.test.remove_test_db (CASSANDRA-12214) + * Synchronize ThriftServer::stop() (CASSANDRA-12105) + * Use dedicated thread for JMX notifications (CASSANDRA-12146) + * NPE when trying to remove purgable tombstones from result (CASSANDRA-12143) + * Improve streaming synchronization and fault tolerance (CASSANDRA-11414) + * MemoryUtil.getShort() should return an unsigned short also for architectures not supporting unaligned memory accesses (CASSANDRA-11973) + * Don't write shadowed range tombstone (CASSANDRA-12030) +Merged from 2.1: - * Fix queries with empty ByteBuffer values in clustering column restrictions (CASSANDRA-12127) + * Add system property to set the max number of native transport requests in queue (CASSANDRA-11363) - * Include column family parameter when -st and -et are provided (CASSANDRA-11866) + * Fix queries with empty ByteBuffer values in clustering column restrictions (CASSANDRA-12127) * Disable passing control to post-flush after flush failure to prevent data loss (CASSANDRA-11828) * Allow STCS-in-L0 compactions to reduce scope with LCS (CASSANDRA-12040) * cannot use cql since upgrading python to 2.7.11+ (CASSANDRA-11850) http://git-wip-us.apache.org/repos/asf/cassandra/blob/465496f3/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java -- diff --cc src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java index 289f3e3,75b983a..75dd05d --- a/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java +++ b/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java @@@ -30,12 -30,12 +30,12 @@@ import static org.apache.cassandra.conc public class RequestThreadPoolExecutor extends AbstractEventExecutor { - private final static int MAX_QUEUED_REQUESTS = 128; + private final static int MAX_QUEUED_REQUESTS = Integer.getInteger("cassandra.max_queued_native_transport_requests", 128); private final static String THREAD_FACTORY_ID = "Native-Transport-Requests"; -private final TracingAwareExecutorService
[02/50] [abbrv] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0
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/407dc30e Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/407dc30e Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/407dc30e Branch: refs/heads/cassandra-3.9 Commit: 407dc30e277e99644805b6a93f432bd5e80fbd3d Parents: fe3f3da 23d4822 Author: Tyler HobbsAuthored: Wed Aug 24 16:52:27 2016 -0500 Committer: Tyler Hobbs Committed: Wed Aug 24 16:52:27 2016 -0500 -- src/java/org/apache/cassandra/service/paxos/ProposeCallback.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --
[jira] [Commented] (CASSANDRA-12659) Query in reversed order brough back deleted data
[ https://issues.apache.org/jira/browse/CASSANDRA-12659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15505312#comment-15505312 ] Aleksey Yeschenko commented on CASSANDRA-12659: --- Could be a duplicate of CASSANDRA-11733. > Query in reversed order brough back deleted data > > > Key: CASSANDRA-12659 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12659 > Project: Cassandra > Issue Type: Bug > Components: Core > Environment: Cassandra 3.0.5, 6 nodes cluster >Reporter: Tai Khuu Tan > > We have and issues with our Cassandra 3.0.5. After we deleted a large amount > of data in the multiple partition keys. Query those partition keys with > reversed order on a clustering key return the deleted data. I have checked > and there are no tombstones left. All of them are deleted. So I don't know > where or how can those deleted data still exist. Is there any other place > that Cassandra will read data when query in reverse order compare to normal > order ? > the schema is very simple > {noformat} > CREATE TABLE table ( uid varchar, version timestamp, data1 varchar, data2 > varchar, data3 varchar, data4 varchar, data5 varchar, PRIMARY KEY (uid, > version, data1 , data2 , data3 , data4 ) ) with compact storage; > {noformat} > Query are doing reverse order on column timestamp > Ex: > {noformat} > select * from data where uid="uid1" order by version DESC > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-6276) CQL: Map can not be created with the same name as a previously dropped list
[ https://issues.apache.org/jira/browse/CASSANDRA-6276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15505270#comment-15505270 ] Aleksey Yeschenko commented on CASSANDRA-6276: -- Dirty but also unsafe. There is a reason the limitation is there in the first place - try to 'work around it' and risk corruption. > CQL: Map can not be created with the same name as a previously dropped list > --- > > Key: CASSANDRA-6276 > URL: https://issues.apache.org/jira/browse/CASSANDRA-6276 > Project: Cassandra > Issue Type: Bug > Environment: Cassandra 2.0.2 | CQL spec 3.1.0 > centos 64 bit > Java(TM) SE Runtime Environment (build 1.7.0-b147) >Reporter: Oli Schacher >Assignee: Benjamin Lerer >Priority: Minor > Labels: cql > Fix For: 2.0.10 > > Attachments: 6272-2.0.txt, CASSANDRA-6276-V2.txt, CASSANDRA-6276.txt > > > If create a list, drop it and create a map with the same name, i get "Bad > Request: comparators do not match or are not compatible." > {quote} > cqlsh:os_test1> create table thetable(id timeuuid primary key, somevalue > text); > cqlsh:os_test1> alter table thetable add mycollection list; > cqlsh:os_test1> alter table thetable drop mycollection; > cqlsh:os_test1> alter table thetable add mycollection map; > Bad Request: comparators do not match or are not compatible. > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-11090) Hinted Handoff loop
[ https://issues.apache.org/jira/browse/CASSANDRA-11090?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15505264#comment-15505264 ] Aleksey Yeschenko commented on CASSANDRA-11090: --- That doesn't seem like a problem to me - that's the way it should work. The original issue was causing empty hint files to be created and deleted every 10 seconds, this seems to be processing non-empty hint files every minute, as intended. > Hinted Handoff loop > --- > > Key: CASSANDRA-11090 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11090 > Project: Cassandra > Issue Type: Bug >Reporter: Blake Eggleston >Assignee: Aleksey Yeschenko >Priority: Minor > Fix For: 3.0.4, 3.4 > > > After the hints executor finishes sending hints, another hints file is > created for the same host, which is then processed on the next go around. > This continues indefinitely. The new hint files are empty, so there shouldn't > be any network traffic. However, there's still unnecessary hint activity, and > the hint crc file isn't deleted in the 3.0 branch after hints are dispatched > (but is in trunk), so any hint activity will trigger ~8640 files being > created per day until the node is restarted. Restarting the node fixes the > problem, after the existing hint files are processed. > This can be duplicated on cassandra-3.0 to trunk with this script: > https://gist.github.com/bdeggleston/13fbb9e70c0c0bd277c7 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-12516) Interned column identifiers can be overridden incorrectly
[ https://issues.apache.org/jira/browse/CASSANDRA-12516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15505259#comment-15505259 ] Stefania commented on CASSANDRA-12516: -- Thanks for the review, committed to 3.0 as 4bc3aa93337474a29bc4ad43ff4438755c9c7ab8 and merged into trunk. > Interned column identifiers can be overridden incorrectly > - > > Key: CASSANDRA-12516 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12516 > Project: Cassandra > Issue Type: Bug > Components: Local Write-Read Paths >Reporter: Aleksey Yeschenko >Assignee: Stefania > Fix For: 3.10, 3.0.10 > > > As discovered by [~Stefania] in CASSANDRA-12423, our use of > {{ColumnIdentifier.internedInstances}} to map byte buffer column names to > column identifiers is incorrect. It's possible for two non-equal > {{ColumnIdentifier}} instances to have the same {{ByteBuffer}} as raw name, > and yet different text representations, due to different column name types, > leading to hard to debug correctness issues. > Should either amend the map to have the type as part of the key, or limit the > use of that map. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12516) Interned column identifiers can be overridden incorrectly
[ https://issues.apache.org/jira/browse/CASSANDRA-12516?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stefania updated CASSANDRA-12516: - Component/s: Local Write-Read Paths > Interned column identifiers can be overridden incorrectly > - > > Key: CASSANDRA-12516 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12516 > Project: Cassandra > Issue Type: Bug > Components: Local Write-Read Paths >Reporter: Aleksey Yeschenko >Assignee: Stefania > Fix For: 3.10, 3.0.10 > > > As discovered by [~Stefania] in CASSANDRA-12423, our use of > {{ColumnIdentifier.internedInstances}} to map byte buffer column names to > column identifiers is incorrect. It's possible for two non-equal > {{ColumnIdentifier}} instances to have the same {{ByteBuffer}} as raw name, > and yet different text representations, due to different column name types, > leading to hard to debug correctness issues. > Should either amend the map to have the type as part of the key, or limit the > use of that map. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12516) Interned column identifiers can be overridden incorrectly
[ https://issues.apache.org/jira/browse/CASSANDRA-12516?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stefania updated CASSANDRA-12516: - Resolution: Fixed Fix Version/s: (was: 3.0.x) (was: 3.x) 3.0.10 3.10 Status: Resolved (was: Ready to Commit) > Interned column identifiers can be overridden incorrectly > - > > Key: CASSANDRA-12516 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12516 > Project: Cassandra > Issue Type: Bug > Components: Local Write-Read Paths >Reporter: Aleksey Yeschenko >Assignee: Stefania > Fix For: 3.10, 3.0.10 > > > As discovered by [~Stefania] in CASSANDRA-12423, our use of > {{ColumnIdentifier.internedInstances}} to map byte buffer column names to > column identifiers is incorrect. It's possible for two non-equal > {{ColumnIdentifier}} instances to have the same {{ByteBuffer}} as raw name, > and yet different text representations, due to different column name types, > leading to hard to debug correctness issues. > Should either amend the map to have the type as part of the key, or limit the > use of that map. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[2/3] cassandra git commit: Extend ColumnIdentifier.internedInstances key to include the type that generated the byte buffer
Extend ColumnIdentifier.internedInstances key to include the type that generated the byte buffer patch by Stefania Alborghetti; reviewed by Aleksey Yeschenko for CASSANDRA-12516 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4bc3aa93 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4bc3aa93 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4bc3aa93 Branch: refs/heads/trunk Commit: 4bc3aa93337474a29bc4ad43ff4438755c9c7ab8 Parents: 85ed48a Author: Stefania AlborghettiAuthored: Fri Sep 2 16:28:35 2016 +0800 Committer: Stefania Alborghetti Committed: Tue Sep 20 09:26:38 2016 +0800 -- CHANGES.txt | 1 + .../apache/cassandra/cql3/ColumnIdentifier.java | 46 +--- .../apache/cassandra/schema/SchemaKeyspace.java | 6 ++- .../utils/NativeSSTableLoaderClient.java| 6 ++- .../cassandra/cql3/ColumnIdentifierTest.java| 24 ++ 5 files changed, 72 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/4bc3aa93/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 5fd8e5e..b61c76c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 3.0.10 + * Extend ColumnIdentifier.internedInstances key to include the type that generated the byte buffer (CASSANDRA-12516) * Backport CASSANDRA-10756 (race condition in NativeTransportService shutdown) (CASSANDRA-12472) http://git-wip-us.apache.org/repos/asf/cassandra/blob/4bc3aa93/src/java/org/apache/cassandra/cql3/ColumnIdentifier.java -- diff --git a/src/java/org/apache/cassandra/cql3/ColumnIdentifier.java b/src/java/org/apache/cassandra/cql3/ColumnIdentifier.java index afb65e1..1e25b23 100644 --- a/src/java/org/apache/cassandra/cql3/ColumnIdentifier.java +++ b/src/java/org/apache/cassandra/cql3/ColumnIdentifier.java @@ -60,7 +60,38 @@ public class ColumnIdentifier extends Selectable implements IMeasurableMemory, C private static final long EMPTY_SIZE = ObjectSizes.measure(new ColumnIdentifier(ByteBufferUtil.EMPTY_BYTE_BUFFER, "", false)); -private static final ConcurrentMap internedInstances = new MapMaker().weakValues().makeMap(); +private static final ConcurrentMap internedInstances = new MapMaker().weakValues().makeMap(); + +private static final class InternedKey +{ +private final AbstractType type; +private final ByteBuffer bytes; + +InternedKey(AbstractType type, ByteBuffer bytes) +{ +this.type = type; +this.bytes = bytes; +} + +@Override +public boolean equals(Object o) +{ +if (this == o) +return true; + +if (o == null || getClass() != o.getClass()) +return false; + +InternedKey that = (InternedKey) o; +return bytes.equals(that.bytes) && type.equals(that.type); +} + +@Override +public int hashCode() +{ +return bytes.hashCode() + 31 * type.hashCode(); +} +} private static long prefixComparison(ByteBuffer bytes) { @@ -103,24 +134,25 @@ public class ColumnIdentifier extends Selectable implements IMeasurableMemory, C public static ColumnIdentifier getInterned(ByteBuffer bytes, AbstractType type) { -return getInterned(bytes, type.getString(bytes)); +return getInterned(type, bytes, type.getString(bytes)); } public static ColumnIdentifier getInterned(String rawText, boolean keepCase) { String text = keepCase ? rawText : rawText.toLowerCase(Locale.US); ByteBuffer bytes = ByteBufferUtil.bytes(text); -return getInterned(bytes, text); +return getInterned(UTF8Type.instance, bytes, text); } -public static ColumnIdentifier getInterned(ByteBuffer bytes, String text) +public static ColumnIdentifier getInterned(AbstractType type, ByteBuffer bytes, String text) { -ColumnIdentifier id = internedInstances.get(bytes); +InternedKey key = new InternedKey(type, bytes); +ColumnIdentifier id = internedInstances.get(key); if (id != null) return id; ColumnIdentifier created = new ColumnIdentifier(bytes, text, true); -ColumnIdentifier previous = internedInstances.putIfAbsent(bytes, created); +ColumnIdentifier previous = internedInstances.putIfAbsent(key, created); return previous == null ? created : previous; } @@ -246,7
[1/3] cassandra git commit: Extend ColumnIdentifier.internedInstances key to include the type that generated the byte buffer
Repository: cassandra Updated Branches: refs/heads/cassandra-3.0 85ed48a1d -> 4bc3aa933 refs/heads/trunk d43b9ce50 -> 105054471 Extend ColumnIdentifier.internedInstances key to include the type that generated the byte buffer patch by Stefania Alborghetti; reviewed by Aleksey Yeschenko for CASSANDRA-12516 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4bc3aa93 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4bc3aa93 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4bc3aa93 Branch: refs/heads/cassandra-3.0 Commit: 4bc3aa93337474a29bc4ad43ff4438755c9c7ab8 Parents: 85ed48a Author: Stefania AlborghettiAuthored: Fri Sep 2 16:28:35 2016 +0800 Committer: Stefania Alborghetti Committed: Tue Sep 20 09:26:38 2016 +0800 -- CHANGES.txt | 1 + .../apache/cassandra/cql3/ColumnIdentifier.java | 46 +--- .../apache/cassandra/schema/SchemaKeyspace.java | 6 ++- .../utils/NativeSSTableLoaderClient.java| 6 ++- .../cassandra/cql3/ColumnIdentifierTest.java| 24 ++ 5 files changed, 72 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/4bc3aa93/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 5fd8e5e..b61c76c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 3.0.10 + * Extend ColumnIdentifier.internedInstances key to include the type that generated the byte buffer (CASSANDRA-12516) * Backport CASSANDRA-10756 (race condition in NativeTransportService shutdown) (CASSANDRA-12472) http://git-wip-us.apache.org/repos/asf/cassandra/blob/4bc3aa93/src/java/org/apache/cassandra/cql3/ColumnIdentifier.java -- diff --git a/src/java/org/apache/cassandra/cql3/ColumnIdentifier.java b/src/java/org/apache/cassandra/cql3/ColumnIdentifier.java index afb65e1..1e25b23 100644 --- a/src/java/org/apache/cassandra/cql3/ColumnIdentifier.java +++ b/src/java/org/apache/cassandra/cql3/ColumnIdentifier.java @@ -60,7 +60,38 @@ public class ColumnIdentifier extends Selectable implements IMeasurableMemory, C private static final long EMPTY_SIZE = ObjectSizes.measure(new ColumnIdentifier(ByteBufferUtil.EMPTY_BYTE_BUFFER, "", false)); -private static final ConcurrentMap internedInstances = new MapMaker().weakValues().makeMap(); +private static final ConcurrentMap internedInstances = new MapMaker().weakValues().makeMap(); + +private static final class InternedKey +{ +private final AbstractType type; +private final ByteBuffer bytes; + +InternedKey(AbstractType type, ByteBuffer bytes) +{ +this.type = type; +this.bytes = bytes; +} + +@Override +public boolean equals(Object o) +{ +if (this == o) +return true; + +if (o == null || getClass() != o.getClass()) +return false; + +InternedKey that = (InternedKey) o; +return bytes.equals(that.bytes) && type.equals(that.type); +} + +@Override +public int hashCode() +{ +return bytes.hashCode() + 31 * type.hashCode(); +} +} private static long prefixComparison(ByteBuffer bytes) { @@ -103,24 +134,25 @@ public class ColumnIdentifier extends Selectable implements IMeasurableMemory, C public static ColumnIdentifier getInterned(ByteBuffer bytes, AbstractType type) { -return getInterned(bytes, type.getString(bytes)); +return getInterned(type, bytes, type.getString(bytes)); } public static ColumnIdentifier getInterned(String rawText, boolean keepCase) { String text = keepCase ? rawText : rawText.toLowerCase(Locale.US); ByteBuffer bytes = ByteBufferUtil.bytes(text); -return getInterned(bytes, text); +return getInterned(UTF8Type.instance, bytes, text); } -public static ColumnIdentifier getInterned(ByteBuffer bytes, String text) +public static ColumnIdentifier getInterned(AbstractType type, ByteBuffer bytes, String text) { -ColumnIdentifier id = internedInstances.get(bytes); +InternedKey key = new InternedKey(type, bytes); +ColumnIdentifier id = internedInstances.get(key); if (id != null) return id; ColumnIdentifier created = new ColumnIdentifier(bytes, text, true); -ColumnIdentifier previous = internedInstances.putIfAbsent(bytes, created); +
[3/3] cassandra git commit: Merge branch 'cassandra-3.0' into trunk
Merge branch 'cassandra-3.0' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/10505447 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/10505447 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/10505447 Branch: refs/heads/trunk Commit: 10505447182a9df6c475e4ce0327f3eec217e7a5 Parents: d43b9ce 4bc3aa9 Author: Stefania AlborghettiAuthored: Tue Sep 20 09:27:21 2016 +0800 Committer: Stefania Alborghetti Committed: Tue Sep 20 09:28:26 2016 +0800 -- CHANGES.txt | 1 + .../cassandra/config/ColumnDefinition.java | 2 +- .../apache/cassandra/cql3/ColumnIdentifier.java | 45 +--- .../apache/cassandra/schema/SchemaKeyspace.java | 6 ++- .../utils/NativeSSTableLoaderClient.java| 6 ++- .../cassandra/cql3/ColumnIdentifierTest.java| 24 +++ 6 files changed, 73 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/10505447/CHANGES.txt -- diff --cc CHANGES.txt index e9e8ccf,b61c76c..979618d --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,69 -1,11 +1,70 @@@ -3.0.10 +3.10 + * Support optional backpressure strategies at the coordinator (CASSANDRA-9318) + * Make randompartitioner work with new vnode allocation (CASSANDRA-12647) + * Fix cassandra-stress graphing (CASSANDRA-12237) + * Allow filtering on partition key columns for queries without secondary indexes (CASSANDRA-11031) + * Fix Cassandra Stress reporting thread model and precision (CASSANDRA-12585) + * Add JMH benchmarks.jar (CASSANDRA-12586) + * Add row offset support to SASI (CASSANDRA-11990) + * Cleanup uses of AlterTableStatementColumn (CASSANDRA-12567) + * Add keep-alive to streaming (CASSANDRA-11841) + * Tracing payload is passed through newSession(..) (CASSANDRA-11706) + * avoid deleting non existing sstable files and improve related log messages (CASSANDRA-12261) + * json/yaml output format for nodetool compactionhistory (CASSANDRA-12486) + * Retry all internode messages once after a connection is + closed and reopened (CASSANDRA-12192) + * Add support to rebuild from targeted replica (CASSANDRA-9875) + * Add sequence distribution type to cassandra stress (CASSANDRA-12490) + * "SELECT * FROM foo LIMIT ;" does not error out (CASSANDRA-12154) + * Define executeLocally() at the ReadQuery Level (CASSANDRA-12474) + * Extend read/write failure messages with a map of replica addresses + to error codes in the v5 native protocol (CASSANDRA-12311) + * Fix rebuild of SASI indexes with existing index files (CASSANDRA-12374) + * Let DatabaseDescriptor not implicitly startup services (CASSANDRA-9054, 12550) + * Fix clustering indexes in presence of static columns in SASI (CASSANDRA-12378) + * Fix queries on columns with reversed type on SASI indexes (CASSANDRA-12223) + * Added slow query log (CASSANDRA-12403) + * Count full coordinated request against timeout (CASSANDRA-12256) + * Allow TTL with null value on insert and update (CASSANDRA-12216) + * Make decommission operation resumable (CASSANDRA-12008) + * Add support to one-way targeted repair (CASSANDRA-9876) + * Remove clientutil jar (CASSANDRA-11635) + * Fix compaction throughput throttle (CASSANDRA-12366) + * Delay releasing Memtable memory on flush until PostFlush has finished running (CASSANDRA-12358) + * Cassandra stress should dump all setting on startup (CASSANDRA-11914) + * Make it possible to compact a given token range (CASSANDRA-10643) + * Allow updating DynamicEndpointSnitch properties via JMX (CASSANDRA-12179) + * Collect metrics on queries by consistency level (CASSANDRA-7384) + * Add support for GROUP BY to SELECT statement (CASSANDRA-10707) + * Deprecate memtable_cleanup_threshold and update default for memtable_flush_writers (CASSANDRA-12228) + * Upgrade to OHC 0.4.4 (CASSANDRA-12133) + * Add version command to cassandra-stress (CASSANDRA-12258) + * Create compaction-stress tool (CASSANDRA-11844) + * Garbage-collecting compaction operation and schema option (CASSANDRA-7019) + * Add beta protocol flag for v5 native protocol (CASSANDRA-12142) + * Support filtering on non-PRIMARY KEY columns in the CREATE + MATERIALIZED VIEW statement's WHERE clause (CASSANDRA-10368) + * Unify STDOUT and SYSTEMLOG logback format (CASSANDRA-12004) + * COPY FROM should raise error for non-existing input files (CASSANDRA-12174) + * Faster write path (CASSANDRA-12269) + * Option to leave omitted columns in INSERT JSON unset (CASSANDRA-11424) + * Support json/yaml output in nodetool tpstats (CASSANDRA-12035) + * Expose metrics for successful/failed authentication
[jira] [Created] (CASSANDRA-12671) Support changing hinted handoff throttle in real time
Dikang Gu created CASSANDRA-12671: - Summary: Support changing hinted handoff throttle in real time Key: CASSANDRA-12671 URL: https://issues.apache.org/jira/browse/CASSANDRA-12671 Project: Cassandra Issue Type: Improvement Reporter: Dikang Gu Assignee: Dikang Gu Priority: Minor Fix For: 3.0.x, 3.x Problem: currently the sethintedhandoffthrottlekb takes effect when current hints handoff tasks finish, and then applies to next task, which could take hours for big node. I think it would be great to change the hinted handoff throttle in real time, which means it takes effect immediately. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12039) Add an index callback to be notified post bootstrap and before joining the ring
[ https://issues.apache.org/jira/browse/CASSANDRA-12039?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aleksey Yeschenko updated CASSANDRA-12039: -- Fix Version/s: 3.x > Add an index callback to be notified post bootstrap and before joining the > ring > --- > > Key: CASSANDRA-12039 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12039 > Project: Cassandra > Issue Type: New Feature >Reporter: Sergio Bossa >Assignee: Sergio Bossa > Fix For: 3.x > > > Custom index implementations might need to be notified when the node finishes > bootstrapping in order to execute some blocking tasks before the node itself > goes into NORMAL state. > This is a proposal to add such functionality, which should roughly require > the following: > 1) Add a {{getPostBootstrapTask}} callback to the {{Index}} interface. > 2) Add an {{executePostBootstrapBlockingTasks}} method to > {{SecondaryIndexManager}} calling into the previously mentioned callback. > 3) Hook that into {{StorageService#joinTokenRing}}. > Thoughts? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-12039) Add an index callback to be notified post bootstrap and before joining the ring
[ https://issues.apache.org/jira/browse/CASSANDRA-12039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15505238#comment-15505238 ] Aleksey Yeschenko commented on CASSANDRA-12039: --- CI results look clean to me (with one failure that I'm pretty sure is unrelated). The patch should only go into 3.x though. > Add an index callback to be notified post bootstrap and before joining the > ring > --- > > Key: CASSANDRA-12039 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12039 > Project: Cassandra > Issue Type: New Feature >Reporter: Sergio Bossa >Assignee: Sergio Bossa > Fix For: 3.x > > > Custom index implementations might need to be notified when the node finishes > bootstrapping in order to execute some blocking tasks before the node itself > goes into NORMAL state. > This is a proposal to add such functionality, which should roughly require > the following: > 1) Add a {{getPostBootstrapTask}} callback to the {{Index}} interface. > 2) Add an {{executePostBootstrapBlockingTasks}} method to > {{SecondaryIndexManager}} calling into the previously mentioned callback. > 3) Hook that into {{StorageService#joinTokenRing}}. > Thoughts? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12039) Add an index callback to be notified post bootstrap and before joining the ring
[ https://issues.apache.org/jira/browse/CASSANDRA-12039?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aleksey Yeschenko updated CASSANDRA-12039: -- Status: Ready to Commit (was: Awaiting Feedback) > Add an index callback to be notified post bootstrap and before joining the > ring > --- > > Key: CASSANDRA-12039 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12039 > Project: Cassandra > Issue Type: New Feature >Reporter: Sergio Bossa >Assignee: Sergio Bossa > > Custom index implementations might need to be notified when the node finishes > bootstrapping in order to execute some blocking tasks before the node itself > goes into NORMAL state. > This is a proposal to add such functionality, which should roughly require > the following: > 1) Add a {{getPostBootstrapTask}} callback to the {{Index}} interface. > 2) Add an {{executePostBootstrapBlockingTasks}} method to > {{SecondaryIndexManager}} calling into the previously mentioned callback. > 3) Hook that into {{StorageService#joinTokenRing}}. > Thoughts? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (CASSANDRA-9318) Bound the number of in-flight requests at the coordinator
[ https://issues.apache.org/jira/browse/CASSANDRA-9318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15505212#comment-15505212 ] Stefania edited comment on CASSANDRA-9318 at 9/20/16 1:13 AM: -- Committed to trunk as d43b9ce5092f8879a1a66afebab74d86e9e127fb, thank you for this excellent patch [~sbtourist]! was (Author: stefania): Committed to trunk as d43b9ce5092f8879a1a66afebab74d86e9e127fb, thank you for your excellent patch [~sbtourist]! > Bound the number of in-flight requests at the coordinator > - > > Key: CASSANDRA-9318 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9318 > Project: Cassandra > Issue Type: Improvement > Components: Local Write-Read Paths, Streaming and Messaging >Reporter: Ariel Weisberg >Assignee: Sergio Bossa > Fix For: 3.10 > > Attachments: 9318-3.0-nits-trailing-spaces.patch, backpressure.png, > limit.btm, no_backpressure.png > > > It's possible to somewhat bound the amount of load accepted into the cluster > by bounding the number of in-flight requests and request bytes. > An implementation might do something like track the number of outstanding > bytes and requests and if it reaches a high watermark disable read on client > connections until it goes back below some low watermark. > Need to make sure that disabling read on the client connection won't > introduce other issues. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-9318) Bound the number of in-flight requests at the coordinator
[ https://issues.apache.org/jira/browse/CASSANDRA-9318?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stefania updated CASSANDRA-9318: Resolution: Fixed Fix Version/s: 3.10 Status: Resolved (was: Patch Available) > Bound the number of in-flight requests at the coordinator > - > > Key: CASSANDRA-9318 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9318 > Project: Cassandra > Issue Type: Improvement > Components: Local Write-Read Paths, Streaming and Messaging >Reporter: Ariel Weisberg >Assignee: Sergio Bossa > Fix For: 3.10 > > Attachments: 9318-3.0-nits-trailing-spaces.patch, backpressure.png, > limit.btm, no_backpressure.png > > > It's possible to somewhat bound the amount of load accepted into the cluster > by bounding the number of in-flight requests and request bytes. > An implementation might do something like track the number of outstanding > bytes and requests and if it reaches a high watermark disable read on client > connections until it goes back below some low watermark. > Need to make sure that disabling read on the client connection won't > introduce other issues. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-9318) Bound the number of in-flight requests at the coordinator
[ https://issues.apache.org/jira/browse/CASSANDRA-9318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15505212#comment-15505212 ] Stefania commented on CASSANDRA-9318: - Committed to trunk as d43b9ce5092f8879a1a66afebab74d86e9e127fb, thank you for your excellent patch [~sbtourist]! > Bound the number of in-flight requests at the coordinator > - > > Key: CASSANDRA-9318 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9318 > Project: Cassandra > Issue Type: Improvement > Components: Local Write-Read Paths, Streaming and Messaging >Reporter: Ariel Weisberg >Assignee: Sergio Bossa > Attachments: 9318-3.0-nits-trailing-spaces.patch, backpressure.png, > limit.btm, no_backpressure.png > > > It's possible to somewhat bound the amount of load accepted into the cluster > by bounding the number of in-flight requests and request bytes. > An implementation might do something like track the number of outstanding > bytes and requests and if it reaches a high watermark disable read on client > connections until it goes back below some low watermark. > Need to make sure that disabling read on the client connection won't > introduce other issues. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[2/2] cassandra git commit: Support optional backpressure strategies at the coordinator
Support optional backpressure strategies at the coordinator patch by Sergio Bossa; reviewed by Stefania Alborghetti for CASSANDRA-9318 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d43b9ce5 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d43b9ce5 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d43b9ce5 Branch: refs/heads/trunk Commit: d43b9ce5092f8879a1a66afebab74d86e9e127fb Parents: 560faba Author: Sergio BossaAuthored: Mon Sep 19 10:42:50 2016 +0800 Committer: Stefania Alborghetti Committed: Tue Sep 20 09:07:36 2016 +0800 -- CHANGES.txt | 1 + conf/cassandra.yaml | 22 + .../org/apache/cassandra/config/Config.java | 4 +- .../cassandra/config/DatabaseDescriptor.java| 46 +++ .../apache/cassandra/hints/HintsDispatcher.java | 6 + .../apache/cassandra/net/BackPressureState.java | 51 +++ .../cassandra/net/BackPressureStrategy.java | 42 ++ .../apache/cassandra/net/IAsyncCallback.java| 5 + .../apache/cassandra/net/MessagingService.java | 124 +- .../cassandra/net/MessagingServiceMBean.java| 18 +- .../net/OutboundTcpConnectionPool.java | 12 +- .../cassandra/net/RateBasedBackPressure.java| 296 ++ .../net/RateBasedBackPressureState.java | 133 ++ .../cassandra/net/ResponseVerbHandler.java | 5 + .../service/AbstractWriteResponseHandler.java | 27 +- .../apache/cassandra/service/StorageProxy.java | 37 +- .../apache/cassandra/utils/SlidingTimeRate.java | 167 .../cassandra/utils/SystemTimeSource.java | 54 +++ .../apache/cassandra/utils/TestRateLimiter.java | 58 +++ .../org/apache/cassandra/utils/TimeSource.java | 58 +++ .../utils/concurrent/IntervalLock.java | 69 test/resources/byteman/mutation_limiter.btm | 8 + .../config/DatabaseDescriptorRefTest.java | 1 + .../cassandra/net/MessagingServiceTest.java | 247 ++- .../net/RateBasedBackPressureTest.java | 409 +++ .../cassandra/utils/SlidingTimeRateTest.java| 146 +++ .../apache/cassandra/utils/TestTimeSource.java | 72 27 files changed, 2072 insertions(+), 46 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/d43b9ce5/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index b625a58..e9e8ccf 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 3.10 + * Support optional backpressure strategies at the coordinator (CASSANDRA-9318) * Make randompartitioner work with new vnode allocation (CASSANDRA-12647) * Fix cassandra-stress graphing (CASSANDRA-12237) * Allow filtering on partition key columns for queries without secondary indexes (CASSANDRA-11031) http://git-wip-us.apache.org/repos/asf/cassandra/blob/d43b9ce5/conf/cassandra.yaml -- diff --git a/conf/cassandra.yaml b/conf/cassandra.yaml index a25e084..8a0b3ee 100644 --- a/conf/cassandra.yaml +++ b/conf/cassandra.yaml @@ -1172,3 +1172,25 @@ gc_warn_threshold_in_ms: 1000 # early. Any value size larger than this threshold will result into marking an SSTable # as corrupted. # max_value_size_in_mb: 256 + +# Back-pressure settings # +# If enabled, the coordinator will apply the back-pressure strategy specified below to each mutation +# sent to replicas, with the aim of reducing pressure on overloaded replicas. +back_pressure_enabled: false +# The back-pressure strategy applied. +# The default implementation, RateBasedBackPressure, takes three arguments: +# high ratio, factor, and flow type, and uses the ratio between incoming mutation responses and outgoing mutation requests. +# If below high ratio, outgoing mutations are rate limited according to the incoming rate decreased by the given factor; +# if above high ratio, the rate limiting is increased by the given factor; +# such factor is usually best configured between 1 and 10, use larger values for a faster recovery +# at the expense of potentially more dropped mutations; +# the rate limiting is applied according to the flow type: if FAST, it's rate limited at the speed of the fastest replica, +# if SLOW at the speed of the slowest one. +# New strategies can be added. Implementors need to implement org.apache.cassandra.net.BackpressureStrategy and +# provide a public constructor accepting a Map . +back_pressure_strategy: +- class_name: org.apache.cassandra.net.RateBasedBackPressure + parameters: +- high_ratio: 0.90 + factor: 5 + flow: FAST
[1/2] cassandra git commit: Support optional backpressure strategies at the coordinator
Repository: cassandra Updated Branches: refs/heads/trunk 560faba2f -> d43b9ce50 http://git-wip-us.apache.org/repos/asf/cassandra/blob/d43b9ce5/test/unit/org/apache/cassandra/net/RateBasedBackPressureTest.java -- diff --git a/test/unit/org/apache/cassandra/net/RateBasedBackPressureTest.java b/test/unit/org/apache/cassandra/net/RateBasedBackPressureTest.java new file mode 100644 index 000..b94b6ee --- /dev/null +++ b/test/unit/org/apache/cassandra/net/RateBasedBackPressureTest.java @@ -0,0 +1,409 @@ +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +*http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +package org.apache.cassandra.net; + +import java.net.InetAddress; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.TimeUnit; + +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.Sets; +import com.google.common.util.concurrent.RateLimiter; + +import org.junit.Assert; +import org.junit.Test; + +import org.apache.cassandra.utils.TestTimeSource; +import org.apache.cassandra.utils.TimeSource; + +import static org.apache.cassandra.net.RateBasedBackPressure.FACTOR; +import static org.apache.cassandra.net.RateBasedBackPressure.FLOW; +import static org.apache.cassandra.net.RateBasedBackPressure.HIGH_RATIO; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + +public class RateBasedBackPressureTest +{ +@Test(expected = IllegalArgumentException.class) +public void testAcceptsNoLessThanThreeArguments() throws Exception +{ +new RateBasedBackPressure(ImmutableMap.of(HIGH_RATIO, "1"), new TestTimeSource(), 10); +} + +@Test(expected = IllegalArgumentException.class) +public void testHighRatioMustBeBiggerThanZero() throws Exception +{ +new RateBasedBackPressure(ImmutableMap.of(HIGH_RATIO, "0", FACTOR, "2", FLOW, "FAST"), new TestTimeSource(), 10); +} + +@Test(expected = IllegalArgumentException.class) +public void testHighRatioMustBeSmallerEqualThanOne() throws Exception +{ +new RateBasedBackPressure(ImmutableMap.of(HIGH_RATIO, "2", FACTOR, "2", FLOW, "FAST"), new TestTimeSource(), 10); +} + +@Test(expected = IllegalArgumentException.class) +public void testFactorMustBeBiggerEqualThanOne() throws Exception +{ +new RateBasedBackPressure(ImmutableMap.of(HIGH_RATIO, "0.9", FACTOR, "0", FLOW, "FAST"), new TestTimeSource(), 10); +} + +@Test(expected = IllegalArgumentException.class) +public void testWindowSizeMustBeBiggerEqualThanTen() throws Exception +{ +new RateBasedBackPressure(ImmutableMap.of(HIGH_RATIO, "0.9", FACTOR, "5", FLOW, "FAST"), new TestTimeSource(), 1); +} + +@Test +public void testFlowMustBeEitherFASTorSLOW() throws Exception +{ +new RateBasedBackPressure(ImmutableMap.of(HIGH_RATIO, "0.9", FACTOR, "1", FLOW, "FAST"), new TestTimeSource(), 10); +new RateBasedBackPressure(ImmutableMap.of(HIGH_RATIO, "0.9", FACTOR, "1", FLOW, "SLOW"), new TestTimeSource(), 10); +try +{ +new RateBasedBackPressure(ImmutableMap.of(HIGH_RATIO, "0.9", FACTOR, "1", FLOW, "WRONG"), new TestTimeSource(), 10); +fail("Expected to fail with wrong flow type."); +} +catch (Exception ex) +{ +} +} + +@Test +public void testBackPressureStateUpdates() +{ +long windowSize = 6000; +TestTimeSource timeSource = new TestTimeSource(); +RateBasedBackPressure strategy = new RateBasedBackPressure(ImmutableMap.of(HIGH_RATIO, "0.9", FACTOR, "10", FLOW, "FAST"), timeSource, windowSize); + +RateBasedBackPressureState state = strategy.newState(InetAddress.getLoopbackAddress()); +state.onMessageSent(null); +assertEquals(0, state.incomingRate.size()); +assertEquals(0, state.outgoingRate.size()); + +state = strategy.newState(InetAddress.getLoopbackAddress()); +state.onResponseReceived(); +assertEquals(1, state.incomingRate.size()); +assertEquals(1, state.outgoingRate.size()); + +state =
[jira] [Updated] (CASSANDRA-12478) cassandra stress still uses CFMetaData.compile()
[ https://issues.apache.org/jira/browse/CASSANDRA-12478?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Denis Ranger updated CASSANDRA-12478: - Attachment: cassandra-stress-trunk.patch > cassandra stress still uses CFMetaData.compile() > > > Key: CASSANDRA-12478 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12478 > Project: Cassandra > Issue Type: Bug > Components: Tools >Reporter: Denis Ranger > Labels: stress > Fix For: 3.0.x > > Attachments: > 0001-Replaced-using-CFMetaData.compile-in-cassandra-stres.patch, > cassandra-stress-trunk.patch > > > Using CFMetaData.compile() on a client tool causes permission problems. To > reproduce: > * Start cassandra under user _cassandra_ > * Run {{chmod -R go-rwx /var/lib/cassandra}} to deny access to other users. > * Use a non-root user to run {{cassandra-stress}} > This produces an access denied message on {{/var/lib/cassandra/commitlog}}. > The attached fix uses client-mode functionality. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12478) cassandra stress still uses CFMetaData.compile()
[ https://issues.apache.org/jira/browse/CASSANDRA-12478?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Denis Ranger updated CASSANDRA-12478: - Status: Patch Available (was: Open) The trunk patch gets rid of the uses of QueryProcessor in the stress tool, which fixes the problem. Still missing a unit test... > cassandra stress still uses CFMetaData.compile() > > > Key: CASSANDRA-12478 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12478 > Project: Cassandra > Issue Type: Bug > Components: Tools >Reporter: Denis Ranger > Labels: stress > Fix For: 3.0.x > > Attachments: > 0001-Replaced-using-CFMetaData.compile-in-cassandra-stres.patch > > > Using CFMetaData.compile() on a client tool causes permission problems. To > reproduce: > * Start cassandra under user _cassandra_ > * Run {{chmod -R go-rwx /var/lib/cassandra}} to deny access to other users. > * Use a non-root user to run {{cassandra-stress}} > This produces an access denied message on {{/var/lib/cassandra/commitlog}}. > The attached fix uses client-mode functionality. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12516) Interned column identifiers can be overridden incorrectly
[ https://issues.apache.org/jira/browse/CASSANDRA-12516?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aleksey Yeschenko updated CASSANDRA-12516: -- Status: Ready to Commit (was: Patch Available) > Interned column identifiers can be overridden incorrectly > - > > Key: CASSANDRA-12516 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12516 > Project: Cassandra > Issue Type: Bug >Reporter: Aleksey Yeschenko >Assignee: Stefania > Fix For: 3.0.x, 3.x > > > As discovered by [~Stefania] in CASSANDRA-12423, our use of > {{ColumnIdentifier.internedInstances}} to map byte buffer column names to > column identifiers is incorrect. It's possible for two non-equal > {{ColumnIdentifier}} instances to have the same {{ByteBuffer}} as raw name, > and yet different text representations, due to different column name types, > leading to hard to debug correctness issues. > Should either amend the map to have the type as part of the key, or limit the > use of that map. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-12516) Interned column identifiers can be overridden incorrectly
[ https://issues.apache.org/jira/browse/CASSANDRA-12516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15505178#comment-15505178 ] Aleksey Yeschenko commented on CASSANDRA-12516: --- Patch LGTM, +1. > Interned column identifiers can be overridden incorrectly > - > > Key: CASSANDRA-12516 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12516 > Project: Cassandra > Issue Type: Bug >Reporter: Aleksey Yeschenko >Assignee: Stefania > Fix For: 3.0.x, 3.x > > > As discovered by [~Stefania] in CASSANDRA-12423, our use of > {{ColumnIdentifier.internedInstances}} to map byte buffer column names to > column identifiers is incorrect. It's possible for two non-equal > {{ColumnIdentifier}} instances to have the same {{ByteBuffer}} as raw name, > and yet different text representations, due to different column name types, > leading to hard to debug correctness issues. > Should either amend the map to have the type as part of the key, or limit the > use of that map. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12598) BailErrorStragery alike for ANTLR grammar parsing
[ https://issues.apache.org/jira/browse/CASSANDRA-12598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Joshua McKenzie updated CASSANDRA-12598: Reviewer: Benjamin Lerer > BailErrorStragery alike for ANTLR grammar parsing > - > > Key: CASSANDRA-12598 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12598 > Project: Cassandra > Issue Type: Bug > Components: CQL >Reporter: Berenguer Blasi > Fix For: 3.x > > > CQL parsing is missing a mechanism similar to > http://www.antlr.org/api/Java/org/antlr/v4/runtime/BailErrorStrategy.html > This solves: > - Stopping parsing instead of continuing when we've got already an error > which is wasteful. > - Any skipped java code tied to 'recovered' missing tokens might later cause > java exceptions (think non-init variables, non incremented integers (div by > zero), etc.) which will bubble up directly and will hide properly formatted > error messages to the user with no indication on what went wrong at all. Just > a cryptic NPE i.e -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12670) unable to connect to thrift when rpc_type = hsha
[ https://issues.apache.org/jira/browse/CASSANDRA-12670?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Raffaello Bertini updated CASSANDRA-12670: -- Description: cassandra thrift protocol seems not able to create socket connection when rpc_type: hsha. my configuration: in cassandra.yaml rpc_start=true port=9160. rpc_type:hsha environment: OS centos 7 iptables not running firewalld not running cassandra ver 3.7 (datastax repo) up and running. java version "1.8.0_51" Java(TM) SE Runtime Environment (build 1.8.0_51-b16) Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode) JAN installed JMX enabled everything in cassandra configuration is ok, except swap file needed due to lack of RAM. selinux doesn't matter but permissive. i am able to connect from remote, but this is the output from nodetools enablethrift {code:java} error: Could not create ServerSocket on address /10.10.30.11:9160. -- StackTrace -- org.apache.thrift.transport.TTransportException: Could not create ServerSocket on address /10.10.30.11:9160. at org.apache.thrift.transport.TNonblockingServerSocket.(TNonblockingServerSocket.java:96) at org.apache.thrift.transport.TNonblockingServerSocket.(TNonblockingServerSocket.java:79) at org.apache.thrift.transport.TNonblockingServerSocket.(TNonblockingServerSocket.java:75) at org.apache.cassandra.thrift.TCustomNonblockingServerSocket.(TCustomNonblockingServerSocket.java:39) at org.apache.cassandra.thrift.THsHaDisruptorServer$Factory.buildTServer(THsHaDisruptorServer.java:80) at org.apache.cassandra.thrift.TServerCustomFactory.buildTServer(TServerCustomFactory.java:55) at org.apache.cassandra.thrift.ThriftServer$ThriftServerThread.(ThriftServer.java:131) at org.apache.cassandra.thrift.ThriftServer.start(ThriftServer.java:58) at org.apache.cassandra.service.StorageService.startRPCServer(StorageService.java:408) 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:497) at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71) at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275) at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112) at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46) at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237) at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) at com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:468) at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1470) at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76) at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1311) at java.security.AccessController.doPrivileged(Native Method) at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1410) at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:832) 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:497) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:323) at sun.rmi.transport.Transport$1.run(Transport.java:200) at sun.rmi.transport.Transport$1.run(Transport.java:197) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:196) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$79(TCPTransport.java:683) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$$Lambda$98/201325936.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at
[jira] [Updated] (CASSANDRA-7306) Support "edge dcs" with more flexible gossip
[ https://issues.apache.org/jira/browse/CASSANDRA-7306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aleksey Yeschenko updated CASSANDRA-7306: - Reviewer: (was: Aleksey Yeschenko) > Support "edge dcs" with more flexible gossip > > > Key: CASSANDRA-7306 > URL: https://issues.apache.org/jira/browse/CASSANDRA-7306 > Project: Cassandra > Issue Type: Improvement > Components: Distributed Metadata >Reporter: Tupshin Harper >Assignee: Jeff Jirsa > Labels: ponies > > As Cassandra clusters get bigger and bigger, and their topology becomes more > complex, there is more and more need for a notion of "hub" and "spoke" > datacenters. > One of the big obstacles to supporting hundreds (or thousands) of remote dcs, > is the assumption that all dcs need to talk to each other (and be connected > all the time). > This ticket is a vague placeholder with the goals of achieving: > 1) better behavioral support for occasionally disconnected datacenters > 2) explicit support for custom dc to dc routing. A simple approach would be > an optional per-dc annotation of which other DCs that DC could gossip with. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-7662) Implement templated CREATE TABLE functionality (CREATE TABLE LIKE)
[ https://issues.apache.org/jira/browse/CASSANDRA-7662?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aleksey Yeschenko updated CASSANDRA-7662: - Assignee: (was: Aleksey Yeschenko) > Implement templated CREATE TABLE functionality (CREATE TABLE LIKE) > -- > > Key: CASSANDRA-7662 > URL: https://issues.apache.org/jira/browse/CASSANDRA-7662 > Project: Cassandra > Issue Type: Improvement >Reporter: Aleksey Yeschenko >Priority: Minor > Fix For: 3.x > > Attachments: 7662.patch, CASSANDRA-7662.patch > > > Implement templated CREATE TABLE functionality (CREATE TABLE LIKE) to > simplify creating new tables duplicating existing ones (see parent_table part > of http://www.postgresql.org/docs/9.1/static/sql-createtable.html). > CREATE TABLE LIKE ; - would create a new table with > the same columns and options as -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-12421) Add the option to only gossip manual severity, not severity from IOWait.
[ https://issues.apache.org/jira/browse/CASSANDRA-12421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15505061#comment-15505061 ] Aleksey Yeschenko commented on CASSANDRA-12421: --- Ad discussed offline (at the Summit), this should go to trunk (3.10), being an improvement. Can you cook up a trunk patch please? > Add the option to only gossip manual severity, not severity from IOWait. > > > Key: CASSANDRA-12421 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12421 > Project: Cassandra > Issue Type: Improvement >Reporter: Dikang Gu >Assignee: Dikang Gu > Fix For: 3.x > > > Similar to CASSANDRA-11737, but I'd like to still respect the manual > severity, and ignore the severity calculated from IOWait/Compaction, since in > general disk throughput is not a problem for flash card. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (CASSANDRA-12670) unable to connect to thrift when rpc_type = hsha
Raffaello Bertini created CASSANDRA-12670: - Summary: unable to connect to thrift when rpc_type = hsha Key: CASSANDRA-12670 URL: https://issues.apache.org/jira/browse/CASSANDRA-12670 Project: Cassandra Issue Type: Bug Environment: OS centos 7 iptables not running firewalld not running cassandra ver 3.7 (datastax repo) up and running. java version "1.8.0_51" Java(TM) SE Runtime Environment (build 1.8.0_51-b16) Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode) JAN installed JMX enabled everything in cassandra configuration is ok, except swap file needed due to lack of RAM. selinux doesn't matter but permissive. Reporter: Raffaello Bertini Priority: Minor I do not know why i am not able to enable thrift protocol on cassandra. in cassandra.yaml rpc_start=true port=9160. OS centos 7 iptables not running firewalld not running cassandra ver 3.7 (datastax repo) up and running. java version "1.8.0_51" Java(TM) SE Runtime Environment (build 1.8.0_51-b16) Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode) JAN installed JMX enabled etc.. everything in cassandra configuration is ok, except swap file needed due to lack of RAM. selinux doesn't matter but permissive. i am able to connect from remote, but this is the output from nodetools enablethrift error: Could not create ServerSocket on address /10.10.30.11:9160. -- StackTrace -- org.apache.thrift.transport.TTransportException: Could not create ServerSocket on address /10.10.30.11:9160. at org.apache.thrift.transport.TNonblockingServerSocket.(TNonblockingServerSocket.java:96) at org.apache.thrift.transport.TNonblockingServerSocket.(TNonblockingServerSocket.java:79) at org.apache.thrift.transport.TNonblockingServerSocket.(TNonblockingServerSocket.java:75) at org.apache.cassandra.thrift.TCustomNonblockingServerSocket.(TCustomNonblockingServerSocket.java:39) at org.apache.cassandra.thrift.THsHaDisruptorServer$Factory.buildTServer(THsHaDisruptorServer.java:80) at org.apache.cassandra.thrift.TServerCustomFactory.buildTServer(TServerCustomFactory.java:55) at org.apache.cassandra.thrift.ThriftServer$ThriftServerThread.(ThriftServer.java:131) at org.apache.cassandra.thrift.ThriftServer.start(ThriftServer.java:58) at org.apache.cassandra.service.StorageService.startRPCServer(StorageService.java:408) 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:497) at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71) at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275) at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112) at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46) at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237) at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) at com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:468) at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1470) at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76) at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1311) at java.security.AccessController.doPrivileged(Native Method) at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1410) at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:832) 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:497) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:323) at sun.rmi.transport.Transport$1.run(Transport.java:200) at sun.rmi.transport.Transport$1.run(Transport.java:197) at
[jira] [Updated] (CASSANDRA-10726) Read repair inserts should not be blocking
[ https://issues.apache.org/jira/browse/CASSANDRA-10726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aleksey Yeschenko updated CASSANDRA-10726: -- Reviewer: (was: Aleksey Yeschenko) > Read repair inserts should not be blocking > -- > > Key: CASSANDRA-10726 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10726 > Project: Cassandra > Issue Type: Improvement > Components: Coordination >Reporter: Richard Low >Assignee: Nachiket Patil > > Today, if there’s a digest mismatch in a foreground read repair, the insert > to update out of date replicas is blocking. This means, if it fails, the read > fails with a timeout. If a node is dropping writes (maybe it is overloaded or > the mutation stage is backed up for some other reason), all reads to a > replica set could fail. Further, replicas dropping writes get more out of > sync so will require more read repair. > The comment on the code for why the writes are blocking is: > {code} > // wait for the repair writes to be acknowledged, to minimize impact on any > replica that's > // behind on writes in case the out-of-sync row is read multiple times in > quick succession > {code} > but the bad side effect is that reads timeout. Either the writes should not > be blocking or we should return success for the read even if the write times > out. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12421) Add the option to only gossip manual severity, not severity from IOWait.
[ https://issues.apache.org/jira/browse/CASSANDRA-12421?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aleksey Yeschenko updated CASSANDRA-12421: -- Fix Version/s: (was: 2.2.x) 3.x Status: Open (was: Patch Available) > Add the option to only gossip manual severity, not severity from IOWait. > > > Key: CASSANDRA-12421 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12421 > Project: Cassandra > Issue Type: Improvement >Reporter: Dikang Gu >Assignee: Dikang Gu > Fix For: 3.x > > > Similar to CASSANDRA-11737, but I'd like to still respect the manual > severity, and ignore the severity calculated from IOWait/Compaction, since in > general disk throughput is not a problem for flash card. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12472) Backport CASSANDRA-10756 to 3.0
[ https://issues.apache.org/jira/browse/CASSANDRA-12472?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aleksey Yeschenko updated CASSANDRA-12472: -- Resolution: Fixed Fix Version/s: 3.0.10 Status: Resolved (was: Ready to Commit) > Backport CASSANDRA-10756 to 3.0 > --- > > Key: CASSANDRA-12472 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12472 > Project: Cassandra > Issue Type: Bug > Components: Testing >Reporter: Joel Knighton >Assignee: Alex Petrov > Fix For: 3.0.10 > > > [CASSANDRA-10756] fixed a problem with timeouts in > {{NativeTransportService.testConcurrentDestroys}}. > This fix was only committed to trunk, but the test still fails for the same > reason on 3.0 > [here|http://cassci.datastax.com/job/cassandra-3.0_testall/612/testReport/junit/org.apache.cassandra.service/NativeTransportServiceTest/testConcurrentDestroys_2/]. > The fix should cleanly backport to 3.0. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-12472) Backport CASSANDRA-10756 to 3.0
[ https://issues.apache.org/jira/browse/CASSANDRA-12472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15505049#comment-15505049 ] Aleksey Yeschenko commented on CASSANDRA-12472: --- Committed as [85ed48a1d9ac5aafb2a914a05ef6a620eeec5d0d|https://github.com/apache/cassandra/commit/85ed48a1d9ac5aafb2a914a05ef6a620eeec5d0d] to cassandra-3.0, thanks. > Backport CASSANDRA-10756 to 3.0 > --- > > Key: CASSANDRA-12472 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12472 > Project: Cassandra > Issue Type: Bug > Components: Testing >Reporter: Joel Knighton >Assignee: Alex Petrov > Fix For: 3.0.10 > > > [CASSANDRA-10756] fixed a problem with timeouts in > {{NativeTransportService.testConcurrentDestroys}}. > This fix was only committed to trunk, but the test still fails for the same > reason on 3.0 > [here|http://cassci.datastax.com/job/cassandra-3.0_testall/612/testReport/junit/org.apache.cassandra.service/NativeTransportServiceTest/testConcurrentDestroys_2/]. > The fix should cleanly backport to 3.0. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[3/3] cassandra git commit: Merge branch 'cassandra-3.0' into trunk
Merge branch 'cassandra-3.0' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/560faba2 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/560faba2 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/560faba2 Branch: refs/heads/trunk Commit: 560faba2ffcfc636df58264b40aabb12cf8fe582 Parents: c1a9a47 85ed48a Author: Aleksey YeschenkoAuthored: Mon Sep 19 16:42:17 2016 -0700 Committer: Aleksey Yeschenko Committed: Mon Sep 19 16:42:17 2016 -0700 -- --
[2/3] cassandra git commit: Backport CASSANDRA-10756 (race condition in NativeTransportService shutdown)
Backport CASSANDRA-10756 (race condition in NativeTransportService shutdown) Patch by Alex Petrov; reviewed by Joel Knighton for CASSANDRA-12472 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/85ed48a1 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/85ed48a1 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/85ed48a1 Branch: refs/heads/trunk Commit: 85ed48a1d9ac5aafb2a914a05ef6a620eeec5d0d Parents: d600f51 Author: Alex PetrovAuthored: Tue Sep 13 09:49:02 2016 +0200 Committer: Aleksey Yeschenko Committed: Mon Sep 19 16:41:57 2016 -0700 -- CHANGES.txt | 4 .../apache/cassandra/service/NativeTransportService.java | 11 +-- 2 files changed, 5 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/85ed48a1/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index f0ec3e3..5fd8e5e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,7 @@ +3.0.10 + * Backport CASSANDRA-10756 (race condition in NativeTransportService shutdown) (CASSANDRA-12472) + + 3.0.9 * Handle composite prefixes with final EOC=0 as in 2.x and refactor LegacyLayout.decodeBound (CASSANDRA-12423) * Fix paging for 2.x to 3.x upgrades (CASSANDRA-11195) http://git-wip-us.apache.org/repos/asf/cassandra/blob/85ed48a1/src/java/org/apache/cassandra/service/NativeTransportService.java -- diff --git a/src/java/org/apache/cassandra/service/NativeTransportService.java b/src/java/org/apache/cassandra/service/NativeTransportService.java index eff3a89..48839f1 100644 --- a/src/java/org/apache/cassandra/service/NativeTransportService.java +++ b/src/java/org/apache/cassandra/service/NativeTransportService.java @@ -145,16 +145,7 @@ public class NativeTransportService servers = Collections.emptyList(); // shutdown executors used by netty for native transport server -Future wgStop = workerGroup.shutdownGracefully(0, 0, TimeUnit.SECONDS); - -try -{ -wgStop.await(5000); -} -catch (InterruptedException e1) -{ -Thread.currentThread().interrupt(); -} +workerGroup.shutdownGracefully(3, 5, TimeUnit.SECONDS).awaitUninterruptibly(); // shutdownGracefully not implemented yet in RequestThreadPoolExecutor eventExecutorGroup.shutdown();
[1/3] cassandra git commit: Backport CASSANDRA-10756 (race condition in NativeTransportService shutdown)
Repository: cassandra Updated Branches: refs/heads/cassandra-3.0 d600f51ee -> 85ed48a1d refs/heads/trunk c1a9a47df -> 560faba2f Backport CASSANDRA-10756 (race condition in NativeTransportService shutdown) Patch by Alex Petrov; reviewed by Joel Knighton for CASSANDRA-12472 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/85ed48a1 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/85ed48a1 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/85ed48a1 Branch: refs/heads/cassandra-3.0 Commit: 85ed48a1d9ac5aafb2a914a05ef6a620eeec5d0d Parents: d600f51 Author: Alex PetrovAuthored: Tue Sep 13 09:49:02 2016 +0200 Committer: Aleksey Yeschenko Committed: Mon Sep 19 16:41:57 2016 -0700 -- CHANGES.txt | 4 .../apache/cassandra/service/NativeTransportService.java | 11 +-- 2 files changed, 5 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/85ed48a1/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index f0ec3e3..5fd8e5e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,7 @@ +3.0.10 + * Backport CASSANDRA-10756 (race condition in NativeTransportService shutdown) (CASSANDRA-12472) + + 3.0.9 * Handle composite prefixes with final EOC=0 as in 2.x and refactor LegacyLayout.decodeBound (CASSANDRA-12423) * Fix paging for 2.x to 3.x upgrades (CASSANDRA-11195) http://git-wip-us.apache.org/repos/asf/cassandra/blob/85ed48a1/src/java/org/apache/cassandra/service/NativeTransportService.java -- diff --git a/src/java/org/apache/cassandra/service/NativeTransportService.java b/src/java/org/apache/cassandra/service/NativeTransportService.java index eff3a89..48839f1 100644 --- a/src/java/org/apache/cassandra/service/NativeTransportService.java +++ b/src/java/org/apache/cassandra/service/NativeTransportService.java @@ -145,16 +145,7 @@ public class NativeTransportService servers = Collections.emptyList(); // shutdown executors used by netty for native transport server -Future wgStop = workerGroup.shutdownGracefully(0, 0, TimeUnit.SECONDS); - -try -{ -wgStop.await(5000); -} -catch (InterruptedException e1) -{ -Thread.currentThread().interrupt(); -} +workerGroup.shutdownGracefully(3, 5, TimeUnit.SECONDS).awaitUninterruptibly(); // shutdownGracefully not implemented yet in RequestThreadPoolExecutor eventExecutorGroup.shutdown();
[jira] [Commented] (CASSANDRA-12668) Memtable Contention in 2.1
[ https://issues.apache.org/jira/browse/CASSANDRA-12668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15505044#comment-15505044 ] sankalp kohli commented on CASSANDRA-12668: --- We tried the fanout = 4 in tests and found no change. I will update once we test the actual use case. > Memtable Contention in 2.1 > -- > > Key: CASSANDRA-12668 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12668 > Project: Cassandra > Issue Type: Bug >Reporter: sankalp kohli > > We added a new Btree implementation in 2.1 which causes write performance to > go down in Cassandra if there is lot of contention in the memtable for a CQL > partition. Upgrading a cluster from 2.0 to 2.1 with contention causes the > cluster to fall apart due to GC. We tried making the defaults added in > CASSANDRA-7546 configurable but that did not help. Is there anyway to fix > this issue? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12647) Improve vnode allocation on RandomPartitioner
[ https://issues.apache.org/jira/browse/CASSANDRA-12647?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aleksey Yeschenko updated CASSANDRA-12647: -- Resolution: Fixed Fix Version/s: (was: 3.0.x) (was: 3.x) 3.10 Status: Resolved (was: Ready to Commit) > Improve vnode allocation on RandomPartitioner > - > > Key: CASSANDRA-12647 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12647 > Project: Cassandra > Issue Type: Improvement >Reporter: Dikang Gu >Assignee: Dikang Gu > Fix For: 3.10 > > > CASSANDRA-7032 introduced the improved vnode allocation algorithm, but it > only support Murmur3Partitioner for now. > We use RandomPartitioner in most of our clusters, I'd like to add the support > to RandomPartitioner as well. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12647) Improve vnode allocation on RandomPartitioner
[ https://issues.apache.org/jira/browse/CASSANDRA-12647?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aleksey Yeschenko updated CASSANDRA-12647: -- Priority: Minor (was: Major) > Improve vnode allocation on RandomPartitioner > - > > Key: CASSANDRA-12647 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12647 > Project: Cassandra > Issue Type: Improvement >Reporter: Dikang Gu >Assignee: Dikang Gu >Priority: Minor > Fix For: 3.10 > > > CASSANDRA-7032 introduced the improved vnode allocation algorithm, but it > only support Murmur3Partitioner for now. > We use RandomPartitioner in most of our clusters, I'd like to add the support > to RandomPartitioner as well. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-12647) Improve vnode allocation on RandomPartitioner
[ https://issues.apache.org/jira/browse/CASSANDRA-12647?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15505038#comment-15505038 ] Aleksey Yeschenko commented on CASSANDRA-12647: --- Committed as [c1a9a47df292dbbde3c675c10d68043e7b212c28|https://github.com/apache/cassandra/commit/c1a9a47df292dbbde3c675c10d68043e7b212c28] to trunk (3.10).Thanks. > Improve vnode allocation on RandomPartitioner > - > > Key: CASSANDRA-12647 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12647 > Project: Cassandra > Issue Type: Improvement >Reporter: Dikang Gu >Assignee: Dikang Gu > Fix For: 3.0.x, 3.x > > > CASSANDRA-7032 introduced the improved vnode allocation algorithm, but it > only support Murmur3Partitioner for now. > We use RandomPartitioner in most of our clusters, I'd like to add the support > to RandomPartitioner as well. -- This message was sent by Atlassian JIRA (v6.3.4#6332)