摘要 |
<p>The present invention discloses a distributed database synchronization method and system. A distributed database includes a master server cluster and a backup server cluster, where the master server cluster includes a first master node and a second master node, and the backup server cluster includes a first backup node and a second backup node. The method includes: generating a hash tree of the master server cluster and a hash tree of the backup server cluster; determining a range hash tree of the second master node and a range hash tree of the second backup node that have inconsistent range hash values; determining a data unit to be synchronized in the second master node and a data unit to be synchronized in the second backup node; and performing data synchronization. In the present invention, because data units to be synchronized can be determined separately in each node, it can be achieved that data units to be synchronized are determined separately and simultaneously in multiple nodes, thereby saving time required for data consistency check, and further improving efficiency of data synchronization.</p> |