Skip to content

search: remove zoekt.MatchLimiter

Warren Gifford requested to merge k/rm-limiter into main

Created by: keegancsmith

Rather than limiting the response we get back from Zoekt, we just ask not to send more than our limit in results. We still calculate limit hit correctly.

This has two user visible changes. The first is we can receive upto "len(zoektsReplicas) * limit" results. For graphql we limit before sending to the user. For streaming we just send down the results anyways. This seems like fine behaviour, especially given our default limit is so low and we have computed the information anyways. If we want to change that behaviour, we need to introduce limiting at the top level for streaming anyways since we need to limit between backends.

The other user visible change is we now no longer compute the partial sets. If a repo appeared in partial, we would show a "+" next to the dynamic filter count for that repo. This is the most contentious part of the change. The previous implementation was pretty hacky and not necessarily correct. This is something we could maybe add back when we create a streaming RPC for zoekt. Or we could not do this change now.

Merge request reports

Loading