[1/2] git commit: Fix message when trying to alter a clustering key type
Updated Branches: refs/heads/cassandra-1.2.0 b4f369301 - bac979410 Fix message when trying to alter a clustering key type patch by slebresne; reviewed by jbellis for CASSANDRA-5012 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/bac97941 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/bac97941 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/bac97941 Branch: refs/heads/cassandra-1.2.0 Commit: bac979410df5a88834964fa133b3fb9f22deee3f Parents: 7442fc0 Author: Sylvain Lebresne sylv...@datastax.com Authored: Fri Dec 7 10:12:17 2012 +0100 Committer: Sylvain Lebresne sylv...@datastax.com Committed: Fri Dec 7 10:12:17 2012 +0100 -- CHANGES.txt|1 + .../org/apache/cassandra/config/CFMetaData.java| 52 --- .../apache/cassandra/service/MigrationManager.java |2 + 3 files changed, 32 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/bac97941/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 2ffaee5..d3e04a7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -5,6 +5,7 @@ * Fix preparing queries with counter increment (CASSANDRA-5022) * Fix preparing updates with collections (CASSANDRA-5017) * Don't generate UUID based on other node address (CASSANDRA-5002) + * Fix message when trying to alter a clustering key type (CASSANDRA-5012) Merged from 1.1 * Improve schema propagation performance (CASSANDRA-5025) http://git-wip-us.apache.org/repos/asf/cassandra/blob/bac97941/src/java/org/apache/cassandra/config/CFMetaData.java -- diff --git a/src/java/org/apache/cassandra/config/CFMetaData.java b/src/java/org/apache/cassandra/config/CFMetaData.java index 986e95d..7ad2dc4 100644 --- a/src/java/org/apache/cassandra/config/CFMetaData.java +++ b/src/java/org/apache/cassandra/config/CFMetaData.java @@ -731,30 +731,8 @@ public final class CFMetaData public void apply(CFMetaData cfm) throws ConfigurationException { logger.debug(applying {} to {}, cfm, this); -// validate -if (!cfm.ksName.equals(ksName)) -throw new ConfigurationException(String.format(Keyspace mismatch (found %s; expected %s), - cfm.ksName, ksName)); -if (!cfm.cfName.equals(cfName)) -throw new ConfigurationException(String.format(Column family mismatch (found %s; expected %s), - cfm.cfName, cfName)); -if (!cfm.cfId.equals(cfId)) -throw new ConfigurationException(String.format(Column family ID mismatch (found %s; expected %s), - cfm.cfId, cfId)); -if (!cfm.cfType.equals(cfType)) -throw new ConfigurationException(types do not match.); - -if (!cfm.comparator.isCompatibleWith(comparator)) -throw new ConfigurationException(comparators do not match or are not compatible.); -if (cfm.subcolumnComparator == null) -{ -if (subcolumnComparator != null) -throw new ConfigurationException(subcolumncomparators do not match.); -// else, it's null and we're good. -} -else if (!cfm.subcolumnComparator.isCompatibleWith(subcolumnComparator)) -throw new ConfigurationException(subcolumncomparators do not match or are note compatible.); +validateCompatility(cfm); // TODO: this method should probably return a new CFMetaData so that // 1) we can keep comparator and subcolumnComparator final @@ -813,6 +791,34 @@ public final class CFMetaData logger.debug(application result is {}, this); } +public void validateCompatility(CFMetaData cfm) throws ConfigurationException +{ +// validate +if (!cfm.ksName.equals(ksName)) +throw new ConfigurationException(String.format(Keyspace mismatch (found %s; expected %s), + cfm.ksName, ksName)); +if (!cfm.cfName.equals(cfName)) +throw new ConfigurationException(String.format(Column family mismatch (found %s; expected %s), + cfm.cfName, cfName)); +if (!cfm.cfId.equals(cfId)) +throw new ConfigurationException(String.format(Column family ID mismatch (found %s; expected %s), + cfm.cfId, cfId)); + +if (!cfm.cfType.equals(cfType)) +throw new
[2/2] git commit: Don't generate UUID based on other nodes' address
Don't generate UUID based on other nodes' address patch by slebresne; reviewed by jbellis for CASSANDRA-5002 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7442fc02 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7442fc02 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7442fc02 Branch: refs/heads/cassandra-1.2.0 Commit: 7442fc02098c468447a4610d84023336f57545a4 Parents: b4f3693 Author: Sylvain Lebresne sylv...@datastax.com Authored: Fri Dec 7 10:07:57 2012 +0100 Committer: Sylvain Lebresne sylv...@datastax.com Committed: Fri Dec 7 10:09:25 2012 +0100 -- CHANGES.txt|1 + src/java/org/apache/cassandra/db/RowMutation.java |2 +- .../org/apache/cassandra/db/marshal/UUIDType.java |2 +- .../cassandra/hadoop/ColumnFamilyRecordReader.java | 14 +-- .../cassandra/service/AntiEntropyService.java |2 +- .../cassandra/streaming/StreamInSession.java |2 +- .../cassandra/streaming/StreamOutSession.java |2 +- .../cassandra/streaming/StreamingRepairTask.java |2 +- .../apache/cassandra/thrift/CassandraServer.java |2 +- .../org/apache/cassandra/tracing/TraceState.java |2 +- .../transport/messages/ExecuteMessage.java |2 +- .../transport/messages/PrepareMessage.java |2 +- .../cassandra/transport/messages/QueryMessage.java |2 +- src/java/org/apache/cassandra/utils/CounterId.java |2 +- .../org/apache/cassandra/utils/FBUtilities.java| 21 +++ src/java/org/apache/cassandra/utils/UUIDGen.java | 99 +++ .../apache/cassandra/cql/jdbc/ClientUtilsTest.java |2 +- .../cassandra/db/marshal/CompositeTypeTest.java|2 +- .../db/marshal/DynamicCompositeTypeTest.java |2 +- .../apache/cassandra/db/marshal/RoundTripTest.java |4 +- .../cassandra/db/marshal/TimeUUIDTypeTest.java | 14 +- .../apache/cassandra/db/marshal/UUIDTypeTest.java | 31 ++ .../cassandra/io/LazilyCompactedRowTest.java |2 +- .../cassandra/streaming/SerializationsTest.java|6 +- .../unit/org/apache/cassandra/utils/UUIDTests.java | 14 +- .../cassandra/stress/operations/CqlInserter.java |2 +- .../apache/cassandra/stress/util/Operation.java|2 +- 27 files changed, 116 insertions(+), 124 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/7442fc02/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 385dca6..2ffaee5 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,7 @@ * Fix preparing insert queries (CASSANDRA-5016) * Fix preparing queries with counter increment (CASSANDRA-5022) * Fix preparing updates with collections (CASSANDRA-5017) + * Don't generate UUID based on other node address (CASSANDRA-5002) Merged from 1.1 * Improve schema propagation performance (CASSANDRA-5025) http://git-wip-us.apache.org/repos/asf/cassandra/blob/7442fc02/src/java/org/apache/cassandra/db/RowMutation.java -- diff --git a/src/java/org/apache/cassandra/db/RowMutation.java b/src/java/org/apache/cassandra/db/RowMutation.java index 4fcee8a..a8e845d 100644 --- a/src/java/org/apache/cassandra/db/RowMutation.java +++ b/src/java/org/apache/cassandra/db/RowMutation.java @@ -105,7 +105,7 @@ public class RowMutation implements IMutation public static RowMutation hintFor(RowMutation mutation, UUID targetId) throws IOException { RowMutation rm = new RowMutation(Table.SYSTEM_KS, UUIDType.instance.decompose(targetId)); -UUID hintId = UUIDGen.makeType1UUIDFromHost(FBUtilities.getBroadcastAddress()); +UUID hintId = UUIDGen.getTimeUUID(); // determine the TTL for the RowMutation // this is set at the smallest GCGraceSeconds for any of the CFs in the RM http://git-wip-us.apache.org/repos/asf/cassandra/blob/7442fc02/src/java/org/apache/cassandra/db/marshal/UUIDType.java -- diff --git a/src/java/org/apache/cassandra/db/marshal/UUIDType.java b/src/java/org/apache/cassandra/db/marshal/UUIDType.java index 53f87d2..cef7b00 100644 --- a/src/java/org/apache/cassandra/db/marshal/UUIDType.java +++ b/src/java/org/apache/cassandra/db/marshal/UUIDType.java @@ -212,7 +212,7 @@ public class UUIDType extends AbstractTypeUUID } else if (source.toLowerCase().equals(now)) { -idBytes = ByteBuffer.wrap(UUIDGen.decompose(UUIDGen.makeType1UUIDFromHost(FBUtilities.getBroadcastAddress(; +idBytes = ByteBuffer.wrap(UUIDGen.getTimeUUIDBytes()); } // Milliseconds since epoch? else
[1/3] git commit: Merge branch 'cassandra-1.2.0' into cassandra-1.2
Updated Branches: refs/heads/cassandra-1.2 8c1683345 - fc416fab0 Merge branch 'cassandra-1.2.0' into cassandra-1.2 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/fc416fab Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/fc416fab Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/fc416fab Branch: refs/heads/cassandra-1.2 Commit: fc416fab0b21db5d9c9a14fb99f7c139cec64247 Parents: 8c16833 bac9794 Author: Sylvain Lebresne sylv...@datastax.com Authored: Fri Dec 7 10:13:43 2012 +0100 Committer: Sylvain Lebresne sylv...@datastax.com Committed: Fri Dec 7 10:13:43 2012 +0100 -- CHANGES.txt|2 + .../org/apache/cassandra/config/CFMetaData.java| 52 + src/java/org/apache/cassandra/db/RowMutation.java |2 +- .../org/apache/cassandra/db/marshal/UUIDType.java |2 +- .../cassandra/hadoop/ColumnFamilyRecordReader.java | 14 +-- .../cassandra/service/AntiEntropyService.java |2 +- .../apache/cassandra/service/MigrationManager.java |2 + .../cassandra/streaming/StreamInSession.java |2 +- .../cassandra/streaming/StreamOutSession.java |2 +- .../cassandra/streaming/StreamingRepairTask.java |2 +- .../apache/cassandra/thrift/CassandraServer.java |2 +- .../org/apache/cassandra/tracing/TraceState.java |2 +- .../transport/messages/ExecuteMessage.java |2 +- .../transport/messages/PrepareMessage.java |2 +- .../cassandra/transport/messages/QueryMessage.java |2 +- src/java/org/apache/cassandra/utils/CounterId.java |2 +- .../org/apache/cassandra/utils/FBUtilities.java| 21 +++ src/java/org/apache/cassandra/utils/UUIDGen.java | 99 +++ .../apache/cassandra/cql/jdbc/ClientUtilsTest.java |2 +- .../cassandra/db/marshal/CompositeTypeTest.java|2 +- .../db/marshal/DynamicCompositeTypeTest.java |2 +- .../apache/cassandra/db/marshal/RoundTripTest.java |4 +- .../cassandra/db/marshal/TimeUUIDTypeTest.java | 14 +- .../apache/cassandra/db/marshal/UUIDTypeTest.java | 31 ++ .../cassandra/io/LazilyCompactedRowTest.java |2 +- .../cassandra/streaming/SerializationsTest.java|6 +- .../unit/org/apache/cassandra/utils/UUIDTests.java | 14 +- .../cassandra/stress/operations/CqlInserter.java |2 +- .../apache/cassandra/stress/util/Operation.java|2 +- 29 files changed, 148 insertions(+), 147 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc416fab/CHANGES.txt -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc416fab/tools/stress/src/org/apache/cassandra/stress/operations/CqlInserter.java -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc416fab/tools/stress/src/org/apache/cassandra/stress/util/Operation.java --
[2/3] git commit: Fix message when trying to alter a clustering key type
Fix message when trying to alter a clustering key type patch by slebresne; reviewed by jbellis for CASSANDRA-5012 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/bac97941 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/bac97941 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/bac97941 Branch: refs/heads/cassandra-1.2 Commit: bac979410df5a88834964fa133b3fb9f22deee3f Parents: 7442fc0 Author: Sylvain Lebresne sylv...@datastax.com Authored: Fri Dec 7 10:12:17 2012 +0100 Committer: Sylvain Lebresne sylv...@datastax.com Committed: Fri Dec 7 10:12:17 2012 +0100 -- CHANGES.txt|1 + .../org/apache/cassandra/config/CFMetaData.java| 52 --- .../apache/cassandra/service/MigrationManager.java |2 + 3 files changed, 32 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/bac97941/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 2ffaee5..d3e04a7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -5,6 +5,7 @@ * Fix preparing queries with counter increment (CASSANDRA-5022) * Fix preparing updates with collections (CASSANDRA-5017) * Don't generate UUID based on other node address (CASSANDRA-5002) + * Fix message when trying to alter a clustering key type (CASSANDRA-5012) Merged from 1.1 * Improve schema propagation performance (CASSANDRA-5025) http://git-wip-us.apache.org/repos/asf/cassandra/blob/bac97941/src/java/org/apache/cassandra/config/CFMetaData.java -- diff --git a/src/java/org/apache/cassandra/config/CFMetaData.java b/src/java/org/apache/cassandra/config/CFMetaData.java index 986e95d..7ad2dc4 100644 --- a/src/java/org/apache/cassandra/config/CFMetaData.java +++ b/src/java/org/apache/cassandra/config/CFMetaData.java @@ -731,30 +731,8 @@ public final class CFMetaData public void apply(CFMetaData cfm) throws ConfigurationException { logger.debug(applying {} to {}, cfm, this); -// validate -if (!cfm.ksName.equals(ksName)) -throw new ConfigurationException(String.format(Keyspace mismatch (found %s; expected %s), - cfm.ksName, ksName)); -if (!cfm.cfName.equals(cfName)) -throw new ConfigurationException(String.format(Column family mismatch (found %s; expected %s), - cfm.cfName, cfName)); -if (!cfm.cfId.equals(cfId)) -throw new ConfigurationException(String.format(Column family ID mismatch (found %s; expected %s), - cfm.cfId, cfId)); -if (!cfm.cfType.equals(cfType)) -throw new ConfigurationException(types do not match.); - -if (!cfm.comparator.isCompatibleWith(comparator)) -throw new ConfigurationException(comparators do not match or are not compatible.); -if (cfm.subcolumnComparator == null) -{ -if (subcolumnComparator != null) -throw new ConfigurationException(subcolumncomparators do not match.); -// else, it's null and we're good. -} -else if (!cfm.subcolumnComparator.isCompatibleWith(subcolumnComparator)) -throw new ConfigurationException(subcolumncomparators do not match or are note compatible.); +validateCompatility(cfm); // TODO: this method should probably return a new CFMetaData so that // 1) we can keep comparator and subcolumnComparator final @@ -813,6 +791,34 @@ public final class CFMetaData logger.debug(application result is {}, this); } +public void validateCompatility(CFMetaData cfm) throws ConfigurationException +{ +// validate +if (!cfm.ksName.equals(ksName)) +throw new ConfigurationException(String.format(Keyspace mismatch (found %s; expected %s), + cfm.ksName, ksName)); +if (!cfm.cfName.equals(cfName)) +throw new ConfigurationException(String.format(Column family mismatch (found %s; expected %s), + cfm.cfName, cfName)); +if (!cfm.cfId.equals(cfId)) +throw new ConfigurationException(String.format(Column family ID mismatch (found %s; expected %s), + cfm.cfId, cfId)); + +if (!cfm.cfType.equals(cfType)) +throw new ConfigurationException(types do not match.); + +if
[3/3] git commit: Don't generate UUID based on other nodes' address
Don't generate UUID based on other nodes' address patch by slebresne; reviewed by jbellis for CASSANDRA-5002 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7442fc02 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7442fc02 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7442fc02 Branch: refs/heads/cassandra-1.2 Commit: 7442fc02098c468447a4610d84023336f57545a4 Parents: b4f3693 Author: Sylvain Lebresne sylv...@datastax.com Authored: Fri Dec 7 10:07:57 2012 +0100 Committer: Sylvain Lebresne sylv...@datastax.com Committed: Fri Dec 7 10:09:25 2012 +0100 -- CHANGES.txt|1 + src/java/org/apache/cassandra/db/RowMutation.java |2 +- .../org/apache/cassandra/db/marshal/UUIDType.java |2 +- .../cassandra/hadoop/ColumnFamilyRecordReader.java | 14 +-- .../cassandra/service/AntiEntropyService.java |2 +- .../cassandra/streaming/StreamInSession.java |2 +- .../cassandra/streaming/StreamOutSession.java |2 +- .../cassandra/streaming/StreamingRepairTask.java |2 +- .../apache/cassandra/thrift/CassandraServer.java |2 +- .../org/apache/cassandra/tracing/TraceState.java |2 +- .../transport/messages/ExecuteMessage.java |2 +- .../transport/messages/PrepareMessage.java |2 +- .../cassandra/transport/messages/QueryMessage.java |2 +- src/java/org/apache/cassandra/utils/CounterId.java |2 +- .../org/apache/cassandra/utils/FBUtilities.java| 21 +++ src/java/org/apache/cassandra/utils/UUIDGen.java | 99 +++ .../apache/cassandra/cql/jdbc/ClientUtilsTest.java |2 +- .../cassandra/db/marshal/CompositeTypeTest.java|2 +- .../db/marshal/DynamicCompositeTypeTest.java |2 +- .../apache/cassandra/db/marshal/RoundTripTest.java |4 +- .../cassandra/db/marshal/TimeUUIDTypeTest.java | 14 +- .../apache/cassandra/db/marshal/UUIDTypeTest.java | 31 ++ .../cassandra/io/LazilyCompactedRowTest.java |2 +- .../cassandra/streaming/SerializationsTest.java|6 +- .../unit/org/apache/cassandra/utils/UUIDTests.java | 14 +- .../cassandra/stress/operations/CqlInserter.java |2 +- .../apache/cassandra/stress/util/Operation.java|2 +- 27 files changed, 116 insertions(+), 124 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/7442fc02/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 385dca6..2ffaee5 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,7 @@ * Fix preparing insert queries (CASSANDRA-5016) * Fix preparing queries with counter increment (CASSANDRA-5022) * Fix preparing updates with collections (CASSANDRA-5017) + * Don't generate UUID based on other node address (CASSANDRA-5002) Merged from 1.1 * Improve schema propagation performance (CASSANDRA-5025) http://git-wip-us.apache.org/repos/asf/cassandra/blob/7442fc02/src/java/org/apache/cassandra/db/RowMutation.java -- diff --git a/src/java/org/apache/cassandra/db/RowMutation.java b/src/java/org/apache/cassandra/db/RowMutation.java index 4fcee8a..a8e845d 100644 --- a/src/java/org/apache/cassandra/db/RowMutation.java +++ b/src/java/org/apache/cassandra/db/RowMutation.java @@ -105,7 +105,7 @@ public class RowMutation implements IMutation public static RowMutation hintFor(RowMutation mutation, UUID targetId) throws IOException { RowMutation rm = new RowMutation(Table.SYSTEM_KS, UUIDType.instance.decompose(targetId)); -UUID hintId = UUIDGen.makeType1UUIDFromHost(FBUtilities.getBroadcastAddress()); +UUID hintId = UUIDGen.getTimeUUID(); // determine the TTL for the RowMutation // this is set at the smallest GCGraceSeconds for any of the CFs in the RM http://git-wip-us.apache.org/repos/asf/cassandra/blob/7442fc02/src/java/org/apache/cassandra/db/marshal/UUIDType.java -- diff --git a/src/java/org/apache/cassandra/db/marshal/UUIDType.java b/src/java/org/apache/cassandra/db/marshal/UUIDType.java index 53f87d2..cef7b00 100644 --- a/src/java/org/apache/cassandra/db/marshal/UUIDType.java +++ b/src/java/org/apache/cassandra/db/marshal/UUIDType.java @@ -212,7 +212,7 @@ public class UUIDType extends AbstractTypeUUID } else if (source.toLowerCase().equals(now)) { -idBytes = ByteBuffer.wrap(UUIDGen.decompose(UUIDGen.makeType1UUIDFromHost(FBUtilities.getBroadcastAddress(; +idBytes = ByteBuffer.wrap(UUIDGen.getTimeUUIDBytes()); } // Milliseconds since epoch? else if
[2/4] git commit: Merge branch 'cassandra-1.2.0' into cassandra-1.2
Merge branch 'cassandra-1.2.0' into cassandra-1.2 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/fc416fab Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/fc416fab Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/fc416fab Branch: refs/heads/trunk Commit: fc416fab0b21db5d9c9a14fb99f7c139cec64247 Parents: 8c16833 bac9794 Author: Sylvain Lebresne sylv...@datastax.com Authored: Fri Dec 7 10:13:43 2012 +0100 Committer: Sylvain Lebresne sylv...@datastax.com Committed: Fri Dec 7 10:13:43 2012 +0100 -- CHANGES.txt|2 + .../org/apache/cassandra/config/CFMetaData.java| 52 + src/java/org/apache/cassandra/db/RowMutation.java |2 +- .../org/apache/cassandra/db/marshal/UUIDType.java |2 +- .../cassandra/hadoop/ColumnFamilyRecordReader.java | 14 +-- .../cassandra/service/AntiEntropyService.java |2 +- .../apache/cassandra/service/MigrationManager.java |2 + .../cassandra/streaming/StreamInSession.java |2 +- .../cassandra/streaming/StreamOutSession.java |2 +- .../cassandra/streaming/StreamingRepairTask.java |2 +- .../apache/cassandra/thrift/CassandraServer.java |2 +- .../org/apache/cassandra/tracing/TraceState.java |2 +- .../transport/messages/ExecuteMessage.java |2 +- .../transport/messages/PrepareMessage.java |2 +- .../cassandra/transport/messages/QueryMessage.java |2 +- src/java/org/apache/cassandra/utils/CounterId.java |2 +- .../org/apache/cassandra/utils/FBUtilities.java| 21 +++ src/java/org/apache/cassandra/utils/UUIDGen.java | 99 +++ .../apache/cassandra/cql/jdbc/ClientUtilsTest.java |2 +- .../cassandra/db/marshal/CompositeTypeTest.java|2 +- .../db/marshal/DynamicCompositeTypeTest.java |2 +- .../apache/cassandra/db/marshal/RoundTripTest.java |4 +- .../cassandra/db/marshal/TimeUUIDTypeTest.java | 14 +- .../apache/cassandra/db/marshal/UUIDTypeTest.java | 31 ++ .../cassandra/io/LazilyCompactedRowTest.java |2 +- .../cassandra/streaming/SerializationsTest.java|6 +- .../unit/org/apache/cassandra/utils/UUIDTests.java | 14 +- .../cassandra/stress/operations/CqlInserter.java |2 +- .../apache/cassandra/stress/util/Operation.java|2 +- 29 files changed, 148 insertions(+), 147 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc416fab/CHANGES.txt -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc416fab/tools/stress/src/org/apache/cassandra/stress/operations/CqlInserter.java -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc416fab/tools/stress/src/org/apache/cassandra/stress/util/Operation.java --
[3/4] git commit: Fix message when trying to alter a clustering key type
Fix message when trying to alter a clustering key type patch by slebresne; reviewed by jbellis for CASSANDRA-5012 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/bac97941 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/bac97941 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/bac97941 Branch: refs/heads/trunk Commit: bac979410df5a88834964fa133b3fb9f22deee3f Parents: 7442fc0 Author: Sylvain Lebresne sylv...@datastax.com Authored: Fri Dec 7 10:12:17 2012 +0100 Committer: Sylvain Lebresne sylv...@datastax.com Committed: Fri Dec 7 10:12:17 2012 +0100 -- CHANGES.txt|1 + .../org/apache/cassandra/config/CFMetaData.java| 52 --- .../apache/cassandra/service/MigrationManager.java |2 + 3 files changed, 32 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/bac97941/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 2ffaee5..d3e04a7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -5,6 +5,7 @@ * Fix preparing queries with counter increment (CASSANDRA-5022) * Fix preparing updates with collections (CASSANDRA-5017) * Don't generate UUID based on other node address (CASSANDRA-5002) + * Fix message when trying to alter a clustering key type (CASSANDRA-5012) Merged from 1.1 * Improve schema propagation performance (CASSANDRA-5025) http://git-wip-us.apache.org/repos/asf/cassandra/blob/bac97941/src/java/org/apache/cassandra/config/CFMetaData.java -- diff --git a/src/java/org/apache/cassandra/config/CFMetaData.java b/src/java/org/apache/cassandra/config/CFMetaData.java index 986e95d..7ad2dc4 100644 --- a/src/java/org/apache/cassandra/config/CFMetaData.java +++ b/src/java/org/apache/cassandra/config/CFMetaData.java @@ -731,30 +731,8 @@ public final class CFMetaData public void apply(CFMetaData cfm) throws ConfigurationException { logger.debug(applying {} to {}, cfm, this); -// validate -if (!cfm.ksName.equals(ksName)) -throw new ConfigurationException(String.format(Keyspace mismatch (found %s; expected %s), - cfm.ksName, ksName)); -if (!cfm.cfName.equals(cfName)) -throw new ConfigurationException(String.format(Column family mismatch (found %s; expected %s), - cfm.cfName, cfName)); -if (!cfm.cfId.equals(cfId)) -throw new ConfigurationException(String.format(Column family ID mismatch (found %s; expected %s), - cfm.cfId, cfId)); -if (!cfm.cfType.equals(cfType)) -throw new ConfigurationException(types do not match.); - -if (!cfm.comparator.isCompatibleWith(comparator)) -throw new ConfigurationException(comparators do not match or are not compatible.); -if (cfm.subcolumnComparator == null) -{ -if (subcolumnComparator != null) -throw new ConfigurationException(subcolumncomparators do not match.); -// else, it's null and we're good. -} -else if (!cfm.subcolumnComparator.isCompatibleWith(subcolumnComparator)) -throw new ConfigurationException(subcolumncomparators do not match or are note compatible.); +validateCompatility(cfm); // TODO: this method should probably return a new CFMetaData so that // 1) we can keep comparator and subcolumnComparator final @@ -813,6 +791,34 @@ public final class CFMetaData logger.debug(application result is {}, this); } +public void validateCompatility(CFMetaData cfm) throws ConfigurationException +{ +// validate +if (!cfm.ksName.equals(ksName)) +throw new ConfigurationException(String.format(Keyspace mismatch (found %s; expected %s), + cfm.ksName, ksName)); +if (!cfm.cfName.equals(cfName)) +throw new ConfigurationException(String.format(Column family mismatch (found %s; expected %s), + cfm.cfName, cfName)); +if (!cfm.cfId.equals(cfId)) +throw new ConfigurationException(String.format(Column family ID mismatch (found %s; expected %s), + cfm.cfId, cfId)); + +if (!cfm.cfType.equals(cfType)) +throw new ConfigurationException(types do not match.); + +if (!cfm.comparator.isCompatibleWith(comparator)) +
[1/4] git commit: Merge branch 'cassandra-1.2' into trunk
Updated Branches: refs/heads/trunk ef379f280 - f8f80d3e5 Merge branch 'cassandra-1.2' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f8f80d3e Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f8f80d3e Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f8f80d3e Branch: refs/heads/trunk Commit: f8f80d3e5058b7920ecb598d0b8a0ef2ccb3edf6 Parents: ef379f2 fc416fa Author: Sylvain Lebresne sylv...@datastax.com Authored: Fri Dec 7 10:14:16 2012 +0100 Committer: Sylvain Lebresne sylv...@datastax.com Committed: Fri Dec 7 10:14:16 2012 +0100 -- CHANGES.txt|2 + .../org/apache/cassandra/config/CFMetaData.java| 52 + src/java/org/apache/cassandra/db/RowMutation.java |2 +- .../org/apache/cassandra/db/marshal/UUIDType.java |2 +- .../cassandra/hadoop/ColumnFamilyRecordReader.java | 14 +-- .../cassandra/service/AntiEntropyService.java |2 +- .../apache/cassandra/service/MigrationManager.java |2 + .../cassandra/streaming/StreamInSession.java |2 +- .../cassandra/streaming/StreamOutSession.java |2 +- .../cassandra/streaming/StreamingRepairTask.java |2 +- .../apache/cassandra/thrift/CassandraServer.java |2 +- .../org/apache/cassandra/tracing/TraceState.java |2 +- .../transport/messages/ExecuteMessage.java |2 +- .../transport/messages/PrepareMessage.java |2 +- .../cassandra/transport/messages/QueryMessage.java |2 +- src/java/org/apache/cassandra/utils/CounterId.java |2 +- .../org/apache/cassandra/utils/FBUtilities.java| 21 +++ src/java/org/apache/cassandra/utils/UUIDGen.java | 99 +++ .../apache/cassandra/cql/jdbc/ClientUtilsTest.java |2 +- .../cassandra/db/marshal/CompositeTypeTest.java|2 +- .../db/marshal/DynamicCompositeTypeTest.java |2 +- .../apache/cassandra/db/marshal/RoundTripTest.java |4 +- .../cassandra/db/marshal/TimeUUIDTypeTest.java | 14 +- .../apache/cassandra/db/marshal/UUIDTypeTest.java | 31 ++ .../cassandra/io/LazilyCompactedRowTest.java |2 +- .../cassandra/streaming/SerializationsTest.java|6 +- .../unit/org/apache/cassandra/utils/UUIDTests.java | 14 +- .../cassandra/stress/operations/CqlInserter.java |2 +- .../apache/cassandra/stress/util/Operation.java|2 +- 29 files changed, 148 insertions(+), 147 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f8f80d3e/CHANGES.txt -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f8f80d3e/src/java/org/apache/cassandra/config/CFMetaData.java -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f8f80d3e/src/java/org/apache/cassandra/db/RowMutation.java -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f8f80d3e/src/java/org/apache/cassandra/service/MigrationManager.java -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f8f80d3e/src/java/org/apache/cassandra/thrift/CassandraServer.java -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f8f80d3e/src/java/org/apache/cassandra/utils/FBUtilities.java -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f8f80d3e/test/unit/org/apache/cassandra/io/LazilyCompactedRowTest.java -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f8f80d3e/test/unit/org/apache/cassandra/streaming/SerializationsTest.java --
[4/4] git commit: Don't generate UUID based on other nodes' address
Don't generate UUID based on other nodes' address patch by slebresne; reviewed by jbellis for CASSANDRA-5002 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7442fc02 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7442fc02 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7442fc02 Branch: refs/heads/trunk Commit: 7442fc02098c468447a4610d84023336f57545a4 Parents: b4f3693 Author: Sylvain Lebresne sylv...@datastax.com Authored: Fri Dec 7 10:07:57 2012 +0100 Committer: Sylvain Lebresne sylv...@datastax.com Committed: Fri Dec 7 10:09:25 2012 +0100 -- CHANGES.txt|1 + src/java/org/apache/cassandra/db/RowMutation.java |2 +- .../org/apache/cassandra/db/marshal/UUIDType.java |2 +- .../cassandra/hadoop/ColumnFamilyRecordReader.java | 14 +-- .../cassandra/service/AntiEntropyService.java |2 +- .../cassandra/streaming/StreamInSession.java |2 +- .../cassandra/streaming/StreamOutSession.java |2 +- .../cassandra/streaming/StreamingRepairTask.java |2 +- .../apache/cassandra/thrift/CassandraServer.java |2 +- .../org/apache/cassandra/tracing/TraceState.java |2 +- .../transport/messages/ExecuteMessage.java |2 +- .../transport/messages/PrepareMessage.java |2 +- .../cassandra/transport/messages/QueryMessage.java |2 +- src/java/org/apache/cassandra/utils/CounterId.java |2 +- .../org/apache/cassandra/utils/FBUtilities.java| 21 +++ src/java/org/apache/cassandra/utils/UUIDGen.java | 99 +++ .../apache/cassandra/cql/jdbc/ClientUtilsTest.java |2 +- .../cassandra/db/marshal/CompositeTypeTest.java|2 +- .../db/marshal/DynamicCompositeTypeTest.java |2 +- .../apache/cassandra/db/marshal/RoundTripTest.java |4 +- .../cassandra/db/marshal/TimeUUIDTypeTest.java | 14 +- .../apache/cassandra/db/marshal/UUIDTypeTest.java | 31 ++ .../cassandra/io/LazilyCompactedRowTest.java |2 +- .../cassandra/streaming/SerializationsTest.java|6 +- .../unit/org/apache/cassandra/utils/UUIDTests.java | 14 +- .../cassandra/stress/operations/CqlInserter.java |2 +- .../apache/cassandra/stress/util/Operation.java|2 +- 27 files changed, 116 insertions(+), 124 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/7442fc02/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 385dca6..2ffaee5 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,7 @@ * Fix preparing insert queries (CASSANDRA-5016) * Fix preparing queries with counter increment (CASSANDRA-5022) * Fix preparing updates with collections (CASSANDRA-5017) + * Don't generate UUID based on other node address (CASSANDRA-5002) Merged from 1.1 * Improve schema propagation performance (CASSANDRA-5025) http://git-wip-us.apache.org/repos/asf/cassandra/blob/7442fc02/src/java/org/apache/cassandra/db/RowMutation.java -- diff --git a/src/java/org/apache/cassandra/db/RowMutation.java b/src/java/org/apache/cassandra/db/RowMutation.java index 4fcee8a..a8e845d 100644 --- a/src/java/org/apache/cassandra/db/RowMutation.java +++ b/src/java/org/apache/cassandra/db/RowMutation.java @@ -105,7 +105,7 @@ public class RowMutation implements IMutation public static RowMutation hintFor(RowMutation mutation, UUID targetId) throws IOException { RowMutation rm = new RowMutation(Table.SYSTEM_KS, UUIDType.instance.decompose(targetId)); -UUID hintId = UUIDGen.makeType1UUIDFromHost(FBUtilities.getBroadcastAddress()); +UUID hintId = UUIDGen.getTimeUUID(); // determine the TTL for the RowMutation // this is set at the smallest GCGraceSeconds for any of the CFs in the RM http://git-wip-us.apache.org/repos/asf/cassandra/blob/7442fc02/src/java/org/apache/cassandra/db/marshal/UUIDType.java -- diff --git a/src/java/org/apache/cassandra/db/marshal/UUIDType.java b/src/java/org/apache/cassandra/db/marshal/UUIDType.java index 53f87d2..cef7b00 100644 --- a/src/java/org/apache/cassandra/db/marshal/UUIDType.java +++ b/src/java/org/apache/cassandra/db/marshal/UUIDType.java @@ -212,7 +212,7 @@ public class UUIDType extends AbstractTypeUUID } else if (source.toLowerCase().equals(now)) { -idBytes = ByteBuffer.wrap(UUIDGen.decompose(UUIDGen.makeType1UUIDFromHost(FBUtilities.getBroadcastAddress(; +idBytes = ByteBuffer.wrap(UUIDGen.getTimeUUIDBytes()); } // Milliseconds since epoch? else if
[jira] [Commented] (CASSANDRA-5002) UUIGen should never use another host IP for its node part
[ https://issues.apache.org/jira/browse/CASSANDRA-5002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13526245#comment-13526245 ] Sylvain Lebresne commented on CASSANDRA-5002: - You're right, the getAllByName part is probably useless. I've move the getNetworkInterfaces part in FBUtilities (and used it in CFRR and UUIDGen) and committed. Thanks. UUIGen should never use another host IP for its node part - Key: CASSANDRA-5002 URL: https://issues.apache.org/jira/browse/CASSANDRA-5002 Project: Cassandra Issue Type: Bug Reporter: Sylvain Lebresne Assignee: Sylvain Lebresne Priority: Minor Fix For: 1.2.0 rc1 Attachments: 5002.txt UUIDGen allows to specify the inet address that we use to generate the node part of the created UUID. This is wrong however. More precisely, the node part is what make sure UUID generated on two different hosts are different, because we can't guarantee that the timestamp and clock parts will be different. In other words, generating on a host a UUID with the node part of another host is dangerous is clearly contrary to the spec. And as it turns out, making sure we always use the local address means that the full lsb part of the UUID becomes constant (as it should) and we can remove the nodeCache from UUIDGen and simplify/speedup UUID generation, which is all the more reason to fix it. I note that we were almost always using the local address to generate UUID anyway. The only place where we weren't is in Stream{In/Out}Session, and there is virtually no chance that this has ever broke anything (but we should still fix it). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-4750) Add jmx/nodetool methods to enable/disable hinted handoff
[ https://issues.apache.org/jira/browse/CASSANDRA-4750?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alexey Zotov updated CASSANDRA-4750: Attachment: cassandra-1.2-enable_disable_hh-v2.txt Please review the patch. Add jmx/nodetool methods to enable/disable hinted handoff - Key: CASSANDRA-4750 URL: https://issues.apache.org/jira/browse/CASSANDRA-4750 Project: Cassandra Issue Type: New Feature Reporter: Brandon Williams Assignee: Alexey Zotov Priority: Minor Labels: hintedhandoff, nodetool Fix For: 1.2.1 Attachments: cassandra-1.1-4750-enable_disable_hh.txt, cassandra-1.2-4750-enable_disable_hh.txt, cassandra-1.2-enable_disable_hh-v2.txt Title says it all. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Reopened] (CASSANDRA-5025) Schema push/pull race
[ https://issues.apache.org/jira/browse/CASSANDRA-5025?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brandon Williams reopened CASSANDRA-5025: - This broke bootstrapping, the node thinks it has the schema when it does not, then of course streams nothing and joins the ring. Schema push/pull race - Key: CASSANDRA-5025 URL: https://issues.apache.org/jira/browse/CASSANDRA-5025 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.1.0 Reporter: Jonathan Ellis Assignee: Jonathan Ellis Priority: Minor Fix For: 1.1.8 Attachments: 5025.txt, 5025-v2.txt When a schema change is made, the coordinator pushes the delta to the other nodes in the cluster. This is more efficient than sending the entire schema. But the coordinator also announces the new schema version, so the other nodes' reception of the new version races with processing the delta, and usually seeing the new schema wins. So the other nodes also issue a pull to the coordinator for the entire schema. Thus, schema changes tend to become O(n) in the number of KS and CF present. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5013) disallow bloom filter false positive chance of 0
[ https://issues.apache.org/jira/browse/CASSANDRA-5013?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brandon Williams updated CASSANDRA-5013: Attachment: 5013.txt Since we're already converting zero to the default, it makes sense to maintain that behavior and simply remove the error. Patch to do so and simplify the logic around this. disallow bloom filter false positive chance of 0 Key: CASSANDRA-5013 URL: https://issues.apache.org/jira/browse/CASSANDRA-5013 Project: Cassandra Issue Type: Bug Components: Config Reporter: Matthew F. Dennis Assignee: Brandon Williams Priority: Minor Fix For: 1.1.8 Attachments: 5013.txt {pre} ERROR [CompactionExecutor:16] 2012-11-30 08:44:32,546 SSTableWriter.java (line 414) Bloom filter FP chance of zero isn't supposed to happen {pre} when attempting to set it to zero, C* should either disallow the change or should just interpret 0 as make it the default and not continually log the above error message -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5013) disallow bloom filter false positive chance of 0
[ https://issues.apache.org/jira/browse/CASSANDRA-5013?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brandon Williams updated CASSANDRA-5013: Attachment: (was: 5013.txt) disallow bloom filter false positive chance of 0 Key: CASSANDRA-5013 URL: https://issues.apache.org/jira/browse/CASSANDRA-5013 Project: Cassandra Issue Type: Bug Components: Config Reporter: Matthew F. Dennis Assignee: Brandon Williams Priority: Minor Fix For: 1.1.8 {pre} ERROR [CompactionExecutor:16] 2012-11-30 08:44:32,546 SSTableWriter.java (line 414) Bloom filter FP chance of zero isn't supposed to happen {pre} when attempting to set it to zero, C* should either disallow the change or should just interpret 0 as make it the default and not continually log the above error message -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5013) disallow bloom filter false positive chance of 0
[ https://issues.apache.org/jira/browse/CASSANDRA-5013?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brandon Williams updated CASSANDRA-5013: Attachment: 5013.txt disallow bloom filter false positive chance of 0 Key: CASSANDRA-5013 URL: https://issues.apache.org/jira/browse/CASSANDRA-5013 Project: Cassandra Issue Type: Bug Components: Config Reporter: Matthew F. Dennis Assignee: Brandon Williams Priority: Minor Fix For: 1.1.8 Attachments: 5013.txt {pre} ERROR [CompactionExecutor:16] 2012-11-30 08:44:32,546 SSTableWriter.java (line 414) Bloom filter FP chance of zero isn't supposed to happen {pre} when attempting to set it to zero, C* should either disallow the change or should just interpret 0 as make it the default and not continually log the above error message -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Comment Edited] (CASSANDRA-5013) disallow bloom filter false positive chance of 0
[ https://issues.apache.org/jira/browse/CASSANDRA-5013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13526405#comment-13526405 ] Brandon Williams edited comment on CASSANDRA-5013 at 12/7/12 2:17 PM: -- Since we're already converting zero to the default, it makes sense to maintain that behavior and simply remove the error. Patch to do so. was (Author: brandon.williams): Since we're already converting zero to the default, it makes sense to maintain that behavior and simply remove the error. Patch to do so and simplify the logic around this. disallow bloom filter false positive chance of 0 Key: CASSANDRA-5013 URL: https://issues.apache.org/jira/browse/CASSANDRA-5013 Project: Cassandra Issue Type: Bug Components: Config Reporter: Matthew F. Dennis Assignee: Brandon Williams Priority: Minor Fix For: 1.1.8 Attachments: 5013.txt {pre} ERROR [CompactionExecutor:16] 2012-11-30 08:44:32,546 SSTableWriter.java (line 414) Bloom filter FP chance of zero isn't supposed to happen {pre} when attempting to set it to zero, C* should either disallow the change or should just interpret 0 as make it the default and not continually log the above error message -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5026) Reduce log spam from counter shard warnings
[ https://issues.apache.org/jira/browse/CASSANDRA-5026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13526416#comment-13526416 ] Sylvain Lebresne commented on CASSANDRA-5026: - I'm good with v2, though as said before it sets the flag for anything that is executed by the compactionExecutor (validation, cleanup, scrub, ...) not just actual compaction, so maybe we can rename it from isCompacting? Reduce log spam from counter shard warnings --- Key: CASSANDRA-5026 URL: https://issues.apache.org/jira/browse/CASSANDRA-5026 Project: Cassandra Issue Type: Improvement Components: Core Reporter: Jonathan Ellis Assignee: Sylvain Lebresne Priority: Minor Fix For: 1.1.8 Attachments: 5026.txt, 5026-v2.txt The invalid counter shard warning we can get after unclean shutdown in periodic commitlog mode or after node movement (CASSANDRA-4071) can spam the log hard since it is logged once per read until compaction merges it away. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5040) Can't insert only a key in CQL3
[ https://issues.apache.org/jira/browse/CASSANDRA-5040?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sylvain Lebresne updated CASSANDRA-5040: Attachment: 5040.patch Trivial patch attached Can't insert only a key in CQL3 --- Key: CASSANDRA-5040 URL: https://issues.apache.org/jira/browse/CASSANDRA-5040 Project: Cassandra Issue Type: Bug Affects Versions: 1.2.0 beta 1 Reporter: Sylvain Lebresne Assignee: Sylvain Lebresne Priority: Minor Fix For: 1.2.0 rc1 Attachments: 5040.patch The following should work but well, doesnt: {noformat} cqlsh:k CREATE TABLE t (k int PRIMARY KEY, v int); cqlsh:k INSERT INTO t (k) VALUES (0); Bad Request: line 1:27 required (...)+ loop did not match anything at input ')' {noformat} The reason is just that the parser for INSERT has never been updated from the time where providing only a key was illegal. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (CASSANDRA-5040) Can't insert only a key in CQL3
Sylvain Lebresne created CASSANDRA-5040: --- Summary: Can't insert only a key in CQL3 Key: CASSANDRA-5040 URL: https://issues.apache.org/jira/browse/CASSANDRA-5040 Project: Cassandra Issue Type: Bug Affects Versions: 1.2.0 beta 1 Reporter: Sylvain Lebresne Assignee: Sylvain Lebresne Priority: Minor Fix For: 1.2.0 rc1 Attachments: 5040.patch The following should work but well, doesnt: {noformat} cqlsh:k CREATE TABLE t (k int PRIMARY KEY, v int); cqlsh:k INSERT INTO t (k) VALUES (0); Bad Request: line 1:27 required (...)+ loop did not match anything at input ')' {noformat} The reason is just that the parser for INSERT has never been updated from the time where providing only a key was illegal. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4775) Counters 2.0
[ https://issues.apache.org/jira/browse/CASSANDRA-4775?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13526459#comment-13526459 ] Jonathan Halliday commented on CASSANDRA-4775: -- RFE: consider allowing configurable subtyping of counters to support similar behaviours. Existing counters implement SUM(...) but with relatively minor modifications to the merge step the same architecture could also support MIN(...) and MAX(...) semantics which currently require locking or other unpleasant solutions. AVG(...) is harder, needing both the sum and item count to be stored under the hood. Even more advanced is bitwise logical AND/OR/... on bitsets rather than numbers, such as would allow for hyperloglog approximate cardinality counting or other similar operations. Counters 2.0 Key: CASSANDRA-4775 URL: https://issues.apache.org/jira/browse/CASSANDRA-4775 Project: Cassandra Issue Type: New Feature Components: Core Reporter: Arya Goudarzi Labels: counters Fix For: 2.0 The existing partitioned counters remain a source of frustration for most users almost two years after being introduced. The remaining problems are inherent in the design, not something that can be fixed given enough time/eyeballs. Ideally a solution would give us - similar performance - less special cases in the code - potential for a retry mechanism -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5025) Schema push/pull race
[ https://issues.apache.org/jira/browse/CASSANDRA-5025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13526467#comment-13526467 ] Chris Herron commented on CASSANDRA-5025: - Could StorageServer.joinTokenRing wait max(RING_DELAY, 1min) (the 1 min being the delay in MigrationManager.maybeScheduleSchemaPull? Or could MigrationManager.maybeScheduleSchemaPull use some multiple of RING_DELAY? Related: is it correct that StorageServer.joinTokenRing calls Schema.instance.updateVersionAndAnnounce and MigrationManager.passiveAnnounce(Schema.instance.getVersion()) in quick succession? Schema push/pull race - Key: CASSANDRA-5025 URL: https://issues.apache.org/jira/browse/CASSANDRA-5025 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.1.0 Reporter: Jonathan Ellis Assignee: Jonathan Ellis Priority: Minor Fix For: 1.1.8 Attachments: 5025.txt, 5025-v2.txt When a schema change is made, the coordinator pushes the delta to the other nodes in the cluster. This is more efficient than sending the entire schema. But the coordinator also announces the new schema version, so the other nodes' reception of the new version races with processing the delta, and usually seeing the new schema wins. So the other nodes also issue a pull to the coordinator for the entire schema. Thus, schema changes tend to become O(n) in the number of KS and CF present. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5013) disallow bloom filter false positive chance of 0
[ https://issues.apache.org/jira/browse/CASSANDRA-5013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13526523#comment-13526523 ] Jonathan Ellis commented on CASSANDRA-5013: --- Where are we converting zero to default? ISTM that setting to zero is likely to either mean # user is asking for no false positives at all, which is impossible. should give an error instead of changing to default. # user is asking for no bloom filter at all, in which changing to default is also not what we want to do. disallow bloom filter false positive chance of 0 Key: CASSANDRA-5013 URL: https://issues.apache.org/jira/browse/CASSANDRA-5013 Project: Cassandra Issue Type: Bug Components: Config Reporter: Matthew F. Dennis Assignee: Brandon Williams Priority: Minor Fix For: 1.1.8 Attachments: 5013.txt {pre} ERROR [CompactionExecutor:16] 2012-11-30 08:44:32,546 SSTableWriter.java (line 414) Bloom filter FP chance of zero isn't supposed to happen {pre} when attempting to set it to zero, C* should either disallow the change or should just interpret 0 as make it the default and not continually log the above error message -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5040) Can't insert only a key in CQL3
[ https://issues.apache.org/jira/browse/CASSANDRA-5040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13526529#comment-13526529 ] Jonathan Ellis commented on CASSANDRA-5040: --- +1 Can't insert only a key in CQL3 --- Key: CASSANDRA-5040 URL: https://issues.apache.org/jira/browse/CASSANDRA-5040 Project: Cassandra Issue Type: Bug Affects Versions: 1.2.0 beta 1 Reporter: Sylvain Lebresne Assignee: Sylvain Lebresne Priority: Minor Fix For: 1.2.0 rc1 Attachments: 5040.patch The following should work but well, doesnt: {noformat} cqlsh:k CREATE TABLE t (k int PRIMARY KEY, v int); cqlsh:k INSERT INTO t (k) VALUES (0); Bad Request: line 1:27 required (...)+ loop did not match anything at input ')' {noformat} The reason is just that the parser for INSERT has never been updated from the time where providing only a key was illegal. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5013) disallow bloom filter false positive chance of 0
[ https://issues.apache.org/jira/browse/CASSANDRA-5013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13526531#comment-13526531 ] Brandon Williams commented on CASSANDRA-5013: - If we detect zero we set fpChance to null, which then results in 15 target buckets. I agree with both your points but for a point release in stable changing the behavior doesn't seem appropriate. disallow bloom filter false positive chance of 0 Key: CASSANDRA-5013 URL: https://issues.apache.org/jira/browse/CASSANDRA-5013 Project: Cassandra Issue Type: Bug Components: Config Reporter: Matthew F. Dennis Assignee: Brandon Williams Priority: Minor Fix For: 1.1.8 Attachments: 5013.txt {pre} ERROR [CompactionExecutor:16] 2012-11-30 08:44:32,546 SSTableWriter.java (line 414) Bloom filter FP chance of zero isn't supposed to happen {pre} when attempting to set it to zero, C* should either disallow the change or should just interpret 0 as make it the default and not continually log the above error message -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5025) Schema push/pull race
[ https://issues.apache.org/jira/browse/CASSANDRA-5025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13526533#comment-13526533 ] Chris Herron commented on CASSANDRA-5025: - From discussion on #cassandra-dev with [~brandon.williams], StorageServer.joinTokenRing could use Schema.emptyVersion as Schema UUID in order to allow the maybeScheduleSchemaPull delay to be skipped. Patch to follow... Schema push/pull race - Key: CASSANDRA-5025 URL: https://issues.apache.org/jira/browse/CASSANDRA-5025 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.1.0 Reporter: Jonathan Ellis Assignee: Jonathan Ellis Priority: Minor Fix For: 1.1.8 Attachments: 5025.txt, 5025-v2.txt When a schema change is made, the coordinator pushes the delta to the other nodes in the cluster. This is more efficient than sending the entire schema. But the coordinator also announces the new schema version, so the other nodes' reception of the new version races with processing the delta, and usually seeing the new schema wins. So the other nodes also issue a pull to the coordinator for the entire schema. Thus, schema changes tend to become O(n) in the number of KS and CF present. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5013) disallow bloom filter false positive chance of 0
[ https://issues.apache.org/jira/browse/CASSANDRA-5013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13526553#comment-13526553 ] Jonathan Ellis commented on CASSANDRA-5013: --- then let's fix it in 1.2 :) disallow bloom filter false positive chance of 0 Key: CASSANDRA-5013 URL: https://issues.apache.org/jira/browse/CASSANDRA-5013 Project: Cassandra Issue Type: Bug Components: Config Reporter: Matthew F. Dennis Assignee: Brandon Williams Priority: Minor Fix For: 1.1.8 Attachments: 5013.txt {pre} ERROR [CompactionExecutor:16] 2012-11-30 08:44:32,546 SSTableWriter.java (line 414) Bloom filter FP chance of zero isn't supposed to happen {pre} when attempting to set it to zero, C* should either disallow the change or should just interpret 0 as make it the default and not continually log the above error message -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (CASSANDRA-5041) LeveledManifest does not recover with old or tmp files
Carl Yeksigian created CASSANDRA-5041: - Summary: LeveledManifest does not recover with old or tmp files Key: CASSANDRA-5041 URL: https://issues.apache.org/jira/browse/CASSANDRA-5041 Project: Cassandra Issue Type: Bug Reporter: Carl Yeksigian Even though leveled compaction creates an old and a tmp file while writing out a new file, the leveled manifest does not attempt to load those files. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5041) LeveledManifest does not recover with old or tmp files
[ https://issues.apache.org/jira/browse/CASSANDRA-5041?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Carl Yeksigian updated CASSANDRA-5041: -- Issue Type: Improvement (was: Bug) LeveledManifest does not recover with old or tmp files -- Key: CASSANDRA-5041 URL: https://issues.apache.org/jira/browse/CASSANDRA-5041 Project: Cassandra Issue Type: Improvement Reporter: Carl Yeksigian Even though leveled compaction creates an old and a tmp file while writing out a new file, the leveled manifest does not attempt to load those files. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5041) Change LeveledManifest to try to load old and tmp json files
[ https://issues.apache.org/jira/browse/CASSANDRA-5041?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Carl Yeksigian updated CASSANDRA-5041: -- Attachment: 5041.txt Change LeveledManifest to try to load old and tmp json files Key: CASSANDRA-5041 URL: https://issues.apache.org/jira/browse/CASSANDRA-5041 Project: Cassandra Issue Type: Improvement Reporter: Carl Yeksigian Attachments: 5041.txt Even though leveled compaction creates an old and a tmp file while writing out a new file, the leveled manifest does not attempt to load those files. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5041) Change LeveledManifest to try to load old and tmp json files
[ https://issues.apache.org/jira/browse/CASSANDRA-5041?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Carl Yeksigian updated CASSANDRA-5041: -- Summary: Change LeveledManifest to try to load old and tmp json files (was: LeveledManifest does not recover with old or tmp files) Change LeveledManifest to try to load old and tmp json files Key: CASSANDRA-5041 URL: https://issues.apache.org/jira/browse/CASSANDRA-5041 Project: Cassandra Issue Type: Improvement Reporter: Carl Yeksigian Attachments: 5041.txt Even though leveled compaction creates an old and a tmp file while writing out a new file, the leveled manifest does not attempt to load those files. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5041) Change LeveledManifest to try to load old and tmp json files
[ https://issues.apache.org/jira/browse/CASSANDRA-5041?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Carl Yeksigian updated CASSANDRA-5041: -- Attachment: 5041.txt Change LeveledManifest to try to load old and tmp json files Key: CASSANDRA-5041 URL: https://issues.apache.org/jira/browse/CASSANDRA-5041 Project: Cassandra Issue Type: Improvement Reporter: Carl Yeksigian Labels: leveled Fix For: 1.2.1 Attachments: 5041.txt Even though leveled compaction creates an old and a tmp file while writing out a new file, the leveled manifest does not attempt to load those files. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5041) Change LeveledManifest to try to load old and tmp json files
[ https://issues.apache.org/jira/browse/CASSANDRA-5041?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Carl Yeksigian updated CASSANDRA-5041: -- Attachment: (was: 5041.txt) Change LeveledManifest to try to load old and tmp json files Key: CASSANDRA-5041 URL: https://issues.apache.org/jira/browse/CASSANDRA-5041 Project: Cassandra Issue Type: Improvement Reporter: Carl Yeksigian Labels: leveled Fix For: 1.2.1 Attachments: 5041.txt Even though leveled compaction creates an old and a tmp file while writing out a new file, the leveled manifest does not attempt to load those files. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5041) Change LeveledManifest to try to load old and tmp json files
[ https://issues.apache.org/jira/browse/CASSANDRA-5041?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Carl Yeksigian updated CASSANDRA-5041: -- Attachment: (was: 5041.txt) Change LeveledManifest to try to load old and tmp json files Key: CASSANDRA-5041 URL: https://issues.apache.org/jira/browse/CASSANDRA-5041 Project: Cassandra Issue Type: Improvement Reporter: Carl Yeksigian Labels: leveled Fix For: 1.2.1 Attachments: 5041.txt Even though leveled compaction creates an old and a tmp file while writing out a new file, the leveled manifest does not attempt to load those files. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5041) Change LeveledManifest to try to load old and tmp json files
[ https://issues.apache.org/jira/browse/CASSANDRA-5041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13526564#comment-13526564 ] Jonathan Ellis commented on CASSANDRA-5041: --- tmp will usually be a partially written file so using that is not appropriate. Change LeveledManifest to try to load old and tmp json files Key: CASSANDRA-5041 URL: https://issues.apache.org/jira/browse/CASSANDRA-5041 Project: Cassandra Issue Type: Improvement Reporter: Carl Yeksigian Labels: leveled Fix For: 1.2.1 Attachments: 5041.txt Even though leveled compaction creates an old and a tmp file while writing out a new file, the leveled manifest does not attempt to load those files. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5041) Change LeveledManifest to try to load old and tmp json files
[ https://issues.apache.org/jira/browse/CASSANDRA-5041?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Carl Yeksigian updated CASSANDRA-5041: -- Attachment: 5041.txt Change LeveledManifest to try to load old and tmp json files Key: CASSANDRA-5041 URL: https://issues.apache.org/jira/browse/CASSANDRA-5041 Project: Cassandra Issue Type: Improvement Reporter: Carl Yeksigian Labels: leveled Fix For: 1.2.1 Attachments: 5041.txt Even though leveled compaction creates an old and a tmp file while writing out a new file, the leveled manifest does not attempt to load those files. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5041) Change LeveledManifest to try to load old and tmp json files
[ https://issues.apache.org/jira/browse/CASSANDRA-5041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13526570#comment-13526570 ] Carl Yeksigian commented on CASSANDRA-5041: --- That means that it won't be parseable, so we'll fall back to the old file instead. Change LeveledManifest to try to load old and tmp json files Key: CASSANDRA-5041 URL: https://issues.apache.org/jira/browse/CASSANDRA-5041 Project: Cassandra Issue Type: Improvement Reporter: Carl Yeksigian Labels: leveled Fix For: 1.2.1 Attachments: 5041.txt Even though leveled compaction creates an old and a tmp file while writing out a new file, the leveled manifest does not attempt to load those files. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[2/10] git commit: Merge branch 'cassandra-1.2.0' into cassandra-1.2
Merge branch 'cassandra-1.2.0' into cassandra-1.2 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/0934bffa Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/0934bffa Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/0934bffa Branch: refs/heads/cassandra-1.2 Commit: 0934bffa107cb9c13062a1cfbff986339f622847 Parents: fc416fa 8581be8 Author: Yuki Morishita yu...@apache.org Authored: Fri Dec 7 11:42:45 2012 -0600 Committer: Yuki Morishita yu...@apache.org Committed: Fri Dec 7 11:42:45 2012 -0600 -- src/java/org/apache/cassandra/cli/CliClient.java |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) --
[5/10] git commit: Merge branch 'cassandra-1.1' into cassandra-1.2.0
Merge branch 'cassandra-1.1' into cassandra-1.2.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/8581be8a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8581be8a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8581be8a Branch: refs/heads/cassandra-1.2.0 Commit: 8581be8a2beef81b89e571351c6e05ed51dde718 Parents: bac9794 1ac9058 Author: Yuki Morishita yu...@apache.org Authored: Fri Dec 7 11:42:17 2012 -0600 Committer: Yuki Morishita yu...@apache.org Committed: Fri Dec 7 11:42:17 2012 -0600 -- src/java/org/apache/cassandra/cli/CliClient.java |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/8581be8a/src/java/org/apache/cassandra/cli/CliClient.java --
[4/10] git commit: Merge branch 'cassandra-1.1' into cassandra-1.2.0
Merge branch 'cassandra-1.1' into cassandra-1.2.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/8581be8a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8581be8a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8581be8a Branch: refs/heads/trunk Commit: 8581be8a2beef81b89e571351c6e05ed51dde718 Parents: bac9794 1ac9058 Author: Yuki Morishita yu...@apache.org Authored: Fri Dec 7 11:42:17 2012 -0600 Committer: Yuki Morishita yu...@apache.org Committed: Fri Dec 7 11:42:17 2012 -0600 -- src/java/org/apache/cassandra/cli/CliClient.java |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/8581be8a/src/java/org/apache/cassandra/cli/CliClient.java --
[7/10] git commit: suppress output of index_options when empty
suppress output of index_options when empty Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/1ac90589 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/1ac90589 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/1ac90589 Branch: refs/heads/trunk Commit: 1ac90589ead4b95a922d783ead75412dd46c0f28 Parents: 8d55474 Author: Yuki Morishita yu...@apache.org Authored: Fri Dec 7 11:23:44 2012 -0600 Committer: Yuki Morishita yu...@apache.org Committed: Fri Dec 7 11:39:32 2012 -0600 -- src/java/org/apache/cassandra/cli/CliClient.java |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/1ac90589/src/java/org/apache/cassandra/cli/CliClient.java -- diff --git a/src/java/org/apache/cassandra/cli/CliClient.java b/src/java/org/apache/cassandra/cli/CliClient.java index b32b0f7..a7e8d92 100644 --- a/src/java/org/apache/cassandra/cli/CliClient.java +++ b/src/java/org/apache/cassandra/cli/CliClient.java @@ -1822,7 +1822,7 @@ public class CliClient .append(TAB + TAB + index_name : ' + CliUtils.escapeSQLString(colDef.index_name) + ', + NEWLINE) .append(TAB + TAB + index_type : + CliUtils.escapeSQLString(Integer.toString(colDef.index_type.getValue(; -if (colDef.index_options != null) +if (colDef.index_options != null !colDef.index_options.isEmpty()) { output.append(,).append(NEWLINE); output.append(TAB + TAB + index_options : { + NEWLINE);
[9/10] git commit: suppress output of index_options when empty
suppress output of index_options when empty Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/1ac90589 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/1ac90589 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/1ac90589 Branch: refs/heads/cassandra-1.2.0 Commit: 1ac90589ead4b95a922d783ead75412dd46c0f28 Parents: 8d55474 Author: Yuki Morishita yu...@apache.org Authored: Fri Dec 7 11:23:44 2012 -0600 Committer: Yuki Morishita yu...@apache.org Committed: Fri Dec 7 11:39:32 2012 -0600 -- src/java/org/apache/cassandra/cli/CliClient.java |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/1ac90589/src/java/org/apache/cassandra/cli/CliClient.java -- diff --git a/src/java/org/apache/cassandra/cli/CliClient.java b/src/java/org/apache/cassandra/cli/CliClient.java index b32b0f7..a7e8d92 100644 --- a/src/java/org/apache/cassandra/cli/CliClient.java +++ b/src/java/org/apache/cassandra/cli/CliClient.java @@ -1822,7 +1822,7 @@ public class CliClient .append(TAB + TAB + index_name : ' + CliUtils.escapeSQLString(colDef.index_name) + ', + NEWLINE) .append(TAB + TAB + index_type : + CliUtils.escapeSQLString(Integer.toString(colDef.index_type.getValue(; -if (colDef.index_options != null) +if (colDef.index_options != null !colDef.index_options.isEmpty()) { output.append(,).append(NEWLINE); output.append(TAB + TAB + index_options : { + NEWLINE);
[6/10] git commit: Merge branch 'cassandra-1.1' into cassandra-1.2.0
Merge branch 'cassandra-1.1' into cassandra-1.2.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/8581be8a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8581be8a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8581be8a Branch: refs/heads/cassandra-1.2 Commit: 8581be8a2beef81b89e571351c6e05ed51dde718 Parents: bac9794 1ac9058 Author: Yuki Morishita yu...@apache.org Authored: Fri Dec 7 11:42:17 2012 -0600 Committer: Yuki Morishita yu...@apache.org Committed: Fri Dec 7 11:42:17 2012 -0600 -- src/java/org/apache/cassandra/cli/CliClient.java |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/8581be8a/src/java/org/apache/cassandra/cli/CliClient.java --
[1/10] git commit: Merge branch 'cassandra-1.2' into trunk
Updated Branches: refs/heads/cassandra-1.1 8d55474fe - 1ac90589e refs/heads/cassandra-1.2 fc416fab0 - 0934bffa1 refs/heads/cassandra-1.2.0 bac979410 - 8581be8a2 refs/heads/trunk f8f80d3e5 - 5a7943da4 Merge branch 'cassandra-1.2' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/5a7943da Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5a7943da Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5a7943da Branch: refs/heads/trunk Commit: 5a7943da422cf4c0d76a0e1807ffe9c0d1fcd908 Parents: f8f80d3 0934bff Author: Yuki Morishita yu...@apache.org Authored: Fri Dec 7 11:43:01 2012 -0600 Committer: Yuki Morishita yu...@apache.org Committed: Fri Dec 7 11:43:01 2012 -0600 -- src/java/org/apache/cassandra/cli/CliClient.java |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/5a7943da/src/java/org/apache/cassandra/cli/CliClient.java --
[8/10] git commit: suppress output of index_options when empty
suppress output of index_options when empty Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/1ac90589 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/1ac90589 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/1ac90589 Branch: refs/heads/cassandra-1.2 Commit: 1ac90589ead4b95a922d783ead75412dd46c0f28 Parents: 8d55474 Author: Yuki Morishita yu...@apache.org Authored: Fri Dec 7 11:23:44 2012 -0600 Committer: Yuki Morishita yu...@apache.org Committed: Fri Dec 7 11:39:32 2012 -0600 -- src/java/org/apache/cassandra/cli/CliClient.java |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/1ac90589/src/java/org/apache/cassandra/cli/CliClient.java -- diff --git a/src/java/org/apache/cassandra/cli/CliClient.java b/src/java/org/apache/cassandra/cli/CliClient.java index b32b0f7..a7e8d92 100644 --- a/src/java/org/apache/cassandra/cli/CliClient.java +++ b/src/java/org/apache/cassandra/cli/CliClient.java @@ -1822,7 +1822,7 @@ public class CliClient .append(TAB + TAB + index_name : ' + CliUtils.escapeSQLString(colDef.index_name) + ', + NEWLINE) .append(TAB + TAB + index_type : + CliUtils.escapeSQLString(Integer.toString(colDef.index_type.getValue(; -if (colDef.index_options != null) +if (colDef.index_options != null !colDef.index_options.isEmpty()) { output.append(,).append(NEWLINE); output.append(TAB + TAB + index_options : { + NEWLINE);
[10/10] git commit: suppress output of index_options when empty
suppress output of index_options when empty Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/1ac90589 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/1ac90589 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/1ac90589 Branch: refs/heads/cassandra-1.1 Commit: 1ac90589ead4b95a922d783ead75412dd46c0f28 Parents: 8d55474 Author: Yuki Morishita yu...@apache.org Authored: Fri Dec 7 11:23:44 2012 -0600 Committer: Yuki Morishita yu...@apache.org Committed: Fri Dec 7 11:39:32 2012 -0600 -- src/java/org/apache/cassandra/cli/CliClient.java |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/1ac90589/src/java/org/apache/cassandra/cli/CliClient.java -- diff --git a/src/java/org/apache/cassandra/cli/CliClient.java b/src/java/org/apache/cassandra/cli/CliClient.java index b32b0f7..a7e8d92 100644 --- a/src/java/org/apache/cassandra/cli/CliClient.java +++ b/src/java/org/apache/cassandra/cli/CliClient.java @@ -1822,7 +1822,7 @@ public class CliClient .append(TAB + TAB + index_name : ' + CliUtils.escapeSQLString(colDef.index_name) + ', + NEWLINE) .append(TAB + TAB + index_type : + CliUtils.escapeSQLString(Integer.toString(colDef.index_type.getValue(; -if (colDef.index_options != null) +if (colDef.index_options != null !colDef.index_options.isEmpty()) { output.append(,).append(NEWLINE); output.append(TAB + TAB + index_options : { + NEWLINE);
[3/10] git commit: Merge branch 'cassandra-1.2.0' into cassandra-1.2
Merge branch 'cassandra-1.2.0' into cassandra-1.2 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/0934bffa Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/0934bffa Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/0934bffa Branch: refs/heads/trunk Commit: 0934bffa107cb9c13062a1cfbff986339f622847 Parents: fc416fa 8581be8 Author: Yuki Morishita yu...@apache.org Authored: Fri Dec 7 11:42:45 2012 -0600 Committer: Yuki Morishita yu...@apache.org Committed: Fri Dec 7 11:42:45 2012 -0600 -- src/java/org/apache/cassandra/cli/CliClient.java |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) --
[jira] [Resolved] (CASSANDRA-5008) show schema command in cassandra-cli generates wrong index_options values.
[ https://issues.apache.org/jira/browse/CASSANDRA-5008?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Yuki Morishita resolved CASSANDRA-5008. --- Resolution: Fixed Fix Version/s: 1.2.0 rc1 Thanks Thierry, committed your !isEmpty check in 1ac90589ead4b95a922d783ead75412dd46c0f28 show schema command in cassandra-cli generates wrong index_options values. -- Key: CASSANDRA-5008 URL: https://issues.apache.org/jira/browse/CASSANDRA-5008 Project: Cassandra Issue Type: Bug Affects Versions: 1.1.6 Environment: ubuntu 12.04 Reporter: Thierry Boileau Assignee: Yuki Morishita Priority: Minor Fix For: 1.1.8, 1.2.0 rc1 Using cassandra-cli, launch the show schema command and save the output to a file. Try to import it in order to recreate the schema, it fails with error message : Syntax error at position 626: no viable alternative at input '}' -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
git commit: ninja relocate crc_check_chance removal from options list
Updated Branches: refs/heads/cassandra-1.2.0 8581be8a2 - 248d6266e ninja relocate crc_check_chance removal from options list Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/248d6266 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/248d6266 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/248d6266 Branch: refs/heads/cassandra-1.2.0 Commit: 248d6266e67bae97a0a6f27776645768704df201 Parents: 8581be8 Author: Jake Luciani jluci...@bluemountaincapital.com Authored: Fri Dec 7 12:50:49 2012 -0500 Committer: Jake Luciani jluci...@bluemountaincapital.com Committed: Fri Dec 7 12:51:53 2012 -0500 -- .../io/compress/CompressionParameters.java |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/248d6266/src/java/org/apache/cassandra/io/compress/CompressionParameters.java -- diff --git a/src/java/org/apache/cassandra/io/compress/CompressionParameters.java b/src/java/org/apache/cassandra/io/compress/CompressionParameters.java index df077ac..93e150f 100644 --- a/src/java/org/apache/cassandra/io/compress/CompressionParameters.java +++ b/src/java/org/apache/cassandra/io/compress/CompressionParameters.java @@ -56,7 +56,6 @@ public class CompressionParameters String chunkLength = options.get(CHUNK_LENGTH_KB); options.remove(SSTABLE_COMPRESSION); options.remove(CHUNK_LENGTH_KB); -options.remove(CRC_CHECK_CHANCE); CompressionParameters cp = new CompressionParameters(sstableCompressionClass, parseChunkLength(chunkLength), options); cp.validate(); return cp; @@ -78,6 +77,7 @@ public class CompressionParameters this.chunkLength = chunkLength; this.otherOptions = otherOptions; String chance = otherOptions.get(CRC_CHECK_CHANCE); +otherOptions.remove(CRC_CHECK_CHANCE); this.crcChance = (chance == null) ? DEFAULT_CRC_CHECK_CHANCE : Double.parseDouble(chance); }
[jira] [Created] (CASSANDRA-5042) Make LeveledManifest more generic
Carl Yeksigian created CASSANDRA-5042: - Summary: Make LeveledManifest more generic Key: CASSANDRA-5042 URL: https://issues.apache.org/jira/browse/CASSANDRA-5042 Project: Cassandra Issue Type: Improvement Reporter: Carl Yeksigian Priority: Minor The idea of the compaction manifest seems like a general one for different compaction strategies. In a few places, leveled manifest is named directly, e.g. Directories. Those places should be changed to just refer to manifest. Also, leveled manifest should be broken out into an abstract class which contains the generations without knowledge of what the different generations are. This way, leveled manifest remains for leveled compaction, while other compaction strategies can use the abstract manifest. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
git commit: ninja relocate crc_check_chance removal from options list
Updated Branches: refs/heads/cassandra-1.2 0934bffa1 - b49ca58b2 ninja relocate crc_check_chance removal from options list Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b49ca58b Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b49ca58b Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b49ca58b Branch: refs/heads/cassandra-1.2 Commit: b49ca58b2a7fb272e21dd2acd00996483a36ddcc Parents: 0934bff Author: Jake Luciani jluci...@bluemountaincapital.com Authored: Fri Dec 7 12:50:49 2012 -0500 Committer: Jake Luciani jluci...@bluemountaincapital.com Committed: Fri Dec 7 12:57:33 2012 -0500 -- .../io/compress/CompressionParameters.java |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/b49ca58b/src/java/org/apache/cassandra/io/compress/CompressionParameters.java -- diff --git a/src/java/org/apache/cassandra/io/compress/CompressionParameters.java b/src/java/org/apache/cassandra/io/compress/CompressionParameters.java index df077ac..93e150f 100644 --- a/src/java/org/apache/cassandra/io/compress/CompressionParameters.java +++ b/src/java/org/apache/cassandra/io/compress/CompressionParameters.java @@ -56,7 +56,6 @@ public class CompressionParameters String chunkLength = options.get(CHUNK_LENGTH_KB); options.remove(SSTABLE_COMPRESSION); options.remove(CHUNK_LENGTH_KB); -options.remove(CRC_CHECK_CHANCE); CompressionParameters cp = new CompressionParameters(sstableCompressionClass, parseChunkLength(chunkLength), options); cp.validate(); return cp; @@ -78,6 +77,7 @@ public class CompressionParameters this.chunkLength = chunkLength; this.otherOptions = otherOptions; String chance = otherOptions.get(CRC_CHECK_CHANCE); +otherOptions.remove(CRC_CHECK_CHANCE); this.crcChance = (chance == null) ? DEFAULT_CRC_CHECK_CHANCE : Double.parseDouble(chance); }
[jira] [Commented] (CASSANDRA-5042) Make LeveledManifest more generic
[ https://issues.apache.org/jira/browse/CASSANDRA-5042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13526578#comment-13526578 ] Jonathan Ellis commented on CASSANDRA-5042: --- Are you trying to solve a specific problem or just a fan of abstraction for its own sake? If the latter let's wontfix this. Make LeveledManifest more generic - Key: CASSANDRA-5042 URL: https://issues.apache.org/jira/browse/CASSANDRA-5042 Project: Cassandra Issue Type: Improvement Reporter: Carl Yeksigian Priority: Minor The idea of the compaction manifest seems like a general one for different compaction strategies. In a few places, leveled manifest is named directly, e.g. Directories. Those places should be changed to just refer to manifest. Also, leveled manifest should be broken out into an abstract class which contains the generations without knowledge of what the different generations are. This way, leveled manifest remains for leveled compaction, while other compaction strategies can use the abstract manifest. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-4880) Endless loop flushing+compacting system/schema_keyspaces and system/schema_columnfamilies
[ https://issues.apache.org/jira/browse/CASSANDRA-4880?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jonathan Ellis updated CASSANDRA-4880: -- Fix Version/s: 1.1.7 Endless loop flushing+compacting system/schema_keyspaces and system/schema_columnfamilies - Key: CASSANDRA-4880 URL: https://issues.apache.org/jira/browse/CASSANDRA-4880 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.1.6, 1.2.0 beta 1 Environment: Linux x86_64 3.4.9, sun-jdk 1.6.0_33 Reporter: Mina Naguib Assignee: Pavel Yaskevich Fix For: 1.1.7, 1.2.0 beta 3 Attachments: CASSANDRA-4880-fix.patch, CASSANDRA-4880.patch After upgrading a node from 1.1.2 to 1.1.6, the startup sequence entered a loop as seen here: http://mina.naguib.ca/misc/cassandra_116_startup_loop.txt Stopping and starting the node entered the same loop. Reverting back to 1.1.2 started successfully. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5042) Make LeveledManifest more generic
[ https://issues.apache.org/jira/browse/CASSANDRA-5042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13526585#comment-13526585 ] Carl Yeksigian commented on CASSANDRA-5042: --- I'm working on a new compaction strategy that would use a manifest. It will have a fixed set of levels rather than dependent on the sstable size, so we need a new class to represent the manifest. Making a class that both implementations subclass makes more sense than subclassing leveledmanifest. Make LeveledManifest more generic - Key: CASSANDRA-5042 URL: https://issues.apache.org/jira/browse/CASSANDRA-5042 Project: Cassandra Issue Type: Improvement Reporter: Carl Yeksigian Priority: Minor The idea of the compaction manifest seems like a general one for different compaction strategies. In a few places, leveled manifest is named directly, e.g. Directories. Those places should be changed to just refer to manifest. Also, leveled manifest should be broken out into an abstract class which contains the generations without knowledge of what the different generations are. This way, leveled manifest remains for leveled compaction, while other compaction strategies can use the abstract manifest. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5042) Make LeveledManifest more generic
[ https://issues.apache.org/jira/browse/CASSANDRA-5042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13526589#comment-13526589 ] Jonathan Ellis commented on CASSANDRA-5042: --- Okay, so let's do this. Perform your refactoring, write your compaction strategy, and if it actually does what you want then we can look at pushing the refactor into trunk. Make LeveledManifest more generic - Key: CASSANDRA-5042 URL: https://issues.apache.org/jira/browse/CASSANDRA-5042 Project: Cassandra Issue Type: Improvement Reporter: Carl Yeksigian Priority: Minor The idea of the compaction manifest seems like a general one for different compaction strategies. In a few places, leveled manifest is named directly, e.g. Directories. Those places should be changed to just refer to manifest. Also, leveled manifest should be broken out into an abstract class which contains the generations without knowledge of what the different generations are. This way, leveled manifest remains for leveled compaction, while other compaction strategies can use the abstract manifest. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5030) IndexHelper.IndexFor call throws AOB exception when passing multiple slices
[ https://issues.apache.org/jira/browse/CASSANDRA-5030?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] T Jake Luciani updated CASSANDRA-5030: -- Attachment: 5030-1.txt New version with recommended changes IndexHelper.IndexFor call throws AOB exception when passing multiple slices --- Key: CASSANDRA-5030 URL: https://issues.apache.org/jira/browse/CASSANDRA-5030 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.2.0 beta 3 Reporter: T Jake Luciani Assignee: T Jake Luciani Fix For: 1.2.0 rc1 Attachments: 5030-1.txt, 5030.txt While testing multiple slices I'm seeing some exceptions when a slice hits the end of an index. {code} ERROR [ReadStage:138179] 2012-12-04 18:04:28,796 CassandraDaemon.java (line 132) Exception in thread Thread[ReadStage:138179,5,main] java.lang.IndexOutOfBoundsException: toIndex = 6 at java.util.SubList.init(AbstractList.java:602) at java.util.RandomAccessSubList.init(AbstractList.java:758) at java.util.AbstractList.subList(AbstractList.java:468) at org.apache.cassandra.io.sstable.IndexHelper.indexFor(IndexHelper.java:182) at org.apache.cassandra.db.columniterator.IndexedSliceReader$IndexedBlockFetcher.setNextSlice(IndexedSliceReader.java:253) at org.apache.cassandra.db.columniterator.IndexedSliceReader$IndexedBlockFetcher.init(IndexedSliceReader.java:246) at org.apache.cassandra.db.columniterator.IndexedSliceReader.init(IndexedSliceReader.java:91) at org.apache.cassandra.db.columniterator.SSTableSliceIterator.createReader(SSTableSliceIterator.java:68) at org.apache.cassandra.db.columniterator.SSTableSliceIterator.init(SSTableSliceIterator.java:44) at org.apache.cassandra.db.filter.SliceQueryFilter.getSSTableColumnIterator(SliceQueryFilter.java:101) at org.apache.cassandra.db.filter.QueryFilter.getSSTableColumnIterator(QueryFilter.java:68) at org.apache.cassandra.db.CollationController.collectAllData(CollationController.java:267) at org.apache.cassandra.db.CollationController.getTopLevelColumns(CollationController.java:61) at org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(ColumnFamilyStore.java:1387) at org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1247) at org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1159) at org.apache.cassandra.db.Table.getRow(Table.java:348) at org.apache.cassandra.db.SliceFromReadCommand.getRow(SliceFromReadCommand.java:70) at org.apache.cassandra.db.ReadVerbHandler.doVerb(ReadVerbHandler.java:48) at org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:56) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) {code} I can reproduce this in a test, attached -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5030) IndexHelper.IndexFor call throws AOB exception when passing multiple slices
[ https://issues.apache.org/jira/browse/CASSANDRA-5030?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13526664#comment-13526664 ] Jonathan Ellis commented on CASSANDRA-5030: --- +1 IndexHelper.IndexFor call throws AOB exception when passing multiple slices --- Key: CASSANDRA-5030 URL: https://issues.apache.org/jira/browse/CASSANDRA-5030 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.2.0 beta 3 Reporter: T Jake Luciani Assignee: T Jake Luciani Fix For: 1.2.0 rc1 Attachments: 5030-1.txt, 5030.txt While testing multiple slices I'm seeing some exceptions when a slice hits the end of an index. {code} ERROR [ReadStage:138179] 2012-12-04 18:04:28,796 CassandraDaemon.java (line 132) Exception in thread Thread[ReadStage:138179,5,main] java.lang.IndexOutOfBoundsException: toIndex = 6 at java.util.SubList.init(AbstractList.java:602) at java.util.RandomAccessSubList.init(AbstractList.java:758) at java.util.AbstractList.subList(AbstractList.java:468) at org.apache.cassandra.io.sstable.IndexHelper.indexFor(IndexHelper.java:182) at org.apache.cassandra.db.columniterator.IndexedSliceReader$IndexedBlockFetcher.setNextSlice(IndexedSliceReader.java:253) at org.apache.cassandra.db.columniterator.IndexedSliceReader$IndexedBlockFetcher.init(IndexedSliceReader.java:246) at org.apache.cassandra.db.columniterator.IndexedSliceReader.init(IndexedSliceReader.java:91) at org.apache.cassandra.db.columniterator.SSTableSliceIterator.createReader(SSTableSliceIterator.java:68) at org.apache.cassandra.db.columniterator.SSTableSliceIterator.init(SSTableSliceIterator.java:44) at org.apache.cassandra.db.filter.SliceQueryFilter.getSSTableColumnIterator(SliceQueryFilter.java:101) at org.apache.cassandra.db.filter.QueryFilter.getSSTableColumnIterator(QueryFilter.java:68) at org.apache.cassandra.db.CollationController.collectAllData(CollationController.java:267) at org.apache.cassandra.db.CollationController.getTopLevelColumns(CollationController.java:61) at org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(ColumnFamilyStore.java:1387) at org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1247) at org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1159) at org.apache.cassandra.db.Table.getRow(Table.java:348) at org.apache.cassandra.db.SliceFromReadCommand.getRow(SliceFromReadCommand.java:70) at org.apache.cassandra.db.ReadVerbHandler.doVerb(ReadVerbHandler.java:48) at org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:56) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) {code} I can reproduce this in a test, attached -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5013) disallow bloom filter false positive chance of 0
[ https://issues.apache.org/jira/browse/CASSANDRA-5013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13526706#comment-13526706 ] Brandon Williams commented on CASSANDRA-5013: - Sure, but let's apply this patch for 1.1.8 :) disallow bloom filter false positive chance of 0 Key: CASSANDRA-5013 URL: https://issues.apache.org/jira/browse/CASSANDRA-5013 Project: Cassandra Issue Type: Bug Components: Config Reporter: Matthew F. Dennis Assignee: Brandon Williams Priority: Minor Fix For: 1.1.8 Attachments: 5013.txt {pre} ERROR [CompactionExecutor:16] 2012-11-30 08:44:32,546 SSTableWriter.java (line 414) Bloom filter FP chance of zero isn't supposed to happen {pre} when attempting to set it to zero, C* should either disallow the change or should just interpret 0 as make it the default and not continually log the above error message -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5013) disallow bloom filter false positive chance of 0
[ https://issues.apache.org/jira/browse/CASSANDRA-5013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13526714#comment-13526714 ] Jonathan Ellis commented on CASSANDRA-5013: --- I'm not sure at all this is going to work as designed. The comments there say this isn't supposed to happen which makes me think that there is some code somewhere else that tries to get rid of zeros. That complexity is gone in 1.2 (since we gave up on grandfathering in the pre-1.0? code that calls the 15 bucket path) so I'd rather stick with changes there than risk regressions. disallow bloom filter false positive chance of 0 Key: CASSANDRA-5013 URL: https://issues.apache.org/jira/browse/CASSANDRA-5013 Project: Cassandra Issue Type: Bug Components: Config Reporter: Matthew F. Dennis Assignee: Brandon Williams Priority: Minor Fix For: 1.1.8 Attachments: 5013.txt {pre} ERROR [CompactionExecutor:16] 2012-11-30 08:44:32,546 SSTableWriter.java (line 414) Bloom filter FP chance of zero isn't supposed to happen {pre} when attempting to set it to zero, C* should either disallow the change or should just interpret 0 as make it the default and not continually log the above error message -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
git commit: Fix for IndexHelper.IndexFor OOB Exception
Updated Branches: refs/heads/cassandra-1.2.0 248d6266e - f91001a08 Fix for IndexHelper.IndexFor OOB Exception Patch by tjake; reviewed by jbellis for CASSANDRA-5030 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f91001a0 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f91001a0 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f91001a0 Branch: refs/heads/cassandra-1.2.0 Commit: f91001a085886a75f62c7eef019fd32bdc4c9fe1 Parents: 248d626 Author: Jake Luciani jluci...@bluemountaincapital.com Authored: Fri Dec 7 14:47:52 2012 -0500 Committer: Jake Luciani jluci...@bluemountaincapital.com Committed: Fri Dec 7 14:47:52 2012 -0500 -- CHANGES.txt|2 +- .../db/columniterator/SSTableNamesIterator.java|2 +- .../apache/cassandra/io/sstable/IndexHelper.java |4 ++ .../cassandra/io/sstable/IndexHelperTest.java | 33 ++- 4 files changed, 28 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f91001a0/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index d3e04a7..9a41c87 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,7 +8,7 @@ * Fix message when trying to alter a clustering key type (CASSANDRA-5012) Merged from 1.1 * Improve schema propagation performance (CASSANDRA-5025) - + * Fix for IndexHelper.IndexFor throws OOB Exception (CASSANDRA-5030) 1.2-beta3 * make consistency level configurable in cqlsh (CASSANDRA-4829) http://git-wip-us.apache.org/repos/asf/cassandra/blob/f91001a0/src/java/org/apache/cassandra/db/columniterator/SSTableNamesIterator.java -- diff --git a/src/java/org/apache/cassandra/db/columniterator/SSTableNamesIterator.java b/src/java/org/apache/cassandra/db/columniterator/SSTableNamesIterator.java index 766c282..da4631d 100644 --- a/src/java/org/apache/cassandra/db/columniterator/SSTableNamesIterator.java +++ b/src/java/org/apache/cassandra/db/columniterator/SSTableNamesIterator.java @@ -234,7 +234,7 @@ public class SSTableNamesIterator extends SimpleAbstractColumnIterator implement for (ByteBuffer name : filteredColumnNames) { int index = IndexHelper.indexFor(name, indexList, comparator, false, lastIndexIdx); -if (index == indexList.size()) +if (index 0 || index == indexList.size()) continue; IndexHelper.IndexInfo indexInfo = indexList.get(index); // Check the index block does contain the column names and that we haven't inserted this block yet. http://git-wip-us.apache.org/repos/asf/cassandra/blob/f91001a0/src/java/org/apache/cassandra/io/sstable/IndexHelper.java -- diff --git a/src/java/org/apache/cassandra/io/sstable/IndexHelper.java b/src/java/org/apache/cassandra/io/sstable/IndexHelper.java index d01c45d..6a2e101 100644 --- a/src/java/org/apache/cassandra/io/sstable/IndexHelper.java +++ b/src/java/org/apache/cassandra/io/sstable/IndexHelper.java @@ -154,6 +154,10 @@ public class IndexHelper { if (name.remaining() == 0 reversed) return indexList.size() - 1; + +if (lastIndex = indexList.size()) +return -1; + IndexInfo target = new IndexInfo(name, name, 0, 0); /* Take the example from the unit test, and say your index looks like this: http://git-wip-us.apache.org/repos/asf/cassandra/blob/f91001a0/test/unit/org/apache/cassandra/io/sstable/IndexHelperTest.java -- diff --git a/test/unit/org/apache/cassandra/io/sstable/IndexHelperTest.java b/test/unit/org/apache/cassandra/io/sstable/IndexHelperTest.java index d5370d6..d96cab1 100644 --- a/test/unit/org/apache/cassandra/io/sstable/IndexHelperTest.java +++ b/test/unit/org/apache/cassandra/io/sstable/IndexHelperTest.java @@ -20,6 +20,9 @@ package org.apache.cassandra.io.sstable; import java.util.ArrayList; import java.util.List; + +import static junit.framework.Assert.*; + import org.junit.Test; import org.apache.cassandra.db.marshal.AbstractType; @@ -39,16 +42,24 @@ public class IndexHelperTest AbstractType comp = IntegerType.instance; -assert 0 == IndexHelper.indexFor(bytes(-1L), indexes, comp, false, -1); -assert 0 == IndexHelper.indexFor(bytes(5L), indexes, comp, false, -1); -assert 1 == IndexHelper.indexFor(bytes(12L), indexes, comp, false, -1); -assert 2 == IndexHelper.indexFor(bytes(17L), indexes, comp, false, -1); -assert 3 == IndexHelper.indexFor(bytes(100L), indexes,
[jira] [Updated] (CASSANDRA-5042) Make LeveledManifest more generic
[ https://issues.apache.org/jira/browse/CASSANDRA-5042?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] T Jake Luciani updated CASSANDRA-5042: -- Assignee: Carl Yeksigian Make LeveledManifest more generic - Key: CASSANDRA-5042 URL: https://issues.apache.org/jira/browse/CASSANDRA-5042 Project: Cassandra Issue Type: Improvement Reporter: Carl Yeksigian Assignee: Carl Yeksigian Priority: Minor The idea of the compaction manifest seems like a general one for different compaction strategies. In a few places, leveled manifest is named directly, e.g. Directories. Those places should be changed to just refer to manifest. Also, leveled manifest should be broken out into an abstract class which contains the generations without knowledge of what the different generations are. This way, leveled manifest remains for leveled compaction, while other compaction strategies can use the abstract manifest. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5025) Schema push/pull race
[ https://issues.apache.org/jira/browse/CASSANDRA-5025?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chris Herron updated CASSANDRA-5025: Attachment: 5025-v3.txt Attached patch 3 proposing the use of Schema.emptyVersion to differentiate StorageServer.joinTokenRing from other scenarios so that migration delay can be skipped for bootstrapping. Schema push/pull race - Key: CASSANDRA-5025 URL: https://issues.apache.org/jira/browse/CASSANDRA-5025 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.1.0 Reporter: Jonathan Ellis Assignee: Jonathan Ellis Priority: Minor Fix For: 1.1.8 Attachments: 5025.txt, 5025-v2.txt, 5025-v3.txt When a schema change is made, the coordinator pushes the delta to the other nodes in the cluster. This is more efficient than sending the entire schema. But the coordinator also announces the new schema version, so the other nodes' reception of the new version races with processing the delta, and usually seeing the new schema wins. So the other nodes also issue a pull to the coordinator for the entire schema. Thus, schema changes tend to become O(n) in the number of KS and CF present. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5025) Schema push/pull race
[ https://issues.apache.org/jira/browse/CASSANDRA-5025?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brandon Williams updated CASSANDRA-5025: Attachment: 5025-v4.txt Close, but maybeScheduleSchemaPull is actually called by the bootstrapping node, so the check needs to see if the current schema version is empty and if so pull. v4 attached. Schema push/pull race - Key: CASSANDRA-5025 URL: https://issues.apache.org/jira/browse/CASSANDRA-5025 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.1.0 Reporter: Jonathan Ellis Assignee: Jonathan Ellis Priority: Minor Fix For: 1.1.8 Attachments: 5025.txt, 5025-v2.txt, 5025-v3.txt, 5025-v4.txt When a schema change is made, the coordinator pushes the delta to the other nodes in the cluster. This is more efficient than sending the entire schema. But the coordinator also announces the new schema version, so the other nodes' reception of the new version races with processing the delta, and usually seeing the new schema wins. So the other nodes also issue a pull to the coordinator for the entire schema. Thus, schema changes tend to become O(n) in the number of KS and CF present. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5025) Schema push/pull race
[ https://issues.apache.org/jira/browse/CASSANDRA-5025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13526778#comment-13526778 ] Jonathan Ellis commented on CASSANDRA-5025: --- +1 Schema push/pull race - Key: CASSANDRA-5025 URL: https://issues.apache.org/jira/browse/CASSANDRA-5025 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.1.0 Reporter: Jonathan Ellis Assignee: Jonathan Ellis Priority: Minor Fix For: 1.1.8 Attachments: 5025.txt, 5025-v2.txt, 5025-v3.txt, 5025-v4.txt When a schema change is made, the coordinator pushes the delta to the other nodes in the cluster. This is more efficient than sending the entire schema. But the coordinator also announces the new schema version, so the other nodes' reception of the new version races with processing the delta, and usually seeing the new schema wins. So the other nodes also issue a pull to the coordinator for the entire schema. Thus, schema changes tend to become O(n) in the number of KS and CF present. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (CASSANDRA-5043) Small CollationController refactoring and CFS.getRawCachedRow(DecoratedKey) fix.
Pavel Yaskevich created CASSANDRA-5043: -- Summary: Small CollationController refactoring and CFS.getRawCachedRow(DecoratedKey) fix. Key: CASSANDRA-5043 URL: https://issues.apache.org/jira/browse/CASSANDRA-5043 Project: Cassandra Issue Type: Improvement Components: Core Reporter: Pavel Yaskevich Assignee: Pavel Yaskevich Priority: Minor Fix For: 1.2.0 Attachments: CASSANDRA-5043.patch CollactionController can construct a factory on init based on mutableColumns parameter. ArrayBackedSortedColumns proven to be better for counters as well as normal columns (row size from 5 to 75 columns). CFS.getRawCachedRow would copy key byte array each time it contracts a RowCacheKey so we want to avoid that where possible. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5043) Small CollationController refactoring and CFS.getRawCachedRow(DecoratedKey) fix.
[ https://issues.apache.org/jira/browse/CASSANDRA-5043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pavel Yaskevich updated CASSANDRA-5043: --- Attachment: CASSANDRA-5043.patch Small CollationController refactoring and CFS.getRawCachedRow(DecoratedKey) fix. Key: CASSANDRA-5043 URL: https://issues.apache.org/jira/browse/CASSANDRA-5043 Project: Cassandra Issue Type: Improvement Components: Core Reporter: Pavel Yaskevich Assignee: Pavel Yaskevich Priority: Minor Fix For: 1.2.0 Attachments: CASSANDRA-5043.patch CollactionController can construct a factory on init based on mutableColumns parameter. ArrayBackedSortedColumns proven to be better for counters as well as normal columns (row size from 5 to 75 columns). CFS.getRawCachedRow would copy key byte array each time it contracts a RowCacheKey so we want to avoid that where possible. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[3/14] git commit: Merge branch 'cassandra-1.2.0' into cassandra-1.2
Merge branch 'cassandra-1.2.0' into cassandra-1.2 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/cf3cde3d Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/cf3cde3d Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/cf3cde3d Branch: refs/heads/trunk Commit: cf3cde3d99ba9250d6f606cc52e15f50d3c7ddf7 Parents: b49ca58 44545d3 Author: Brandon Williams brandonwilli...@apache.org Authored: Fri Dec 7 15:43:55 2012 -0600 Committer: Brandon Williams brandonwilli...@apache.org Committed: Fri Dec 7 15:43:55 2012 -0600 -- CHANGES.txt|2 +- .../db/columniterator/SSTableNamesIterator.java|2 +- .../apache/cassandra/io/sstable/IndexHelper.java |4 + .../apache/cassandra/service/MigrationManager.java | 56 +-- .../apache/cassandra/service/StorageService.java |5 +- .../cassandra/io/sstable/IndexHelperTest.java | 33 ++--- 6 files changed, 66 insertions(+), 36 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/cf3cde3d/CHANGES.txt --
[4/14] git commit: Merge branch 'cassandra-1.1' into cassandra-1.2.0
Merge branch 'cassandra-1.1' into cassandra-1.2.0 Conflicts: src/java/org/apache/cassandra/service/MigrationManager.java src/java/org/apache/cassandra/service/StorageService.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/44545d38 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/44545d38 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/44545d38 Branch: refs/heads/trunk Commit: 44545d380d639926c2a5734b70d5165bd22b0ca7 Parents: f91001a 442a7b3 Author: Brandon Williams brandonwilli...@apache.org Authored: Fri Dec 7 15:43:42 2012 -0600 Committer: Brandon Williams brandonwilli...@apache.org Committed: Fri Dec 7 15:43:42 2012 -0600 -- .../apache/cassandra/service/MigrationManager.java | 56 +-- .../apache/cassandra/service/StorageService.java |5 +- 2 files changed, 38 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/44545d38/src/java/org/apache/cassandra/service/MigrationManager.java -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/44545d38/src/java/org/apache/cassandra/service/StorageService.java -- diff --cc src/java/org/apache/cassandra/service/StorageService.java index bc418f4,d041279..276136a --- a/src/java/org/apache/cassandra/service/StorageService.java +++ b/src/java/org/apache/cassandra/service/StorageService.java @@@ -522,16 -544,14 +522,17 @@@ public class StorageService implements Gossiper.instance.register(this); Gossiper.instance.register(migrationManager); Gossiper.instance.start(SystemTable.incrementAndGetGeneration()); // needed for node-ring gathering. - +// gossip network proto version + Gossiper.instance.addLocalApplicationState(ApplicationState.NET_VERSION, valueFactory.networkVersion()); +Gossiper.instance.addLocalApplicationState(ApplicationState.HOST_ID, valueFactory.hostId(SystemTable.getLocalHostId())); +// gossip snitch infos (local DC and rack) +gossipSnitchInfo(); - // gossip schema version when gossiper is running - Schema.instance.updateVersionAndAnnounce(); + // gossip Schema.emptyVersion forcing immediate check for schema updates (see MigrationManager#maybeScheduleSchemaPull) + Schema.instance.updateVersion(); // Ensure we know our own actual Schema UUID in preparation for updates + MigrationManager.passiveAnnounce(Schema.emptyVersion); - // add rpc listening info Gossiper.instance.addLocalApplicationState(ApplicationState.RPC_ADDRESS, valueFactory.rpcaddress(DatabaseDescriptor.getRpcAddress())); -if (null != DatabaseDescriptor.getReplaceToken()) +if (0 != DatabaseDescriptor.getReplaceTokens().size()) Gossiper.instance.addLocalApplicationState(ApplicationState.STATUS, valueFactory.hibernate(true)); MessagingService.instance().listen(FBUtilities.getLocalAddress());
[2/14] git commit: Merge branch 'cassandra-1.2.0' into cassandra-1.2
Merge branch 'cassandra-1.2.0' into cassandra-1.2 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/cf3cde3d Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/cf3cde3d Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/cf3cde3d Branch: refs/heads/cassandra-1.2 Commit: cf3cde3d99ba9250d6f606cc52e15f50d3c7ddf7 Parents: b49ca58 44545d3 Author: Brandon Williams brandonwilli...@apache.org Authored: Fri Dec 7 15:43:55 2012 -0600 Committer: Brandon Williams brandonwilli...@apache.org Committed: Fri Dec 7 15:43:55 2012 -0600 -- CHANGES.txt|2 +- .../db/columniterator/SSTableNamesIterator.java|2 +- .../apache/cassandra/io/sstable/IndexHelper.java |4 + .../apache/cassandra/service/MigrationManager.java | 56 +-- .../apache/cassandra/service/StorageService.java |5 +- .../cassandra/io/sstable/IndexHelperTest.java | 33 ++--- 6 files changed, 66 insertions(+), 36 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/cf3cde3d/CHANGES.txt --
[5/14] git commit: Merge branch 'cassandra-1.1' into cassandra-1.2.0
Merge branch 'cassandra-1.1' into cassandra-1.2.0 Conflicts: src/java/org/apache/cassandra/service/MigrationManager.java src/java/org/apache/cassandra/service/StorageService.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/44545d38 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/44545d38 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/44545d38 Branch: refs/heads/cassandra-1.2.0 Commit: 44545d380d639926c2a5734b70d5165bd22b0ca7 Parents: f91001a 442a7b3 Author: Brandon Williams brandonwilli...@apache.org Authored: Fri Dec 7 15:43:42 2012 -0600 Committer: Brandon Williams brandonwilli...@apache.org Committed: Fri Dec 7 15:43:42 2012 -0600 -- .../apache/cassandra/service/MigrationManager.java | 56 +-- .../apache/cassandra/service/StorageService.java |5 +- 2 files changed, 38 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/44545d38/src/java/org/apache/cassandra/service/MigrationManager.java -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/44545d38/src/java/org/apache/cassandra/service/StorageService.java -- diff --cc src/java/org/apache/cassandra/service/StorageService.java index bc418f4,d041279..276136a --- a/src/java/org/apache/cassandra/service/StorageService.java +++ b/src/java/org/apache/cassandra/service/StorageService.java @@@ -522,16 -544,14 +522,17 @@@ public class StorageService implements Gossiper.instance.register(this); Gossiper.instance.register(migrationManager); Gossiper.instance.start(SystemTable.incrementAndGetGeneration()); // needed for node-ring gathering. - +// gossip network proto version + Gossiper.instance.addLocalApplicationState(ApplicationState.NET_VERSION, valueFactory.networkVersion()); +Gossiper.instance.addLocalApplicationState(ApplicationState.HOST_ID, valueFactory.hostId(SystemTable.getLocalHostId())); +// gossip snitch infos (local DC and rack) +gossipSnitchInfo(); - // gossip schema version when gossiper is running - Schema.instance.updateVersionAndAnnounce(); + // gossip Schema.emptyVersion forcing immediate check for schema updates (see MigrationManager#maybeScheduleSchemaPull) + Schema.instance.updateVersion(); // Ensure we know our own actual Schema UUID in preparation for updates + MigrationManager.passiveAnnounce(Schema.emptyVersion); - // add rpc listening info Gossiper.instance.addLocalApplicationState(ApplicationState.RPC_ADDRESS, valueFactory.rpcaddress(DatabaseDescriptor.getRpcAddress())); -if (null != DatabaseDescriptor.getReplaceToken()) +if (0 != DatabaseDescriptor.getReplaceTokens().size()) Gossiper.instance.addLocalApplicationState(ApplicationState.STATUS, valueFactory.hibernate(true)); MessagingService.instance().listen(FBUtilities.getLocalAddress());
[12/14] git commit: ninja relocate crc_check_chance removal from options list
ninja relocate crc_check_chance removal from options list Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b49ca58b Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b49ca58b Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b49ca58b Branch: refs/heads/trunk Commit: b49ca58b2a7fb272e21dd2acd00996483a36ddcc Parents: 0934bff Author: Jake Luciani jluci...@bluemountaincapital.com Authored: Fri Dec 7 12:50:49 2012 -0500 Committer: Jake Luciani jluci...@bluemountaincapital.com Committed: Fri Dec 7 12:57:33 2012 -0500 -- .../io/compress/CompressionParameters.java |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/b49ca58b/src/java/org/apache/cassandra/io/compress/CompressionParameters.java -- diff --git a/src/java/org/apache/cassandra/io/compress/CompressionParameters.java b/src/java/org/apache/cassandra/io/compress/CompressionParameters.java index df077ac..93e150f 100644 --- a/src/java/org/apache/cassandra/io/compress/CompressionParameters.java +++ b/src/java/org/apache/cassandra/io/compress/CompressionParameters.java @@ -56,7 +56,6 @@ public class CompressionParameters String chunkLength = options.get(CHUNK_LENGTH_KB); options.remove(SSTABLE_COMPRESSION); options.remove(CHUNK_LENGTH_KB); -options.remove(CRC_CHECK_CHANCE); CompressionParameters cp = new CompressionParameters(sstableCompressionClass, parseChunkLength(chunkLength), options); cp.validate(); return cp; @@ -78,6 +77,7 @@ public class CompressionParameters this.chunkLength = chunkLength; this.otherOptions = otherOptions; String chance = otherOptions.get(CRC_CHECK_CHANCE); +otherOptions.remove(CRC_CHECK_CHANCE); this.crcChance = (chance == null) ? DEFAULT_CRC_CHECK_CHANCE : Double.parseDouble(chance); }
[6/14] git commit: Merge branch 'cassandra-1.1' into cassandra-1.2.0
Merge branch 'cassandra-1.1' into cassandra-1.2.0 Conflicts: src/java/org/apache/cassandra/service/MigrationManager.java src/java/org/apache/cassandra/service/StorageService.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/44545d38 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/44545d38 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/44545d38 Branch: refs/heads/cassandra-1.2 Commit: 44545d380d639926c2a5734b70d5165bd22b0ca7 Parents: f91001a 442a7b3 Author: Brandon Williams brandonwilli...@apache.org Authored: Fri Dec 7 15:43:42 2012 -0600 Committer: Brandon Williams brandonwilli...@apache.org Committed: Fri Dec 7 15:43:42 2012 -0600 -- .../apache/cassandra/service/MigrationManager.java | 56 +-- .../apache/cassandra/service/StorageService.java |5 +- 2 files changed, 38 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/44545d38/src/java/org/apache/cassandra/service/MigrationManager.java -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/44545d38/src/java/org/apache/cassandra/service/StorageService.java -- diff --cc src/java/org/apache/cassandra/service/StorageService.java index bc418f4,d041279..276136a --- a/src/java/org/apache/cassandra/service/StorageService.java +++ b/src/java/org/apache/cassandra/service/StorageService.java @@@ -522,16 -544,14 +522,17 @@@ public class StorageService implements Gossiper.instance.register(this); Gossiper.instance.register(migrationManager); Gossiper.instance.start(SystemTable.incrementAndGetGeneration()); // needed for node-ring gathering. - +// gossip network proto version + Gossiper.instance.addLocalApplicationState(ApplicationState.NET_VERSION, valueFactory.networkVersion()); +Gossiper.instance.addLocalApplicationState(ApplicationState.HOST_ID, valueFactory.hostId(SystemTable.getLocalHostId())); +// gossip snitch infos (local DC and rack) +gossipSnitchInfo(); - // gossip schema version when gossiper is running - Schema.instance.updateVersionAndAnnounce(); + // gossip Schema.emptyVersion forcing immediate check for schema updates (see MigrationManager#maybeScheduleSchemaPull) + Schema.instance.updateVersion(); // Ensure we know our own actual Schema UUID in preparation for updates + MigrationManager.passiveAnnounce(Schema.emptyVersion); - // add rpc listening info Gossiper.instance.addLocalApplicationState(ApplicationState.RPC_ADDRESS, valueFactory.rpcaddress(DatabaseDescriptor.getRpcAddress())); -if (null != DatabaseDescriptor.getReplaceToken()) +if (0 != DatabaseDescriptor.getReplaceTokens().size()) Gossiper.instance.addLocalApplicationState(ApplicationState.STATUS, valueFactory.hibernate(true)); MessagingService.instance().listen(FBUtilities.getLocalAddress());
[11/14] git commit: Fix for IndexHelper.IndexFor OOB Exception
Fix for IndexHelper.IndexFor OOB Exception Patch by tjake; reviewed by jbellis for CASSANDRA-5030 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f91001a0 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f91001a0 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f91001a0 Branch: refs/heads/trunk Commit: f91001a085886a75f62c7eef019fd32bdc4c9fe1 Parents: 248d626 Author: Jake Luciani jluci...@bluemountaincapital.com Authored: Fri Dec 7 14:47:52 2012 -0500 Committer: Jake Luciani jluci...@bluemountaincapital.com Committed: Fri Dec 7 14:47:52 2012 -0500 -- CHANGES.txt|2 +- .../db/columniterator/SSTableNamesIterator.java|2 +- .../apache/cassandra/io/sstable/IndexHelper.java |4 ++ .../cassandra/io/sstable/IndexHelperTest.java | 33 ++- 4 files changed, 28 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f91001a0/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index d3e04a7..9a41c87 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,7 +8,7 @@ * Fix message when trying to alter a clustering key type (CASSANDRA-5012) Merged from 1.1 * Improve schema propagation performance (CASSANDRA-5025) - + * Fix for IndexHelper.IndexFor throws OOB Exception (CASSANDRA-5030) 1.2-beta3 * make consistency level configurable in cqlsh (CASSANDRA-4829) http://git-wip-us.apache.org/repos/asf/cassandra/blob/f91001a0/src/java/org/apache/cassandra/db/columniterator/SSTableNamesIterator.java -- diff --git a/src/java/org/apache/cassandra/db/columniterator/SSTableNamesIterator.java b/src/java/org/apache/cassandra/db/columniterator/SSTableNamesIterator.java index 766c282..da4631d 100644 --- a/src/java/org/apache/cassandra/db/columniterator/SSTableNamesIterator.java +++ b/src/java/org/apache/cassandra/db/columniterator/SSTableNamesIterator.java @@ -234,7 +234,7 @@ public class SSTableNamesIterator extends SimpleAbstractColumnIterator implement for (ByteBuffer name : filteredColumnNames) { int index = IndexHelper.indexFor(name, indexList, comparator, false, lastIndexIdx); -if (index == indexList.size()) +if (index 0 || index == indexList.size()) continue; IndexHelper.IndexInfo indexInfo = indexList.get(index); // Check the index block does contain the column names and that we haven't inserted this block yet. http://git-wip-us.apache.org/repos/asf/cassandra/blob/f91001a0/src/java/org/apache/cassandra/io/sstable/IndexHelper.java -- diff --git a/src/java/org/apache/cassandra/io/sstable/IndexHelper.java b/src/java/org/apache/cassandra/io/sstable/IndexHelper.java index d01c45d..6a2e101 100644 --- a/src/java/org/apache/cassandra/io/sstable/IndexHelper.java +++ b/src/java/org/apache/cassandra/io/sstable/IndexHelper.java @@ -154,6 +154,10 @@ public class IndexHelper { if (name.remaining() == 0 reversed) return indexList.size() - 1; + +if (lastIndex = indexList.size()) +return -1; + IndexInfo target = new IndexInfo(name, name, 0, 0); /* Take the example from the unit test, and say your index looks like this: http://git-wip-us.apache.org/repos/asf/cassandra/blob/f91001a0/test/unit/org/apache/cassandra/io/sstable/IndexHelperTest.java -- diff --git a/test/unit/org/apache/cassandra/io/sstable/IndexHelperTest.java b/test/unit/org/apache/cassandra/io/sstable/IndexHelperTest.java index d5370d6..d96cab1 100644 --- a/test/unit/org/apache/cassandra/io/sstable/IndexHelperTest.java +++ b/test/unit/org/apache/cassandra/io/sstable/IndexHelperTest.java @@ -20,6 +20,9 @@ package org.apache.cassandra.io.sstable; import java.util.ArrayList; import java.util.List; + +import static junit.framework.Assert.*; + import org.junit.Test; import org.apache.cassandra.db.marshal.AbstractType; @@ -39,16 +42,24 @@ public class IndexHelperTest AbstractType comp = IntegerType.instance; -assert 0 == IndexHelper.indexFor(bytes(-1L), indexes, comp, false, -1); -assert 0 == IndexHelper.indexFor(bytes(5L), indexes, comp, false, -1); -assert 1 == IndexHelper.indexFor(bytes(12L), indexes, comp, false, -1); -assert 2 == IndexHelper.indexFor(bytes(17L), indexes, comp, false, -1); -assert 3 == IndexHelper.indexFor(bytes(100L), indexes, comp, false, -1); - -assert -1 == IndexHelper.indexFor(bytes(-1L),
[9/14] git commit: Pull schema immediately when bootstrapping. Patch by Chris Herron and brandonwilliams, reviewed by jbellis for CASSANDRA-5025
Pull schema immediately when bootstrapping. Patch by Chris Herron and brandonwilliams, reviewed by jbellis for CASSANDRA-5025 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/442a7b3a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/442a7b3a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/442a7b3a Branch: refs/heads/cassandra-1.2.0 Commit: 442a7b3a60c5cc765221cc6f07add3546a8e9c3d Parents: 8d55474 Author: Brandon Williams brandonwilli...@apache.org Authored: Fri Dec 7 15:31:25 2012 -0600 Committer: Brandon Williams brandonwilli...@apache.org Committed: Fri Dec 7 15:31:25 2012 -0600 -- .../apache/cassandra/service/MigrationManager.java | 57 +-- .../apache/cassandra/service/StorageService.java |7 ++- 2 files changed, 41 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/442a7b3a/src/java/org/apache/cassandra/service/MigrationManager.java -- diff --git a/src/java/org/apache/cassandra/service/MigrationManager.java b/src/java/org/apache/cassandra/service/MigrationManager.java index 102ea12..72a9a84 100644 --- a/src/java/org/apache/cassandra/service/MigrationManager.java +++ b/src/java/org/apache/cassandra/service/MigrationManager.java @@ -25,6 +25,7 @@ import java.io.IOException; import java.net.InetAddress; import java.nio.ByteBuffer; import java.util.*; +import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import java.util.ArrayList; @@ -92,6 +93,10 @@ public class MigrationManager implements IEndpointStateChangeSubscriber public void onRemove(InetAddress endpoint) {} +/** + * If versions differ this node sends request with local migration list to the endpoint + * and expecting to receive a list of migrations to apply locally. + */ private static void maybeScheduleSchemaPull(final UUID theirVersion, final InetAddress endpoint) { // Can't request migrations from nodes with versions younger than 1.1.7 @@ -101,29 +106,39 @@ public class MigrationManager implements IEndpointStateChangeSubscriber if (Schema.instance.getVersion().equals(theirVersion)) return; -// check our schema vs theirs, after a delay to make sure we have a chance to apply any changes -// being pushed out simultaneously. See CASSANDRA-5025 -Runnable runnable = new Runnable() +if (Schema.emptyVersion.equals(Schema.instance.getVersion())) { -public void run() +// If we think we may be bootstrapping, submit MigrationTask immediately +submitMigrationTask(endpoint); +} +else +{ +// Include a delay to make sure we have a chance to apply any changes being +// pushed out simultaneously. See CASSANDRA-5025 +Runnable runnable = new Runnable() { -// grab the latest version of the schema since it may have changed again since the initial scheduling -VersionedValue value = Gossiper.instance.getEndpointStateForEndpoint(endpoint).getApplicationState(ApplicationState.SCHEMA); -UUID currentVersion = UUID.fromString(value.value); -if (Schema.instance.getVersion().equals(currentVersion)) -return; - -/** - * if versions differ this node sends request with local migration list to the endpoint - * and expecting to receive a list of migrations to apply locally. - * - * Do not de-ref the future because that causes distributed deadlock (CASSANDRA-3832) because we are - * running in the gossip stage. - */ -StageManager.getStage(Stage.MIGRATION).submit(new MigrationTask(endpoint)); -} -}; -StorageService.optionalTasks.schedule(runnable, 1, TimeUnit.MINUTES); +public void run() +{ +// grab the latest version of the schema since it may have changed again since the initial scheduling +VersionedValue value = Gossiper.instance.getEndpointStateForEndpoint(endpoint).getApplicationState(ApplicationState.SCHEMA); +UUID currentVersion = UUID.fromString(value.value); +if (Schema.instance.getVersion().equals(currentVersion)) +return; + +submitMigrationTask(endpoint); +} +}; +StorageService.optionalTasks.schedule(runnable, 1, TimeUnit.MINUTES); +} +} + +private static
[10/14] git commit: Fix for IndexHelper.IndexFor OOB Exception
Fix for IndexHelper.IndexFor OOB Exception Patch by tjake; reviewed by jbellis for CASSANDRA-5030 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f91001a0 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f91001a0 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f91001a0 Branch: refs/heads/cassandra-1.2 Commit: f91001a085886a75f62c7eef019fd32bdc4c9fe1 Parents: 248d626 Author: Jake Luciani jluci...@bluemountaincapital.com Authored: Fri Dec 7 14:47:52 2012 -0500 Committer: Jake Luciani jluci...@bluemountaincapital.com Committed: Fri Dec 7 14:47:52 2012 -0500 -- CHANGES.txt|2 +- .../db/columniterator/SSTableNamesIterator.java|2 +- .../apache/cassandra/io/sstable/IndexHelper.java |4 ++ .../cassandra/io/sstable/IndexHelperTest.java | 33 ++- 4 files changed, 28 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f91001a0/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index d3e04a7..9a41c87 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,7 +8,7 @@ * Fix message when trying to alter a clustering key type (CASSANDRA-5012) Merged from 1.1 * Improve schema propagation performance (CASSANDRA-5025) - + * Fix for IndexHelper.IndexFor throws OOB Exception (CASSANDRA-5030) 1.2-beta3 * make consistency level configurable in cqlsh (CASSANDRA-4829) http://git-wip-us.apache.org/repos/asf/cassandra/blob/f91001a0/src/java/org/apache/cassandra/db/columniterator/SSTableNamesIterator.java -- diff --git a/src/java/org/apache/cassandra/db/columniterator/SSTableNamesIterator.java b/src/java/org/apache/cassandra/db/columniterator/SSTableNamesIterator.java index 766c282..da4631d 100644 --- a/src/java/org/apache/cassandra/db/columniterator/SSTableNamesIterator.java +++ b/src/java/org/apache/cassandra/db/columniterator/SSTableNamesIterator.java @@ -234,7 +234,7 @@ public class SSTableNamesIterator extends SimpleAbstractColumnIterator implement for (ByteBuffer name : filteredColumnNames) { int index = IndexHelper.indexFor(name, indexList, comparator, false, lastIndexIdx); -if (index == indexList.size()) +if (index 0 || index == indexList.size()) continue; IndexHelper.IndexInfo indexInfo = indexList.get(index); // Check the index block does contain the column names and that we haven't inserted this block yet. http://git-wip-us.apache.org/repos/asf/cassandra/blob/f91001a0/src/java/org/apache/cassandra/io/sstable/IndexHelper.java -- diff --git a/src/java/org/apache/cassandra/io/sstable/IndexHelper.java b/src/java/org/apache/cassandra/io/sstable/IndexHelper.java index d01c45d..6a2e101 100644 --- a/src/java/org/apache/cassandra/io/sstable/IndexHelper.java +++ b/src/java/org/apache/cassandra/io/sstable/IndexHelper.java @@ -154,6 +154,10 @@ public class IndexHelper { if (name.remaining() == 0 reversed) return indexList.size() - 1; + +if (lastIndex = indexList.size()) +return -1; + IndexInfo target = new IndexInfo(name, name, 0, 0); /* Take the example from the unit test, and say your index looks like this: http://git-wip-us.apache.org/repos/asf/cassandra/blob/f91001a0/test/unit/org/apache/cassandra/io/sstable/IndexHelperTest.java -- diff --git a/test/unit/org/apache/cassandra/io/sstable/IndexHelperTest.java b/test/unit/org/apache/cassandra/io/sstable/IndexHelperTest.java index d5370d6..d96cab1 100644 --- a/test/unit/org/apache/cassandra/io/sstable/IndexHelperTest.java +++ b/test/unit/org/apache/cassandra/io/sstable/IndexHelperTest.java @@ -20,6 +20,9 @@ package org.apache.cassandra.io.sstable; import java.util.ArrayList; import java.util.List; + +import static junit.framework.Assert.*; + import org.junit.Test; import org.apache.cassandra.db.marshal.AbstractType; @@ -39,16 +42,24 @@ public class IndexHelperTest AbstractType comp = IntegerType.instance; -assert 0 == IndexHelper.indexFor(bytes(-1L), indexes, comp, false, -1); -assert 0 == IndexHelper.indexFor(bytes(5L), indexes, comp, false, -1); -assert 1 == IndexHelper.indexFor(bytes(12L), indexes, comp, false, -1); -assert 2 == IndexHelper.indexFor(bytes(17L), indexes, comp, false, -1); -assert 3 == IndexHelper.indexFor(bytes(100L), indexes, comp, false, -1); - -assert -1 ==
[13/14] git commit: ninja relocate crc_check_chance removal from options list
ninja relocate crc_check_chance removal from options list Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/248d6266 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/248d6266 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/248d6266 Branch: refs/heads/trunk Commit: 248d6266e67bae97a0a6f27776645768704df201 Parents: 8581be8 Author: Jake Luciani jluci...@bluemountaincapital.com Authored: Fri Dec 7 12:50:49 2012 -0500 Committer: Jake Luciani jluci...@bluemountaincapital.com Committed: Fri Dec 7 12:51:53 2012 -0500 -- .../io/compress/CompressionParameters.java |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/248d6266/src/java/org/apache/cassandra/io/compress/CompressionParameters.java -- diff --git a/src/java/org/apache/cassandra/io/compress/CompressionParameters.java b/src/java/org/apache/cassandra/io/compress/CompressionParameters.java index df077ac..93e150f 100644 --- a/src/java/org/apache/cassandra/io/compress/CompressionParameters.java +++ b/src/java/org/apache/cassandra/io/compress/CompressionParameters.java @@ -56,7 +56,6 @@ public class CompressionParameters String chunkLength = options.get(CHUNK_LENGTH_KB); options.remove(SSTABLE_COMPRESSION); options.remove(CHUNK_LENGTH_KB); -options.remove(CRC_CHECK_CHANCE); CompressionParameters cp = new CompressionParameters(sstableCompressionClass, parseChunkLength(chunkLength), options); cp.validate(); return cp; @@ -78,6 +77,7 @@ public class CompressionParameters this.chunkLength = chunkLength; this.otherOptions = otherOptions; String chance = otherOptions.get(CRC_CHECK_CHANCE); +otherOptions.remove(CRC_CHECK_CHANCE); this.crcChance = (chance == null) ? DEFAULT_CRC_CHECK_CHANCE : Double.parseDouble(chance); }
[7/14] git commit: Pull schema immediately when bootstrapping. Patch by Chris Herron and brandonwilliams, reviewed by jbellis for CASSANDRA-5025
Pull schema immediately when bootstrapping. Patch by Chris Herron and brandonwilliams, reviewed by jbellis for CASSANDRA-5025 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/442a7b3a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/442a7b3a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/442a7b3a Branch: refs/heads/trunk Commit: 442a7b3a60c5cc765221cc6f07add3546a8e9c3d Parents: 8d55474 Author: Brandon Williams brandonwilli...@apache.org Authored: Fri Dec 7 15:31:25 2012 -0600 Committer: Brandon Williams brandonwilli...@apache.org Committed: Fri Dec 7 15:31:25 2012 -0600 -- .../apache/cassandra/service/MigrationManager.java | 57 +-- .../apache/cassandra/service/StorageService.java |7 ++- 2 files changed, 41 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/442a7b3a/src/java/org/apache/cassandra/service/MigrationManager.java -- diff --git a/src/java/org/apache/cassandra/service/MigrationManager.java b/src/java/org/apache/cassandra/service/MigrationManager.java index 102ea12..72a9a84 100644 --- a/src/java/org/apache/cassandra/service/MigrationManager.java +++ b/src/java/org/apache/cassandra/service/MigrationManager.java @@ -25,6 +25,7 @@ import java.io.IOException; import java.net.InetAddress; import java.nio.ByteBuffer; import java.util.*; +import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import java.util.ArrayList; @@ -92,6 +93,10 @@ public class MigrationManager implements IEndpointStateChangeSubscriber public void onRemove(InetAddress endpoint) {} +/** + * If versions differ this node sends request with local migration list to the endpoint + * and expecting to receive a list of migrations to apply locally. + */ private static void maybeScheduleSchemaPull(final UUID theirVersion, final InetAddress endpoint) { // Can't request migrations from nodes with versions younger than 1.1.7 @@ -101,29 +106,39 @@ public class MigrationManager implements IEndpointStateChangeSubscriber if (Schema.instance.getVersion().equals(theirVersion)) return; -// check our schema vs theirs, after a delay to make sure we have a chance to apply any changes -// being pushed out simultaneously. See CASSANDRA-5025 -Runnable runnable = new Runnable() +if (Schema.emptyVersion.equals(Schema.instance.getVersion())) { -public void run() +// If we think we may be bootstrapping, submit MigrationTask immediately +submitMigrationTask(endpoint); +} +else +{ +// Include a delay to make sure we have a chance to apply any changes being +// pushed out simultaneously. See CASSANDRA-5025 +Runnable runnable = new Runnable() { -// grab the latest version of the schema since it may have changed again since the initial scheduling -VersionedValue value = Gossiper.instance.getEndpointStateForEndpoint(endpoint).getApplicationState(ApplicationState.SCHEMA); -UUID currentVersion = UUID.fromString(value.value); -if (Schema.instance.getVersion().equals(currentVersion)) -return; - -/** - * if versions differ this node sends request with local migration list to the endpoint - * and expecting to receive a list of migrations to apply locally. - * - * Do not de-ref the future because that causes distributed deadlock (CASSANDRA-3832) because we are - * running in the gossip stage. - */ -StageManager.getStage(Stage.MIGRATION).submit(new MigrationTask(endpoint)); -} -}; -StorageService.optionalTasks.schedule(runnable, 1, TimeUnit.MINUTES); +public void run() +{ +// grab the latest version of the schema since it may have changed again since the initial scheduling +VersionedValue value = Gossiper.instance.getEndpointStateForEndpoint(endpoint).getApplicationState(ApplicationState.SCHEMA); +UUID currentVersion = UUID.fromString(value.value); +if (Schema.instance.getVersion().equals(currentVersion)) +return; + +submitMigrationTask(endpoint); +} +}; +StorageService.optionalTasks.schedule(runnable, 1, TimeUnit.MINUTES); +} +} + +private static void
[8/14] git commit: Pull schema immediately when bootstrapping. Patch by Chris Herron and brandonwilliams, reviewed by jbellis for CASSANDRA-5025
Pull schema immediately when bootstrapping. Patch by Chris Herron and brandonwilliams, reviewed by jbellis for CASSANDRA-5025 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/442a7b3a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/442a7b3a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/442a7b3a Branch: refs/heads/cassandra-1.2 Commit: 442a7b3a60c5cc765221cc6f07add3546a8e9c3d Parents: 8d55474 Author: Brandon Williams brandonwilli...@apache.org Authored: Fri Dec 7 15:31:25 2012 -0600 Committer: Brandon Williams brandonwilli...@apache.org Committed: Fri Dec 7 15:31:25 2012 -0600 -- .../apache/cassandra/service/MigrationManager.java | 57 +-- .../apache/cassandra/service/StorageService.java |7 ++- 2 files changed, 41 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/442a7b3a/src/java/org/apache/cassandra/service/MigrationManager.java -- diff --git a/src/java/org/apache/cassandra/service/MigrationManager.java b/src/java/org/apache/cassandra/service/MigrationManager.java index 102ea12..72a9a84 100644 --- a/src/java/org/apache/cassandra/service/MigrationManager.java +++ b/src/java/org/apache/cassandra/service/MigrationManager.java @@ -25,6 +25,7 @@ import java.io.IOException; import java.net.InetAddress; import java.nio.ByteBuffer; import java.util.*; +import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import java.util.ArrayList; @@ -92,6 +93,10 @@ public class MigrationManager implements IEndpointStateChangeSubscriber public void onRemove(InetAddress endpoint) {} +/** + * If versions differ this node sends request with local migration list to the endpoint + * and expecting to receive a list of migrations to apply locally. + */ private static void maybeScheduleSchemaPull(final UUID theirVersion, final InetAddress endpoint) { // Can't request migrations from nodes with versions younger than 1.1.7 @@ -101,29 +106,39 @@ public class MigrationManager implements IEndpointStateChangeSubscriber if (Schema.instance.getVersion().equals(theirVersion)) return; -// check our schema vs theirs, after a delay to make sure we have a chance to apply any changes -// being pushed out simultaneously. See CASSANDRA-5025 -Runnable runnable = new Runnable() +if (Schema.emptyVersion.equals(Schema.instance.getVersion())) { -public void run() +// If we think we may be bootstrapping, submit MigrationTask immediately +submitMigrationTask(endpoint); +} +else +{ +// Include a delay to make sure we have a chance to apply any changes being +// pushed out simultaneously. See CASSANDRA-5025 +Runnable runnable = new Runnable() { -// grab the latest version of the schema since it may have changed again since the initial scheduling -VersionedValue value = Gossiper.instance.getEndpointStateForEndpoint(endpoint).getApplicationState(ApplicationState.SCHEMA); -UUID currentVersion = UUID.fromString(value.value); -if (Schema.instance.getVersion().equals(currentVersion)) -return; - -/** - * if versions differ this node sends request with local migration list to the endpoint - * and expecting to receive a list of migrations to apply locally. - * - * Do not de-ref the future because that causes distributed deadlock (CASSANDRA-3832) because we are - * running in the gossip stage. - */ -StageManager.getStage(Stage.MIGRATION).submit(new MigrationTask(endpoint)); -} -}; -StorageService.optionalTasks.schedule(runnable, 1, TimeUnit.MINUTES); +public void run() +{ +// grab the latest version of the schema since it may have changed again since the initial scheduling +VersionedValue value = Gossiper.instance.getEndpointStateForEndpoint(endpoint).getApplicationState(ApplicationState.SCHEMA); +UUID currentVersion = UUID.fromString(value.value); +if (Schema.instance.getVersion().equals(currentVersion)) +return; + +submitMigrationTask(endpoint); +} +}; +StorageService.optionalTasks.schedule(runnable, 1, TimeUnit.MINUTES); +} +} + +private static void
[14/14] git commit: ninja relocate crc_check_chance removal from options list
ninja relocate crc_check_chance removal from options list Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/248d6266 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/248d6266 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/248d6266 Branch: refs/heads/cassandra-1.2 Commit: 248d6266e67bae97a0a6f27776645768704df201 Parents: 8581be8 Author: Jake Luciani jluci...@bluemountaincapital.com Authored: Fri Dec 7 12:50:49 2012 -0500 Committer: Jake Luciani jluci...@bluemountaincapital.com Committed: Fri Dec 7 12:51:53 2012 -0500 -- .../io/compress/CompressionParameters.java |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/248d6266/src/java/org/apache/cassandra/io/compress/CompressionParameters.java -- diff --git a/src/java/org/apache/cassandra/io/compress/CompressionParameters.java b/src/java/org/apache/cassandra/io/compress/CompressionParameters.java index df077ac..93e150f 100644 --- a/src/java/org/apache/cassandra/io/compress/CompressionParameters.java +++ b/src/java/org/apache/cassandra/io/compress/CompressionParameters.java @@ -56,7 +56,6 @@ public class CompressionParameters String chunkLength = options.get(CHUNK_LENGTH_KB); options.remove(SSTABLE_COMPRESSION); options.remove(CHUNK_LENGTH_KB); -options.remove(CRC_CHECK_CHANCE); CompressionParameters cp = new CompressionParameters(sstableCompressionClass, parseChunkLength(chunkLength), options); cp.validate(); return cp; @@ -78,6 +77,7 @@ public class CompressionParameters this.chunkLength = chunkLength; this.otherOptions = otherOptions; String chance = otherOptions.get(CRC_CHECK_CHANCE); +otherOptions.remove(CRC_CHECK_CHANCE); this.crcChance = (chance == null) ? DEFAULT_CRC_CHECK_CHANCE : Double.parseDouble(chance); }
[1/14] git commit: Merge branch 'cassandra-1.2' into trunk
Updated Branches: refs/heads/cassandra-1.2 b49ca58b2 - cf3cde3d9 refs/heads/cassandra-1.2.0 f91001a08 - 44545d380 refs/heads/trunk 5a7943da4 - 40dad0aea Merge branch 'cassandra-1.2' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/40dad0ae Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/40dad0ae Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/40dad0ae Branch: refs/heads/trunk Commit: 40dad0aea76b8abd29dd4bb8f5590de195a293e7 Parents: 5a7943d cf3cde3 Author: Brandon Williams brandonwilli...@apache.org Authored: Fri Dec 7 15:44:06 2012 -0600 Committer: Brandon Williams brandonwilli...@apache.org Committed: Fri Dec 7 15:44:06 2012 -0600 -- CHANGES.txt|2 +- .../db/columniterator/SSTableNamesIterator.java|2 +- .../io/compress/CompressionParameters.java |2 +- .../apache/cassandra/io/sstable/IndexHelper.java |4 + .../apache/cassandra/service/MigrationManager.java | 56 +-- .../apache/cassandra/service/StorageService.java |5 +- .../cassandra/io/sstable/IndexHelperTest.java | 33 ++--- 7 files changed, 67 insertions(+), 37 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/40dad0ae/CHANGES.txt -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/40dad0ae/src/java/org/apache/cassandra/service/MigrationManager.java -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/40dad0ae/src/java/org/apache/cassandra/service/StorageService.java --
git commit: Pull schema immediately when bootstrapping. Patch by Chris Herron and brandonwilliams, reviewed by jbellis for CASSANDRA-5025
Updated Branches: refs/heads/cassandra-1.1 1ac90589e - c9ce1f011 Pull schema immediately when bootstrapping. Patch by Chris Herron and brandonwilliams, reviewed by jbellis for CASSANDRA-5025 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c9ce1f01 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c9ce1f01 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c9ce1f01 Branch: refs/heads/cassandra-1.1 Commit: c9ce1f0111202044d686f335fc2ebf0fe771ed79 Parents: 1ac9058 Author: Brandon Williams brandonwilli...@apache.org Authored: Fri Dec 7 15:31:25 2012 -0600 Committer: Brandon Williams brandonwilli...@apache.org Committed: Fri Dec 7 15:44:26 2012 -0600 -- .../apache/cassandra/service/MigrationManager.java | 57 +-- .../apache/cassandra/service/StorageService.java |7 ++- 2 files changed, 41 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/c9ce1f01/src/java/org/apache/cassandra/service/MigrationManager.java -- diff --git a/src/java/org/apache/cassandra/service/MigrationManager.java b/src/java/org/apache/cassandra/service/MigrationManager.java index 102ea12..72a9a84 100644 --- a/src/java/org/apache/cassandra/service/MigrationManager.java +++ b/src/java/org/apache/cassandra/service/MigrationManager.java @@ -25,6 +25,7 @@ import java.io.IOException; import java.net.InetAddress; import java.nio.ByteBuffer; import java.util.*; +import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import java.util.ArrayList; @@ -92,6 +93,10 @@ public class MigrationManager implements IEndpointStateChangeSubscriber public void onRemove(InetAddress endpoint) {} +/** + * If versions differ this node sends request with local migration list to the endpoint + * and expecting to receive a list of migrations to apply locally. + */ private static void maybeScheduleSchemaPull(final UUID theirVersion, final InetAddress endpoint) { // Can't request migrations from nodes with versions younger than 1.1.7 @@ -101,29 +106,39 @@ public class MigrationManager implements IEndpointStateChangeSubscriber if (Schema.instance.getVersion().equals(theirVersion)) return; -// check our schema vs theirs, after a delay to make sure we have a chance to apply any changes -// being pushed out simultaneously. See CASSANDRA-5025 -Runnable runnable = new Runnable() +if (Schema.emptyVersion.equals(Schema.instance.getVersion())) { -public void run() +// If we think we may be bootstrapping, submit MigrationTask immediately +submitMigrationTask(endpoint); +} +else +{ +// Include a delay to make sure we have a chance to apply any changes being +// pushed out simultaneously. See CASSANDRA-5025 +Runnable runnable = new Runnable() { -// grab the latest version of the schema since it may have changed again since the initial scheduling -VersionedValue value = Gossiper.instance.getEndpointStateForEndpoint(endpoint).getApplicationState(ApplicationState.SCHEMA); -UUID currentVersion = UUID.fromString(value.value); -if (Schema.instance.getVersion().equals(currentVersion)) -return; - -/** - * if versions differ this node sends request with local migration list to the endpoint - * and expecting to receive a list of migrations to apply locally. - * - * Do not de-ref the future because that causes distributed deadlock (CASSANDRA-3832) because we are - * running in the gossip stage. - */ -StageManager.getStage(Stage.MIGRATION).submit(new MigrationTask(endpoint)); -} -}; -StorageService.optionalTasks.schedule(runnable, 1, TimeUnit.MINUTES); +public void run() +{ +// grab the latest version of the schema since it may have changed again since the initial scheduling +VersionedValue value = Gossiper.instance.getEndpointStateForEndpoint(endpoint).getApplicationState(ApplicationState.SCHEMA); +UUID currentVersion = UUID.fromString(value.value); +if (Schema.instance.getVersion().equals(currentVersion)) +return; + +submitMigrationTask(endpoint); +} +}; +
[jira] [Resolved] (CASSANDRA-5025) Schema push/pull race
[ https://issues.apache.org/jira/browse/CASSANDRA-5025?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brandon Williams resolved CASSANDRA-5025. - Resolution: Fixed Committed. Schema push/pull race - Key: CASSANDRA-5025 URL: https://issues.apache.org/jira/browse/CASSANDRA-5025 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.1.0 Reporter: Jonathan Ellis Assignee: Jonathan Ellis Priority: Minor Fix For: 1.1.8 Attachments: 5025.txt, 5025-v2.txt, 5025-v3.txt, 5025-v4.txt When a schema change is made, the coordinator pushes the delta to the other nodes in the cluster. This is more efficient than sending the entire schema. But the coordinator also announces the new schema version, so the other nodes' reception of the new version races with processing the delta, and usually seeing the new schema wins. So the other nodes also issue a pull to the coordinator for the entire schema. Thus, schema changes tend to become O(n) in the number of KS and CF present. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5003) Update IAuthenticator to allow dynamic user creation and removal
[ https://issues.apache.org/jira/browse/CASSANDRA-5003?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aleksey Yeschenko updated CASSANDRA-5003: - Attachment: 5003-p2.txt Update IAuthenticator to allow dynamic user creation and removal Key: CASSANDRA-5003 URL: https://issues.apache.org/jira/browse/CASSANDRA-5003 Project: Cassandra Issue Type: Improvement Reporter: Aleksey Yeschenko Assignee: Aleksey Yeschenko Fix For: 1.2.0 rc1 Attachments: 5003-p2.txt, 5003.txt - add new methods to IAuthenticator (createUser, alterUser, dropUser) - add CREATE USER, ALTER USER, DROP USER and LIST USERS CQL3 statements -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[1/16] git commit: Merge branch 'cassandra-1.2' into trunk
Updated Branches: refs/heads/cassandra-1.1 c9ce1f011 - f618369f3 refs/heads/cassandra-1.2 cf3cde3d9 - bdf9c2a91 refs/heads/cassandra-1.2.0 44545d380 - d599b3fc8 refs/heads/trunk 40dad0aea - ff249316b Merge branch 'cassandra-1.2' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/ff249316 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ff249316 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ff249316 Branch: refs/heads/trunk Commit: ff249316b7b30c094791aa8cfdc3bdeaaa34371b Parents: 40dad0a bdf9c2a Author: Jonathan Ellis jbel...@apache.org Authored: Fri Dec 7 16:56:05 2012 -0600 Committer: Jonathan Ellis jbel...@apache.org Committed: Fri Dec 7 16:56:05 2012 -0600 -- CHANGES.txt |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/ff249316/CHANGES.txt --
[2/16] git commit: Merge branch 'cassandra-1.2.0' into cassandra-1.2
Merge branch 'cassandra-1.2.0' into cassandra-1.2 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/bdf9c2a9 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/bdf9c2a9 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/bdf9c2a9 Branch: refs/heads/trunk Commit: bdf9c2a916c4615c2a00bb3dab606aee5f1278cb Parents: cf3cde3 d599b3f Author: Jonathan Ellis jbel...@apache.org Authored: Fri Dec 7 16:55:57 2012 -0600 Committer: Jonathan Ellis jbel...@apache.org Committed: Fri Dec 7 16:55:57 2012 -0600 -- CHANGES.txt |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/bdf9c2a9/CHANGES.txt --
[3/16] git commit: Merge branch 'cassandra-1.2.0' into cassandra-1.2
Merge branch 'cassandra-1.2.0' into cassandra-1.2 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/bdf9c2a9 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/bdf9c2a9 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/bdf9c2a9 Branch: refs/heads/cassandra-1.2 Commit: bdf9c2a916c4615c2a00bb3dab606aee5f1278cb Parents: cf3cde3 d599b3f Author: Jonathan Ellis jbel...@apache.org Authored: Fri Dec 7 16:55:57 2012 -0600 Committer: Jonathan Ellis jbel...@apache.org Committed: Fri Dec 7 16:55:57 2012 -0600 -- CHANGES.txt |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/bdf9c2a9/CHANGES.txt --
[9/16] git commit: edit changes
edit changes Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/8f7754dd Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8f7754dd Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8f7754dd Branch: refs/heads/cassandra-1.2 Commit: 8f7754dd4b8f9972f9b59e4ec24de6691a0c076f Parents: 44545d3 Author: Jonathan Ellis jbel...@apache.org Authored: Fri Dec 7 16:47:59 2012 -0600 Committer: Jonathan Ellis jbel...@apache.org Committed: Fri Dec 7 16:53:19 2012 -0600 -- CHANGES.txt |1 + 1 files changed, 1 insertions(+), 0 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/8f7754dd/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 9a41c87..6f7011d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -201,6 +201,7 @@ Merged from 1.1: * (cql3) Allow defining default consistency levels (CASSANDRA-4448) * (cql3) Fix queries using LIMIT missing results (CASSANDRA-4579) * fix cross-version gossip messaging (CASSANDRA-4576) + * added inet data type (CASSANDRA-4627) 1.1.6
[5/16] git commit: merge from 1.1
merge from 1.1 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d599b3fc Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d599b3fc Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d599b3fc Branch: refs/heads/cassandra-1.2 Commit: d599b3fc80292620043191cbe5a280630207f78e Parents: 8f7754d f618369 Author: Jonathan Ellis jbel...@apache.org Authored: Fri Dec 7 16:55:48 2012 -0600 Committer: Jonathan Ellis jbel...@apache.org Committed: Fri Dec 7 16:55:48 2012 -0600 -- CHANGES.txt |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/d599b3fc/CHANGES.txt --
[4/16] git commit: merge from 1.1
merge from 1.1 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d599b3fc Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d599b3fc Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d599b3fc Branch: refs/heads/trunk Commit: d599b3fc80292620043191cbe5a280630207f78e Parents: 8f7754d f618369 Author: Jonathan Ellis jbel...@apache.org Authored: Fri Dec 7 16:55:48 2012 -0600 Committer: Jonathan Ellis jbel...@apache.org Committed: Fri Dec 7 16:55:48 2012 -0600 -- CHANGES.txt |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/d599b3fc/CHANGES.txt --
[7/16] git commit: edit changes
edit changes Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/8f7754dd Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8f7754dd Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8f7754dd Branch: refs/heads/cassandra-1.2.0 Commit: 8f7754dd4b8f9972f9b59e4ec24de6691a0c076f Parents: 44545d3 Author: Jonathan Ellis jbel...@apache.org Authored: Fri Dec 7 16:47:59 2012 -0600 Committer: Jonathan Ellis jbel...@apache.org Committed: Fri Dec 7 16:53:19 2012 -0600 -- CHANGES.txt |1 + 1 files changed, 1 insertions(+), 0 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/8f7754dd/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 9a41c87..6f7011d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -201,6 +201,7 @@ Merged from 1.1: * (cql3) Allow defining default consistency levels (CASSANDRA-4448) * (cql3) Fix queries using LIMIT missing results (CASSANDRA-4579) * fix cross-version gossip messaging (CASSANDRA-4576) + * added inet data type (CASSANDRA-4627) 1.1.6
[8/16] git commit: edit changes
edit changes Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/8f7754dd Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8f7754dd Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8f7754dd Branch: refs/heads/trunk Commit: 8f7754dd4b8f9972f9b59e4ec24de6691a0c076f Parents: 44545d3 Author: Jonathan Ellis jbel...@apache.org Authored: Fri Dec 7 16:47:59 2012 -0600 Committer: Jonathan Ellis jbel...@apache.org Committed: Fri Dec 7 16:53:19 2012 -0600 -- CHANGES.txt |1 + 1 files changed, 1 insertions(+), 0 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/8f7754dd/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 9a41c87..6f7011d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -201,6 +201,7 @@ Merged from 1.1: * (cql3) Allow defining default consistency levels (CASSANDRA-4448) * (cql3) Fix queries using LIMIT missing results (CASSANDRA-4579) * fix cross-version gossip messaging (CASSANDRA-4576) + * added inet data type (CASSANDRA-4627) 1.1.6
[10/16] git commit: add #2474, #4434 to CHANGES
add #2474, #4434 to CHANGES Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f618369f Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f618369f Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f618369f Branch: refs/heads/cassandra-1.2.0 Commit: f618369f392af6927adc587ebfbeb595925fe138 Parents: c9ce1f0 Author: Jonathan Ellis jbel...@apache.org Authored: Fri Dec 7 16:52:54 2012 -0600 Committer: Jonathan Ellis jbel...@apache.org Committed: Fri Dec 7 16:52:58 2012 -0600 -- CHANGES.txt |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f618369f/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 5d1fd8d..874dbd4 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -113,6 +113,7 @@ Merged from 1.0: 1.1.3 + * (cqlsh) add COPY TO (CASSANDRA-4434) * munmap commitlog segments before rename (CASSANDRA-4337) * (JMX) rename getRangeKeySample to sampleKeyRange to avoid returning multi-MB results as an attribute (CASSANDRA-4452) @@ -454,7 +455,7 @@ Merged from 0.8: * Add SnapshotCommand to trigger snapshot on remote node (CASSANDRA-3721) * Make CFMetaData conversions to/from thrift/native schema inverses (CASSANDRA_3559) - * Add initial code for CQL 3.0-beta (CASSANDRA-3781, 3753) + * Add initial code for CQL 3.0-beta (CASSANDRA-2474, 3781, 3753) * Add wide row support for ColumnFamilyInputFormat (CASSANDRA-3264) * Allow extending CompositeType comparator (CASSANDRA-3657) * Avoids over-paging during get_count (CASSANDRA-3798)
[6/16] git commit: merge from 1.1
merge from 1.1 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d599b3fc Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d599b3fc Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d599b3fc Branch: refs/heads/cassandra-1.2.0 Commit: d599b3fc80292620043191cbe5a280630207f78e Parents: 8f7754d f618369 Author: Jonathan Ellis jbel...@apache.org Authored: Fri Dec 7 16:55:48 2012 -0600 Committer: Jonathan Ellis jbel...@apache.org Committed: Fri Dec 7 16:55:48 2012 -0600 -- CHANGES.txt |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/d599b3fc/CHANGES.txt --
[15/16] git commit: Pull schema immediately when bootstrapping. Patch by Chris Herron and brandonwilliams, reviewed by jbellis for CASSANDRA-5025
Pull schema immediately when bootstrapping. Patch by Chris Herron and brandonwilliams, reviewed by jbellis for CASSANDRA-5025 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c9ce1f01 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c9ce1f01 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c9ce1f01 Branch: refs/heads/cassandra-1.2.0 Commit: c9ce1f0111202044d686f335fc2ebf0fe771ed79 Parents: 1ac9058 Author: Brandon Williams brandonwilli...@apache.org Authored: Fri Dec 7 15:31:25 2012 -0600 Committer: Brandon Williams brandonwilli...@apache.org Committed: Fri Dec 7 15:44:26 2012 -0600 -- .../apache/cassandra/service/MigrationManager.java | 57 +-- .../apache/cassandra/service/StorageService.java |7 ++- 2 files changed, 41 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/c9ce1f01/src/java/org/apache/cassandra/service/MigrationManager.java -- diff --git a/src/java/org/apache/cassandra/service/MigrationManager.java b/src/java/org/apache/cassandra/service/MigrationManager.java index 102ea12..72a9a84 100644 --- a/src/java/org/apache/cassandra/service/MigrationManager.java +++ b/src/java/org/apache/cassandra/service/MigrationManager.java @@ -25,6 +25,7 @@ import java.io.IOException; import java.net.InetAddress; import java.nio.ByteBuffer; import java.util.*; +import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import java.util.ArrayList; @@ -92,6 +93,10 @@ public class MigrationManager implements IEndpointStateChangeSubscriber public void onRemove(InetAddress endpoint) {} +/** + * If versions differ this node sends request with local migration list to the endpoint + * and expecting to receive a list of migrations to apply locally. + */ private static void maybeScheduleSchemaPull(final UUID theirVersion, final InetAddress endpoint) { // Can't request migrations from nodes with versions younger than 1.1.7 @@ -101,29 +106,39 @@ public class MigrationManager implements IEndpointStateChangeSubscriber if (Schema.instance.getVersion().equals(theirVersion)) return; -// check our schema vs theirs, after a delay to make sure we have a chance to apply any changes -// being pushed out simultaneously. See CASSANDRA-5025 -Runnable runnable = new Runnable() +if (Schema.emptyVersion.equals(Schema.instance.getVersion())) { -public void run() +// If we think we may be bootstrapping, submit MigrationTask immediately +submitMigrationTask(endpoint); +} +else +{ +// Include a delay to make sure we have a chance to apply any changes being +// pushed out simultaneously. See CASSANDRA-5025 +Runnable runnable = new Runnable() { -// grab the latest version of the schema since it may have changed again since the initial scheduling -VersionedValue value = Gossiper.instance.getEndpointStateForEndpoint(endpoint).getApplicationState(ApplicationState.SCHEMA); -UUID currentVersion = UUID.fromString(value.value); -if (Schema.instance.getVersion().equals(currentVersion)) -return; - -/** - * if versions differ this node sends request with local migration list to the endpoint - * and expecting to receive a list of migrations to apply locally. - * - * Do not de-ref the future because that causes distributed deadlock (CASSANDRA-3832) because we are - * running in the gossip stage. - */ -StageManager.getStage(Stage.MIGRATION).submit(new MigrationTask(endpoint)); -} -}; -StorageService.optionalTasks.schedule(runnable, 1, TimeUnit.MINUTES); +public void run() +{ +// grab the latest version of the schema since it may have changed again since the initial scheduling +VersionedValue value = Gossiper.instance.getEndpointStateForEndpoint(endpoint).getApplicationState(ApplicationState.SCHEMA); +UUID currentVersion = UUID.fromString(value.value); +if (Schema.instance.getVersion().equals(currentVersion)) +return; + +submitMigrationTask(endpoint); +} +}; +StorageService.optionalTasks.schedule(runnable, 1, TimeUnit.MINUTES); +} +} + +private static
[11/16] git commit: add #2474, #4434 to CHANGES
add #2474, #4434 to CHANGES Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f618369f Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f618369f Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f618369f Branch: refs/heads/cassandra-1.2 Commit: f618369f392af6927adc587ebfbeb595925fe138 Parents: c9ce1f0 Author: Jonathan Ellis jbel...@apache.org Authored: Fri Dec 7 16:52:54 2012 -0600 Committer: Jonathan Ellis jbel...@apache.org Committed: Fri Dec 7 16:52:58 2012 -0600 -- CHANGES.txt |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f618369f/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 5d1fd8d..874dbd4 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -113,6 +113,7 @@ Merged from 1.0: 1.1.3 + * (cqlsh) add COPY TO (CASSANDRA-4434) * munmap commitlog segments before rename (CASSANDRA-4337) * (JMX) rename getRangeKeySample to sampleKeyRange to avoid returning multi-MB results as an attribute (CASSANDRA-4452) @@ -454,7 +455,7 @@ Merged from 0.8: * Add SnapshotCommand to trigger snapshot on remote node (CASSANDRA-3721) * Make CFMetaData conversions to/from thrift/native schema inverses (CASSANDRA_3559) - * Add initial code for CQL 3.0-beta (CASSANDRA-3781, 3753) + * Add initial code for CQL 3.0-beta (CASSANDRA-2474, 3781, 3753) * Add wide row support for ColumnFamilyInputFormat (CASSANDRA-3264) * Allow extending CompositeType comparator (CASSANDRA-3657) * Avoids over-paging during get_count (CASSANDRA-3798)
[12/16] git commit: add #2474, #4434 to CHANGES
add #2474, #4434 to CHANGES Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f618369f Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f618369f Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f618369f Branch: refs/heads/trunk Commit: f618369f392af6927adc587ebfbeb595925fe138 Parents: c9ce1f0 Author: Jonathan Ellis jbel...@apache.org Authored: Fri Dec 7 16:52:54 2012 -0600 Committer: Jonathan Ellis jbel...@apache.org Committed: Fri Dec 7 16:52:58 2012 -0600 -- CHANGES.txt |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f618369f/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 5d1fd8d..874dbd4 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -113,6 +113,7 @@ Merged from 1.0: 1.1.3 + * (cqlsh) add COPY TO (CASSANDRA-4434) * munmap commitlog segments before rename (CASSANDRA-4337) * (JMX) rename getRangeKeySample to sampleKeyRange to avoid returning multi-MB results as an attribute (CASSANDRA-4452) @@ -454,7 +455,7 @@ Merged from 0.8: * Add SnapshotCommand to trigger snapshot on remote node (CASSANDRA-3721) * Make CFMetaData conversions to/from thrift/native schema inverses (CASSANDRA_3559) - * Add initial code for CQL 3.0-beta (CASSANDRA-3781, 3753) + * Add initial code for CQL 3.0-beta (CASSANDRA-2474, 3781, 3753) * Add wide row support for ColumnFamilyInputFormat (CASSANDRA-3264) * Allow extending CompositeType comparator (CASSANDRA-3657) * Avoids over-paging during get_count (CASSANDRA-3798)
[13/16] git commit: add #2474, #4434 to CHANGES
add #2474, #4434 to CHANGES Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f618369f Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f618369f Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f618369f Branch: refs/heads/cassandra-1.1 Commit: f618369f392af6927adc587ebfbeb595925fe138 Parents: c9ce1f0 Author: Jonathan Ellis jbel...@apache.org Authored: Fri Dec 7 16:52:54 2012 -0600 Committer: Jonathan Ellis jbel...@apache.org Committed: Fri Dec 7 16:52:58 2012 -0600 -- CHANGES.txt |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f618369f/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 5d1fd8d..874dbd4 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -113,6 +113,7 @@ Merged from 1.0: 1.1.3 + * (cqlsh) add COPY TO (CASSANDRA-4434) * munmap commitlog segments before rename (CASSANDRA-4337) * (JMX) rename getRangeKeySample to sampleKeyRange to avoid returning multi-MB results as an attribute (CASSANDRA-4452) @@ -454,7 +455,7 @@ Merged from 0.8: * Add SnapshotCommand to trigger snapshot on remote node (CASSANDRA-3721) * Make CFMetaData conversions to/from thrift/native schema inverses (CASSANDRA_3559) - * Add initial code for CQL 3.0-beta (CASSANDRA-3781, 3753) + * Add initial code for CQL 3.0-beta (CASSANDRA-2474, 3781, 3753) * Add wide row support for ColumnFamilyInputFormat (CASSANDRA-3264) * Allow extending CompositeType comparator (CASSANDRA-3657) * Avoids over-paging during get_count (CASSANDRA-3798)
[14/16] git commit: Pull schema immediately when bootstrapping. Patch by Chris Herron and brandonwilliams, reviewed by jbellis for CASSANDRA-5025
Pull schema immediately when bootstrapping. Patch by Chris Herron and brandonwilliams, reviewed by jbellis for CASSANDRA-5025 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c9ce1f01 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c9ce1f01 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c9ce1f01 Branch: refs/heads/trunk Commit: c9ce1f0111202044d686f335fc2ebf0fe771ed79 Parents: 1ac9058 Author: Brandon Williams brandonwilli...@apache.org Authored: Fri Dec 7 15:31:25 2012 -0600 Committer: Brandon Williams brandonwilli...@apache.org Committed: Fri Dec 7 15:44:26 2012 -0600 -- .../apache/cassandra/service/MigrationManager.java | 57 +-- .../apache/cassandra/service/StorageService.java |7 ++- 2 files changed, 41 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/c9ce1f01/src/java/org/apache/cassandra/service/MigrationManager.java -- diff --git a/src/java/org/apache/cassandra/service/MigrationManager.java b/src/java/org/apache/cassandra/service/MigrationManager.java index 102ea12..72a9a84 100644 --- a/src/java/org/apache/cassandra/service/MigrationManager.java +++ b/src/java/org/apache/cassandra/service/MigrationManager.java @@ -25,6 +25,7 @@ import java.io.IOException; import java.net.InetAddress; import java.nio.ByteBuffer; import java.util.*; +import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import java.util.ArrayList; @@ -92,6 +93,10 @@ public class MigrationManager implements IEndpointStateChangeSubscriber public void onRemove(InetAddress endpoint) {} +/** + * If versions differ this node sends request with local migration list to the endpoint + * and expecting to receive a list of migrations to apply locally. + */ private static void maybeScheduleSchemaPull(final UUID theirVersion, final InetAddress endpoint) { // Can't request migrations from nodes with versions younger than 1.1.7 @@ -101,29 +106,39 @@ public class MigrationManager implements IEndpointStateChangeSubscriber if (Schema.instance.getVersion().equals(theirVersion)) return; -// check our schema vs theirs, after a delay to make sure we have a chance to apply any changes -// being pushed out simultaneously. See CASSANDRA-5025 -Runnable runnable = new Runnable() +if (Schema.emptyVersion.equals(Schema.instance.getVersion())) { -public void run() +// If we think we may be bootstrapping, submit MigrationTask immediately +submitMigrationTask(endpoint); +} +else +{ +// Include a delay to make sure we have a chance to apply any changes being +// pushed out simultaneously. See CASSANDRA-5025 +Runnable runnable = new Runnable() { -// grab the latest version of the schema since it may have changed again since the initial scheduling -VersionedValue value = Gossiper.instance.getEndpointStateForEndpoint(endpoint).getApplicationState(ApplicationState.SCHEMA); -UUID currentVersion = UUID.fromString(value.value); -if (Schema.instance.getVersion().equals(currentVersion)) -return; - -/** - * if versions differ this node sends request with local migration list to the endpoint - * and expecting to receive a list of migrations to apply locally. - * - * Do not de-ref the future because that causes distributed deadlock (CASSANDRA-3832) because we are - * running in the gossip stage. - */ -StageManager.getStage(Stage.MIGRATION).submit(new MigrationTask(endpoint)); -} -}; -StorageService.optionalTasks.schedule(runnable, 1, TimeUnit.MINUTES); +public void run() +{ +// grab the latest version of the schema since it may have changed again since the initial scheduling +VersionedValue value = Gossiper.instance.getEndpointStateForEndpoint(endpoint).getApplicationState(ApplicationState.SCHEMA); +UUID currentVersion = UUID.fromString(value.value); +if (Schema.instance.getVersion().equals(currentVersion)) +return; + +submitMigrationTask(endpoint); +} +}; +StorageService.optionalTasks.schedule(runnable, 1, TimeUnit.MINUTES); +} +} + +private static void
[16/16] git commit: Pull schema immediately when bootstrapping. Patch by Chris Herron and brandonwilliams, reviewed by jbellis for CASSANDRA-5025
Pull schema immediately when bootstrapping. Patch by Chris Herron and brandonwilliams, reviewed by jbellis for CASSANDRA-5025 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c9ce1f01 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c9ce1f01 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c9ce1f01 Branch: refs/heads/cassandra-1.2 Commit: c9ce1f0111202044d686f335fc2ebf0fe771ed79 Parents: 1ac9058 Author: Brandon Williams brandonwilli...@apache.org Authored: Fri Dec 7 15:31:25 2012 -0600 Committer: Brandon Williams brandonwilli...@apache.org Committed: Fri Dec 7 15:44:26 2012 -0600 -- .../apache/cassandra/service/MigrationManager.java | 57 +-- .../apache/cassandra/service/StorageService.java |7 ++- 2 files changed, 41 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/c9ce1f01/src/java/org/apache/cassandra/service/MigrationManager.java -- diff --git a/src/java/org/apache/cassandra/service/MigrationManager.java b/src/java/org/apache/cassandra/service/MigrationManager.java index 102ea12..72a9a84 100644 --- a/src/java/org/apache/cassandra/service/MigrationManager.java +++ b/src/java/org/apache/cassandra/service/MigrationManager.java @@ -25,6 +25,7 @@ import java.io.IOException; import java.net.InetAddress; import java.nio.ByteBuffer; import java.util.*; +import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import java.util.ArrayList; @@ -92,6 +93,10 @@ public class MigrationManager implements IEndpointStateChangeSubscriber public void onRemove(InetAddress endpoint) {} +/** + * If versions differ this node sends request with local migration list to the endpoint + * and expecting to receive a list of migrations to apply locally. + */ private static void maybeScheduleSchemaPull(final UUID theirVersion, final InetAddress endpoint) { // Can't request migrations from nodes with versions younger than 1.1.7 @@ -101,29 +106,39 @@ public class MigrationManager implements IEndpointStateChangeSubscriber if (Schema.instance.getVersion().equals(theirVersion)) return; -// check our schema vs theirs, after a delay to make sure we have a chance to apply any changes -// being pushed out simultaneously. See CASSANDRA-5025 -Runnable runnable = new Runnable() +if (Schema.emptyVersion.equals(Schema.instance.getVersion())) { -public void run() +// If we think we may be bootstrapping, submit MigrationTask immediately +submitMigrationTask(endpoint); +} +else +{ +// Include a delay to make sure we have a chance to apply any changes being +// pushed out simultaneously. See CASSANDRA-5025 +Runnable runnable = new Runnable() { -// grab the latest version of the schema since it may have changed again since the initial scheduling -VersionedValue value = Gossiper.instance.getEndpointStateForEndpoint(endpoint).getApplicationState(ApplicationState.SCHEMA); -UUID currentVersion = UUID.fromString(value.value); -if (Schema.instance.getVersion().equals(currentVersion)) -return; - -/** - * if versions differ this node sends request with local migration list to the endpoint - * and expecting to receive a list of migrations to apply locally. - * - * Do not de-ref the future because that causes distributed deadlock (CASSANDRA-3832) because we are - * running in the gossip stage. - */ -StageManager.getStage(Stage.MIGRATION).submit(new MigrationTask(endpoint)); -} -}; -StorageService.optionalTasks.schedule(runnable, 1, TimeUnit.MINUTES); +public void run() +{ +// grab the latest version of the schema since it may have changed again since the initial scheduling +VersionedValue value = Gossiper.instance.getEndpointStateForEndpoint(endpoint).getApplicationState(ApplicationState.SCHEMA); +UUID currentVersion = UUID.fromString(value.value); +if (Schema.instance.getVersion().equals(currentVersion)) +return; + +submitMigrationTask(endpoint); +} +}; +StorageService.optionalTasks.schedule(runnable, 1, TimeUnit.MINUTES); +} +} + +private static void
[5/11] git commit: Merge branch 'cassandra-1.2.0' of https://git-wip-us.apache.org/repos/asf/cassandra into cassandra-1.2.0
Merge branch 'cassandra-1.2.0' of https://git-wip-us.apache.org/repos/asf/cassandra into cassandra-1.2.0 Conflicts: src/java/org/apache/cassandra/service/StorageService.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/fbf9f553 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/fbf9f553 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/fbf9f553 Branch: refs/heads/cassandra-1.2 Commit: fbf9f5533e6910aa61e50d43a28e83aecbe1e665 Parents: 904caea d599b3f Author: Brandon Williams brandonwilli...@apache.org Authored: Fri Dec 7 17:29:49 2012 -0600 Committer: Brandon Williams brandonwilli...@apache.org Committed: Fri Dec 7 17:29:49 2012 -0600 -- CHANGES.txt |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) --
[1/11] git commit: Cleanup from 5025, allow recovering nodes to pull immediately
Updated Branches: refs/heads/cassandra-1.1 f618369f3 - 5e4629793 refs/heads/cassandra-1.2 bdf9c2a91 - 2828d28eb refs/heads/cassandra-1.2.0 d599b3fc8 - fbf9f5533 refs/heads/trunk ff249316b - 36389f7d8 Cleanup from 5025, allow recovering nodes to pull immediately Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/36389f7d Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/36389f7d Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/36389f7d Branch: refs/heads/trunk Commit: 36389f7d8d59881cad309b078fc89df5864fd6d1 Parents: ff24931 Author: Brandon Williams brandonwilli...@apache.org Authored: Fri Dec 7 17:23:40 2012 -0600 Committer: Brandon Williams brandonwilli...@apache.org Committed: Fri Dec 7 17:33:57 2012 -0600 -- .../apache/cassandra/service/MigrationManager.java | 13 ++--- .../apache/cassandra/service/StorageService.java |5 ++--- 2 files changed, 12 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/36389f7d/src/java/org/apache/cassandra/service/MigrationManager.java -- diff --git a/src/java/org/apache/cassandra/service/MigrationManager.java b/src/java/org/apache/cassandra/service/MigrationManager.java index 867a9fb..43fa8f7 100644 --- a/src/java/org/apache/cassandra/service/MigrationManager.java +++ b/src/java/org/apache/cassandra/service/MigrationManager.java @@ -28,6 +28,9 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; +import java.lang.management.ManagementFactory; +import java.lang.management.RuntimeMXBean; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -58,6 +61,10 @@ public class MigrationManager implements IEndpointStateChangeSubscriber public static final MigrationManager instance = new MigrationManager(); +private static final RuntimeMXBean runtimeMXBean = ManagementFactory.getRuntimeMXBean(); + +public static final int MIGRATION_DELAY_IN_MS = 6; + private final ListIMigrationListener listeners = new CopyOnWriteArrayListIMigrationListener(); private MigrationManager() {} @@ -113,9 +120,9 @@ public class MigrationManager implements IEndpointStateChangeSubscriber if (Schema.instance.getVersion().equals(theirVersion)) return; -if (Schema.emptyVersion.equals(Schema.instance.getVersion())) +if (Schema.emptyVersion.equals(Schema.instance.getVersion()) || runtimeMXBean.getUptime() MIGRATION_DELAY_IN_MS) { -// If we think we may be bootstrapping, submit MigrationTask immediately +// If we think we may be bootstrapping or have recently started, submit MigrationTask immediately submitMigrationTask(endpoint); } else @@ -135,7 +142,7 @@ public class MigrationManager implements IEndpointStateChangeSubscriber submitMigrationTask(endpoint); } }; -StorageService.optionalTasks.schedule(runnable, 1, TimeUnit.MINUTES); +StorageService.optionalTasks.schedule(runnable, MIGRATION_DELAY_IN_MS, TimeUnit.MILLISECONDS); } } http://git-wip-us.apache.org/repos/asf/cassandra/blob/36389f7d/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 1936a35..12df15f 100644 --- a/src/java/org/apache/cassandra/service/StorageService.java +++ b/src/java/org/apache/cassandra/service/StorageService.java @@ -527,8 +527,8 @@ public class StorageService implements IEndpointStateChangeSubscriber, StorageSe // gossip snitch infos (local DC and rack) gossipSnitchInfo(); // gossip Schema.emptyVersion forcing immediate check for schema updates (see MigrationManager#maybeScheduleSchemaPull) -Schema.instance.updateVersion(); // Ensure we know our own actual Schema UUID in preparation for updates -MigrationManager.passiveAnnounce(Schema.emptyVersion); +Schema.instance.updateVersionAndAnnounce(); // Ensure we know our own actual Schema UUID in preparation for updates + // add rpc listening info Gossiper.instance.addLocalApplicationState(ApplicationState.RPC_ADDRESS, valueFactory.rpcaddress(DatabaseDescriptor.getRpcAddress())); if (0 != DatabaseDescriptor.getReplaceTokens().size()) @@ -536,7 +536,6 @@ public class StorageService implements IEndpointStateChangeSubscriber, StorageSe MessagingService.instance().listen(FBUtilities.getLocalAddress());