diff options
author | zeripath <art27@cantab.net> | 2019-12-24 07:26:34 +0000 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2019-12-24 15:26:34 +0800 |
commit | 30181d459da79ef57c58bb3789e2ce7130d08b77 (patch) | |
tree | 7bb0b7bca82561f47d785faebcef2a9fdc581ee7 /routers/repo/issue_dependency.go | |
parent | 34688e1db37cebe76df73ab47bc57764821c787c (diff) | |
download | gitea-30181d459da79ef57c58bb3789e2ce7130d08b77.tar.gz gitea-30181d459da79ef57c58bb3789e2ce7130d08b77.zip |
Wrap the code indexer (#9476)
* Wrap the code indexer
In order to prevent a data race in the code indexer it must be wrapped
with a holder otherwise it is possible to Search/Index on an
incompletely initialised indexer, and search will fail with a nil
pointer until the repository indexer is initialised.
Further a completely initialised repository indexer should not be closed
until Termination otherwise actions in Hammer/Shutdown phases could
block or be lost.
Finally, there is a complex dance of shutdown etiquette should the index
initialisation fail. This PR restores that.
* Always return err if closed whilst waiting
Co-authored-by: techknowlogick <matti@mdranta.net>
Diffstat (limited to 'routers/repo/issue_dependency.go')
0 files changed, 0 insertions, 0 deletions