dev: Set DEV_SEARCH_SHARDING for sharded search
Created by: keegancsmith
We update our zoekt wrapper to understand a replica number. If DEV_SEARCH_SHARDING
is set we then start up two replicas locally, each pointing to ~/.sourcegraph/zoekt/index-$replica
.
Test plan: Run ./dev/launch.sh
with and without DEV_SEARCH_SHARDING
set. When not set ensure replica 1 does not start. When set visit check that there are disjoint subsets of indexes:
$ ls ~/.sourcegraph/zoekt-*/index
/Users/keegan/.sourcegraph/zoekt-0/index:
github.com%2Fsourcegraph%2Femacs-sourcegraph-mode_v16.00000.zoekt github.com%2Fsourcegraph%2Fthyme_v16.00000.zoekt
/Users/keegan/.sourcegraph/zoekt-1/index:
github.com%2Fsourcegraph%2Fsourcegraph-typescript_v16.00000.zoekt
Part of https://github.com/sourcegraph/sourcegraph/issues/5725