Mention of “open source project TiDB” leads to a common reaction: It has more than 17,000 STARS on GitHub and boasts 260+ fCN3 positions around the world. But the data is always cold and does not vividly show the charm of the TiDB community. So today, I would like to introduce du Chuan, TiDB contributor’s “heart journey” before and after he joined TiDB community. He tells you from the perspective of his own experience —
- Is PingCAPer nice enough?
- How does active participation in the TiDB community help you improve your skills?
- How to find the most suitable place to land on TiDB? (Or find your favorite “branch” in the tree HHHHHH)
- And… You can also give TiDB 70 PR a year by making good use of shard time!
🚀 Author: Du Chuan, TiDB Contributor
In recent years, I have been submitting some changes to TiDB intermittently. A couple of days ago, I checked some GitHub submission records and found that the total number of PR has reached 70. Considering that we have been working overtime crazily in recent year, and have basically finished the reading list of the top ten books in our spare time, I think this is a modest achievement and worthy of Mark’s recognition.
Anyway, although I only started to submit PR to TiDB in the middle of 2017, I actually heard about TiDB more than a year ago, around April 2016. At that time, my main job was also a SQL execution engine, so I paid close attention to news related to distributed database industry.
Although the database is a high-incidence field of wheels, all kinds of wheels are varied, but in China, the database, especially the wheel of distributed database, is basically a few big factories in the car, either not open source, or open source community is not very active. The idea of building a distributed database from scratch in a completely open source way, like TiDB, really impressed me. Later, one of my team members left for PingCAP, and I participated in several offline meetups of TiDB in the name of the group, and I got to know many friends in the TiDB community.
After I came back to Chengdu from Beijing at the end of 2016, my focus of work changed from doing infra to facing more business demands. However, after doing infra for several years, I am still very interested in database kernel, so in my spare time, I began to study the implementation of TiDB, and built a set of TiDB to replace MySQL in the development environment. As we all know, MySQL after years of development, its SQL syntax is relatively complex. Although TiDB is fully compatible with MySQL syntax and protocol, but because there is no reuse of MySQL code, it is impossible to achieve 100% compatibility, implementation of some specific statements, and MySQL will certainly have some differences. Because I have been doing the SQL engine development of OLAP system before, I am quite familiar with this area. After meeting this problem, I feel it is not very troublesome to solve it, so I gradually began to give SOME PR to TiDB in this aspect. After getting familiar with it in the future, I will also go to the Issue list of TiDB to solve related issues if I have time, mainly focusing on SQL Parser, expression calculation, MySQL compatibility and other aspects. Recently, I found time to do some features related to aggregation function.
Since I am still busy at work and working overtime is common, I submit PR and reply Review opinions to TiDB on weekends, after my wife goes to bed at night, or during lunch break. One problem is that the time period is relatively discrete, and it is difficult to have a long time for coherent thinking. Therefore, at the present stage, on the one hand, I will choose some relatively small and independent features when PROPOSING PR. On the other hand, I try to focus my development on weekends when I have plenty of time, using evenings and other spare moments to Review and respond to reviews, Update code, and run regression tests. That works out to an average of three to five man-hours per PR submission, including development, testing, and communication with community partners.
But this time I think is very worthwhile, because I am very interested in itself to the database, the participation TiDB community development as a kind of interest, can be seen as the work of a kind of relaxed, 2 it is I have been engaged in the related work of database including OLAP engine runtime SQL optimization related work before, The work that’s going on with cloud databases today is really tied to what you’re doing in the community. For example, how a MySQL Builtin function behaves under various extreme inputs, or how various combinations of SQL_MODE affect the behavior of the Builtin function, these questions may be difficult for me to consider thoroughly in my daily work. But in order to propose a PR to implement the Builtin function in the community, I had to think about these problems clearly and go through various cases bombarded by the community partners. By the time the PR was committed, I knew the details by heart.
Speaking of communities, I think TiDB is doing a pretty good job. On the one hand, PingCAPers are very active. An Issue raised on GitHub can usually get a reply quickly. If you have any questions, you can get feedback through GitHub, wechat group or even Zhihu questions. On the other hand, it is more important for community partners to maintain a rigorous attitude during Review PR.
As far as my experience is concerned, some Corner cases and detail errors that I did not notice in the development process can be basically turned out in the Review PR process. This requires not only a clear explanation of relevant details of the corresponding features of PR, but also a construction of potentially problematic scenes. A Reviewer will also be required to understand the PR author’s development thinking. The effort involved is often no less than developing the Feature itself. In addition, TiDB has devoted a lot of attention to the construction of a series of test frameworks from UT and FT to integration test, which makes it easier for me to test the features I developed in various directions during the development project, saving a lot of trouble to go back and forth.
Overall, participating in the TiDB community has been very interesting and rewarding for me, and I will continue to follow the progress of the TiDB project. In the short term, MY plan is mainly to find time to complete some features related to aggregation functions at hand, including support for MySQL aggregation functions STDDEV and VARIANCE, as well as corresponding changes in TiKV Coprocessor. After that, I plan to see if I can combine my previous experience in runtime optimization of the OLAP SQL engine with TiDB’s capabilities in the OLAP space. However, this is a relatively large goal, when the time comes to discuss with the community partners.
TiDB community event
TiDB TechDay2018 will be held in Shenzhen on July 28th, registration has been fully booked, we will see you on Saturday! Click here for details of the event. Welcome to join TiDB Robot