Search International and National Patent Collections
|1. (WO2018099397) METHOD AND DEVICE FOR DATA MIGRATION IN DATABASE CLUSTER AND STORAGE MEDIUM|
|Applicants:||TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
|Title:||METHOD AND DEVICE FOR DATA MIGRATION IN DATABASE CLUSTER AND STORAGE MEDIUM|
A method and device for data migration in a database cluster. The method comprises: acquiring a snapshot of a source data node, and according to stock data in a data shard to be migrated backed-up in the snapshot, recording incremental data in the data shard to be migrated (310); migrating the backed-up stock data to a target data node (330); migrating the recorded incremental data, and during the migration, when the incremental data not yet migrated satisfies a preset write-lock condition, instructing the source data node to perform a write-lock operation on the data shard to be migrated and migrating the incremental data not yet migrated to the target data node (350); when the migration of the incremental data is completed, instructing the coordinator node to switch the routing corresponding to the data shard to be migrated from the source data node to the target data node (370).