-
Notifications
You must be signed in to change notification settings - Fork 720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracking issue for Region Label Feature #3839
Comments
Hi @disksing , thanks for creating this tracking issue. Is there a design for this feature? I'd like to know how region label feature is integrated with region merge on top of that. |
Could you please help me to understand why region rule better than placement rule? Is it because we want to configure rules at finer granularity? Thanks. |
The detailed design is in Chinese so not linked. sorry :( Our plan is to support binding some attributes for table (or database or partition) in SQL, and these attributes will be synchronized to PD in the form of label. For example, if we define a special label called 'nomerge', after TiDB adds this keyword to the attribute, the label configuration will be synchronized to PD, and then in PD, we will be able to query the region label of |
The region label is not used to replace the placement rule, but to reinforce it. A region label is essentially a system for categorizing the data in a cluster. By setting various rules, we can classify regions based on key range / key prefix / region size. This classification information can then be easily used by other modules to handle different types of data in a special way. A powerful scenario for TiDB is to inject the mapping between key-range and DB schema into PD through region label configration, so that we actually have the ability to specialize the data belonging to different schemas in PD, and PD does not need to understand the concept of schema - -They just arbitrary labels for PD. Once we have synchronized the mapping of schema and key-range to PD, we can improve the original placement rules by allowing the original key range configuration to be changed to a region label. This way the placement rule does not need to care about the key range binding of the schema, especially when the key range of the table changes, the placement rule configuration does not need to be updated. At the same time, the placement rule will be more powerful due to the diversity of region label configurations - for example, placement policy for prefixes, specialized placement policy for small regions, specialized placement policy for hot regions. |
@rleungx I can see you create several PR against this issue, which subtask they target to? We can create a subtask issue for each and let the PR close that one. As tikv/tikv#10537 |
This issue has been finished. Close it. |
Region Label is a system that runs inside PD and is used to identify different types of Regions, based on Region Label we can bind different behaviors to different regions.
For example, by setting labels for different tables of regions, we can control some tables from being merged.
In the first phase, we will support syncing part of the schema from TiDB to PD as region labels, and use region labels to control the behavior of region merge on top of that.
Sub tasks break up:
nomerge
label to disable merge for some regions #4001The text was updated successfully, but these errors were encountered: