From d79ecbad86fcedf04bf3c09caab766d4f3dd4312 Mon Sep 17 00:00:00 2001 From: Seebs Date: Fri, 22 Nov 2019 14:18:36 -0600 Subject: [PATCH] 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. --- executor.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/executor.go b/executor.go index 3751a018c..8d31c739b 100644 --- a/executor.go +++ b/executor.go @@ -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