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
parent
3a5adb7e07
commit
7e659b92e3
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue