Skip to content

Commit

Permalink
backport CASSANDRA-1722 from 0.7
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/cassandra/branches/cassandra-0.6@1034172 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
jbellis committed Nov 11, 2010
1 parent e6b0191 commit 2331b01
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/java/org/apache/cassandra/service/StorageProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -602,8 +602,8 @@ public static List<Row> getRangeSlice(RangeSliceCommand command, ConsistencyLeve
*/
static List<AbstractBounds> getRestrictedRanges(final AbstractBounds queryRange)
{
// special case for bounds containing exactly 1 token
if (queryRange instanceof Bounds && queryRange.left.equals(queryRange.right))
// special case for bounds containing exactly 1 (non-minimum) token
if (queryRange instanceof Bounds && queryRange.left.equals(queryRange.right) && !queryRange.left.equals(StorageService.getPartitioner().getMinimumToken()))
{
if (logger.isDebugEnabled())
logger.debug("restricted single token match for query " + queryRange);
Expand Down
2 changes: 2 additions & 0 deletions test/unit/org/apache/cassandra/service/StorageProxyTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,7 @@ public void testGRRExactBounds() throws Throwable
{
// equal tokens are special cased as non-wrapping for bounds
testGRR(bounds("0", "0"), bounds("0", "0"));
// completely empty bounds match everything
testGRR(bounds("", ""), bounds("", "1"), range("1", "6"), range("6", ""));
}
}

0 comments on commit 2331b01

Please sign in to comment.