Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zoekt-git-index too many branches error #146

Open
simonsmh opened this issue Dec 26, 2024 · 4 comments
Open

zoekt-git-index too many branches error #146

simonsmh opened this issue Dec 26, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@simonsmh
Copy link

simonsmh commented Dec 26, 2024

[backend] | Error: Command failed: zoekt-git-index -allow_missing_branches -index /data/.sourcebot/index -file_limit 2097152 -branches * /data/.sourcebot/repos/ URL
[backend] | 2024/12/26 06:46:24 indexGitRepo(/data/.sourcebot/repos/\.git, delta=false): build.NewBuilder: too many branches

``
@brendan-kellam brendan-kellam added the bug Something isn't working label Dec 26, 2024
@brendan-kellam
Copy link
Contributor

Heya - how many branches are you indexing? iirc, zoekt can index a maximum of 64 branches

@simonsmh
Copy link
Author

Above 64. What about making separate indexes? Or just make index of 1-64 branches instead of error.

@brendan-kellam
Copy link
Contributor

Are you wanting to search across more than 64 branches? Or are you using a glob pattern so a ton of branches are getting included?

I would need to dig through the zoekt codebase a bit, but I imagine it could get tricky to support >64 branches (afaik, a uint64 is used as a bitmask to represent what files appear in which branches. See here).

Making separate indexes per 64 branch chunk is interesting - I will test that out and see if it's possible without overriding existing indexes.

@thespad
Copy link

thespad commented Jan 14, 2025

As an example: https://github.com/linuxserver/docker-mods/, currently clocking in at an unwieldy 99 branches.

A use case here would be something like "Search all branches for Dockerfiles where the FROM is a given image"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants