Add TiDB single sandbox support #54
Comments
TODO: add a flavor+capability rule to prevent deploying replication sandboxes. |
I believe it will also need to refuse to deploy if neither Edit: confirmed this bug exists. The |
I am about to commit the check that will prevent replication, or a deployment without I've noticed that when I deploy several TiDB sandboxes, the server UUID is always the same( |
Yes. TiDB traditionally has lied about variables it doesn't support. We are moving away from this behavior though, and I have proposals to cleanup sysvars and define compatibility criteria:
|
The implementation is almost finished. To complete it, I'd like to make TiDB installations compatible with MySQL, so that I can include a TiDB deployment in the functional test suite (currently I only have a mock test). What's missing for integration:
|
I have created pingcap/tidb#9362 for the port issue and assigned myself. I didn't think to use socket, but that makes sense to me. Should we also clean up the startup script to delete a stale socket file if there is no tidb-server process to match it? The alternative is to print a warning saying stale socket file. |
Cleaning up the start is a good idea. |
I think you are right - TiDB should produce a pid file. I have created pingcap/tidb#9379 to track. It touches a few more server components, so it might take 1-2 weeks to write and merge. Is that ok? |
No pressure. What’s in the current code is good enough for now. I will merge it as it is. |
I looked into this. It is not technically Please note that there is also a bug in my implementation of showing an accurate port. It will be fixed in pingcap/tidb#9383 |
This has been added to dbdeployer 1.19.0 |
Is your feature request related to a problem? Please describe.
I would like to propose
single
sandbox support for TiDB, to allow developers to easily test compatibility without having to install a full distributed system (tidb+tikv+pd).Describe the solution you'd like
TiDB can run with something called
mocktikv
(goleveldb) instead oftikv
, which means that only one server component needs to be setup. In my own testing it is 5x slower thantikv
, but the advantage is that you only need atidb-server
setup, and nopd
ortikv
.The memory footprint is smaller than MySQL, so it's possible some might even prefer it for development.
Describe alternatives you've considered
I've looked at alternatives installation methods like Homebrew etc, but they do not solve the use case of having multiple versions installed concurrently. The TiDB release schedule is every 6 months, so dbdeployer is really useful in providing a system of organizing binaries for TiDB developers.
Additional context
I have looked at the initial work, and much of it can be implemented by sandbox templates and some core changes that @datacharmer already has planned (discussed at FOSDEM). Let me try and comment in terms of each:
Core
--client-from
(or similar) Add support for --client-from=X #49lib/libmysqlclient.so
andscripts/mysql_install_db
needs to be moved into either "capabilities" or "flavors".Templates
I will send a pull request after some discussion, but my initial testing shows that the major template changes are:
TBD:
I think that these two templates can be kept vanila assuming support for
--client-from
is added:my_template
The text was updated successfully, but these errors were encountered: