Add node.concurrency to internalAPI
What does this MR do and why?
This MR adds a new node.concurrency
argument to the indexer, which will be helpful for determining the number of jobs we want to give to the indexer.
Most likely we'll set it to params['node.concurrency'] - params['node.task_count']
on the Rails side.
How to set up and validate locally
- Export
GDK_DIR
export GDK_DIR=<PATH_TO_GDK>
- Execute Zoekt indexer in GDK mode
make gdk
- Note the concurrency in the log message
2023/12/02 08:38:40 Starting taskRequest for 'm1.local' { index_url: 'http://localhost:6080', search_url: 'http://localhost:6090', gitlab_url: 'http://localhost:3000', concurrency: 10 }
- Tail
log/development.log
- Verify that you see
node.concurrency
as of the parameters for/api/v4/internal/search/zoekt/<UUID>/tasks
. It should be set to the numbers of cores you have (or toGOMAXPROCS
if you have it overridden)
Edited by Dmitry Gruzd