gitea/modules/indexer/code
zeripath 30181d459d 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>
2019-12-24 15:26:34 +08:00
..
bleve_test.go Refactor code indexer (#9313) 2019-12-23 20:31:16 +08:00
bleve.go Refactor code indexer (#9313) 2019-12-23 20:31:16 +08:00
git.go Refactor code indexer (#9313) 2019-12-23 20:31:16 +08:00
indexer.go Wrap the code indexer (#9476) 2019-12-24 15:26:34 +08:00
queue.go Wrap the code indexer (#9476) 2019-12-24 15:26:34 +08:00
search.go Refactor code indexer (#9313) 2019-12-23 20:31:16 +08:00
wrapped.go Wrap the code indexer (#9476) 2019-12-24 15:26:34 +08:00