-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
combine all binaries into one #4908
Comments
I don't think this will improve compile time. When building three binaries, they are compiled in parallel. And tikv-server is always the last one that finish compilation. The overall idea looks good to me. |
This is a super great idea! |
We should consider that if we do this with TiKV the same should be done for PD to maintain consistency. |
I think probably it makes sense. If there were a way to run a post-install script, we could even preserve the existing names by linking e.g. For less parallel builds it will improve build times. It will make I can't think of a great downside, except that it could be argued to violate the single responsibility principle. Doing this would decrease the distribution size. It could be worth considering something similar for the benchmarks - I noted it takes me 95 minutes to build all the benchmarks with thinLTO. Though that would make it take longer to build individual benchmarks. |
Note that we've split tikv-importer into its own repository (https://github.com/tikv/importer) and the copy here will soon be deleted on master. |
It is very easy to try this idea out by putting all the binaries into a single docker container. Create a dispatch shell script called Note that with this approach it is also easy to add in PD, whereas this issue does mention PD, presumably because combining go and Rust into a single binary is harder. |
As for compatibility, the hyperkube approach is a good solution. The hyperkube is a binary wrapper for all the k8s binaries, when running To try and play yourself, you can use the following command to enter the hyperkube docker image:
|
Feature Request
Is your feature request related to a problem? Please describe:
Now we have three binaries: tikv-server, tikv-ctl and tikv-importer. Compiling them all may take a long time, and another problem is that people may misuse different versions, e.g. one people used an old tikv-ctl to access tikv-server.
Describe the feature you'd like:
We may combine all into one binary, I guess this can also improve the compiling time. /cc @brson
So now there is only one binary, assume the name is
tikv
, so the commands look:To support compatibility, we may provide a tikv-server, tikv-ctl, tikv-importer script, like:
Describe alternatives you've considered:
Teachability, Documentation, Adoption, Migration Strategy:
Some documents should be changed:
The ansible and K8s operator should also be changed.
The text was updated successfully, but these errors were encountered: