recompute shards for cross-index calls

It turns out that we need to recompute the set of shards whenever
a query is cross-index. Otherwise we get partial results in unexpected
ways sometimes.
This commit is contained in:
Seebs 2019-11-22 14:18:36 -06:00
parent 36ef82d7ac
commit d79ecbad86

View file

@ -317,6 +317,8 @@ func (e *executor) handlePreCalls(ctx context.Context, index string, c *pql.Call
if newIndex != "" && newIndex != index {
c.Type = pql.PrecallGlobal
index = newIndex
// we need to recompute shards, then
shards = nil
}
if c.Type == pql.PrecallNone {
// otherwise, handle the children