pingcap / tidb

TiDB is an open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics. Try AI-powered Chat2Query free at : https://www.pingcap.com/tidb-serverless/
https://pingcap.com
Apache License 2.0
37.03k stars 5.82k forks source link

Can metadata and system tables support 5 copies ? #19902

Open shldreams opened 4 years ago

shldreams commented 4 years ago

Feature Request

Is your feature request related to a problem? Please describe: In order to prevent the loss and damage of metadata and system table data, we can set these data to 5 copies by way of Placement Rules. The key range of metadata is continuous, but the data of system tables is scattered. If we use Placement Rules to set the number of copies, many rules need to be set, which is very inconvenient to manage, and may be missed.

Describe the feature you'd like: Whether TiDB can support the function of directly setting 5 copies of metadata and system tables.

scsldb commented 4 years ago

The availability of three copies is already high, and it may be more important to backup the system table regularly than to grow the replica count.

zz-jason commented 3 years ago

The key range of metadata is continuous, but the data of system tables is scattered. If we use Placement Rules to set the number of copies, many rules need to be set, which is very inconvenient to manage, and may be missed.

IIUC, this feature request is aimed to seek an easy method to config placement rules for metadata and system table. At present, some metadata is not stored in a table. If we store all these metadata into tables and provide a list of these metadata tables, this feature request is achieved.

ilovesoup commented 3 years ago

We need to make sure we serialized all metadata in a way that placement rule can replicate easily. Some of these tables are not in a form of normal table but a special record.