Log synchronization method and device, equipment and storage medium
A log and synchronized technology, applied in the database field, can solve problems such as inability to roll back data pages, incorrect switching, and affecting the running speed of the main database.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0067] figure 1 It is a flow chart of a log synchronization method provided by Embodiment 1 of the present invention. This embodiment is applicable to the case of log synchronization between the master and standby databases in a database cluster. This method can be executed by a log synchronization device. The log synchronization The device may be implemented by software and / or hardware, and the log synchronization device may be configured on a computing device, and the computing device may be composed of two or more physical entities, or may be composed of one physical entity.
[0068] It should be clarified that the log synchronization method provided in Embodiment 1 is applied to a database cluster, and the database cluster includes a master database and at least two standby databases, and the number of standby databases is an even number. A database cluster can be understood as a virtual single database logical image composed of multiple database servers, which can provide...
Embodiment 2
[0083] figure 2 It is a flow chart of a log synchronization method provided by Embodiment 2 of the present invention. The technical solution of the embodiment of the present invention is further refined on the basis of the above-mentioned optional technical solutions. The value array determines the sequence number of the log package submitted by the main library and the sequence value of the log submitted by the main library, provides a method for determining the sequence number of the log package submitted by the main library and the sequence value of the log submitted by the main library, and sets the sequence number of the log package submitted by the main library and The submitted log sequence value of the main database is carried in the log to be synchronized and sent to each standby database, so that after the standby database replays according to the log to be synchronized, it can be aligned according to the serial number of the log package submitted by the main databas...
Embodiment 3
[0154] Figure 5 It is a schematic structural diagram of a log synchronization device provided by Embodiment 3 of the present invention. The log synchronization device is applied to a database cluster, and the database cluster includes a master database and at least two backup databases, and the number of backup databases is an even number. The log synchronization device includes: a log packet generation module 31 , a replay feedback module 32 and an array update module 33 .
[0155] Wherein, the log packet generating module 31 is used for the master database to generate a log packet to be synchronized according to the array of synchronized log packet serial numbers, the array of synchronized log sequence values and the received data modification operation, and send the log packet to be synchronized to each standby database The replay feedback module 32 is used for the backup library to replay according to the received log packets to be synchronized, and after modifying the ...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


