Master-slave synchronization method and device, master server and storage medium
A master server and server technology, applied in the direction of instruments, special data processing applications, electrical digital data processing, etc., can solve the problems of low master-slave synchronization efficiency and achieve the effect of improving synchronization efficiency
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0043] Such as figure 1 As shown, the embodiment of the present invention provides a master-slave synchronization method, which is executed in the master server, such as figure 1 As shown, the method includes:
[0044] S101: Determine the ratio of the storage capacity occupied by the incremental file to the storage capacity occupied by the main database backup file;
[0045] S102: When the determined ratio meets a preset copy condition, make the slave server copy the incremental file in a preset copy buffer area according to the maximum displacement of the slave server.
[0046] The embodiment of the present invention first determines the ratio of the storage capacity occupied by the incremental file to the storage capacity occupied by the main database backup file, and then determines the relationship between the determined ratio and the preset copy condition, and only when the determined ratio meets the preset copy condition, Make the slave server copy the incremental file in the p...
Embodiment 2
[0055] The embodiment of the present invention provides a master-slave synchronization method. Specifically, the embodiment of the present invention provides a method for selecting incremental replication and full replication. In the embodiment of the present invention, the method first determines whether the maximum displacement of the slave server is in the Copy the buffer area, if it is not, then perform full copy, if it is, then further select incremental copy and full copy.
[0056] In the embodiment of the present invention, incremental copy means copy from the copy buffer area, and full copy means copy of the backup file of the main database.
[0057] The embodiment of the present invention improves S101 of the first embodiment, that is, the ratio of the storage capacity occupied by the incremental file to the storage capacity occupied by the main database backup file may include:
[0058] Receiving the synchronization request from the slave server;
[0059] If it is determined...
Embodiment 3
[0071] The embodiment of the present invention provides a master-slave synchronization method. Specifically, on the basis of Embodiment 1, the embodiment of the present invention provides a method for determining the storage capacity of an incremental file, that is, the determined incremental file Before the ratio of the occupied storage capacity to the storage capacity occupied by the main database backup file, it can include:
[0072] The storage capacity of the incremental file is determined according to the writing rate and the writing time of the incremental file written to the copy buffer area.
[0073] For example, multiply the write rate and the write time to obtain the storage capacity of the incremental file.
[0074] In the embodiment of the present invention, the storage capacity of the incremental file is determined by the write rate and the write time, and the determination method is quick and efficient, which further improves the efficiency of master-slave synchronizat...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com