| CPC G06F 16/2282 (2019.01) [G06F 16/278 (2019.01)] | 17 Claims |

|
1. A data processing method for an electronic device, comprising:
obtaining data rebalance information representing a new partition plan for a partition table, the partition table being a table for data distribution based on a partition key;
creating, for a set specified in the partition plan, a corresponding partition space, and recording, in the corresponding partition space, a current data range of a set corresponding to the partition space, the data range comprising one of a value range of the partition key and a value list of the partition key;
updating the data range recorded in the corresponding partition space based on the partition plan, and updating correspondence between the corresponding partition space and sets of the partition table by using the updated data range in the corresponding partition space; and
updating data distribution in the sets of the partition table based on the correspondence,
wherein the updating the data range recorded in the corresponding partition space based on the partition plan, and updating correspondence between the corresponding partition space and sets of the partition table by using the updated data range in the corresponding partition space comprises:
determining a new data range of the set in the partition table based on the partition plan;
updating, based on the new data range of the set, the data range recorded in the partition space corresponding to the set;
determining, based on the updated data range in the corresponding partition space, data of a to-be-changed set among the sets corresponding to the corresponding partition space, and creating a new set for the data of the to-be-changed set among the sets; and
determining a correspondence between the created set corresponding to the data of the to-be-changed set and the partition space, and determining a data range of the set corresponding to the data of the to-be-changed set.
|