[Iteration 1] Remove hardcoded Zoekt::Shard.first
Background
Currently, we use Zoekt::Shard
model, but only have 1 shard in all environments.
We also hardcode Zoekt::Shard.first
. For example, https://gitlab.com/gitlab-org/gitlab/-/blob/38a6142c0fc6e9e578317368403327332a7ef920/ee/lib/gitlab/search/zoekt/client.rb#L157-161
Proposal
We should update the code that assumes that we only have one shard and verify that everything works correctly. Doing that would allow us to scale Zoekt horizontally after we complete previous issues in Iteration 1.
Notes:
- We might want to update our CI image so that we can have at least 2 shards for testing it properly
Edited by Dmitry Gruzd