TiDB Operator Source Code Reading (V): Backup and Restore

In our last article, we learned how to implement a component control loop in TiDB Operator. This time, I’ll move on to a new but important topic: backup and restore.

Backup and restore are two of the most important and frequently used operations when you maintain a database. To ensure data safety, database maintainers usually need a set of scripts that automatically back up the data and recover the dataset when data is corrupted. A well-designed backup and restore platform should allow you to:

TiDB Operator Source Code Reading (Part 4): Implementing a Component Control Loop

In our last article, we introduced how TiDB Operator orchestrates control loop events to manage the lifecycles of TiDB components. The TidbCluster controller manages TiDB components' lifecycles, and the member manager of each TiDB component encapsulates that component's specific management logic.

In this post, I'll explain in detail how we implement a component control loop by taking PD as an example. You'll learn about the PD member manager and its lifecycle management operations. I'll also compare other components with PD and show their differences.