From ee421c8eb2622241ddf8c647dc117ec4fafc43c0 Mon Sep 17 00:00:00 2001 From: mpl Date: Fri, 26 Aug 2016 02:24:18 +0200 Subject: [PATCH] pkg/search: use the right method for locking the index Since probably e93e4f3822aaa6946f19c6d2d8dd949c2edece9e we've been using (*search.Handler).DescribeLocked instead of (*search.Handler).Describe when serving describe queries, so the index was never locked :( I was so focused on debugging the recursions in describeReally that I missed that elephant in the room. I still think the Describe and describeReally recursions protected by dr.wg is too complicated but that's for another CL. Fixes #750 Change-Id: I376ee0f807df68ad1ef3752f944edc7c9bdb92ee --- pkg/search/describe.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/search/describe.go b/pkg/search/describe.go index c359a1a0f..1148d7a94 100644 --- a/pkg/search/describe.go +++ b/pkg/search/describe.go @@ -43,7 +43,7 @@ func (sh *Handler) serveDescribe(rw http.ResponseWriter, req *http.Request) { dr.fromHTTP(req) ctx := context.TODO() - res, err := sh.DescribeLocked(ctx, &dr) + res, err := sh.Describe(ctx, &dr) if err != nil { httputil.ServeJSONError(rw, err) return