Instance-based distributed data recovery method and apparatus
First Claim
1. An instance-based distributed data recovery method for a distributed data system, the distributed data system comprising a database cluster that includes at least one master node and a plurality of non-master nodes, and a distributed file system that includes a database including multiple primary storage units and multiple secondary storage units, wherein, during normal operation when the master node and the non-master nodes are all running online, the primary storage units are managed by respective ones of the plurality of non-master nodes and the multiple secondary storage units are managed by the master node, and wherein each of the multiple secondary storage units stores indexes of multiple primary storage units, and each of the multiple primary storage units stores one instance, the method comprising:
- detecting, by the master node, one of the non-master nodes going down;
allocating, by the master node, multiple secondary storage units that index multiple primary storage units managed by the non-master node that is going down to at least one online node, an online node being a non-master node that remains online;
performing, by the online node to which the multiple secondary storage units have been allocated by the master node, hash grouping on instances stored on logs of the non-master node that is going down and allocating the instances to multiple threads inside the online node; and
recovering, by the online node, data of the multiple primary storage units managed by the non-master node that is going down in parallel in the multiple threads.
4 Assignments
0 Petitions
Accused Products
Abstract
The present application discloses an instance-based distributed data recovery method. A specific implementation of the method includes: detecting a non-master down node; allocating multiple secondary storage units corresponding to the down node to at least one online node; performing hash grouping on instances stored on logs and allocating the instances to multiple threads; and recovering data of multiple primary storage units in parallel inside the online node. Embodiments of the present invention recover data of a down node in a distributed database in parallel in nodes.
1 Citation
14 Claims
-
1. An instance-based distributed data recovery method for a distributed data system, the distributed data system comprising a database cluster that includes at least one master node and a plurality of non-master nodes, and a distributed file system that includes a database including multiple primary storage units and multiple secondary storage units, wherein, during normal operation when the master node and the non-master nodes are all running online, the primary storage units are managed by respective ones of the plurality of non-master nodes and the multiple secondary storage units are managed by the master node, and wherein each of the multiple secondary storage units stores indexes of multiple primary storage units, and each of the multiple primary storage units stores one instance, the method comprising:
-
detecting, by the master node, one of the non-master nodes going down; allocating, by the master node, multiple secondary storage units that index multiple primary storage units managed by the non-master node that is going down to at least one online node, an online node being a non-master node that remains online; performing, by the online node to which the multiple secondary storage units have been allocated by the master node, hash grouping on instances stored on logs of the non-master node that is going down and allocating the instances to multiple threads inside the online node; and recovering, by the online node, data of the multiple primary storage units managed by the non-master node that is going down in parallel in the multiple threads. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A device, comprising:
-
a processor; and a memory, storing computer readable instructions thereon, the computer readable instructions when executed by the processor, causing the processor to; detect, by a master node, a non-master node that is going down; allocate, by the master node, multiple secondary storage units that index multiple primary storage units managed by the non-master node that is going down to at least one online node, an online node being a non-master node that remains online, wherein a distributed data system comprises a database cluster that includes at least one master node and a plurality of non-master nodes, and a distributed file system that includes a database including multiple primary storage units and multiple secondary storage units, wherein, during normal operation when the master node and the non-master nodes are all running online, the primary storage units are managed by respective ones of the plurality of non-master nodes and the multiple secondary storage units are managed by the master node, and wherein each of the multiple secondary storage units stores indexes of multiple primary storage units, and each of the multiple primary storage units stores one instance; perform, by the online node to which the multiple secondary storage units have been allocated by the master node, hash grouping on instances stored on logs of the non-master node that is going down and allocate the instances to multiple threads inside the online node; and recover, by the online node, data of multiple primary storage units managed by the non-master node that is going down in parallel in the multiple threads. - View Dependent Claims (9, 10, 11, 12, 13)
-
-
14. A non-transitory computer storage medium storing computer readable instructions, the computer readable instructions when executed by a processor, causing the processor to:
-
detect, by a master node, a non-master node that is going down; allocate, by the master node, multiple secondary storage units that index multiple primary storage units managed by the non-master node that is going down to at least one online node, an online node being a non-master node that remains online, wherein a distributed data system comprises a database cluster that includes at least one master node and a plurality of non-master nodes, and a distributed file system that includes a database including multiple primary storage units and multiple secondary storage units, wherein, during normal operation when the master node and the non-master nodes are all running online, the primary storage units are managed by respective ones of the plurality of non-master nodes and the multiple secondary storage units are managed by the master node, and wherein each of the multiple secondary storage units stores indexes of multiple primary storage units, and each of the multiple primary storage units stores one instance; perform, by the online node to which the multiple secondary storage units have been allocated by the master node, hash grouping on instances stored on logs of the non-master node that is going down and allocate the instances to multiple threads inside the online node; and recover, by the online node, data of multiple primary storage units managed by the non-master node that is going down in parallel in the multiple threads.
-
Specification