Data migration method and apparatus, device, distributed system and storage medium
AssigneeAlibaba Cloud Computing Ltd.
InventorsYanxin Luo, Feifei Li, Wei Cao
Life of this patent
Estimating the term…
Abstract
A data migration method and apparatus, a device, a distributed system and a storage medium are provided. Said method is applied to each data node in a distributed system comprising a plurality of data nodes. Said method comprises: determining, in a current data migration task, a table to be migrated of a current node, and a target data node (S101); and writing incremental data in the table to be migrated into the table to be migrated, and a target data table of the target data node, the incremental data being data obtained by performing, after the data migration task is started, a change operation on data in the table to be migrated (S102).
Claims18
A data migration method, applied to each data node of a plurality of data nodes comprised in a distributed system, wherein the method comprises:
- determining a target data node and a table to be migrated of a present data node for a present data migration task;
- determining a migration state of the table to be migrated as a first state, wherein the first state indicates that a double write operation is performed on incremental data;
- synchronizing state information indicating the first state with the target data node, so that the target data node determines a migration state of a target data table of the target data node as the first state;
- and
- writing, to the target data table of the target data node and the table to be migrated of the present data node, the incremental data for the table to be migrated under the first state of both the table to be migrated and the target data table by using the double write operation, such that a change operation on the table to be migrated is performed in both the table to be migrated of the present data node and the target data table of the target data node, wherein the incremental data is data obtained by performing, after both the migration state of the table to be migrated and the migration state of the target data table are determined as the first state, the change operation on data in the table to be migrated.
A data migration apparatus, applied to each data node of a plurality of data nodes comprised in a distributed system, wherein the apparatus comprises:
- at least one processor;
- and
- a memory communicatively connected with the at least one processor,
- wherein the memory stores instructions executable by the at least one processor, and the instructions, when executed by the at least one processor, cause the at least one processor to perform operations of:
- determining a target data node and a table to be migrated of a present data node for a present data migration task;
- determining a migration state of the table to be migrated as a first state, wherein the first state indicates that a double write operation is performed on incremental data;
- synchronizing state information indicating the first state with the target data node, so that the target data node determines a migration state of a target data table of the target data node as the first state;
- and
- writing, to the target data table of the target data node and the table to be migrated of the present data node, the incremental data for the table to be migrated under the first state of both the table to be migrated and the target data table by using the double write operation, such that a change operation on the table to be migrated is performed in both the table to be migrated of the present data node and the target data table of the target data node, wherein the incremental data is data obtained by performing, after both the migration state of the table to be migrated and the migration state of the target data table are determined as the first state, the change operation on data in the table to be migrated.
A distributed system comprising a plurality of data nodes, wherein each data node of the plurality of data nodes is a computer device comprising a memory, a processor, and a computer program which is stored in the memory and is run on the processor, wherein the processor of each computer device, when executing the computer program, implements operations of:
- determining a target data node and a table to be migrated of a present data node for a present data migration task;
- determining a migration state of the table to be migrated as a first state, wherein the first state indicates that a double write operation is performed on incremental data;
- synchronizing state information indicating the first state with the target data node, so that the target data node determines a migration state of a target data table of the target data node as the first state;
- and
- writing, to the target data table of the target data node and the table to be migrated of the present data node, the incremental data for the table to be migrated under the first state of both the table to be migrated and the target data table by using the double write operation, such that a change operation on the table to be migrated is performed in both the table to be migrated of the present data node and the target data table of the target data node, wherein the incremental data is data obtained by performing, after both the migration state of the table to be migrated and the migration state of the target data table are determined as the first state, the change operation on data in the table to be migrated.
Dependencies are inferred from the claim text.