mirror of https://github.com/apache/cassandra
Fix LCS bug with sstables containing only 1 row
patch by slebresne; reviewed by jbellis for CASSANDRA-4411
This commit is contained in:
parent
9f32efa727
commit
02030dd658
|
|
@ -11,6 +11,7 @@
|
|||
* (cql3) delete "component_index" column on DROP TABLE call (CASSANDRA-4420)
|
||||
* change nanoTime() to currentTimeInMillis() in schema related code (CASSANDRA-4432)
|
||||
* add a token generation tool (CASSANDRA-3709)
|
||||
* Fix LCS bug with sstable containing only 1 row (CASSANDRA-4411)
|
||||
Merged from 1.0:
|
||||
* allow dropping columns shadowed by not-yet-expired supercolumn or row
|
||||
tombstones in PrecompactedRow (CASSANDRA-4396)
|
||||
|
|
|
|||
|
|
@ -47,7 +47,10 @@ public class Bounds<T extends RingPosition> extends AbstractBounds<T>
|
|||
|
||||
public boolean contains(T position)
|
||||
{
|
||||
return Range.contains(left, right, position) || left.equals(position);
|
||||
// Range.contains doesnt work correctly if left == right because for
|
||||
// Range that means a wrapping range that select the whole ring. So we
|
||||
// must explicitely handle this case
|
||||
return left.equals(position) || (!left.equals(right) && Range.contains(left, right, position));
|
||||
}
|
||||
|
||||
public Pair<AbstractBounds<T>, AbstractBounds<T>> split(T position)
|
||||
|
|
|
|||
Loading…
Reference in New Issue