make sure that a shard endtime is exclusive when we search for shards range

note: this is hard to test since the shards will only return points in
the given range, so even if we use more shards than we're supposed to
the returned points will not be outside the query range. The only way to
test this is to write a unit test.
pull/302/head
John Shahid 2014-03-11 17:58:47 -04:00
parent 3a5adb7e07
commit 7e659b92e3
1 changed files with 1 additions and 1 deletions

View File

@ -760,7 +760,7 @@ func (self *ClusterConfiguration) getShardRange(querySpec QuerySpec, shards []*S
}
endIndex := sort.Search(len(shards)-startIndex, func(n int) bool {
return shards[n+startIndex].endMicro < startTime
return shards[n+startIndex].endMicro <= startTime
})
return shards[startIndex : endIndex+startIndex]