mirror of https://github.com/perkeep/perkeep.git
pkg/search: use the right method for locking the index
Since probably e93e4f3822
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
This commit is contained in:
parent
55a0748c37
commit
ee421c8eb2
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue