# Online DDL Related Modules

![`smart`](OnlineDDLRelatedModules_aa_002_20220509.png)

------------------------------------------------------------
TiDB supports online DDL, that is, DDL operations do not lock tables.

The entire TiDB cluster allows only one TiDB server to perform DDL operations at the same time. Every TiDB server has a `Worker` module that handles DDL operations and is enabled only if the current TiDB server role is `Owner`.

If you have more than one TiDB server in your TiDB cluster, then these TiDB servers will take turns to become the `Owner` role according to a fixed time (by election). When a TiDB server is the `Owner` role, its `Worker` module can then handle DDL operations.

The current `Owner` role information of the cluster is stored in PD, and the `Woker` module can check whether the TiDB server in which it is located is currently the `Owner` role. When the term of `Owner` expires, PD will initiate the election for a new `Owner`.

In addition to the `Worker` module, there is also a `Load Schema` module, which is used to load the latest schema information after the current TiDB server becomes the `Owner` role, so that the TiDB server with the current `Owner` role has the latest schema information.

Finally, the `Start Job` module is responsible for receiving DDL request and assigning unique ID to DDL operations. Here we call each DDL operation with an assigned ID a job. The `Start Job` module will put the job to the job queue in TiKV cluster.