Merge branch 'cassandra-1.2' into cassandra-2.0 Conflicts: CHANGES.txt src/java/org/apache/cassandra/thrift/ThriftValidation.java
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/03f4c92d Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/03f4c92d Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/03f4c92d Branch: refs/heads/trunk Commit: 03f4c92d14ec7bbdac7524f531423c79015c8061 Parents: b5c9b49 a58a95d Author: Aleksey Yeschenko <alek...@apache.org> Authored: Sun Dec 22 20:09:18 2013 +0300 Committer: Aleksey Yeschenko <alek...@apache.org> Committed: Sun Dec 22 20:09:18 2013 +0300 ---------------------------------------------------------------------- CHANGES.txt | 1 + .../org/apache/cassandra/thrift/ThriftValidation.java | 12 +++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/03f4c92d/CHANGES.txt ---------------------------------------------------------------------- diff --cc CHANGES.txt index b80c821,4eee4ee..f38b58f --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -34,50 -28,9 +34,51 @@@ Merged from 1.2 (CASSANDRA-6413) * (Hadoop) add describe_local_ring (CASSANDRA-6268) * Fix handling of concurrent directory creation failure (CASSANDRA-6459) + * Allow executing CREATE statements multiple times (CASSANDRA-6471) + * Don't send confusing info with timeouts (CASSANDRA-6491) + * Don't resubmit counter mutation runnables internally (CASSANDRA-6427) + * Don't drop local mutations without a trace (CASSANDRA-6510) + * Don't allow null max_hint_window_in_ms (CASSANDRA-6419) ++ * Validate SliceRange start and finish lengths (CASSANDRA-6521) -1.2.12 +2.0.3 + * Fix FD leak on slice read path (CASSANDRA-6275) + * Cancel read meter task when closing SSTR (CASSANDRA-6358) + * free off-heap IndexSummary during bulk (CASSANDRA-6359) + * Recover from IOException in accept() thread (CASSANDRA-6349) + * Improve Gossip tolerance of abnormally slow tasks (CASSANDRA-6338) + * Fix trying to hint timed out counter writes (CASSANDRA-6322) + * Allow restoring specific columnfamilies from archived CL (CASSANDRA-4809) + * Avoid flushing compaction_history after each operation (CASSANDRA-6287) + * Fix repair assertion error when tombstones expire (CASSANDRA-6277) + * Skip loading corrupt key cache (CASSANDRA-6260) + * Fixes for compacting larger-than-memory rows (CASSANDRA-6274) + * Compact hottest sstables first and optionally omit coldest from + compaction entirely (CASSANDRA-6109) + * Fix modifying column_metadata from thrift (CASSANDRA-6182) + * cqlsh: fix LIST USERS output (CASSANDRA-6242) + * Add IRequestSink interface (CASSANDRA-6248) + * Update memtable size while flushing (CASSANDRA-6249) + * Provide hooks around CQL2/CQL3 statement execution (CASSANDRA-6252) + * Require Permission.SELECT for CAS updates (CASSANDRA-6247) + * New CQL-aware SSTableWriter (CASSANDRA-5894) + * Reject CAS operation when the protocol v1 is used (CASSANDRA-6270) + * Correctly throw error when frame too large (CASSANDRA-5981) + * Fix serialization bug in PagedRange with 2ndary indexes (CASSANDRA-6299) + * Fix CQL3 table validation in Thrift (CASSANDRA-6140) + * Fix bug missing results with IN clauses (CASSANDRA-6327) + * Fix paging with reversed slices (CASSANDRA-6343) + * Set minTimestamp correctly to be able to drop expired sstables (CASSANDRA-6337) + * Support NaN and Infinity as float literals (CASSANDRA-6003) + * Remove RF from nodetool ring output (CASSANDRA-6289) + * Fix attempting to flush empty rows (CASSANDRA-6374) + * Fix potential out of bounds exception when paging (CASSANDRA-6333) +Merged from 1.2: + * Optimize FD phi calculation (CASSANDRA-6386) + * Improve initial FD phi estimate when starting up (CASSANDRA-6385) + * Don't list CQL3 table in CLI describe even if named explicitely + (CASSANDRA-5750) * Invalidate row cache when dropping CF (CASSANDRA-6351) * add non-jamm path for cached statements (CASSANDRA-6293) * (Hadoop) Require CFRR batchSize to be at least 2 (CASSANDRA-6114) http://git-wip-us.apache.org/repos/asf/cassandra/blob/03f4c92d/src/java/org/apache/cassandra/thrift/ThriftValidation.java ---------------------------------------------------------------------- diff --cc src/java/org/apache/cassandra/thrift/ThriftValidation.java index 3a831f4,442ea4e..f2efc03 --- a/src/java/org/apache/cassandra/thrift/ThriftValidation.java +++ b/src/java/org/apache/cassandra/thrift/ThriftValidation.java @@@ -268,7 -228,16 +268,16 @@@ public class ThriftValidatio public static void validateRange(CFMetaData metadata, ColumnParent column_parent, SliceRange range) throws org.apache.cassandra.exceptions.InvalidRequestException { + if (range.count < 0) + throw new org.apache.cassandra.exceptions.InvalidRequestException("get_slice requires non-negative count"); + - if (range.start.remaining() > IColumn.MAX_NAME_LENGTH) - throw new org.apache.cassandra.exceptions.InvalidRequestException("range start length cannot be larger than " + IColumn.MAX_NAME_LENGTH); ++ int maxNameLength = org.apache.cassandra.db.Column.MAX_NAME_LENGTH; ++ if (range.start.remaining() > maxNameLength) ++ throw new org.apache.cassandra.exceptions.InvalidRequestException("range start length cannot be larger than " + maxNameLength); ++ if (range.finish.remaining() > maxNameLength) ++ throw new org.apache.cassandra.exceptions.InvalidRequestException("range finish length cannot be larger than " + maxNameLength); + - if (range.finish.remaining() > IColumn.MAX_NAME_LENGTH) - throw new org.apache.cassandra.exceptions.InvalidRequestException("range finish length cannot be larger than " + IColumn.MAX_NAME_LENGTH); - - AbstractType<?> comparator = metadata.getComparatorFor(column_parent.super_column); + AbstractType<?> comparator = SuperColumns.getComparatorFor(metadata, column_parent.super_column); try { comparator.validate(range.start);